Knitro options

Knitro has a great number and variety of user option settings and although it tries to choose the best settings by default, often significant performance improvements can be realized by choosing some non-default option settings.

For information on how to set options in various interfaces, see the Setting options section of the User Guide.

Index

User options are defined in the knitro.h and summarized in the following index. To see a more detailed description of an individual option and its possible values click on the option name. The importance of each option is related to its category (General, Derivatives, etc…), 1 being the most important parameters.

General options

Option name

Importance

Purpose

blasoption

2

Specifies the BLAS/LAPACK function library to use for basic vector and matrix computations.

blasoptionlib

3

Specifies a dynamic library name that contains object code for BLAS/LAPACK functions.

bndrange

3

Specifies max limits on the magnitude of constraint and variable bounds.

cg_maxit

2

Determines the maximum allowable number of inner conjugate gradient (CG) iterations per Knitro minor iteration.

cg_pmem

3

Specifies the amount of nonzero elements per column of the Hessian of the Lagrangian which are retained when computing the incomplete Cholesky preconditioner.

cg_precond

2

Specifies whether an incomplete Cholesky preconditioner is applied during CG iterations in barrier algorithms.

cg_stoptol

3

Specifies the relative stopping tolerance used for the conjugate gradient (CG) subproblem solves.

convex

1

Declare the problem as convex by setting KN_CONVEX_YES or non-convex by setting KN_CONVEX_NO.

cpuplatform

2

This option can be used to specify the target instruction set architecture for the machine on which Knitro is running.

datacheck

2

Specifies whether to perform more extensive data checks to look for errors in the problem input to Knitro (in particular, this option looks for errors in the sparse Jacobian and/or sparse Hessian structure).

delta

3

Specifies the initial trust region radius scaling factor used to determine the initial trust region size.

deterministic

1

This option specifies whether to always enforce deterministic behavior for Knitro.

eval_cost

1

Use this option to tell Knitro the relative cost of performing a callback.

eval_fcga

3

Use this option to tell Knitro that you are providing the first derivatives in the same callback routine used for your function evaluations.

honorbnds

1

Indicates whether or not to enforce satisfaction of simple variable bounds throughout the optimization.

initpenalty

3

Specifies the initial penalty parameter used in the Knitro merit functions.

initpt_strategy

1

Specifies the initial point strategy used for the continuous algorithms.

initptfile

3

Specifies a file from which to read the initial point used for the Knitro algorithms.

linesearch

2

Indicates which linesearch strategy to use for the Interior/Direct or SQP algorithm to search for a new acceptable iterate.

linesearch_maxtrials

3

Indicates the maximum allowable number of trial points during the linesearch of the Interior/Direct or SQP algorithm before treating the linesearch step as a failure and generating a new step.

linsolver

1

Indicates which linear solver to use to solve linear systems arising in Knitro algorithms.

linsolver_maxitref

3

Indicates the maximum allowable number of iterative refinement steps applied when a linear system is solved inside Knitro.

linsolver_nodeamalg

3

Controls the node amalgamation setting for the MA57, MA86 and MA97 linear solvers.

linsolver_ooc

3

Indicates whether to use Intel MKL PARDISO out-of-core solve of linear systems when linsolver = mklpardiso.

linsolver_ordering

2

Sets the ordering method used for the linear system solver.

linsolver_pivottol

3

Specifies the initial pivot threshold used in factorization routines.

linsolver_scaling

2

Enables scaling for the linear system solver.

lp_algorithm

1

Indicates which algorithm to use to solve linear problems (LPs).

maxstepsize

2

This option enforces a maximum step size limit at every iteration of the continuous NLP algorithms in Knitro (as well as the barrier LP algorithm).

maxstepsize_maxit

3

This option specifies the maximum number of iterations where the maxstepsize restriction is enforced (if 0 then no iteration limit is imposed for this).

ncvx_qcqp_init

2

Specifies the initialization strategy used for non-convex QPs and QCQPs.

nlp_algorithm

1

Indicates which algorithm to use to solve nonlinear problems (e.g. NLPs, QPs, QCQPs)

objrange

3

Specifies the extreme limits of the objective function for purposes of determining unboundedness.

restarts

2

Specifies whether or not to enable automatic restarts in Knitro.

restarts_maxit

3

When restarts are enabled, this option can be used to specify a maximum number of iterations before enforcing a restart.

scale

1

Specifies whether to perform problem scaling of the objective function, constraint functions, or possibly variables.

scale_strategy

2

Strategies for problem scaling. Multiple strategies can be selected at once using multiple bits.

soc

3

Specifies whether or not to try second order corrections (SOC).

soltype

2

This option specifies the solution returned by Knitro.

strat_warm_start

2

Specifies whether or not to invoke a warm-start strategy.

Derivatives options

Option name

Importance

Purpose

bfgs_scaling

2

Specify the initial scaling to use for the BFGS or L-BFGS Hessian approximation.

derivcheck

1

Determine whether or not to perform a derivative check

derivcheck_terminate

3

Determine whether to always terminate after the derivative check or only when the derivative checker detects a possible error.

derivcheck_tol

3

Specifies the relative tolerance used for detecting derivative errors, when the Knitro derivative checker is enabled.

derivcheck_type

3

Specifies whether to use forward or central finite differencing for the derivative checker when it is enabled.

findiff_estnoise

2

This option can be used to enable an estimate of the noise in the model when using finite-difference gradients.

findiff_relstepsize

2

Specifies the relative stepsize used for finite-difference gradients during the optimization.

gradopt

1

Specifies how to compute the gradients of the objective and constraint functions.

hessian_no_f

3

Determines whether or not to allow Knitro to request Hessian (or Hessian-vector product) evaluations without the objective component included.

hessopt

1

Specifies how to compute the (approximate) Hessian of the Lagrangian.

lmsize

2

Specifies the number of limited memory pairs stored when approximating the Hessian using the limited-memory quasi-Newton BFGS option.

Termination options

Option name

Importance

Purpose

feaserr_level

2

This option specifies the feasibility error measure used at the algorithm level and for termination.

feastol

1

Specifies the final relative stopping tolerance for the feasibility error.

feastol_abs

1

Specifies the final absolute stopping tolerance for the feasibility error.

findiff_terminate

2

This option specifies the termination criteria when using finite-difference gradients.

fstopval

2

Used to implement a custom stopping condition based on the objective function value.

ftol

2

The optimization process will terminate if the relative change in the objective function is less than ftol for ftol_iters consecutive feasible iterations.

ftol_iters

3

The optimization process will terminate if the relative change in the objective function is less than ftol for ftol_iters consecutive feasible iterations.

infeastol

2

Specifies the (relative) tolerance used for declaring infeasibility of a model.

infeastol_iters

3

Controls the termination for consecutive infeasible iterations.

maxfevals

2

Specifies the maximum number of function evaluations before termination.

maxit

1

Specifies the maximum number of iterations before termination.

maxtime

1

Specifies, in seconds, the maximum allowable real time before termination.

opttol

1

Specifies the final relative stopping tolerance for the KKT (optimality) error.

opttol_abs

1

Specifies the final absolute stopping tolerance for the KKT (optimality) error.

xtol

1

Tolerance for convergence criterion based on relative change between successive solution points.

xtol_iters

3

Number of iterations for convergence criterion based on relative change between successive solution points.

Presolve options

Option name

Importance

Purpose

presolve

1

Determine whether or not to use the Knitro presolver to try to simplify the model by removing variables or constraints.

presolve_initpt

2

Control whether the Knitro presolver can shift a user-supplied initial point.

presolve_level

2

Set the level of presolve operations to enable through the Knitro presolver.

presolve_passes

2

Set a maximum limit on the number of passes through the Knitro presolve operations.

presolve_tol

3

Determines the tolerance used by the Knitro presolver to remove variables and constraints from the model.

presolve_zero_tol

2

Tolerance for rounding to zero linear coefficients in presolve. Higher values mean that more reductions will be applied. Zero value is not recommended as it means no rounding is done, which can lead to numerical instability.

presolveop_clique_merging

2

Determine whether or not to enable the Knitro presolve operations that attempt to merge cliques to strengthen the formulation.

presolveop_implied_mpec

3

Transforms quadratic constraints into MPEC constraints.

presolveop_probing

2

Determine whether or not to enable the Knitro presolve operations that analyze deductions made by fixing integer variables.

presolveop_redundant

2

Determine whether or not to enable the Knitro presolve operation to detect and remove redundant constraints.

presolveop_substitution

2

Determine whether or not to enable the Knitro presolve operation to substitute out variables when possible.

presolveop_substitution_tol

3

Tolerance for applying a substitution.

presolveop_tighten

2

Determine whether or not to enable the Knitro presolve operation to tighten variable bounds or coefficients.

Barrier options

Option name

Importance

Purpose

bar_conic_enable

1

Enable special treatments for conic constraints.

bar_directinterval

1

Controls the maximum number of consecutive conjugate gradient (CG) steps before Knitro will try to enforce that a step is taken using direct linear algebra.

bar_feasible

1

Specifies whether special emphasis is placed on getting and staying feasible in the interior-point algorithms.

bar_feasmodetol

3

Tolerance used in the feasibility condition that determines whether Knitro will force subsequent iterates to remain feasible.

bar_globalize

2

Specifies the globalization strategy used in the interior-point algorithms.

bar_initmu

2

Specifies the initial value for the barrier parameter $mu$ used with the barrier algorithms.

bar_initpi_mpec

3

Specifies the initial value for the MPEC penalty parameter $pi$ used when solving problems with complementarity constraints using the barrier algorithms.

bar_initpt

2

Indicates initial point strategy for x, slacks and multipliers when using a barrier algorithm.

bar_linsys

2

Indicates which linear system form is used inside the Interior/Direct algorithm for computing primal-dual steps.

bar_linsys_storage

2

Indicates how to store in memory the linear systems used inside the Interior/Direct algorithm for computing primal-dual steps.

bar_maxcorrectors

2

Specifies the maximum number of corrector steps allowed for primal-dual steps.

bar_maxcrossit

3

Specifies the maximum number of crossover iterations before termination.

bar_maxmu

3

Specifies the maximum allowable value for the barrier parameter $mu$ used with the barrier algorithms.

bar_maxrefactor

3

Indicates the maximum number of refactorizations of the KKT system per iteration of the Interior/Direct algorithm before reverting to a CG step.

bar_mpec_heuristic

3

Specifies whether or not to use a heuristic approach when solving MPEC models with the barrier algorithm.

bar_murule

1

Indicates which strategy to use for modifying the barrier parameter $mu$ in the barrier algorithms.

bar_penaltycons

2

Indicates whether a penalty approach is applied to the constraints.

bar_penaltyrule

3

Indicates which penalty parameter strategy to use for determining whether or not to accept a trial iterate.

bar_refinement

3

Specifies whether to try to refine the barrier solution for better precision.

bar_relaxcons

2

Indicates whether a relaxation approach is applied to the constraints.

bar_slackboundpush

3

Specifies the amount by which the barrier slack variables are initially pushed inside the bounds.

bar_switchobj

3

Indicates which objective function to use when the barrier algorithms switch to a pure feasibility phase.

bar_switchrule

3

Indicates whether or not the barrier algorithms will allow switching from an optimality phase to a pure feasibility phase.

bar_watchdog

3

Specifies whether to enable watchdog heuristic for barrier algorithms.

Active-Set options

Option name

Importance

Purpose

act_lpalg

3

Indicates which algorithm to use to solve linear programming (LP) subproblems when using the Knitro Active Set or SQP algorithms.

act_lpfeastol

3

Specifies the feasibility tolerance used for linear programming subproblems solved when using the Active Set or SQP algorithms.

act_lppenalty

1

Indicates whether to use a penalty formulation for linear programming subproblems in the Knitro Active Set or SQP algorithms.

act_lppresolve

3

Indicates whether to apply a presolve for linear programming subproblems in the Knitro Active Set or SQP algorithms.

act_lpsolver

1

Indicates which linear programming simplex solver the Knitro Active Set or SQP algorithms use when solving internal LP subproblems.

act_parametric

2

Indicates whether to use a parametric approach when solving linear programming (LP) subproblems when using the Knitro Active Set or SQP algorithms.

act_qpalg

1

Indicates which algorithm to use to solve quadratic programming (QP) subproblems when using the Knitro Active Set or SQP algorithms.

act_qppenalty

2

Indicates whether to use a penalty formulation for quadratic programming subproblems in the Knitro SQP algorithm.

cplexlibname

3

See option act_lpsolver.

xpresslibname

3

See option act_lpsolver.

Augmented Lagrangian options

Option name

Importance

Purpose

al_initpenalty

2

Specifies the initial penalty parameter value used in the Augmented Lagrangian (AL) algorithm.

al_maxpenalty

2

Specifies the maximum allowable penalty parameter value used in the Augmented Lagrangian (AL) algorithm.

MIP options

Option name

Importance

Purpose

mip_branchrule

1

Specifies which branching rule to use for MIP branch and bound procedure.

mip_clique

2

Specifies rules for adding clique cuts.

mip_cut_flowcover

2

Specifies rules for adding flow cover cuts.

mip_cut_probing

2

Specifies rules for adding probing cuts.

mip_cutfactor

2

This value specifies a limit on the number of cuts added to a node subproblem.

mip_cutoff

3

This value specifies the objective cutoff value for MIP.

mip_cutoff_abs

2

This value specifies the absolute improvement cutoff value for MIP.

mip_cutoff_rel

2

This value specifies the relative improvement cutoff value for MIP.

mip_cutting_plane

2

Specifies when to apply the cutting plane procedure.

mip_debug

2

Specifies debugging level for MIP solution.

mip_gomory

1

Specifies rules for adding Gomory mixed-integer cuts.

mip_gub_branch

3

Specifies whether or not to branch on generalized upper bounds (GUBs).

mip_heuristic_diving

1

Specifies whether or not to enable the MIP diving heuristic.

mip_heuristic_feaspump

1

Specifies whether or not to enable the MIP feasibility pump heuristic.

mip_heuristic_fixpropagate

2

Specifies whether or not to enable the MIP fix-and-propagate heuristic.

mip_heuristic_lns

2

Specifies whether or not to enable the MIP large neighborhood search (LNS) heuristics.

mip_heuristic_localsearch

1

Specifies whether or not to enable the MIP local search heuristic.

mip_heuristic_maxit

2

Maximum number of iterations to allow for MIP heuristic.

mip_heuristic_misqp

3

Specifies whether or not to enable the MIP MISQP heuristic.

mip_heuristic_mpec

1

Specifies whether or not to enable the MIP MPEC heuristic.

mip_heuristic_strategy

1

Specifies the level of effort applied for the MIP heuristic search used to try to find an initial integer feasible point.

mip_heuristic_terminate

2

Specifies the condition for terminating the MIP heuristic.

mip_implications

2

Whether to add logical implications deduced from branching decisions at a MIP node.

mip_initptfile

3

Name for the file from which to read the MIP initial point.

mip_integer_tol

3

This value specifies the threshold for deciding whether or not a variable is determined to be an integer.

mip_intvar_strategy

2

Specifies how to handle integer variables.

mip_knapsack

2

Specifies rules for adding MIP knapsack cuts.

mip_liftproject

2

Specifies rules for adding lift and project cuts.

mip_maxnodes

2

Specifies the maximum number of nodes explored (0 means no limit).

mip_method

1

Specifies which MIP method to use.

mip_mir

2

Specifies rules for adding mixed-integer rounding (MIR) cuts.

mip_multistart

3

Use to enable MIP multi-start at the branch-and-bound level.

mip_node_lpalg

1

Specifies which algorithm to use for standard node LP subproblem solves in MIP (same options as lp_algorithm user option).

mip_node_nlpalg

1

Specifies which algorithm to use for standard node NLP subproblem solves in MIP (same options as nlp_algorithm user option).

mip_numthreads

1

Number of threads to use for MIP solvers.

mip_opt_gap_abs

1

The absolute optimality gap stop tolerance for MIP.

mip_opt_gap_rel

1

The relative optimality gap stop tolerance for MIP.

mip_outinterval

1

Specifies node printing interval for mip_outlevel when mip_outlevel > 0.

mip_outlevel

1

Specifies how much MIP information to print.

mip_outsub

3

Specifies MIP subproblem solve debug output control.

mip_pseudoinit

3

Specifies the method used to initialize pseudo-costs corresponding to variables that have not yet been branched on in the MIP method.

mip_relaxable

2

Specifies whether integer variables are relaxable.

mip_restart

2

Specifies whether to enable the MIP restart procedure.

mip_root_lpalg

1

Specifies which algorithm to use for root node LP subproblem solves in MIP (same options as lp_algorithm user option).

mip_root_nlpalg

2

Specifies which algorithm to use for root node NLP solves in MIP (same options as nlp_algorithm user option).

mip_rounding

2

Specifies the MIP rounding rule to apply.

mip_selectdir

2

Specifies the MIP node selection direction rule (for tiebreakers) for choosing the next node in the branch-and-bound tree.

mip_selectrule

1

Specifies the MIP select rule for choosing the next node in the branch-and-bound tree.

mip_strong_candlim

3

Specifies the maximum number of candidates to explore for MIP strong branching.

mip_strong_level

3

Specifies the maximum number of tree levels on which to perform MIP strong branching.

mip_strong_maxit

3

Specifies the maximum number of iterations to allow for MIP strong branching solves.

mip_sub_maxtime

3

Specifies the maximum allowable real time in seconds for MIP node subproblems.

mip_terminate

1

Specifies conditions for terminating the MIP algorithm.

mip_zerohalf

2

Specifies rules for adding zero-half cuts.

Concurrent solver options

Option name

Importance

Purpose

concurrent_lpalg

2

Specifies the LP algorithms to run concurrently when the concurrent solver is enabled on an LP.

concurrent_maxsolves

2

Specifies the maximum number of solves when using the concurrent solver (should be more than 1 and <= numthreads).

concurrent_nlpalg

2

Specifies the NLP algorithms to run concurrently when the concurrent solver is enabled on an NLP.

concurrent_outlog

3

Specifies the output logging options when the concurrent solver is enabled.

concurrent_solver

1

Specifies whether or not to enable the concurrent solver.

Multi-start options

Option name

Importance

Purpose

ms_enable

1

Whether to enable multistart to find a better local minimum.

ms_initpt_cluster

3

The strategy for clustering initial points in multi-start.

ms_maxbndrange

2

Specifies the maximum range that an unbounded variable can vary over when multistart computes new start points.

ms_maxsolves

1

How many Knitro solutions to compute if multistart is enabled.

ms_num_to_save

2

How many feasible multistart points to save in file knitro_mspoints.log.

ms_numthreads

1

Number of threads to use in parallel multistart.

ms_outsub

2

Enable writing algorithm output to files for the parallel multi-start procedure.

ms_savetol

2

Specifies the tolerance for deciding two feasible points are the same.

ms_seed

2

Seed value used to generate random initial points in multi-start; should be a non-negative integer.

ms_startptrange

1

Specifies the maximum range that any variable can vary over when multistart computes new start points.

ms_sub_maxtime

3

Specifies, in seconds, the maximum allowable real time for multi-start subproblems.

ms_terminate

1

Specifies conditions for terminating the multistart procedure.

ms_terminaterule_tol

1

The tolerance in (0,1] for the rule-based termination of multi-start.

Parallelism options

Option name

Importance

Purpose

blas_numthreads

2

Specify the number of threads to use for BLAS operations when blasoption = 1

concurrent_evals

1

Determines whether or not the user provided callback functions used for function and derivative evaluations can take place concurrently in parallel (for possibly different values of x).

conic_numthreads

2

Number of threads to do conic operations in parallel. Choose any positive integer, or 0 = determine automatically based on numthreads

findiff_numthreads

2

Number of threads to use in finite-differencing.

linsolver_numthreads

2

Specify the number of threads to use for linear system solve operations when linsolver = 6.

numthreads

1

Specify the number of threads to use for parallel computing features.

Output options

Option name

Importance

Purpose

debug

2

Controls the level of debugging output.

newpoint

2

Specifies additional action to take after every iteration in a solve of a continuous problem, or after every new incumbent of the NLPBB algorithm.

out_csvinfo

3

Controls whether or not to generate a file knitro_solve.csv containing solve information in comma separated format.

out_csvname

3

Use to specify a custom csv filename when using out_csvinfo.

out_hints

2

Specifies whether to print diagnostic hints (e.g. about user option settings) after solving.

outappend

2

Specifies whether output should be started in a new file, or appended to existing files.

outdir

2

Specifies a single directory as the location to write all output files.

outlev

1

Controls the level of output produced by Knitro.

outmode

1

Specifies where to direct the output from Knitro.

outname

2

Use to specify a custom filename when output is written to a file using outmode.

Tuner options

Option name

Importance

Purpose

tuner

1

Indicates whether to invoke the Knitro-Tuner.

tuner_optionsfile

1

Can be used to specify the location of a Tuner options file.

tuner_outsub

2

Enable writing additional Tuner subproblem solve output to files for the Knitro-Tuner procedure (tuner = 1).

tuner_sub_maxtime

3

Specifies, in seconds, the maximum allowable real time for Knitro-Tuner subproblems (i.e. individual solves with a particular option setting).

tuner_terminate

1

Define the termination condition for the Knitro-Tuner procedure (tuner = 1).

General options

blasoption

Specifies the BLAS/LAPACK function library to use for basic vector and matrix computations.

Details

BLAS and LAPACK functions from Intel Math Kernel Library (MKL) are provided with the Knitro distribution. The number of threads to use for the MKL BLAS are specified with blas_numthreads. On platforms where Intel MKL and Apple Accelerate are not available, the Knitro built-in functions are used by default.

BLAS (Basic Linear Algebra Subroutines) and LAPACK (Linear Algebra PACKage) functions are used throughout Knitro for fundamental vector and matrix calculations. The CPU time spent in these operations can be measured by setting option debug = 1 and examining the output file kdbg_profile*.txt. Some optimization problems are observed to spend very little CPU time in BLAS/LAPACK operations, while others spend more than 50%. Be aware that the different function implementations can return slightly different answers due to roundoff errors in double precision arithmetic. Thus, changing the value of blasoption sometimes alters the iterates generated by Knitro, or even the final solution point.

The knitro option uses built-in BLAS/LAPACK functions based on standard netlib routines (www.netlib.org). The intel option uses MKL functions written especially for x86 and x86_64 processor architectures. On a machine running an Intel processor, testing indicates that the MKL functions can significantly reduce the CPU time in BLAS/LAPACK operations. The dynamic option allows users to load any library that implements the functions declared in the file include/blas_lapack.h. Specify the library name with option blasoptionlib.

Name

blasoption

API constant

KN_PARAM_BLASOPTION

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_BLASOPTION_AUTO

Let Knitro automatically choose which BLAS to use

0

knitro

KN_BLASOPTION_KNITRO

Use Knitro built-in functions

1

intel

KN_BLASOPTION_INTEL

Use Intel Math Kernel Library (MKL) functions on available platforms.

2

dynamic

KN_BLASOPTION_DYNAMIC

Use the dynamic library specified with option blasoptionlib

3

blis

KN_BLASOPTION_BLIS

Use BLIS functions on available platforms (currently not available on Windows OS).

4

apple

KN_BLASOPTION_APPLE

Use Apple Accelerate (only available on Mac with M1 processor).

blasoptionlib

Specifies a dynamic library name that contains object code for BLAS/LAPACK functions.

Details

The library must implement all the functions declared in the file include/blas_lapack.h.

This option has no effect unless blasoption = 2.

Name

blasoptionlib

API constant

KN_PARAM_BLASOPTIONLIB

Type

string

Default

NULL

bndrange

Specifies max limits on the magnitude of constraint and variable bounds.

Details

Any constraint or variable bounds whose magnitude is greater than or equal to bndrange will be treated as infinite by Knitro. Using very large, finite bounds is discouraged (and is generally an indication of a poorly scaled model).

Name

bndrange

API constant

KN_PARAM_BNDRANGE

Type

double

Minimum

0.0

Default

1.0e+20

cg_maxit

Determines the maximum allowable number of inner conjugate gradient (CG) iterations per Knitro minor iteration.

Name

cg_maxit

API constant

KN_PARAM_CG_MAXIT

Type

integer

Minimum

-1

Default

-1

cg_pmem

Specifies the amount of nonzero elements per column of the Hessian of the Lagrangian which are retained when computing the incomplete Cholesky preconditioner.

Name

cg_pmem

API constant

KN_PARAM_CG_PMEM

Type

integer

Minimum

0

Default

10

cg_precond

Specifies whether an incomplete Cholesky preconditioner is applied during CG iterations in barrier algorithms.

Name

cg_precond

API constant

KN_PARAM_CG_PRECOND

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_CG_PRECOND_NONE

Not applied

1

chol

KN_CG_PRECOND_CHOL

Preconditioner is applied

cg_stoptol

Specifies the relative stopping tolerance used for the conjugate gradient (CG) subproblem solves.

Name

cg_stoptol

API constant

KN_PARAM_CG_STOPTOL

Type

double

Minimum

0.0

Default

1.0e-02

convex

Declare the problem as convex by setting KN_CONVEX_YES or non-convex by setting KN_CONVEX_NO.

Details

Otherwise, Knitro will try to determine this automatically, but may only be able to do so for simple model forms such as QPs or QCQPs. If your model is specified as (or automatically determined to be) convex, this will cause Knitro to apply specializations and tunings that are often beneficial for convex models to speed up the solution.

Name

convex

API constant

KN_PARAM_CONVEX

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_CONVEX_AUTO

Knitro will try to determine this automatically, but may only be able to do so for simple model forms such as QPs or QCQPs.

0

no

KN_CONVEX_NO

Declare problem as non-convex

1

yes

KN_CONVEX_YES

Declare problem as convex

cpuplatform

This option can be used to specify the target instruction set architecture for the machine on which Knitro is running.

Details

This can be used, for example (especially using the setting KN_CPUPLATFORM_COMPATIBLE), to try to produce more consistent Knitro performance across various architectures (at the expense of, perhaps, slower performance on some platforms). This option is currently only used for the Intel Math Kernel Library (MKL) functions used inside Knitro.

Name

cpuplatform

API constant

KN_PARAM_CPUPLATFORM

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_CPUPLATFORM_AUTO

Determine automatically

1

compatible

KN_CPUPLATFORM_COMPATIBLE

Aim for more compatible performance across architectures

2

sse2

KN_CPUPLATFORM_SSE2

SSE2

3

avx

KN_CPUPLATFORM_AVX

AVX

4

avx2

KN_CPUPLATFORM_AVX2

AVX-2

5

avx512

KN_CPUPLATFORM_AVX512

AVX-512 (experimental)

datacheck

Specifies whether to perform more extensive data checks to look for errors in the problem input to Knitro (in particular, this option looks for errors in the sparse Jacobian and/or sparse Hessian structure).

Details

The datacheck may have a non-trivial cost for large problems. It is turned on by default, but can be turned off for improved speed.

Name

datacheck

API constant

KN_PARAM_DATACHECK

Type

enum

Default

1 (yes)

Value

Name

API constant

Description

0

no

KN_DATACHECK_NO

No extra data checks

1

yes

KN_DATACHECK_YES

Perform extra data checks

delta

Specifies the initial trust region radius scaling factor used to determine the initial trust region size.

Name

delta

API constant

KN_PARAM_DELTA

Type

double

Minimum

1.0e-14

Default

1.0

deterministic

This option specifies whether to always enforce deterministic behavior for Knitro.

Details

Generally, the Knitro algorithms execute deterministically regardless of the setting of this user option. There are some exceptions however. Some linear system solvers that may be used inside Knitro such as MA86 and Apple Accelerate do not enforce deterministic behavior (see linsolver). In addition, the concurrent solver (concurrent_solver) runs non-deterministically by default. Setting deterministic =1 will enforce that in all cases Knitro runs deterministically.

Name

deterministic

API constant

KN_PARAM_DETERMINISTIC

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_DETERMINISTIC_NO

Do not enforce deterministic behavior in Knitro.

1

yes

KN_DETERMINISTIC_YES

Enforce deterministic behavior in Knitro.

eval_cost

Use this option to tell Knitro the relative cost of performing a callback.

Details

For function, gradient and Hessian evaluations. Knitro will use this information to better tune its algorithms.

Name

eval_cost

API constant

KN_PARAM_EVAL_COST

Type

enum

Default

0 (unspecified)

Value

Name

API constant

Description

0

unspecified

KN_EVAL_COST_UNSPECIFIED

Evaluation cost is not specified

1

inexpensive

KN_EVAL_COST_INEXPENSIVE

Evaluation cost is relatively inexpensive

2

expensive

KN_EVAL_COST_EXPENSIVE

Evaluation cost is relatively expensive

eval_fcga

Use this option to tell Knitro that you are providing the first derivatives in the same callback routine used for your function evaluations.

Name

eval_fcga

API constant

KN_PARAM_EVAL_FCGA

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_EVAL_FCGA_NO

Gradients are not evaluated in the function evaluation callback

1

yes

KN_EVAL_FCGA_YES

Gradients are evaluated in the function evaluation callback

honorbnds

Indicates whether or not to enforce satisfaction of simple variable bounds throughout the optimization.

Details

The API function KN_set_var_honorbnds() can be used to set this option for each variable individually. This option and the bar_feasible option may be useful in applications where functions are undefined outside the region defined by inequalities.

Note that setting honorbnds = 1 (always) or 2 (initpt) or using the default auto option may cause Knitro to shift the value of a user-provided initial point so that it lies sufficiently inside the (possibly presolved) bounds. Setting honorbnds = 0 (no) will prevent Knitro from shifting a user-provided initial point.

Name

honorbnds

API constant

KN_PARAM_HONORBNDS

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_HONORBNDS_AUTO

Setting determined automatically by Knitro

0

no

KN_HONORBNDS_NO

Allow iterations to violate the bounds

1

always

KN_HONORBNDS_ALWAYS

Enforce bounds satisfaction of all iterates

2

initpt

KN_HONORBNDS_INITPT

Enforce bounds satisfaction of initial point

initpenalty

Specifies the initial penalty parameter used in the Knitro merit functions.

Details

The Knitro merit functions are used to balance improvements in the objective function versus improvements in feasibility. A larger initial penalty value places more weight initially on feasibility in the merit function.

Name

initpenalty

API constant

KN_PARAM_INITPENALTY

Type

double

Minimum

0.0

Default

10.0

initpt_strategy

Specifies the initial point strategy used for the continuous algorithms.

Details

Using a more advanced initial point strategy may produce a better initial point at the cost of more computation.

Name

initpt_strategy

API constant

KN_PARAM_INITPT_STRATEGY

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_INITPT_STRATEGY_AUTO

Automatic initial point strategy

1

basic

KN_INITPT_STRATEGY_BASIC

Try basic initial point strategy

2

advanced

KN_INITPT_STRATEGY_ADVANCED

Try more advanced initial point strategy

initptfile

Specifies a file from which to read the initial point used for the Knitro algorithms.

Details

Setting to NULL means that no initial point is read from a file.

Name

initptfile

API constant

KN_PARAM_INITPTFILE

Type

string

Default

NULL

linesearch

Indicates which linesearch strategy to use for the Interior/Direct or SQP algorithm to search for a new acceptable iterate.

Details

This option has no effect on the Interior/CG or Active Set algorithm.

Name

linesearch

API constant

KN_PARAM_LINESEARCH

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_LINESEARCH_AUTO

Let Knitro choose the linesearch method

1

backtrack

KN_LINESEARCH_BACKTRACK

Backtracking linesearch

2

interpolate

KN_LINESEARCH_INTERPOLATE

Interpolation based linesearch

3

weakwolfe

KN_LINESEARCH_WEAKWOLFE

Weak Wolfe linesearch

linesearch_maxtrials

Indicates the maximum allowable number of trial points during the linesearch of the Interior/Direct or SQP algorithm before treating the linesearch step as a failure and generating a new step.

Details

This option has no effect on the Interior/CG or Active Set algorithm.

Name

linesearch_maxtrials

API constant

KN_PARAM_LINESEARCH_MAXTRIALS

Type

integer

Minimum

0

Default

3

linsolver

Indicates which linear solver to use to solve linear systems arising in Knitro algorithms.

Details

The QR linear solver, the HSL MA57/MA86/MA97 linear solvers and the Intel MKL PARDISO solver all make frequent use of Basic Linear Algebra Subroutines (BLAS) for internal linear algebra operations. If using any of these it is highly recommended to use optimized BLAS for your particular machine. This can result in dramatic speedup. Please read the notes under the blasoption user option in this section for more details about the BLAS options in Knitro and how to make sure that the Intel MKL BLAS or other user-specified BLAS can be used by Knitro. You may also achieve speedups using multi-threaded BLAS with these solvers by setting numthreads > 1 or blas_numthreads > 1 when using the solvers.

Additionally, the HSL solvers MA86 and MA97, the Intel MKL PARDISO solver, and the Apple Accelerate solver are specifically designed to exploit parallelism (beyond BLAS parallelism) to achieve speedups on large problems. You may try setting numthreads > 1 or linsolver_numthreads > 1 (with blas_numthreads = 1) when using these solvers, to obtain greater speedups.

Name

linsolver

API constant

KN_PARAM_LINSOLVER

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_LINSOLVER_AUTO

Let Knitro automatically choose the linear solver.

1

internal

KN_LINSOLVER_INTERNAL

Use internal solver provided with Knitro.

2

hybrid

KN_LINSOLVER_HYBRID

Use a hybrid approach where the solver chosen depends on the particular linear system which needs to be solved.

3

qr

KN_LINSOLVER_DENSEQR

Use a dense QR method. This approach uses LAPACK QR routines. Since it uses a dense method, it is only efficient for small problems. It may often be the most efficient method for small problems with dense Jacobians or Hessian matrices.

4

ma27

KN_LINSOLVER_MA27

Use the HSL MA27 sparse symmetric indefinite solver.

5

ma57

KN_LINSOLVER_MA57

Use the HSL MA57 sparse symmetric indefinite solver.

6

mklpardiso

KN_LINSOLVER_MKLPARDISO

Use the Intel MKL PARDISO (parallel, deterministic) sparse symmetric indefinite solver (x86-64 only).

7

ma97

KN_LINSOLVER_MA97

Use the HSL MA97 (parallel, deterministic) sparse symmetric indefinite solver.

8

ma86

KN_LINSOLVER_MA86

Use the HSL MA86 (parallel, non-deterministic) sparse symmetric indefinite solver.

9

apple

KN_LINSOLVER_APPLE

Use the Apple Accelerate (parallel, non-deterministic) sparse symmetric indefinite solver (macOS only).

linsolver_maxitref

Indicates the maximum allowable number of iterative refinement steps applied when a linear system is solved inside Knitro.

Details

Iterative refinement steps may be applied when there are significant errors (e.g. large residuals) in the linear system solves. Applying more iterative refinement steps may improve the numerical accuracy of the linear solves at extra cost.

Name

linsolver_maxitref

API constant

KN_PARAM_LINSOLVER_MAXITREF

Type

integer

Minimum

0

Default

2

linsolver_nodeamalg

Controls the node amalgamation setting for the MA57, MA86 and MA97 linear solvers.

Details

A value of 0 indicates that the default value should be used for the given linear solver, while a positive value sets the node amalgamation parameter for the linear solver to that specific value.

Name

linsolver_nodeamalg

API constant

KN_PARAM_LINSOLVER_NODEAMALG

Type

integer

Minimum

0

Default

0

linsolver_ooc

Indicates whether to use Intel MKL PARDISO out-of-core solve of linear systems when linsolver = mklpardiso.

Details

This option is only active when linsolver = mklpardiso.

See the Intel MKL PARDISO documentation for more details on how this option works.

Name

linsolver_ooc

API constant

KN_PARAM_LINSOLVER_OOC

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_LINSOLVER_OOC_NO

Always use in-core version

1

maybe

KN_LINSOLVER_OOC_MAYBE

Will use out-of-core version beyond a certain size

2

yes

KN_LINSOLVER_OOC_YES

Always use out-of-core version

linsolver_ordering

Sets the ordering method used for the linear system solver.

Name

linsolver_ordering

API constant

KN_PARAM_LINSOLVER_ORDERING

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_LINSOLVER_ORDERING_AUTO

Automatically determine ordering procedure

0

best

KN_LINSOLVER_ORDERING_BEST

Choose the best between AMD and METIS

1

amd

KN_LINSOLVER_ORDERING_AMD

Use AMD ordering (min degree for MKL PARDISO)

2

metis

KN_LINSOLVER_ORDERING_METIS

Use METIS ordering

linsolver_pivottol

Specifies the initial pivot threshold used in factorization routines.

Details

The value should be in the range [0, 0.5] with higher values resulting in more pivoting (more stable factorizations). Values less than 0 will be set to 0 and values larger than 0.5 will be set to 0.5. If linsolver_pivottol is non-positive, initially no pivoting will be performed. Smaller values may improve the speed of the code but higher values are recommended for more stability (for example, if the problem appears to be very ill-conditioned).

Name

linsolver_pivottol

API constant

KN_PARAM_LINSOLVER_PIVOTTOL

Type

double

Minimum

0.0

Maximum

5.0e-01

Default

1.0e-08

linsolver_scaling

Enables scaling for the linear system solver.

Details

Applying scaling may allow for more accuracy in the linear system solves, but will generally make the linear system solves more expensive.

Name

linsolver_scaling

API constant

KN_PARAM_LINSOLVER_SCALING

Type

enum

Default

0 (none)

Value

Name

API constant

Description

0

none

KN_LINSOLVER_SCALING_NONE

No scaling is applied in the linear system solves

1

always

KN_LINSOLVER_SCALING_ALWAYS

Always apply scaling in the linear system solves

2

dynamic

KN_LINSOLVER_SCALING_DYNAMIC

Dynamically apply scaling in the linear system solves

lp_algorithm

Indicates which algorithm to use to solve linear problems (LPs).

Name

lp_algorithm

API constant

KN_PARAM_LP_ALGORITHM

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_LP_ALG_AUTO

Let Knitro automatically decide.

0

nlp

KN_LP_ALG_NLPALGORITHM

Use algorithm specified in nlp_algorithm.

1

primalsimplex

KN_LP_ALG_PRIMALSIMPLEX

Use Primal Simplex algorithm.

2

dualsimplex

KN_LP_ALG_DUALSIMPLEX

Use Dual Simplex algorithm.

3

barrier

KN_LP_ALG_BARRIER

Use Interior-Point/Barrier algorithm.

4

pdlp

KN_LP_ALG_PDLP

Use Primal-Dual Linear Programming algorithm.

maxstepsize

This option enforces a maximum step size limit at every iteration of the continuous NLP algorithms in Knitro (as well as the barrier LP algorithm).

Details

The maximum limit is based on the magnitude of the step taken at the algorithm level (on the scaled, presolved problem) and may not exactly correspond to the step measured at the application level. A value less than or equal to 0 implies no maximum limit is applied. The number of iterations where this limit is enforced is controlled by the maxstepsize_maxit user option.

Name

maxstepsize

API constant

KN_PARAM_MAXSTEPSIZE

Type

double

Default

-1.0

maxstepsize_maxit

This option specifies the maximum number of iterations where the maxstepsize restriction is enforced (if 0 then no iteration limit is imposed for this).

Name

maxstepsize_maxit

API constant

KN_PARAM_MAXSTEPSIZE_MAXIT

Type

integer

Minimum

0

Default

0

ncvx_qcqp_init

Specifies the initialization strategy used for non-convex QPs and QCQPs.

Details

In particular, these strategies may be more likely to cause Knitro to find global or better local solutions on non-convex quadratic programs (QPs) or non-convex quadratically constrained quadratic programs (QCQPs).

Name

ncvx_qcqp_init

API constant

KN_PARAM_NCVX_QCQP_INIT

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_NCVX_QCQP_INIT_AUTO

Knitro will automatically determine the strategy.

0

none

KN_NCVX_QCQP_INIT_NONE

No special initialization strategy is used.

1

linear

KN_NCVX_QCQP_INIT_LINEAR

Initialize by solving a linear relaxation.

2

hybrid

KN_NCVX_QCQP_INIT_HYBRID

Initialize by solving a hybrid formulation.

3

penalty

KN_NCVX_QCQP_INIT_PENALTY

Initialize by solving a penalty formulation.

4

cvxquad

KN_NCVX_QCQP_INIT_CVXQUAD

Initialize by solving a convex quadratic relaxation.

nlp_algorithm

Indicates which algorithm to use to solve nonlinear problems (e.g. NLPs, QPs, QCQPs)

Name

nlp_algorithm

API constant

KN_PARAM_NLP_ALGORITHM

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_ALG_AUTOMATIC

Let Knitro choose the algorithm

1

direct

KN_ALG_BAR_DIRECT

Use Interior (barrier) Direct algorithm

2

cg

KN_ALG_BAR_CG

Use Interior (barrier) CG algorithm

3

active

KN_ALG_ACT_CG

Use Active Set SLQP algorithm

4

sqp

KN_ALG_ACT_SQP

Use Active Set SQP algorithm

5

multi

KN_ALG_MULTI

Run multiple algorithms (perhaps in parallel)

6

al

KN_ALG_AL

Use Augmented Lagrangian algorithm

objrange

Specifies the extreme limits of the objective function for purposes of determining unboundedness.

Details

If the magnitude of the objective function becomes greater than objrange for a feasible iterate, then the problem is determined to be unbounded and Knitro proceeds no further.

Name

objrange

API constant

KN_PARAM_OBJRANGE

Type

double

Minimum

0.0

Default

1.0e+20

restarts

Specifies whether or not to enable automatic restarts in Knitro.

Details

When enabled, if a Knitro algorithm seems to be converging slowly or not converging, the algorithm will automatically restart, which may help with convergence.

Name

restarts

API constant

KN_PARAM_RESTARTS

Type

integer

Minimum

-1

Default

-1

restarts_maxit

When restarts are enabled, this option can be used to specify a maximum number of iterations before enforcing a restart.

Name

restarts_maxit

API constant

KN_PARAM_RESTARTS_MAXIT

Type

integer

Minimum

0

Default

0

scale

Specifies whether to perform problem scaling of the objective function, constraint functions, or possibly variables.

Details

If scaling is performed, internal computations, including some aspects of the optimality tests, are based on the scaled values, though the feasibility error is always computed in terms of the original, unscaled values.

Name

scale

API constant

KN_PARAM_SCALE

Type

enum

Default

1 (user_internal)

Value

Name

API constant

Description

0

no

KN_SCALE_NEVER

No scaling done

1

user_internal

KN_SCALE_USER_INTERNAL

User, if defined, otherwise internal

2

user_none

KN_SCALE_USER_NONE

User, if defined, otherwise none

3

internal

KN_SCALE_INTERNAL

Knitro performs internal scaling

scale_strategy

Strategies for problem scaling. Multiple strategies can be selected at once using multiple bits.

Name

scale_strategy

API constant

KN_PARAM_SCALE_STRATEGY

Type

bitset

Default

0

Bit value

Name

Description

0

auto

Let Knitro choose the scaling strategy. Use option scale for fully disabling scaling.

1

cons

Apply constraint scaling.

2

vars

Apply variable scaling.

4

obj

Apply objective scaling.

8

equilibration

Apply Equilibration scaling. If enabled, curtisreid and ruizpock bits are ignored.

16

curtisreid

Apply Curtis-Reid scaling.

32

ruizpock

Apply Ruiz and Pock scalings.

64

geomean

Use geometric mean in scaling computation rather than the infinity norm.

128

varscaling_bounds

Apply variable scaling based on bounds. If disabled, the strategy given by the previous three bits is applied for variable scaling.

256

scaling_up

Allow scaling factors larger than one.

512

poweroftwo

Force scaling factors to be powers of two.

1024

repeat

Allow scaling factor computation in a loop.

2048

dynamic

Allow dynamic scaling (only for NLPs).

soc

Specifies whether or not to try second order corrections (SOC).

Details

A second order correction may be beneficial for problems with highly nonlinear constraints.

Name

soc

API constant

KN_PARAM_SOC

Type

enum

Default

1 (maybe)

Value

Name

API constant

Description

0

no

KN_SOC_NO

Never do second order corrections

1

maybe

KN_SOC_MAYBE

SOC steps attempted on some iterations

2

yes

KN_SOC_YES

SOC steps always attempted when constraints are nonlinear

soltype

This option specifies the solution returned by Knitro.

Details

Generally, the solution converged to by Knitro is a locally optimal solution that corresponds to the best feasible solution found. However, on rare occasions, Knitro may encounter a feasible solution during the optimization process that has a better objective value than the final solution converged to by Knitro. Setting soltype = 1 in this case will return this iterate. This iterate can also be retrieved through the API function KN_get_best_feasible_iterate().

Name

soltype

API constant

KN_PARAM_SOLTYPE

Type

enum

Default

0 (final)

Value

Name

API constant

Description

0

final

KN_SOLTYPE_FINAL

Return the final iterate

1

bestfeas

KN_SOLTYPE_BESTFEAS

Return the best feasible iterate found

strat_warm_start

Specifies whether or not to invoke a warm-start strategy.

Details

A warm-start strategy may be beneficial when an initial point close to the solution can be provided. For example, this may occur when solving a sequence of closely related problems, and the solution from one problem can be used to initialize (or warm-start) the next problem in the sequence. The Knitro warm-start strategy will use this information to tune the algorithms to try to converge more quickly in this case. If the initial point is not sufficiently close to the solution, or is too infeasible, the warm-start strategy may not be helpful. This option is currently only used for the Knitro barrier/interior-point algorithms. In this case it may also be useful to experiment with different (smaller than default) values for the initial barrier parameter bar_initmu. In general, the closer the initial point is to the solution, the smaller this value should be (Knitro will try by default to initialize this to a good value when applying a warm-start strategy).

Name

strat_warm_start

API constant

KN_PARAM_STRAT_WARM_START

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_STRAT_WARM_START_NO

No warm-start strategy is applied.

1

yes

KN_STRAT_WARM_START_YES

Knitro will apply a warm-start strategy with special tunings.

Derivatives options

bfgs_scaling

Specify the initial scaling to use for the BFGS or L-BFGS Hessian approximation.

Name

bfgs_scaling

API constant

KN_PARAM_BFGS_SCALING

Type

enum

Default

0 (dynamic)

Value

Name

API constant

Description

0

dynamic

KN_BFGS_SCALING_DYNAMIC

Dynamically determine

1

invhess

KN_BFGS_SCALING_INVHESS

Approximate scale of the inverse Hessian

2

hess

KN_BFGS_SCALING_HESS

Approximate the scale of the Hessian

derivcheck

Determine whether or not to perform a derivative check

Name

derivcheck

API constant

KN_PARAM_DERIVCHECK

Type

enum

Default

0 (none)

Value

Name

API constant

Description

0

none

KN_DERIVCHECK_NONE

No derivative check

1

first

KN_DERIVCHECK_FIRST

Check first derivatives

2

second

KN_DERIVCHECK_SECOND

Check second derivatives

3

all

KN_DERIVCHECK_ALL

Check all derivatives

derivcheck_terminate

Determine whether to always terminate after the derivative check or only when the derivative checker detects a possible error.

Name

derivcheck_terminate

API constant

KN_PARAM_DERIVCHECK_TERMINATE

Type

enum

Default

1 (error)

Value

Name

API constant

Description

1

error

KN_DERIVCHECK_STOPERROR

Stop when there is an error detected

2

always

KN_DERIVCHECK_STOPALWAYS

Always stop after the derivative check

derivcheck_tol

Specifies the relative tolerance used for detecting derivative errors, when the Knitro derivative checker is enabled.

Name

derivcheck_tol

API constant

KN_PARAM_DERIVCHECK_TOL

Type

double

Minimum

0.0

Default

1.0e-06

derivcheck_type

Specifies whether to use forward or central finite differencing for the derivative checker when it is enabled.

Name

derivcheck_type

API constant

KN_PARAM_DERIVCHECK_TYPE

Type

enum

Default

1 (forward)

Value

Name

API constant

Description

1

forward

KN_DERIVCHECK_FORWARD

Check using forward finite-differences

2

central

KN_DERIVCHECK_CENTRAL

Check using central finite-differences

findiff_estnoise

This option can be used to enable an estimate of the noise in the model when using finite-difference gradients.

Details

This noise estimate can then be used to set a finite-difference steplength appropriate for the estimated noise level. This can improve performance on models with noise (e.g. noisy black-box optimization models). The cost of the noise estimation procedure is usually a few extra function evaluations.

Name

findiff_estnoise

API constant

KN_PARAM_FINDIFF_ESTNOISE

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_FINDIFF_ESTNOISE_NO

No estimation of noise performed

1

yes

KN_FINDIFF_ESTNOISE_YES

Estimate the noise and perhaps use it to determine a finite-difference steplength

2

withcurv

KN_FINDIFF_ESTNOISE_WITHCURV

Estimate a curvature factor as well as the noise and perhaps use it to determine a finite-difference steplength

findiff_relstepsize

Specifies the relative stepsize used for finite-difference gradients during the optimization.

Details

This option sets the stepsize for all variables. The API function KN_set_cb_relstepsizes() can be used to customize the settings for individual variables. Note that this option has no effect on the finite-difference derivatives computed for the derivative checker (default values are always used here). It is only used for the finite-difference derivatives computed during the optimization.

Name

findiff_relstepsize

API constant

KN_PARAM_FINDIFF_RELSTEPSIZE

Type

double

Default

0.0

gradopt

Specifies how to compute the gradients of the objective and constraint functions.

Details

It is highly recommended to provide exact gradients if at all possible as this greatly impacts the performance of the code.

Name

gradopt

API constant

KN_PARAM_GRADOPT

Type

enum

Default

1 (exact)

Value

Name

API constant

Description

1

exact

KN_GRADOPT_EXACT

User supplies exact first derivatives

2

forward

KN_GRADOPT_FORWARD

Gradients computed by internal forward finite differences

3

central

KN_GRADOPT_CENTRAL

Gradients computed by internal central finite differences

4

user_forward

KN_GRADOPT_USER_FORWARD

Gradients computed by user-provided forward finite differences

5

user_central

KN_GRADOPT_USER_CENTRAL

Gradients computed by user-provided central finite differences

hessian_no_f

Determines whether or not to allow Knitro to request Hessian (or Hessian-vector product) evaluations without the objective component included.

Details

If hessian_no_f = 0, Knitro will only ask the user for the standard Hessian and will internally approximate the Hessian without the objective component when it is needed. When hessian_no_f = 1, Knitro will provide a flag to the user EVALH_NO_F (or EVALHV_NO_F) when it wants an evaluation of the Hessian (or Hessian-vector product) without the objective component. Using hessian_no_f = 1 (and providing the appropriate Hessian) may improve Knitro performance on some problems. This option only has an effect when hessopt = 1 (i.e. user-provided exact Hessians), or hessopt = 5 (i.e. user-provided exact Hessian-vector products).

Name

hessian_no_f

API constant

KN_PARAM_HESSIAN_NO_F

Type

enum

Default

0 (forbid)

Value

Name

API constant

Description

0

forbid

KN_HESSIAN_NO_F_FORBID

Not allowed

1

allow

KN_HESSIAN_NO_F_ALLOW

User can provide this version of the Hessian if requested

hessopt

Specifies how to compute the (approximate) Hessian of the Lagrangian.

Details

Options hessopt = 4 and hessopt = 5 are not available with the Interior/Direct or SQP algorithms.

Knitro usually performs best when the user provides exact Hessians (hessopt = 1) or exact Hessian-vector products (hessopt = 5). If neither can be provided but exact gradients are available (i.e., gradopt = 1), then hessopt = 4 may be a good option. This option is comparable in terms of robustness to the exact Hessian option and typically not much slower in terms of time, provided that gradient evaluations are not a dominant cost. However, this option is only available for some algorithms.

If exact gradients cannot be provided, then one of the quasi-Newton options is preferred. Options hessopt = 2 and hessopt = 3 are only recommended for small problems (say, n < 1000) since they require working with a dense Hessian approximation. Note that with these last two options, the Hessian pattern will be ignored since Knitro computes a dense approximation. Option hessopt = 6 should be used for large problems.

Name

hessopt

API constant

KN_PARAM_HESSOPT

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_HESSOPT_AUTO

Knitro will use exact Hessians if provided; otherwise it uses an appropriate approximation.

1

exact

KN_HESSOPT_EXACT

Knitro uses supplied exact second derivatives

2

bfgs

KN_HESSOPT_BFGS

Knitro computes a dense quasi-Newton BFGS Hessian

3

sr1

KN_HESSOPT_SR1

Knitro computes a dense quasi-Newton SR1 Hessian

4

product_findiff

KN_HESSOPT_PRODUCT_FINDIFF

Knitro computes Hessian-vector products by finite differences

5

product

KN_HESSOPT_PRODUCT

User supplies exact Hessian-vector products

6

lbfgs

KN_HESSOPT_LBFGS

Knitro computes a limited-memory quasi-Newton BFGS Hessian

7

gauss_newton

KN_HESSOPT_GAUSS_NEWTON

Knitro computes a Gauss-Newton approximation of the Hessian (available for least-squares only, and default value for least-squares)

lmsize

Specifies the number of limited memory pairs stored when approximating the Hessian using the limited-memory quasi-Newton BFGS option.

Details

The value must be between 1 and 100 and is only used with hessopt = 6. Larger values may give a more accurate, but more expensive, Hessian approximation. Smaller values may give a less accurate, but faster, Hessian approximation. When using the limited memory BFGS approach it is recommended to experiment with different values of this parameter.

Name

lmsize

API constant

KN_PARAM_LMSIZE

Type

integer

Minimum

1

Maximum

100

Default

8

Termination options

feaserr_level

This option specifies the feasibility error measure used at the algorithm level and for termination.

Details

If set to the application level, the feasibility error used in the algorithm is based on the original, user problem form. If set to internal, then the feasibility error measure is based on the internal (presolved, scaled) problem form.

Name

feaserr_level

API constant

KN_PARAM_FEASERR_LEVEL

Type

enum

Default

1 (application)

Value

Name

API constant

Description

1

application

KN_FEASERR_LEVEL_APPLICATION

Use feasibility error based on application level (original) problem form

2

internal

KN_FEASERR_LEVEL_INTERNAL

Use feasibility error based on internal (presolved, scaled) problem form

feastol

Specifies the final relative stopping tolerance for the feasibility error.

Details

Smaller values of feastol result in a higher degree of accuracy in the solution with respect to feasibility. A negative value uses an automatic setting, which will adapt the stopping tolerance to the problem type and solution method (e.g. using a less strict tolerance for first-order methods). For standard NLP problems the auto setting will use 1.0e-6.

Name

feastol

API constant

KN_PARAM_FEASTOL

Type

double

Minimum

-1.0

Default

-1.0

feastol_abs

Specifies the final absolute stopping tolerance for the feasibility error.

Details

Smaller values of feastol_abs result in a higher degree of accuracy in the solution with respect to feasibility. A negative value uses an automatic setting, which will adapt the stopping tolerance to the problem type and solution method (e.g. using a less strict tolerance for first-order methods). For standard NLP problems the auto setting will use 1.0e-3.

Name

feastol_abs

API constant

KN_PARAM_FEASTOLABS

Type

double

Minimum

-1.0

Default

-1.0

findiff_terminate

This option specifies the termination criteria when using finite-difference gradients.

Details

The optimality (or KKT) conditions for nonlinear optimization depend on gradient values of the nonlinear objective and constraint functions. When using finite-difference gradients (e.g. gradopt > 1), there will typically be small errors in the computed gradients that will limit the precision in the solution (and the ability to satisfy the optimality conditions). By default, Knitro will try to estimate these finite-difference gradient errors and terminate when it seems that no more accuracy in the solution is possible. The solution will be treated as optimal as long as it is feasible and the optimality conditions are satisfied either by the optimality tolerances (opttol and opttol_abs) or the error estimates. On some problems, the error estimates may result in extra function evaluations on some iterations, but will often prevent extra iterations that produce no significant improvement in the solution. This special termination can be disabled by setting findiff_terminate = 0 (none).

Name

findiff_terminate

API constant

KN_PARAM_FINDIFF_TERMINATE

Type

enum

Default

1 (errest)

Value

Name

API constant

Description

0

none

KN_FINDIFF_TERMINATE_NONE

No special criteria; use the standard stopping conditions.

1

errest

KN_FINDIFF_TERMINATE_ERREST

Allow termination based on estimates of the finite-difference error (when no more significant progress is likely).

fstopval

Used to implement a custom stopping condition based on the objective function value.

Details

Knitro will stop and declare that a satisfactory solution was found if a feasible objective function value at least as good as the value specified by fstopval is achieved. This stopping condition is only active when the absolute value of fstopval is less than objrange.

Name

fstopval

API constant

KN_PARAM_FSTOPVAL

Type

double

Default

inf

ftol

The optimization process will terminate if the relative change in the objective function is less than ftol for ftol_iters consecutive feasible iterations.

Name

ftol

API constant

KN_PARAM_FTOL

Type

double

Minimum

0.0

Default

1.0e-12

ftol_iters

The optimization process will terminate if the relative change in the objective function is less than ftol for ftol_iters consecutive feasible iterations.

Name

ftol_iters

API constant

KN_PARAM_FTOL_ITERS

Type

integer

Minimum

1

Default

5

infeastol

Specifies the (relative) tolerance used for declaring infeasibility of a model.

Details

Smaller values of infeastol make it more difficult to satisfy the conditions Knitro uses for detecting infeasible models. If you believe Knitro incorrectly declares a model to be infeasible, then you should try a smaller value for infeastol.

Name

infeastol

API constant

KN_PARAM_INFEASTOL

Type

double

Minimum

0.0

Default

1.0e-08

infeastol_iters

Controls the termination for consecutive infeasible iterations.

Details

The optimization process will terminate if the relative change in the feasibility error is less than infeastol for infeastol_iters consecutive infeasible iterations.

Name

infeastol_iters

API constant

KN_PARAM_INFEASTOL_ITERS

Type

integer

Minimum

1

Default

50

maxfevals

Specifies the maximum number of function evaluations before termination.

Details

Values less than zero imply no limit.

Name

maxfevals

API constant

KN_PARAM_MAXFEVALS

Type

integer

Default

-1

maxit

Specifies the maximum number of iterations before termination.

Details

Currently Knitro sets this value to 10000 for LPs/NLPs and 3000 for MIP problems.

Name

maxit

API constant

KN_PARAM_MAXIT

Type

integer

Minimum

0

Default

0

maxtime

Specifies, in seconds, the maximum allowable real time before termination.

Name

maxtime

API constant

KN_PARAM_MAXTIME

Type

double

Minimum

0.0

Default

100000000.0

opttol

Specifies the final relative stopping tolerance for the KKT (optimality) error.

Details

Smaller values of opttol result in a higher degree of accuracy in the solution with respect to optimality. A negative value uses an automatic setting, which will adapt the stopping tolerance to the problem type and solution method (e.g. using a less strict tolerance for first-order methods). For standard NLP problems the auto setting will use 1.0e-6.

Name

opttol

API constant

KN_PARAM_OPTTOL

Type

double

Minimum

-1.0

Default

-1.0

opttol_abs

Specifies the final absolute stopping tolerance for the KKT (optimality) error.

Details

Smaller values of opttol_abs result in a higher degree of accuracy in the solution with respect to optimality. A negative value uses an automatic setting, which will adapt the stopping tolerance to the problem type and solution method (e.g. using a less strict tolerance for first-order methods). For standard NLP problems the auto setting will use 1.0e-3.

Name

opttol_abs

API constant

KN_PARAM_OPTTOLABS

Type

double

Minimum

-1.0

Default

-1.0

xtol

Tolerance for convergence criterion based on relative change between successive solution points.

Details

The optimization process will terminate if the relative change in all components of the solution point estimate is less than xtol for xtol_iters consecutive iterations. If using the Interior/Direct or Interior/CG algorithm and the barrier parameter is still large, Knitro will first try decreasing the barrier parameter before terminating.

Name

xtol

API constant

KN_PARAM_XTOL

Type

double

Minimum

0.0

Default

1.0e-12

xtol_iters

Number of iterations for convergence criterion based on relative change between successive solution points.

Details

The optimization process will terminate if the relative change in all components of the solution point estimate is less than xtol for xtol_iters consecutive iterations. If set to 0, Knitro chooses this value based on the solver and context. Currently Knitro sets this value to 3 unless the MISQP algorithm is being used, in which case the value is set to 1 by default.

Name

xtol_iters

API constant

KN_PARAM_XTOL_ITERS

Type

integer

Minimum

0

Default

0

Presolve options

presolve

Determine whether or not to use the Knitro presolver to try to simplify the model by removing variables or constraints.

Name

presolve

API constant

KN_PARAM_PRESOLVE

Type

enum

Default

1 (yes)

Value

Name

API constant

Description

0

no

KN_PRESOLVE_NO

No presolve

1

yes

KN_PRESOLVE_YES

Knitro performs presolve

presolve_initpt

Control whether the Knitro presolver can shift a user-supplied initial point.

Name

presolve_initpt

API constant

KN_PARAM_PRESOLVE_INITPT

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_PRESOLVE_INITPT_AUTO

Determine automatically

0

noshift

KN_PRESOLVE_INITPT_NOSHIFT

Do not shift initial point in presolve

1

linshift

KN_PRESOLVE_INITPT_LINSHIFT

Allow shifting variables in linear constraints

2

anyshift

KN_PRESOLVE_INITPT_ANYSHIFT

Allow shifting any variable

presolve_level

Set the level of presolve operations to enable through the Knitro presolver.

Details

A higher presolve level enables more complex presolve operations.

Name

presolve_level

API constant

KN_PARAM_PRESOLVE_LEVEL

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_PRESOLVE_LEVEL_AUTO

Determine automatically

1

level1

KN_PRESOLVE_LEVEL_1

Most basic presolve

2

level2

KN_PRESOLVE_LEVEL_2

More advanced presolve

presolve_passes

Set a maximum limit on the number of passes through the Knitro presolve operations.

Name

presolve_passes

API constant

KN_PARAM_PRESOLVE_PASSES

Type

integer

Minimum

0

Default

10

presolve_tol

Determines the tolerance used by the Knitro presolver to remove variables and constraints from the model.

Details

If you believe the Knitro presolver is incorrectly modifying the model, use a smaller value for this tolerance (or turn the presolver off).

Name

presolve_tol

API constant

KN_PARAM_PRESOLVE_TOL

Type

double

Minimum

0.0

Default

1.0e-08

presolve_zero_tol

Tolerance for rounding to zero linear coefficients in presolve. Higher values mean that more reductions will be applied. Zero value is not recommended as it means no rounding is done, which can lead to numerical instability.

Name

presolve_zero_tol

API constant

KN_PARAM_PRESOLVE_ZERO_TOL

Type

double

Minimum

0.0

Default

1.0e-11

presolveop_clique_merging

Determine whether or not to enable the Knitro presolve operations that attempt to merge cliques to strengthen the formulation.

Name

presolveop_clique_merging

API constant

KN_PARAM_PRESOLVEOP_CLIQUE_MERGING

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_PRESOLVEOP_CLIQUE_MERGING_AUTO

Determine automatically

0

no

KN_PRESOLVEOP_CLIQUE_MERGING_OFF

Disabled

1

yes

KN_PRESOLVEOP_CLIQUE_MERGING_ON

Enabled

presolveop_implied_mpec

Transforms quadratic constraints into MPEC constraints.

Name

presolveop_implied_mpec

API constant

KN_PARAM_PRESOLVEOP_IMPLIED_MPEC

Type

enum

Default

1 (yes)

Value

Name

API constant

Description

0

no

KN_PRESOLVEOP_IMPLIED_MPEC_NO

Disabled

1

yes

KN_PRESOLVEOP_IMPLIED_MPEC_YES

Enabled

presolveop_probing

Determine whether or not to enable the Knitro presolve operations that analyze deductions made by fixing integer variables.

Name

presolveop_probing

API constant

KN_PARAM_PRESOLVEOP_PROBING

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_PRESOLVEOP_PROBING_AUTO

Automatic selection

0

no

KN_PRESOLVEOP_PROBING_OFF

Disabled

1

light

KN_PRESOLVEOP_PROBING_LIGHT

Light probing

2

full

KN_PRESOLVEOP_PROBING_FULL

Full probing until no more deductions are found

presolveop_redundant

Determine whether or not to enable the Knitro presolve operation to detect and remove redundant constraints.

Name

presolveop_redundant

API constant

KN_PARAM_PRESOLVEOP_REDUNDANT

Type

enum

Default

1 (dupcon)

Value

Name

API constant

Description

0

none

KN_PRESOLVEOP_REDUNDANT_NONE

Do not detect redundant constraints

1

dupcon

KN_PRESOLVEOP_REDUNDANT_DUPCON

Detect and remove duplicate constraints

2

depcon

KN_PRESOLVEOP_REDUNDANT_DEPCON

Detect and remove linearly dependent constraints

presolveop_substitution

Determine whether or not to enable the Knitro presolve operation to substitute out variables when possible.

Name

presolveop_substitution

API constant

KN_PARAM_PRESOLVEOP_SUBSTITUTION

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_PRESOLVEOP_SUBSTITUTION_AUTO

Automatic substitution procedure

0

none

KN_PRESOLVEOP_SUBSTITUTION_NONE

No substitution

1

simple

KN_PRESOLVEOP_SUBSTITUTION_SIMPLE

Only doubleton equality substitutions

2

all

KN_PRESOLVEOP_SUBSTITUTION_ALL

All possible substitutions

presolveop_substitution_tol

Tolerance for applying a substitution.

Details

This is a relative tolerance on coefficients involved with the substituted variable. Higher values mean that less reductions will be applied (potentially improving numerical focus). Zero value means all possible substitutions are applied.

Name

presolveop_substitution_tol

API constant

KN_PARAM_PRESOLVEOP_SUBSTITUTION_TOL

Type

double

Minimum

0.0

Default

1.0e-02

presolveop_tighten

Determine whether or not to enable the Knitro presolve operation to tighten variable bounds or coefficients.

Name

presolveop_tighten

API constant

KN_PARAM_PRESOLVEOP_TIGHTEN

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_PRESOLVEOP_TIGHTEN_AUTO

Automatic tightening procedure

0

none

KN_PRESOLVEOP_TIGHTEN_NONE

No tightening

1

varbnd

KN_PRESOLVEOP_TIGHTEN_VARBND

Tighten variable bounds

Barrier options

bar_conic_enable

Enable special treatments for conic constraints.

Details

Only when using the Interior/Direct algorithm (has no effect when using the Interior/CG algorithm).

Name

bar_conic_enable

API constant

KN_PARAM_BAR_CONIC_ENABLE

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_BAR_CONIC_ENABLE_AUTO

Let Knitro automatically choose the strategy.

0

none

KN_BAR_CONIC_ENABLE_NONE

Do not apply any special treatment for conic constraints.

1

soc

KN_BAR_CONIC_ENABLE_SOC

Apply special treatments for any Second Order Cone (SOC) constraints identified in the model.

bar_directinterval

Controls the maximum number of consecutive conjugate gradient (CG) steps before Knitro will try to enforce that a step is taken using direct linear algebra.

Details

This option is only valid for the Interior/Direct algorithm and may be useful on problems where Knitro appears to be taking lots of conjugate gradient steps. Setting bar_directinterval to 0 will try to enforce that only direct steps are taken which may produce better results on some problems.

Name

bar_directinterval

API constant

KN_PARAM_BAR_DIRECTINTERVAL

Type

integer

Minimum

-1

Default

-1

bar_feasible

Specifies whether special emphasis is placed on getting and staying feasible in the interior-point algorithms.

Details

This option can only be used with the Interior/Direct and Interior/CG algorithms. If bar_feasible = stay or bar_feasible = get_stay, this will activate the feasible version of Knitro. The feasible version of Knitro will force iterates to strictly satisfy inequalities, but does not require satisfaction of equality constraints at intermediate iterates. This option and the honorbnds option may be useful in applications where functions are undefined outside the region defined by inequalities. The initial point must satisfy inequalities to a sufficient degree; if not, Knitro may generate infeasible iterates and does not switch to the feasible version until a sufficiently feasible point is found. Sufficient satisfaction occurs at a point x if it is true for all inequalities that cl + tol c(x) cu - tol. The constant tol is determined by the option bar_feasmodetol. If bar_feasible = get or bar_feasible = get_stay, Knitro will place special emphasis on first trying to get feasible before trying to optimize.

Name

bar_feasible

API constant

KN_PARAM_BAR_FEASIBLE

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_BAR_FEASIBLE_NO

No emphasis on feasibility

1

stay

KN_BAR_FEASIBLE_STAY

Iterates must satisfy inequality constraints once they become sufficiently feasible.

2

get

KN_BAR_FEASIBLE_GET

Special emphasis is placed on getting feasible before trying to optimize.

3

get_stay

KN_BAR_FEASIBLE_GET_STAY

Implement both options 1 and 2 above.

bar_feasmodetol

Tolerance used in the feasibility condition that determines whether Knitro will force subsequent iterates to remain feasible.

Details

The tolerance applies to all inequality constraints in the problem. This option only has an effect if option bar_feasible = stay or bar_feasible = get_stay.

Name

bar_feasmodetol

API constant

KN_PARAM_BAR_FEASMODETOL

Type

double

Minimum

0.0

Default

1.0e-04

bar_globalize

Specifies the globalization strategy used in the interior-point algorithms.

Name

bar_globalize

API constant

KN_PARAM_BAR_GLOBALIZE

Type

enum

Default

2 (filter)

Value

Name

API constant

Description

0

none

KN_BAR_GLOBALIZE_NONE

Do not apply any globalization strategy

1

kkt

KN_BAR_GLOBALIZE_KKT

Apply a globalization strategy based on decreasing the KKT error

2

filter

KN_BAR_GLOBALIZE_FILTER

Apply a globalization strategy using a filter based on the objective and constraint violation

bar_initmu

Specifies the initial value for the barrier parameter $mu$ used with the barrier algorithms.

Details

This option has no effect on the Active Set algorithm.

Name

bar_initmu

API constant

KN_PARAM_BAR_INITMU

Type

double

Default

-1.0

bar_initpi_mpec

Specifies the initial value for the MPEC penalty parameter $pi$ used when solving problems with complementarity constraints using the barrier algorithms.

Details

If this value is non-positive, then Knitro uses an internal formula to initialize the MPEC penalty parameter.

Name

bar_initpi_mpec

API constant

KN_PARAM_BAR_INITPI_MPEC

Type

double

Minimum

0.0

Default

0.0

bar_initpt

Indicates initial point strategy for x, slacks and multipliers when using a barrier algorithm.

Details

Note, this option only alters the initial x values if the user does not specify an initial x. This option has no effect on the Active Set algorithm.

Name

bar_initpt

API constant

KN_PARAM_BAR_INITPT

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_BAR_INITPT_AUTO

Let Knitro choose the strategy

1

convex

KN_BAR_INITPT_CONVEX

Initialization designed for convex models.

2

nearbnd

KN_BAR_INITPT_NEARBND

Initialization strategy that stays closer to the bounds.

3

central

KN_BAR_INITPT_CENTRAL

Initialization strategy that is more central on double-bounded variables.

bar_linsys

Indicates which linear system form is used inside the Interior/Direct algorithm for computing primal-dual steps.

Details

Eliminating more elements results in a smaller dimensional linear system (but also one that is, perhaps, less numerically stable). The bounds option may be preferable for very large problems with many bounded variables. The ineq option may generate significant speedups on models where the number of variables is small, but the number of inequality constraints is large.

Name

bar_linsys

API constant

KN_PARAM_BAR_LINSYS

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_BAR_LINSYS_AUTO

Let Knitro automatically choose the linear system form.

0

full

KN_BAR_LINSYS_FULL

Use the full linear system.

1

slacks

KN_BAR_LINSYS_COMPACT1

Eliminate the slack variables.

2

bounds

KN_BAR_LINSYS_COMPACT2

Eliminate the slack variables and bounds.

3

ineqs

KN_BAR_LINSYS_ELIMINATE_INEQS

Eliminate the slack variables, bounds, and some inequalities.

bar_linsys_storage

Indicates how to store in memory the linear systems used inside the Interior/Direct algorithm for computing primal-dual steps.

Details

The lowmem option uses one storage location for multiple linear systems. As a result it may use much less memory, but also may be less efficient when the Interior/Direct algorithm takes a lot of CG steps. The normal option uses separate storage for different linear systems.

Name

bar_linsys_storage

API constant

KN_PARAM_BAR_LINSYS_STORAGE

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_BAR_LINSYS_STORAGE_AUTO

Let Knitro automatically choose the linear system storage approach.

1

lowmem

KN_BAR_LINSYS_STORAGE_LOWMEM

Use common storage for multiple linear systems.

2

normal

KN_BAR_LINSYS_STORAGE_NORMAL

Use separate storage for different linear systems.

bar_maxcorrectors

Specifies the maximum number of corrector steps allowed for primal-dual steps.

Details

If the value is positive and the algorithm used is Interior/Direct, then Knitro may add at most bar_maxcorrectors corrector steps to the primal-dual step to try to stay closer to the central path. This may speedup convergence on some models (although it may make the cost per iteration a little more expensive). If the value is negative, Knitro automatically determines the maximum number of corrector steps to apply.

Name

bar_maxcorrectors

API constant

KN_PARAM_BAR_MAXCORRECTORS

Type

integer

Minimum

-1

Default

-1

bar_maxcrossit

Specifies the maximum number of crossover iterations before termination.

Details

If the value is positive and the algorithm in operation is Interior/Direct or Interior/CG, then Knitro will crossover to the Active Set algorithm near the solution. The Active Set algorithm will then perform at most bar_maxcrossit iterations to get a more exact solution. If the value is 0, no Active Set crossover occurs and the interior-point solution is the final result. If Active Set crossover is unable to improve the approximate interior-point solution, then Knitro will restore the interior-point solution. In some cases (especially on large-scale problems or difficult degenerate problems) the cost of the crossover procedure may be significant – for this reason, crossover is disabled by default. Enabling crossover generally provides a more accurate solution than Interior/Direct or Interior/CG.

Name

bar_maxcrossit

API constant

KN_PARAM_BAR_MAXCROSSIT

Type

integer

Minimum

0

Default

0

bar_maxmu

Specifies the maximum allowable value for the barrier parameter $mu$ used with the barrier algorithms.

Name

bar_maxmu

API constant

KN_PARAM_BAR_MAXMU

Type

double

Minimum

3.0e-16

Maximum

1.0e+16

Default

1.0e+16

bar_maxrefactor

Indicates the maximum number of refactorizations of the KKT system per iteration of the Interior/Direct algorithm before reverting to a CG step.

Details

If this value is set to -1, it will use a dynamic strategy. These refactorizations are performed if negative curvature is detected in the model. Rather than reverting to a CG step, the Hessian matrix is modified in an attempt to make the subproblem convex and then the KKT system is refactorized. Increasing this value will make the Interior/Direct algorithm less likely to take CG steps. If the Interior/Direct algorithm is taking a large number of CG steps (as indicated by a positive value for “CGits” in the output), this may improve performance. This option has no effect on the Active Set algorithm.

Name

bar_maxrefactor

API constant

KN_PARAM_BAR_MAXREFACTOR

Type

integer

Minimum

-1

Default

-1

bar_mpec_heuristic

Specifies whether or not to use a heuristic approach when solving MPEC models with the barrier algorithm.

Details

In some cases enabling this heuristic can speedup the convergence to the solution and provide a more precise solution on MPEC models (i.e., models with complementarity constraints).

Name

bar_mpec_heuristic

API constant

KN_PARAM_BAR_MPEC_HEURISTIC

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_BAR_MPEC_HEURISTIC_NO

No MPEC heuristic enabled

1

yes

KN_BAR_MPEC_HEURISTIC_YES

MPEC heuristic is enabled

bar_murule

Indicates which strategy to use for modifying the barrier parameter $mu$ in the barrier algorithms.

Details

Not all strategies are available for both barrier algorithms, as described below. This option has no effect on the Active Set algorithm.

Name

bar_murule

API constant

KN_PARAM_BAR_MURULE

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_BAR_MURULE_AUTOMATIC

Let Knitro choose the strategy

1

monotone

KN_BAR_MURULE_MONOTONE

Monotonically decrease the barrier parameter. Available for both barrier algorithms.

2

adaptive

KN_BAR_MURULE_ADAPTIVE

Use an adaptive rule based on the complementarity gap to determine the value of the barrier parameter. Available for both barrier algorithms.

3

probing

KN_BAR_MURULE_PROBING

Use a probing (affine-scaling) step to dynamically determine the barrier parameter. Available only for the Interior/Direct algorithm.

4

dampmpc

KN_BAR_MURULE_DAMPMPC

Use a Mehrotra predictor-corrector type rule to determine the barrier parameter, with safeguards on the corrector step. Available only for the Interior/Direct algorithm.

5

fullmpc

KN_BAR_MURULE_FULLMPC

Use a Mehrotra predictor-corrector type rule to determine the barrier parameter, without safeguards on the corrector step. Available only for the Interior/Direct algorithm.

6

quality

KN_BAR_MURULE_QUALITY

Minimize a quality function at each iteration to determine the barrier parameter. Available only for the Interior/Direct algorithm.

bar_penaltycons

Indicates whether a penalty approach is applied to the constraints.

Details

Using a penalty approach may be helpful when the problem has degenerate or difficult constraints. It may also help to more quickly identify infeasible problems, or achieve feasibility in problems with difficult constraints. This option has no effect on the Active Set algorithm.

Name

bar_penaltycons

API constant

KN_PARAM_BAR_PENCONS

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_BAR_PENCONS_AUTO

Let Knitro choose the strategy

0

none

KN_BAR_PENCONS_NONE

Do not apply penalty approach to any constraints

2

all

KN_BAR_PENCONS_ALL

Apply a penalty approach to all general constraints

3

equalities

KN_BAR_PENCONS_EQUALITIES

Apply a penalty approach to equality constraints only

bar_penaltyrule

Indicates which penalty parameter strategy to use for determining whether or not to accept a trial iterate.

Details

This option has no effect on the Active Set algorithm.

Name

bar_penaltyrule

API constant

KN_PARAM_BAR_PENRULE

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_BAR_PENRULE_AUTO

Let Knitro choose the strategy

1

single

KN_BAR_PENRULE_SINGLE

Use a single penalty parameter in the merit function to weight feasibility versus optimality.

2

flex

KN_BAR_PENRULE_FLEX

Use a more tolerant and flexible step acceptance procedure based on a range of penalty parameter values.

bar_refinement

Specifies whether to try to refine the barrier solution for better precision.

Details

If enabled, once the optimality conditions are satisfied, Knitro will apply an additional refinement/postsolve phase to try to obtain more precision in the barrier solution. The effect is similar to the effect of enabling bar_maxcrossit, but it is usually much more efficient since it does not involve switching to the Active Set algorithm.

Name

bar_refinement

API constant

KN_PARAM_BAR_REFINEMENT

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_BAR_REFINEMENT_NO

Do not refine the barrier solution

1

yes

KN_BAR_REFINEMENT_YES

Try to refine the barrier solution

bar_relaxcons

Indicates whether a relaxation approach is applied to the constraints.

Details

Using a relaxation approach may be helpful when the problem has degenerate or difficult constraints. This option has no effect on the Active Set algorithm.

Name

bar_relaxcons

API constant

KN_PARAM_BAR_RELAXCONS

Type

enum

Default

2 (ineqs)

Value

Name

API constant

Description

0

none

KN_BAR_RELAXCONS_NONE

Do not relax any constraints

1

eqs

KN_BAR_RELAXCONS_EQS

Relax only equality constraints

2

ineqs

KN_BAR_RELAXCONS_INEQS

Relax only inequality constraints

3

all

KN_BAR_RELAXCONS_ALL

Relax all general constraints

bar_slackboundpush

Specifies the amount by which the barrier slack variables are initially pushed inside the bounds.

Details

A smaller value may be preferable when warm-starting from a point close to the solution.

Name

bar_slackboundpush

API constant

KN_PARAM_BAR_SLACKBOUNDPUSH

Type

double

Default

-1.0

bar_switchobj

Indicates which objective function to use when the barrier algorithms switch to a pure feasibility phase.

Name

bar_switchobj

API constant

KN_PARAM_BAR_SWITCHOBJ

Type

enum

Default

1 (scalarprox)

Value

Name

API constant

Description

0

none

KN_BAR_SWITCHOBJ_NONE

No objective

1

scalarprox

KN_BAR_SWITCHOBJ_SCALARPROX

Proximal point objective with scalar weighting

2

diagprox

KN_BAR_SWITCHOBJ_DIAGPROX

Proximal point objective with diagonal weighting

bar_switchrule

Indicates whether or not the barrier algorithms will allow switching from an optimality phase to a pure feasibility phase.

Name

bar_switchrule

API constant

KN_PARAM_BAR_SWITCHRULE

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_BAR_SWITCHRULE_AUTO

Let Knitro choose the strategy

0

never

KN_BAR_SWITCHRULE_NEVER

Never switch

2

moderate

KN_BAR_SWITCHRULE_MODERATE

Allow moderate switching

3

aggressive

KN_BAR_SWITCHRULE_AGGRESSIVE

More aggressive switching

bar_watchdog

Specifies whether to enable watchdog heuristic for barrier algorithms.

Details

In general, enabling the watchdog heuristic makes the barrier algorithms more likely to accept trial points. Specifically, the watchdog heuristic may occasionally accept trial points that increase the merit function, provided that subsequent iterates decrease the merit function.

Name

bar_watchdog

API constant

KN_PARAM_BAR_WATCHDOG

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_BAR_WATCHDOG_NO

No watchdog heuristic

1

yes

KN_BAR_WATCHDOG_YES

Allow watchdog heuristic to be used

Active-Set options

act_lpalg

Indicates which algorithm to use to solve linear programming (LP) subproblems when using the Knitro Active Set or SQP algorithms.

Details

The barrier option is currently only active when using the CPLEX(R) or Xpress(R) LP solvers chosen via act_lpsolver. This option has no effect on the Interior/Direct and Interior/CG algorithms.

Name

act_lpalg

API constant

KN_PARAM_ACT_LPALG

Type

enum

Default

0 (default)

Value

Name

API constant

Description

0

default

KN_ACT_LPALG_DEFAULT

Use the default algorithm for the chosen LP solver.

1

primal

KN_ACT_LPALG_PRIMAL

Use a primal simplex algorithm.

2

dual

KN_ACT_LPALG_DUAL

Use a dual simplex algorithm.

3

barrier

KN_ACT_LPALG_BARRIER

Use a barrier/interior-point algorithm.

act_lpfeastol

Specifies the feasibility tolerance used for linear programming subproblems solved when using the Active Set or SQP algorithms.

Name

act_lpfeastol

API constant

KN_PARAM_ACT_LPFEASTOL

Type

double

Minimum

0.0

Default

1.0e-08

act_lppenalty

Indicates whether to use a penalty formulation for linear programming subproblems in the Knitro Active Set or SQP algorithms.

Name

act_lppenalty

API constant

KN_PARAM_ACT_LPPENALTY

Type

enum

Default

1 (all)

Value

Name

API constant

Description

1

all

KN_ACT_LPPENALTY_ALL

Penalize all constraints.

2

nonlinear

KN_ACT_LPPENALTY_NONLINEAR

Penalize only nonlinear constraints.

3

dynamic

KN_ACT_LPPENALTY_DYNAMIC

Dynamically choose which constraints to penalize.

act_lppresolve

Indicates whether to apply a presolve for linear programming subproblems in the Knitro Active Set or SQP algorithms.

Name

act_lppresolve

API constant

KN_PARAM_ACT_LPPRESOLVE

Type

enum

Default

0 (off)

Value

Name

API constant

Description

0

off

KN_ACT_LPPRESOLVE_OFF

Presolve turned off for LP subproblems.

1

on

KN_ACT_LPPRESOLVE_ON

Presolve turned on for LP subproblems.

act_lpsolver

Indicates which linear programming simplex solver the Knitro Active Set or SQP algorithms use when solving internal LP subproblems.

Details

If act_lpsolver = cplex then the CPLEX shared object library or DLL must reside in the operating system’s load path. If this option is selected, Knitro will automatically look for standard CPLEX library names in the system’s load path (in order of most recent releases starting with CPLEX 12.10).

To override the automatic search and load a particular CPLEX library, set its name with the character type user option cplexlibname. Either supply the full path name in this option, or make sure the library resides in a directory that is listed in the operating system’s load path. For example, to specifically load the Windows CPLEX library cplex123.dll, make sure the directory containing the library is part of the PATH environment variable, and call the following (also be sure to check the return status of this call):

KN_set_char_param_by_name (kc, "cplexlibname", "cplex123.dll");

If act_lpsolver = xpress then the Xpress shared object library or DLL must reside in the operating system’s load path. If this option is selected, Knitro will automatically look for the standard Xpress dll/shared library name.

To override the automatic search and load a particular Xpress library, set its name with the character type user option xpresslibname. Either supply the full path name in this option, or make sure the library resides in a directory that is listed in the operating system’s load path.

Name

act_lpsolver

API constant

KN_PARAM_ACT_LPSOLVER

Type

enum

Default

1 (internal)

Value

Name

API constant

Description

1

internal

KN_ACT_LPSOLVER_INTERNAL

Use internal LP solver

2

cplex

KN_ACT_LPSOLVER_CPLEX

CPLEX (if user has a valid license)

3

xpress

KN_ACT_LPSOLVER_XPRESS

XPRESS (if user has a valid license)

act_parametric

Indicates whether to use a parametric approach when solving linear programming (LP) subproblems when using the Knitro Active Set or SQP algorithms.

Details

A parametric approach will solve a sequence of closely related LPs instead of one LP. It may increase the cost of an active-set iteration, but perhaps lead to convergence in fewer iterations.

Name

act_parametric

API constant

KN_PARAM_ACT_PARAMETRIC

Type

enum

Default

1 (maybe)

Value

Name

API constant

Description

0

no

KN_ACT_PARAMETRIC_NO

Never

1

maybe

KN_ACT_PARAMETRIC_MAYBE

Use selectively

2

yes

KN_ACT_PARAMETRIC_YES

Always use parametric approach

act_qpalg

Indicates which algorithm to use to solve quadratic programming (QP) subproblems when using the Knitro Active Set or SQP algorithms.

Details

This option has no effect on the Interior/Direct and Interior/CG algorithms.

Name

act_qpalg

API constant

KN_PARAM_ACT_QPALG

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_ACT_QPALG_AUTO

Let Knitro choose the algorithm

1

direct

KN_ACT_QPALG_BAR_DIRECT

Use Interior (barrier) Direct algorithm

2

cg

KN_ACT_QPALG_BAR_CG

Use Interior (barrier) CG algorithm

3

active

KN_ACT_QPALG_ACT_CG

Use Active Set SLQP algorithm

act_qppenalty

Indicates whether to use a penalty formulation for quadratic programming subproblems in the Knitro SQP algorithm.

Name

act_qppenalty

API constant

KN_PARAM_ACT_QPPENALTY

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_ACT_QPPENALTY_AUTO

Let Knitro automatically decide.

0

none

KN_ACT_QPPENALTY_NONE

Do not penalize constraints in QP subproblems.

1

all

KN_ACT_QPPENALTY_ALL

Penalize all constraints in QP subproblems.

cplexlibname

See option act_lpsolver.

Name

cplexlibname

API constant

KN_PARAM_CPLEXLIB

Type

string

Default

NULL

xpresslibname

See option act_lpsolver.

Name

xpresslibname

API constant

KN_PARAM_XPRESSLIB

Type

string

Default

NULL

Augmented Lagrangian options

al_initpenalty

Specifies the initial penalty parameter value used in the Augmented Lagrangian (AL) algorithm.

Details

A larger initial penalty value places more weight initially on achieving feasibility. Setting this parameter to 0.0 (the default setting) means Knitro will automatically try to choose a good initial value for the penalty parameter.

Name

al_initpenalty

API constant

KN_PARAM_AL_INITPENALTY

Type

double

Minimum

0.0

Maximum

1.0e+16

Default

0.0

al_maxpenalty

Specifies the maximum allowable penalty parameter value used in the Augmented Lagrangian (AL) algorithm.

Details

If feasibility cannot be achieved once this value is reached, the problem is declared infeasible.

Name

al_maxpenalty

API constant

KN_PARAM_AL_MAXPENALTY

Type

double

Minimum

0.0

Maximum

1.0e+16

Default

10000000000.0

MIP options

mip_branchrule

Specifies which branching rule to use for MIP branch and bound procedure.

Details

See options mip_strong_candlim, mip_strong_level and mip_strong_maxit for further control of strong branching procedure.

Name

mip_branchrule

API constant

KN_PARAM_MIP_BRANCHRULE

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_MIP_BRANCH_AUTO

Let Knitro choose the rule

1

most_frac

KN_MIP_BRANCH_MOSTFRAC

Most fractional (most infeasible) variable

2

pseudocost

KN_MIP_BRANCH_PSEUDOCOST

Use pseudo-cost value

3

strong

KN_MIP_BRANCH_STRONG

Use strong branching

mip_clique

Specifies rules for adding clique cuts.

Name

mip_clique

API constant

KN_PARAM_MIP_CLIQUE

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_CLIQUE_AUTO

Determine automatically

0

none

KN_MIP_CLIQUE_NONE

Do not add clique cuts

1

root

KN_MIP_CLIQUE_ROOT

Add clique cuts at root node

2

tree

KN_MIP_CLIQUE_TREE

Add clique cuts in the whole tree

mip_cut_flowcover

Specifies rules for adding flow cover cuts.

Name

mip_cut_flowcover

API constant

KN_PARAM_MIP_CUT_FLOWCOVER

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_CUT_FLOWCOVER_AUTO

Determine automatically

0

none

KN_MIP_CUT_FLOWCOVER_NONE

Do not add flow cover cuts

1

root

KN_MIP_CUT_FLOWCOVER_ROOT

Add flow cover cuts at root node only

2

tree

KN_MIP_CUT_FLOWCOVER_TREE

Add flow cover cuts at any tree node

mip_cut_probing

Specifies rules for adding probing cuts.

Name

mip_cut_probing

API constant

KN_PARAM_MIP_CUT_PROBING

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_CUT_PROBING_AUTO

Determine automatically

0

none

KN_MIP_CUT_PROBING_NONE

Do not add probing cuts

1

root

KN_MIP_CUT_PROBING_ROOT

Add probing cuts at root node only

2

tree

KN_MIP_CUT_PROBING_TREE

Add probing cuts at any tree node

mip_cutfactor

This value specifies a limit on the number of cuts added to a node subproblem.

Details

If non-negative, a maximum of mip_cutfactor times the number of constraints is possibly appended.

Name

mip_cutfactor

API constant

KN_PARAM_MIP_CUTFACTOR

Type

double

Minimum

0.0

Default

1.0

mip_cutoff

This value specifies the objective cutoff value for MIP.

Name

mip_cutoff

API constant

KN_PARAM_MIP_CUTOFF

Type

double

Default

inf

mip_cutoff_abs

This value specifies the absolute improvement cutoff value for MIP.

Details

When a new integer solution is found, this value will be subtracted (resp. added) to the incumbent value to determine the new cutoff value for a minimization problem (resp. maximization problem). A higher value will prune additional nodes (saving time). A lower value will improve bound precision.

Name

mip_cutoff_abs

API constant

KN_PARAM_MIP_CUTOFFABS

Type

double

Minimum

0.0

Default

1.0e-06

mip_cutoff_rel

This value specifies the relative improvement cutoff value for MIP.

Details

When a new integer solution is found, this percentage will be used to determine the new cutoff value from the incumbent value. A higher value will prune additional nodes (saving time). A lower value will improve bound precision.

Name

mip_cutoff_rel

API constant

KN_PARAM_MIP_CUTOFFREL

Type

double

Minimum

0.0

Default

1.0e-04

mip_cutting_plane

Specifies when to apply the cutting plane procedure.

Name

mip_cutting_plane

API constant

KN_PARAM_MIP_CUTTINGPLANE

Type

enum

Default

1 (root)

Value

Name

API constant

Description

0

none

KN_MIP_CUTTINGPLANE_NONE

Do not perform cutting plane

1

root

KN_MIP_CUTTINGPLANE_ROOT

Only perform root-cutting

mip_debug

Specifies debugging level for MIP solution.

Name

mip_debug

API constant

KN_PARAM_MIP_DEBUG

Type

enum

Default

0 (none)

Value

Name

API constant

Description

0

none

KN_MIP_DEBUG_NONE

No MIP debugging info

1

all

KN_MIP_DEBUG_ALL

Write debugging to the file kdbg_mip.log

mip_gomory

Specifies rules for adding Gomory mixed-integer cuts.

Name

mip_gomory

API constant

KN_PARAM_MIP_GOMORY

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_GOMORY_AUTO

Determine automatically

0

none

KN_MIP_GOMORY_NONE

Do not add Gomory cuts

1

root

KN_MIP_GOMORY_ROOT

Add Gomory cuts at root node only

2

tree

KN_MIP_GOMORY_TREE

Add Gomory cuts at any tree node

mip_gub_branch

Specifies whether or not to branch on generalized upper bounds (GUBs).

Name

mip_gub_branch

API constant

KN_PARAM_MIP_GUB_BRANCH

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_MIP_GUB_BRANCH_NO

Do not branch on GUBs

1

yes

KN_MIP_GUB_BRANCH_YES

Branch on GUBs

mip_heuristic_diving

Specifies whether or not to enable the MIP diving heuristic.

Details

This option is a bit-valued option where various diving heuristics can be enabled by activating the corresponding bit value as described below.

Name

mip_heuristic_diving

API constant

KN_PARAM_MIP_HEUR_DIVING

Type

bitset

Default

1

Bit value

Name

Description

1

auto

Automatically determined. If enabled, other bits are ignored.

2

d1

Pure fractional diving.

4

d2

Objective-guided fractional diving.

8

d3

Vectorlength diving (obsolete).

16

d4

Coefficient-branching diving (obsolete).

32

d5

Guided-branching diving (obsolete).

64

d6

Linesearch diving (obsolete).

128

d7

Pseudo-random diving using both fractionality and cliques.

256

d8

Fractional diving followed by lock-based diving.

512

d9

Fractional diving followed by objective-based diving.

1024

d10

Fractional diving skewed towards fixing binaries to 1.

mip_heuristic_feaspump

Specifies whether or not to enable the MIP feasibility pump heuristic.

Name

mip_heuristic_feaspump

API constant

KN_PARAM_MIP_HEUR_FEASPUMP

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_HEUR_FEASPUMP_AUTO

Determine automatically

0

off

KN_MIP_HEUR_FEASPUMP_OFF

Feasibility pump heuristic is turned off

1

on

KN_MIP_HEUR_FEASPUMP_ON

Feasibility pump heuristic is turned on

mip_heuristic_fixpropagate

Specifies whether or not to enable the MIP fix-and-propagate heuristic.

Name

mip_heuristic_fixpropagate

API constant

KN_PARAM_MIP_HEUR_FIXPROPAGATE

Type

bitset

Default

1

Bit value

Name

Description

1

auto

Automatically determined. If enabled, other bits are ignored.

2

fixprop1

Activate fix & propagate heuristic 1.

4

fixprop2

Activate fix & propagate heuristic 2.

8

fixprop3

Activate fix & propagate heuristic 3.

16

fixprop4

Activate fix & propagate heuristic 4.

32

fixprop5

Activate fix & propagate heuristic 5.

mip_heuristic_lns

Specifies whether or not to enable the MIP large neighborhood search (LNS) heuristics.

Details

This option is a bit-valued option where various LNS heuristics can be enabled by activating the corresponding bit value as described below. Setting this option to -1 will use an automatic setting and setting the value to 0 will disable all LNS heuristics. Otherwise, set this parameter value to the sum of the values for the individual LNS heuristics you wish to enable. For example, to enable both the “RENS” and “RINS” LNS heuristics, you would set this option value to 3 (summing 1 for RENS and 2 for RINS).

Name

mip_heuristic_lns

API constant

KN_PARAM_MIP_HEUR_LNS

Type

integer

Minimum

-1

Maximum

31

Default

-1

mip_heuristic_localsearch

Specifies whether or not to enable the MIP local search heuristic.

Name

mip_heuristic_localsearch

API constant

KN_PARAM_MIP_HEUR_LOCALSEARCH

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_HEUR_LOCALSEARCH_AUTO

Determine automatically

0

off

KN_MIP_HEUR_LOCALSEARCH_OFF

MIP local search heuristic is turned off

1

on

KN_MIP_HEUR_LOCALSEARCH_ON

MIP local search heuristic is turned on

mip_heuristic_maxit

Maximum number of iterations to allow for MIP heuristic.

Name

mip_heuristic_maxit

API constant

KN_PARAM_MIP_HEUR_MAXIT

Type

integer

Minimum

0

Default

100

mip_heuristic_misqp

Specifies whether or not to enable the MIP MISQP heuristic.

Name

mip_heuristic_misqp

API constant

KN_PARAM_MIP_HEUR_MISQP

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_HEUR_MISQP_AUTO

Determine automatically

0

off

KN_MIP_HEUR_MISQP_OFF

MISQP heuristic is turned off

1

on

KN_MIP_HEUR_MISQP_ON

MISQP heuristic is turned on

mip_heuristic_mpec

Specifies whether or not to enable the MIP MPEC heuristic.

Name

mip_heuristic_mpec

API constant

KN_PARAM_MIP_HEUR_MPEC

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_HEUR_MPEC_AUTO

Determine automatically

0

off

KN_MIP_HEUR_MPEC_OFF

MPEC heuristic is turned off

1

on

KN_MIP_HEUR_MPEC_ON

MPEC heuristic is turned on

mip_heuristic_strategy

Specifies the level of effort applied for the MIP heuristic search used to try to find an initial integer feasible point.

Name

mip_heuristic_strategy

API constant

KN_PARAM_MIP_HEUR_STRATEGY

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_HEUR_STRATEGY_AUTO

Automatic strategy

0

none

KN_MIP_HEUR_STRATEGY_NONE

No heuristics are used

1

basic

KN_MIP_HEUR_STRATEGY_BASIC

Try basic heuristics

2

advanced

KN_MIP_HEUR_STRATEGY_ADVANCED

Try more advanced heuristics

3

extensive

KN_MIP_HEUR_STRATEGY_EXTENSIVE

Try most extensive heuristics

mip_heuristic_terminate

Specifies the condition for terminating the MIP heuristic.

Name

mip_heuristic_terminate

API constant

KN_PARAM_MIP_HEUR_TERMINATE

Type

enum

Default

1 (feasible)

Value

Name

API constant

Description

1

feasible

KN_MIP_HEUR_TERMINATE_FEASIBLE

Terminate at first feasible point

2

limit

KN_MIP_HEUR_TERMINATE_LIMIT

Run heuristic until it hits limit

mip_implications

Whether to add logical implications deduced from branching decisions at a MIP node.

Name

mip_implications

API constant

KN_PARAM_MIP_IMPLICATNS

Type

enum

Default

1 (yes)

Value

Name

API constant

Description

0

no

KN_MIP_IMPLICATNS_NO

Do not add logical implications

1

yes

KN_MIP_IMPLICATNS_YES

Add logical implications

mip_initptfile

Name for the file from which to read the MIP initial point.

Details

NULL value means no MIP initial point read from file.

Name

mip_initptfile

API constant

KN_PARAM_MIP_INITPTFILE

Type

string

Default

NULL

mip_integer_tol

This value specifies the threshold for deciding whether or not a variable is determined to be an integer.

Name

mip_integer_tol

API constant

KN_PARAM_MIP_INTEGERTOL

Type

double

Minimum

0.0

Maximum

1.0

Default

1.0e-08

mip_intvar_strategy

Specifies how to handle integer variables.

Name

mip_intvar_strategy

API constant

KN_PARAM_MIP_INTVAR_STRATEGY

Type

enum

Default

0 (none)

Value

Name

API constant

Description

0

none

KN_MIP_INTVAR_STRATEGY_NONE

No special treatment

1

relax

KN_MIP_INTVAR_STRATEGY_RELAX

Relax integer variables

2

mpec

KN_MIP_INTVAR_STRATEGY_MPEC

Convert to mpec constraints

mip_knapsack

Specifies rules for adding MIP knapsack cuts.

Name

mip_knapsack

API constant

KN_PARAM_MIP_KNAPSACK

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_KNAPSACK_AUTO

Determine automatically

0

none

KN_MIP_KNAPSACK_NO

Do not add knapsack cuts

1

root

KN_MIP_KNAPSACK_ROOT

Add knapsack cuts derived in the root node

2

tree

KN_MIP_KNAPSACK_TREE

Add knapsack cuts in the whole tree

mip_liftproject

Specifies rules for adding lift and project cuts.

Name

mip_liftproject

API constant

KN_PARAM_MIP_LIFTPROJECT

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_LIFTPROJECT_AUTO

Determine automatically

0

none

KN_MIP_LIFTPROJECT_NONE

Do not add lift and project cuts

1

root

KN_MIP_LIFTPROJECT_ROOT

Add lift and project cuts at root node

mip_maxnodes

Specifies the maximum number of nodes explored (0 means no limit).

Name

mip_maxnodes

API constant

KN_PARAM_MIP_MAXNODES

Type

integer

Minimum

0

Default

0

mip_method

Specifies which MIP method to use.

Name

mip_method

API constant

KN_PARAM_MIP_METHOD

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_MIP_METHOD_AUTO

Let Knitro choose the method

1

BB

KN_MIP_METHOD_BB

Standard branch and bound

3

MISQP

KN_MIP_METHOD_MISQP

Mixed-integer SQP

mip_mir

Specifies rules for adding mixed-integer rounding (MIR) cuts.

Name

mip_mir

API constant

KN_PARAM_MIP_MIR

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_MIR_AUTO

Automatically determine whether to add MIR cuts

0

none

KN_MIP_MIR_NONE

Do not add MIR cuts

1

root

KN_MIP_MIR_ROOT

Add MIR cuts derived in the root node

2

tree

KN_MIP_MIR_TREE

Add MIR cuts in the whole tree

mip_multistart

Use to enable MIP multi-start at the branch-and-bound level.

Name

mip_multistart

API constant

KN_PARAM_MIP_MULTISTART

Type

enum

Default

0 (off)

Value

Name

API constant

Description

0

off

KN_MIP_MULTISTART_OFF

MIP multistart turned off

1

on

KN_MIP_MULTISTART_ON

MIP multistart turned on

mip_node_lpalg

Specifies which algorithm to use for standard node LP subproblem solves in MIP (same options as lp_algorithm user option).

Name

mip_node_lpalg

API constant

KN_PARAM_MIP_NODE_LPALG

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_NODE_LPALG_AUTO

Let Knitro automatically decide.

0

nlp

KN_MIP_NODE_LPALG_NLPALGORITHM

Use algorithm specified in mip_node_nlpalg.

1

primalsimplex

KN_MIP_NODE_LPALG_PRIMALSIMPLEX

Use Primal Simplex algorithm.

2

dualsimplex

KN_MIP_NODE_LPALG_DUALSIMPLEX

Use Dual Simplex algorithm.

3

barrier

KN_MIP_NODE_LPALG_BARRIER

Use Interior-Point/Barrier algorithm.

4

pdlp

KN_MIP_NODE_LPALG_PDLP

Use Primal-Dual Linear Programming algorithm.

mip_node_nlpalg

Specifies which algorithm to use for standard node NLP subproblem solves in MIP (same options as nlp_algorithm user option).

Name

mip_node_nlpalg

API constant

KN_PARAM_MIP_NODE_NLPALG

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_MIP_NODE_NLPALG_AUTO

Let Knitro choose the algorithm

1

direct

KN_MIP_NODE_NLPALG_BAR_DIRECT

Use Interior (barrier) Direct algorithm

2

cg

KN_MIP_NODE_NLPALG_BAR_CG

Use Interior (barrier) CG algorithm

3

active

KN_MIP_NODE_NLPALG_ACT_CG

Use Active Set SLQP algorithm

4

sqp

KN_MIP_NODE_NLPALG_ACT_SQP

Use Active Set SQP algorithm

5

multi

KN_MIP_NODEALG_MULTI

Run multiple algorithms (deprecated)

6

al

KN_MIP_NODE_NLPALG_AL

Use Augmented Lagrangian algorithm

mip_numthreads

Number of threads to use for MIP solvers.

Details

Choose any positive integer, or 0 = determine automatically.

Name

mip_numthreads

API constant

KN_PARAM_MIP_NUMTHREADS

Type

integer

Minimum

0

Default

0

mip_opt_gap_abs

The absolute optimality gap stop tolerance for MIP.

Name

mip_opt_gap_abs

API constant

KN_PARAM_MIP_OPTGAPABS

Type

double

Minimum

-1.0

Default

1.0e-06

mip_opt_gap_rel

The relative optimality gap stop tolerance for MIP.

Name

mip_opt_gap_rel

API constant

KN_PARAM_MIP_OPTGAPREL

Type

double

Minimum

-1.0

Default

1.0e-04

mip_outinterval

Specifies node printing interval for mip_outlevel when mip_outlevel > 0.

Name

mip_outinterval

API constant

KN_PARAM_MIP_OUTINTERVAL

Type

integer

Minimum

0

Default

0

mip_outlevel

Specifies how much MIP information to print.

Name

mip_outlevel

API constant

KN_PARAM_MIP_OUTLEVEL

Type

enum

Default

2 (iterstime)

Value

Name

API constant

Description

0

none

KN_MIP_OUTLEVEL_NONE

Nothing

1

iters

KN_MIP_OUTLEVEL_ITERS

One line for every node

2

iterstime

KN_MIP_OUTLEVEL_ITERSTIME

Also print accumulated time every node

3

root

KN_MIP_OUTLEVEL_ROOT

Also print output from root node relaxation solve

mip_outsub

Specifies MIP subproblem solve debug output control.

Details

This output is only produced if mip_debug = 1 and appears in the file kdbg_mip.log.

Name

mip_outsub

API constant

KN_PARAM_MIP_OUTSUB

Type

enum

Default

0 (none)

Value

Name

API constant

Description

0

none

KN_MIP_OUTSUB_NONE

Do not print any debug output from subproblem solves.

1

yes

KN_MIP_OUTSUB_YES

Subproblem debug output enabled, controlled by option outlev.

2

yesprob

KN_MIP_OUTSUB_YESPROB

Subproblem debug output enabled and print problem characteristics.

mip_pseudoinit

Specifies the method used to initialize pseudo-costs corresponding to variables that have not yet been branched on in the MIP method.

Name

mip_pseudoinit

API constant

KN_PARAM_MIP_PSEUDOINIT

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_MIP_PSEUDOINIT_AUTO

Let Knitro choose the method

1

ave

KN_MIP_PSEUDOINIT_AVE

Use average value

2

strong

KN_MIP_PSEUDOINIT_STRONG

Use strong branching

mip_relaxable

Specifies whether integer variables are relaxable.

Name

mip_relaxable

API constant

KN_PARAM_MIP_RELAXABLE

Type

enum

Default

1 (all)

Value

Name

API constant

Description

0

none

KN_MIP_RELAXABLE_NONE

Integer variables not relaxable

1

all

KN_MIP_RELAXABLE_ALL

All integer variables are relaxable

mip_restart

Specifies whether to enable the MIP restart procedure.

Name

mip_restart

API constant

KN_PARAM_MIP_RESTART

Type

enum

Default

1 (on)

Value

Name

API constant

Description

0

off

KN_MIP_RESTART_OFF

MIP restart turned off

1

on

KN_MIP_RESTART_ON

MIP restart turned on

mip_root_lpalg

Specifies which algorithm to use for root node LP subproblem solves in MIP (same options as lp_algorithm user option).

Name

mip_root_lpalg

API constant

KN_PARAM_MIP_ROOT_LPALG

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_ROOT_LPALG_AUTO

Let Knitro automatically decide.

0

nlp

KN_MIP_ROOT_LPALG_NLPALGORITHM

Use algorithm specified in mip_root_nlpalg.

1

primalsimplex

KN_MIP_ROOT_LPALG_PRIMALSIMPLEX

Use Primal Simplex algorithm.

2

dualsimplex

KN_MIP_ROOT_LPALG_DUALSIMPLEX

Use Dual Simplex algorithm.

3

barrier

KN_MIP_ROOT_LPALG_BARRIER

Use Interior-Point/Barrier algorithm.

4

pdlp

KN_MIP_ROOT_LPALG_PDLP

Use Primal-Dual Linear Programming algorithm.

mip_root_nlpalg

Specifies which algorithm to use for root node NLP solves in MIP (same options as nlp_algorithm user option).

Name

mip_root_nlpalg

API constant

KN_PARAM_MIP_ROOT_NLPALG

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_MIP_ROOT_NLPALG_AUTO

Let Knitro choose the algorithm

1

direct

KN_MIP_ROOT_NLPALG_BAR_DIRECT

Use Interior (barrier) Direct algorithm

2

cg

KN_MIP_ROOT_NLPALG_BAR_CG

Use Interior (barrier) CG algorithm

3

active

KN_MIP_ROOT_NLPALG_ACT_CG

Use Active Set SLQP algorithm

4

sqp

KN_MIP_ROOT_NLPALG_ACT_SQP

Use Active Set SQP algorithm

5

multi

KN_MIP_ROOTALG_MULTI

Run multiple algorithms (deprecated)

6

al

KN_MIP_ROOT_NLPALG_AL

Use Augmented Lagrangian algorithm

mip_rounding

Specifies the MIP rounding rule to apply.

Name

mip_rounding

API constant

KN_PARAM_MIP_ROUNDING

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_ROUND_AUTO

Let Knitro choose the rule

0

none

KN_MIP_ROUND_NONE

Do not round if a node is infeasible

2

heur_only

KN_MIP_ROUND_HEURISTIC

Round using heuristic only (fast)

3

nlp_sometimes

KN_MIP_ROUND_NLP_SOME

Round and solve NLP if likely to succeed

4

nlp_always

KN_MIP_ROUND_NLP_ALWAYS

Always round and solve NLP

mip_selectdir

Specifies the MIP node selection direction rule (for tiebreakers) for choosing the next node in the branch-and-bound tree.

Name

mip_selectdir

API constant

KN_PARAM_MIP_SELECTDIR

Type

enum

Default

0 (down)

Value

Name

API constant

Description

0

down

KN_MIP_SELECTDIR_DOWN

Choose the less-than node first

1

up

KN_MIP_SELECTDIR_UP

Choose the greater-than node first

mip_selectrule

Specifies the MIP select rule for choosing the next node in the branch-and-bound tree.

Name

mip_selectrule

API constant

KN_PARAM_MIP_SELECTRULE

Type

enum

Default

0 (auto)

Value

Name

API constant

Description

0

auto

KN_MIP_SEL_AUTO

Let Knitro choose the rule

1

depth_first

KN_MIP_SEL_DEPTHFIRST

Search the tree depth first

2

best_bound

KN_MIP_SEL_BESTBOUND

Node with the best relaxation bound

3

combo_1

KN_MIP_SEL_COMBO_1

Depth first unless pruned, then best bound

mip_strong_candlim

Specifies the maximum number of candidates to explore for MIP strong branching.

Name

mip_strong_candlim

API constant

KN_PARAM_MIP_STRONG_CANDLIM

Type

integer

Minimum

0

Default

128

mip_strong_level

Specifies the maximum number of tree levels on which to perform MIP strong branching.

Name

mip_strong_level

API constant

KN_PARAM_MIP_STRONG_LEVEL

Type

integer

Minimum

0

Default

10

mip_strong_maxit

Specifies the maximum number of iterations to allow for MIP strong branching solves.

Name

mip_strong_maxit

API constant

KN_PARAM_MIP_STRONG_MAXIT

Type

integer

Minimum

0

Default

1000

mip_sub_maxtime

Specifies the maximum allowable real time in seconds for MIP node subproblems.

Name

mip_sub_maxtime

API constant

KN_PARAM_MIP_SUB_MAXTIME

Type

double

Minimum

0.0

Default

100000000.0

mip_terminate

Specifies conditions for terminating the MIP algorithm.

Name

mip_terminate

API constant

KN_PARAM_MIP_TERMINATE

Type

enum

Default

0 (optimal)

Value

Name

API constant

Description

0

optimal

KN_MIP_TERMINATE_OPTIMAL

Terminate at optimum

1

feasible

KN_MIP_TERMINATE_FEASIBLE

Terminate at first integer feasible point

mip_zerohalf

Specifies rules for adding zero-half cuts.

Name

mip_zerohalf

API constant

KN_PARAM_MIP_ZEROHALF

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_MIP_ZEROHALF_AUTO

Determine automatically

0

none

KN_MIP_ZEROHALF_NONE

Do not add zero-half cuts

1

root

KN_MIP_ZEROHALF_ROOT

Add cuts derived in the root node

2

tree

KN_MIP_ZEROHALF_TREE

Add zero-half cuts in the whole tree

Concurrent solver options

concurrent_lpalg

Specifies the LP algorithms to run concurrently when the concurrent solver is enabled on an LP.

Name

concurrent_lpalg

API constant

KN_PARAM_CONCURRENT_LPALG

Type

bitset

Default

-1

Bit value

Name

Description

-1

auto

Automatically determine LP algorithm for concurrent solver

0

nlp

Use algorithms specified in concurrent_nlpalg

1

primalsimplex

Enable Primal Simplex algorithm for concurrent solver

2

dualsimplex

Enable Dual Simplex algorithm for concurrent solver

4

barrier

Enable Interior-Point/Barrier algorithm for concurrent solver

8

pdlp

Enable Primal-Dual Linear Programming algorithm for concurrent solver

concurrent_maxsolves

Specifies the maximum number of solves when using the concurrent solver (should be more than 1 and <= numthreads).

Details

Knitro will automatically set the maximum solve limit based on numthreads if set to 0.

Name

concurrent_maxsolves

API constant

KN_PARAM_CONCURRENT_MAXSOLVES

Type

integer

Default

0

concurrent_nlpalg

Specifies the NLP algorithms to run concurrently when the concurrent solver is enabled on an NLP.

Name

concurrent_nlpalg

API constant

KN_PARAM_CONCURRENT_NLPALG

Type

bitset

Default

-1

Bit value

Name

Description

-1

auto

Automatically determine NLP algorithm for concurrent solver

1

direct

Enable Barrier Direct algorithm for concurrent solver

2

cg

Enable Interior Barrier CG algorithm for concurrent solver

4

active

Enable Active-Set SLQP algorithm for concurrent solver

8

sqp

Enable SQP algorithm for concurrent solver

16

al

Enable Augmented Lagrangian algorithm for concurrent solver

concurrent_outlog

Specifies the output logging options when the concurrent solver is enabled.

Name

concurrent_outlog

API constant

KN_PARAM_CONCURRENT_OUTLOG

Type

enum

Default

2 (objfeas)

Value

Name

API constant

Description

1

all

KN_CONCURRENT_OUTLOG_ALL

Show all iteration information on all concurrent solves

2

objfeas

KN_CONCURRENT_OUTLOG_OBJFEAS

Show objective and feasibility error on all concurrent solves

3

best

KN_CONCURRENT_OUTLOG_BEST

Show information from the current best concurrent solve iterate

concurrent_solver

Specifies whether or not to enable the concurrent solver.

Name

concurrent_solver

API constant

KN_PARAM_CONCURRENT_SOLVER

Type

enum

Default

-1 (auto)

Value

Name

API constant

Description

-1

auto

KN_CONCURRENT_SOLVER_AUTO

Determine automatically whether to enable the concurrent solver.

0

no

KN_CONCURRENT_SOLVER_NO

Do not enable the concurrent solver.

1

yes

KN_CONCURRENT_SOLVER_YES

Enable the concurrent solver.

Multi-start options

ms_enable

Whether to enable multistart to find a better local minimum.

Name

ms_enable

API constant

KN_PARAM_MULTISTART

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_MULTISTART_NO

Knitro solves from a single initial point

1

yes

KN_MULTISTART_YES

Knitro solves using multiple start points

ms_initpt_cluster

The strategy for clustering initial points in multi-start.

Name

ms_initpt_cluster

API constant

KN_PARAM_MS_INITPT_CLUSTER

Type

enum

Default

0 (none)

Value

Name

API constant

Description

0

none

KN_MS_INITPT_CLUSTER_NONE

Do not apply clustering

1

sl

KN_MS_INITPT_CLUSTER_SL

Apply single linkage based clustering

ms_maxbndrange

Specifies the maximum range that an unbounded variable can vary over when multistart computes new start points.

Name

ms_maxbndrange

API constant

KN_PARAM_MSMAXBNDRANGE

Type

double

Minimum

0.0

Default

1000.0

ms_maxsolves

How many Knitro solutions to compute if multistart is enabled.

Details

Choose any positive integer, or 0 means Knitro sets a default value depending on context.

Name

ms_maxsolves

API constant

KN_PARAM_MSMAXSOLVES

Type

integer

Minimum

0

Default

0

ms_num_to_save

How many feasible multistart points to save in file knitro_mspoints.log.

Details

Choose any positive integer, or 0 means save none.

Name

ms_num_to_save

API constant

KN_PARAM_MSNUMTOSAVE

Type

integer

Minimum

0

Default

0

ms_numthreads

Number of threads to use in parallel multistart.

Details

Choose any positive integer, or 0 = determine automatically based on numthreads.

Name

ms_numthreads

API constant

KN_PARAM_MS_NUMTHREADS

Type

integer

Minimum

0

Default

0

ms_outsub

Enable writing algorithm output to files for the parallel multi-start procedure.

Name

ms_outsub

API constant

KN_PARAM_MS_OUTSUB

Type

enum

Default

0 (none)

Value

Name

API constant

Description

0

none

KN_MS_OUTSUB_NONE

No output from subproblem solves

1

yes

KN_MS_OUTSUB_YES

Subproblem output enabled, controlled by option outlev.

ms_savetol

Specifies the tolerance for deciding two feasible points are the same.

Name

ms_savetol

API constant

KN_PARAM_MSSAVETOL

Type

double

Minimum

0.0

Default

1.0e-06

ms_seed

Seed value used to generate random initial points in multi-start; should be a non-negative integer.

Name

ms_seed

API constant

KN_PARAM_MS_SEED

Type

integer

Minimum

0

Default

0

ms_startptrange

Specifies the maximum range that any variable can vary over when multistart computes new start points.

Name

ms_startptrange

API constant

KN_PARAM_MSSTARTPTRANGE

Type

double

Minimum

0.0

Default

1.0e+20

ms_sub_maxtime

Specifies, in seconds, the maximum allowable real time for multi-start subproblems.

Details

This is the time for local solves from a given initial point. This option has no effect unless ms_enable = yes.

Name

ms_sub_maxtime

API constant

KN_PARAM_MS_SUB_MAXTIME

Type

double

Minimum

0.0

Default

100000000.0

ms_terminate

Specifies conditions for terminating the multistart procedure.

Name

ms_terminate

API constant

KN_PARAM_MSTERMINATE

Type

enum

Default

4 (rulebased)

Value

Name

API constant

Description

0

maxsolves

KN_MSTERMINATE_MAXSOLVES

Terminate after maxsolves

1

optimal

KN_MSTERMINATE_OPTIMAL

Terminate at first local optimum

2

feasible

KN_MSTERMINATE_FEASIBLE

Terminate at first feasible solution estimate

3

any

KN_MSTERMINATE_ANY

Terminate at first completed solve

4

rulebased

KN_MSTERMINATE_RULEBASED

Terminate when the estimated probability of finding a new local solution is low

ms_terminaterule_tol

The tolerance in (0,1] for the rule-based termination of multi-start.

Details

Specifying a non-positive value will enable an automatic tolerance selection. Values closer to 1 trigger termination sooner, while values closer to zero will result in more solves before termination.

Name

ms_terminaterule_tol

API constant

KN_PARAM_MS_TERMINATERULE_TOL

Type

double

Minimum

0.0

Maximum

1.0

Default

0.0

Parallelism options

blas_numthreads

Specify the number of threads to use for BLAS operations when blasoption = 1

Name

blas_numthreads

API constant

KN_PARAM_BLAS_NUMTHREADS

Type

integer

Minimum

0

Default

0

concurrent_evals

Determines whether or not the user provided callback functions used for function and derivative evaluations can take place concurrently in parallel (for possibly different values of x).

Details

If it is not safe to have concurrent evaluations, then setting concurrent_evals = 0, will put these evaluations in a critical region so that only one evaluation can take place at a time. If concurrent_evals = 1 then concurrent evaluations are allowed when Knitro is run in parallel, and it is the responsibility of the user to ensure that these evaluations are stable.

Name

concurrent_evals

API constant

KN_PARAM_CONCURRENT_EVALS

Type

enum

Default

1 (yes)

Value

Name

API constant

Description

0

no

KN_CONCURRENT_EVALS_NO

Only one thread can perform an evaluation at a time

1

yes

KN_CONCURRENT_EVALS_YES

Allow multi-threaded simultaneous evaluations

conic_numthreads

Number of threads to do conic operations in parallel. Choose any positive integer, or 0 = determine automatically based on numthreads

Name

conic_numthreads

API constant

KN_PARAM_CONIC_NUMTHREADS

Type

integer

Default

0

findiff_numthreads

Number of threads to use in finite-differencing.

Details

Choose any positive integer, or 0 = determine automatically based on numthreads

Name

findiff_numthreads

API constant

KN_PARAM_FINDIFF_NUMTHREADS

Type

integer

Minimum

0

Default

0

linsolver_numthreads

Specify the number of threads to use for linear system solve operations when linsolver = 6.

Name

linsolver_numthreads

API constant

KN_PARAM_LINSOLVER_NUMTHREADS

Type

integer

Minimum

0

Default

0

numthreads

Specify the number of threads to use for parallel computing features.

Name

numthreads

API constant

KN_PARAM_NUMTHREADS

Type

integer

Minimum

-1

Default

-1

Output options

debug

Controls the level of debugging output.

Details

Debugging output can slow execution of Knitro and should not be used in a production setting. All debugging output is suppressed if option outlev = 0.

Name

debug

API constant

KN_PARAM_DEBUG

Type

enum

Default

0 (none)

Value

Name

API constant

Description

0

none

KN_DEBUG_NONE

No debugging output

1

problem

KN_DEBUG_PROBLEM

Print algorithm information to kdbg*.log output files.

2

execution

KN_DEBUG_EXECUTION

Print program execution information.

newpoint

Specifies additional action to take after every iteration in a solve of a continuous problem, or after every new incumbent of the NLPBB algorithm.

Details

For a continuous problem, an iteration of Knitro results in a new point that is closer to a solution. The new point includes values of x and Lagrange multipliers lambda.

Name

newpoint

API constant

KN_PARAM_NEWPOINT

Type

enum

Default

0 (none)

Value

Name

API constant

Description

0

none

KN_NEWPOINT_NONE

No additional action

1

saveone

KN_NEWPOINT_SAVEONE

Save the latest new point to file knitro_newpoint.knsol. Previous contents of the file are overwritten.

2

saveall

KN_NEWPOINT_SAVEALL

Export one file per iteration with the new point, named knitro_newpoint_#.knsol where # is the iteration number.

out_csvinfo

Controls whether or not to generate a file knitro_solve.csv containing solve information in comma separated format.

Name

out_csvinfo

API constant

KN_PARAM_OUT_CSVINFO

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_OUT_CSVINFO_NO

No csv solution file is generated

1

yes

KN_OUT_CSVINFO_YES

Generate a solution file knitro_solve.csv

out_csvname

Use to specify a custom csv filename when using out_csvinfo.

Name

out_csvname

API constant

KN_PARAM_OUT_CSVNAME

Type

string

Default

NULL

out_hints

Specifies whether to print diagnostic hints (e.g. about user option settings) after solving.

Name

out_hints

API constant

KN_PARAM_OUT_HINTS

Type

enum

Default

1 (yes)

Value

Name

API constant

Description

0

no

KN_OUT_HINTS_NO

Do not print any hints.

1

yes

KN_OUT_HINTS_YES

Print diagnostic hints on occasion.

outappend

Specifies whether output should be started in a new file, or appended to existing files.

Details

The option affects knitro.log and files produced when debug = 1.

Name

outappend

API constant

KN_PARAM_OUTAPPEND

Type

enum

Default

0 (no)

Value

Name

API constant

Description

0

no

KN_OUTAPPEND_NO

Erase existing files when opening

1

yes

KN_OUTAPPEND_YES

Append to existing files

outdir

Specifies a single directory as the location to write all output files.

Details

The option should be a full pathname to the directory, and the directory must already exist.

Name

outdir

API constant

KN_PARAM_OUTDIR

Type

string

Default

NULL

outlev

Controls the level of output produced by Knitro.

Name

outlev

API constant

KN_PARAM_OUTLEV

Type

enum

Default

2 (iter_10)

Value

Name

API constant

Description

0

none

KN_OUTLEV_NONE

Printing of all output is suppressed

1

summary

KN_OUTLEV_SUMMARY

Print only summary information

2

iter_10

KN_OUTLEV_ITER_10

Print basic information every 10 iterations

3

iter

KN_OUTLEV_ITER

Print basic information at each iteration

4

iter_verbose

KN_OUTLEV_ITER_VERBOSE

Print basic information and the function count at each iteration

5

iter_x

KN_OUTLEV_ITER_X

Print all the above, and the values of the solution vector x

6

all

KN_OUTLEV_ALL

Print all the above, and the values of the constraints c at x and the Lagrange multipliers lambda

outmode

Specifies where to direct the output from Knitro.

Name

outmode

API constant

KN_PARAM_OUTMODE

Type

enum

Default

0 (screen)

Value

Name

API constant

Description

0

screen

KN_OUTMODE_SCREEN

Directed to standard output (stdout)

1

file

KN_OUTMODE_FILE

Directed to a file (default name knitro.log, see option outname)

2

both

KN_OUTMODE_BOTH

Both standard output and file

outname

Use to specify a custom filename when output is written to a file using outmode.

Name

outname

API constant

KN_PARAM_OUTNAME

Type

string

Default

NULL

Tuner options

tuner

Indicates whether to invoke the Knitro-Tuner.

Name

tuner

API constant

KN_PARAM_TUNER

Type

enum

Default

0 (off)

Value

Name

API constant

Description

0

off

KN_TUNER_OFF

Knitro Tuner turned off

1

on

KN_TUNER_ON

Knitro Tuner enabled

tuner_optionsfile

Can be used to specify the location of a Tuner options file.

Name

tuner_optionsfile

API constant

KN_PARAM_TUNER_OPTIONSFILE

Type

string

Default

NULL

tuner_outsub

Enable writing additional Tuner subproblem solve output to files for the Knitro-Tuner procedure (tuner = 1).

Name

tuner_outsub

API constant

KN_PARAM_TUNER_OUTSUB

Type

enum

Default

0 (none)

Value

Name

API constant

Description

0

none

KN_TUNER_OUTSUB_NONE

No output from subproblem solves and no subproblem summary file

1

summary

KN_TUNER_OUTSUB_SUMMARY

Subproblem output summary directed to a file knitro_tuner_summary.log

2

all

KN_TUNER_OUTSUB_ALL

Subproblem output enabled, controlled by option outlev.

tuner_sub_maxtime

Specifies, in seconds, the maximum allowable real time for Knitro-Tuner subproblems (i.e. individual solves with a particular option setting).

Details

This option has no effect unless tuner = on.

Name

tuner_sub_maxtime

API constant

KN_PARAM_TUNER_SUB_MAXTIME

Type

double

Minimum

0.0

Default

100000000.0

tuner_terminate

Define the termination condition for the Knitro-Tuner procedure (tuner = 1).

Name

tuner_terminate

API constant

KN_PARAM_TUNER_TERMINATE

Type

enum

Default

0 (all)

Value

Name

API constant

Description

0

all

KN_TUNER_TERMINATE_ALL

Terminate after all Tuner runs complete

1

optimal

KN_TUNER_TERMINATE_OPTIMAL

Terminate at first local optimum

2

feasible

KN_TUNER_TERMINATE_FEASIBLE

Terminate at first feasible solution estimate

3

any

KN_TUNER_TERMINATE_ANY

Terminate at first completed solve