Knitro user 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 nondefault option settings.
Note
The hessopt
user option cannnot be changed after
calling KN_solve()
. You must first call
KN_free()
and then reload the model before
changing hessopt
and solving again.
Note
In the preKnitro 11.0 API, user option names begin with
KTR_
, instead of KN_
.
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 

algorithm 
1  Indicates which algorithm to use to solve the problem 
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 
cg_pmem 
3  Specifies number of nonzero elements per hessian column when computing preconditioner 
cg_precond 
2  Specifies whether or not to apply preconditioning during CG iterations in barrier algorithms 
cg_stoptol 
3  Relative stopping tolerance for CG subproblems 
convex 
1  Apply specializations/tunings often beneficial for convex models 
datacheck 
2  Specifies whether to perform more extensive data checks 
delta 
3  Specifies the initial trust region radius scaling factor 
eval_fcga 
3  Specifies that gradients are provided together with functions in one callback 
honorbnds 
1  Indicates whether or not to enforce satisfaction of simple variable bounds 
initpenalty 
3  Initial penalty value used in Knitro merit function 
linesearch_maxtrials 
3  Indicates the maximum allowable number of trial points during the linesearch 
linesearch 
2  Indicates which linesearch strategy to use for the Interior/Direct or SQP algorithm 
linsolver_ooc 
3  Indicates whether to use Intel MKL PARDISO outofcore solve of linear systems 
linsolver 
2  Indicates which linear solver to use to solve linear systems arising in Knitro algorithms 
linsolver_pivottol 
3  Specifies the initial pivot threshold used in factorization routines 
objrange 
3  Specifies the extreme limits of the objective function for purposes of determining unboundedness 
presolve_tol 
3  Determines the tolerance used by the Knitro presolver 
presolve 
1  Determine whether or not to use the Knitro presolver 
restarts 
2  Specifies whether to enable automatic restarts 
restarts_maxit 
3  Maximum number of iterations before restarting when restarts are enabled 
scale 
1  Specifies whether to perform problem scaling 
soc 
3  Specifies whether or not to try second order corrections (SOC) 
Derivatives options
Option name  Importance  Purpose 

derivcheck 
1  Determine whether or not to perform a derivative check on the model 
derivcheck_terminate 
3  Determine whether or not to terminate after the derivative check 
derivcheck_tol 
3  Specifies the relative tolerance used for detecting derivative errors 
derivcheck_type 
3  Specifies whether to use forward or central finite differencing for the derivative checker 
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 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 
Termination options
Option name  Importance  Purpose 

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 
fstopval 
2  Used to implement a custom stopping condition based on the objective function value 
ftol 
2  The optimization process will terminate if feasible and the relative change in the objective function is less than ftol 
ftol_iters 
3  Number of consecutive feasible iterations where the relative change in the objective function is less than ftol before Knitro stops 
infeastol 
2  Specifies the (relative) tolerance used for declaring infeasibility of a model 
maxfevals 
2  Specifies the maximum number of function evaluations before termination. 
maxit 
1  Specifies the maximum number of iterations before termination 
maxtime_cpu 
2  Specifies, in seconds, the maximum allowable CPU time before termination 
maxtime_real 
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  The optimization process will terminate if the relative change of the solution point estimate is less than xtol 
xtol_iters 
3  Number of consecutive iterations where change of the solution point estimate is less than xtol before Knitro stops 
Barrier options
Option name  Importance  Purpose 

bar_conic_enable 
1  Enable special treatments for conic constraints in the Interior/Direct algorithm 
bar_directinterval 
1  Controls the maximum number of consecutive conjugate gradient (CG) steps 
bar_feasible 
1  Specifies whether special emphasis is placed on getting and staying feasible 
bar_feasmodetol 
3  Specifies the tolerance in equation that determines whether Knitro will force subsequent iterates to remain feasible 
bar_initmu 
2  Specifies the initial value for the barrier parameter used 
bar_initpi_mpec 
3  Specifies the initial value for the MPEC penalty parameter 
bar_initpt 
2  Indicates initial point strategy for x, slacks and multipliers 
bar_maxcrossit 
3  Specifies the maximum number of crossover iterations before termination 
bar_maxrefactor 
3  Indicates the maximum number of refactorizations of the KKT system per iteration 
bar_murule 
1  Indicates which strategy to use for modifying the barrier parameter 
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  Indicates minimum amount by which initial slack variables are pushed inside the bounds 
bar_switchobj 
3  Indicates objective function used 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 
Activeset options
Option name  Importance  Purpose 

act_lpalg 
3  Indicates which algorithm to use for linear programming (LP) subproblems (only when using Cplex or Xpress) 
act_lpfeastol 
3  Feasibility tolerance for the linear programming solver in the Knitro Active Set or SQP algorithms 
act_lppenalty 
1  Indicate whether to use penalty formulation for linear programming subproblems 
act_lppresolve 
3  Controls presolve for linear programming subproblems 
act_lpsolver 
1  Indicates which linear programming solver the Knitro Active Set or SQP algorithms use 
act_parametric 
1  Solve parametric linear programming subproblems instead of standard LPs 
act_qpalg 
1  Indicates which algorithm to use to solve quadratic programming (QP) subproblems 
cplexlibname 
3  Name of the Xpress library when act_lpsolver=KN_ACT_LPSOLVER_CPLEX 
xpresslibname 
3  Name of the Xpress library when act_lpsolver=KN_ACT_LPSOLVER_XPRESS 
MIP options
Option name  Importance  Purpose 

mip_branchrule 
1  Specifies which branching rule to use for MIP branch and bound procedure 
mip_debug 
2  Specifies debugging level for MIP solution 
mip_gub_branch 
3  Specifies whether or not to branch on generalized upper bounds (GUBs) 
mip_heuristic 
1  Specifies which MIP heuristic search approach to apply 
mip_heuristic_maxit 
2  Specifies the maximum number of iterations to allow for MIP heuristic 
mip_heuristic_terminate 
2  Specifies the condition for terminating the MIP heuristic 
mip_implications 
2  Specifies whether or not to add constraints to the MIP derived from logical implications 
mip_integer_tol 
3  Specifies the threshold for deciding whether or not a variable is determined to be an integer 
mip_integral_gap_abs 
1  The absolute integrality gap stop tolerance for MIP 
mip_integral_gap_rel 
1  The relative integrality gap stop tolerance for MIP 
mip_intvar_strategy 
2  Specifies how to handle integer variables 
mip_knapsack 
2  Specifies rules for adding MIP knapsack cuts 
mip_lpalg 
2  Specifies which algorithm to use for any linear programming (LP) subproblem solves 
mip_maxnodes 
2  Specifies the maximum number of nodes explored (0 means no limit) 
mip_maxsolves 
3  Specifies the maximum number of subproblem solves allowed (0 means no limit) 
mip_maxtime_cpu 
2  Specifies the maximum allowable CPU time in seconds for the complete MIP solution 
mip_maxtime_real 
1  Specifies the maximum allowable real time in seconds for the complete MIP solution 
mip_method 
1  Specifies which MIP method to use 
mip_nodealg 
1  Specifies which algorithm to use for standard node subproblem solves in 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 pseudocosts 
mip_relaxable 
2  Specifies whether integer variables are relaxable 
mip_rootalg 
2  Specifies which algorithm to use for the root node solve in MIP 
mip_rounding 
2  Specifies the MIP rounding rule to apply 
mip_selectdir 
2  Specifies the MIP node selection direction rule 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_terminate 
1  Specifies conditions for terminating the MIP algorithm 
Multialgorithm options
Option name  Importance  Purpose 

ma_maxtime_cpu 
3  Specifies the maximum allowable CPU time before termination for the multialgorithm procedure 
ma_maxtime_real 
2  Specifies the maximum allowable real time before termination for the multialgorithm procedure 
ma_outsub 
1  Enable writing algorithm output to files for the multialgorithm procedure 
ma_terminate 
1  Define the termination condition for the multialgorithm procedure 
Multistart options
Option name  Importance  Purpose 

ms_deterministic 
2  Indicates whether Knitro multistart procedure will be deterministic 
ms_enable 
1  Indicates whether Knitro will solve from multiple start points to find a better local minimum 
ms_maxbndrange 
2  Specifies the maximum range that an unbounded variable can take when determining new start points 
ms_maxsolves 
1  Specifies how many start points to try in multistart 
ms_maxtime_cpu 
3  Specifies, in seconds, the maximum allowable CPU time before termination 
ms_maxtime_real 
2  Specifies, in seconds, the maximum allowable real time before termination 
ms_num_to_save 
2  Specifies the number of distinct feasible points to save in a file named 
ms_outsub 
2  Enable writing algorithm output to files for the parallel multistart procedure 
ms_savetol 
2  Specifies the tolerance for deciding if two feasible points are distinct 
ms_seed 
2  Seed value used to generate random initial points in multistart 
ms_startptrange 
1  Specifies the maximum range that each variable can take when determining new start points 
ms_terminate 
1  Specifies the condition for terminating multistart 
par_msnumthreads 
1  Specify the number of threads to use for multistart 
Parallelism options
Option name  Importance  Purpose 

par_blasnumthreads 
2  Specify the number of threads to use for BLAS operations 
par_concurrent_evals 
1  Determines whether or not function and derivative evaluations can take place concurrently in parallel 
par_lsnumthreads 
2  Specify the number of threads to use for linear system solve operations 
par_numthreads 
1  Specify the number of threads to use for parallel (excluding BLAS) 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 
out_csvinfo 
3  Specifies whether to create knitro_solve.csv information file 
out_csvname 
3  Specify nondefault filename when using out_csvinfo 
out_hints 
2  Print diagnostic hints (e.g. on 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  Specify filename (default knitro.log) when directing output to a file via outmode 
Tuner options
Option name  Importance  Purpose 

tuner 
1  Indicates whether to invoke the KnitroTuner 
tuner_maxtime_cpu 
2  Specifies the maximum allowable CPU time before terminating the KnitroTuner 
tuner_maxtime_real 
1  Specifies the maximum allowable real time before terminating the KnitroTuner 
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 KnitroTuner procedure 
tuner_terminate 
1  Define the termination condition for the KnitroTuner procedure 
General options

algorithm

KN_PARAM_ALG
#define KN_PARAM_ALGORITHM 1003 #define KN_PARAM_ALG 1003 # define KN_ALG_AUTOMATIC 0 # define KN_ALG_AUTO 0 # define KN_ALG_BAR_DIRECT 1 # define KN_ALG_BAR_CG 2 # define KN_ALG_ACT_CG 3 # define KN_ALG_ACT_SQP 4 # define KN_ALG_MULTI 5
Indicates which algorithm to use to solve the problem
 0 (auto) let Knitro automatically choose an algorithm, based on the problem characteristics.
 1 (direct) use the Interior/Direct algorithm.
 2 (cg) use the Interior/CG algorithm.
 3 (active) use the Active Set algorithm.
 4 (sqp) use the SQP algorithm.
 5 (multi) run all algorithms, perhaps in parallel (see Algorithms).
Default value: 0

blasoption

KN_PARAM_BLASOPTION
#define KN_PARAM_BLASOPTION 1042 # define KN_BLASOPTION_KNITRO 0 # define KN_BLASOPTION_INTEL 1 # define KN_BLASOPTION_DYNAMIC 2
Specifies the BLAS/LAPACK function library to use for basic vector and matrix computations.
 0 (knitro) Use Knitro builtin functions.
 1 (intel) Use Intel Math Kernel Library (MKL) functions on available platforms.
 2 (dynamic) Use the dynamic library specified with option
blasoptionlib
.
Default value: 1
Note
BLAS and LAPACK functions from Intel Math Kernel Library
(MKL) are provided with the Knitro distribution.
Beginning with Knitro 8.1, the multithreaded version
of the MKL BLAS is included with Knitro. The number of threads
to use for the MKL BLAS are specified with par_blasnumthreads
.
On platforms, where the intel MKL is not available, the Knitro
builtin 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 builtin 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
(e.g., Pentium 4), 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
.
Some Intel MKL libraries may be provided in the Knitro lib directory and may need to be loaded at runtime by Knitro. If so, the operating system’s load path must be configured to find this directory or the MKL will fail to load.

blasoptionlib

KN_PARAM_BLASOPTIONLIB
#define KN_PARAM_BLASOPTIONLIB 1045
Specifies a dynamic library name that contains object code for BLAS/LAPACK functions.
The library must implement all the functions declared in the file
include/blas_lapack.h
.
Note
This option has no effect unless blasoption
= 2.

bndrange

KN_PARAM_BNDRANGE
#define KN_PARAM_BNDRANGE 1112
Specifies max limits on the magnitude of constraint and variable bounds. 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).Default value: 1.0e20

cg_maxit

KN_PARAM_CG_MAXIT
#define KN_PARAM_CG_MAXIT 1013
Determines the maximum allowable number of inner conjugate gradient (CG) iterations per Knitro minor iteration.
 0 Let Knitro automatically choose a value based on the problem size.
 n At most n>0 CG iterations may be performed during one minor iteration of Knitro.
Default value: 0

cg_pmem

KN_PARAM_CG_PMEM
#define KN_PARAM_CG_PMEM 1103
Specifies the amount of nonzero elements per column of the Hessian of the Lagrangian which are retained when computing the incomplete Cholesky preconditioner.
 n At most n>0 nonzero elements per column.
Default value: 10

cg_precond

KN_PARAM_CG_PRECOND
#define KN_PARAM_CG_PRECOND 1041 # define KN_CG_PRECOND_NONE 0 # define KN_CG_PRECOND_CHOL 1
Specifies whether an incomplete Cholesky preconditioner is applied during CG iterations in barrier algorithms.
 0 (no) Not applied.
 1 (chol) Preconditioner is applied.
Default value: 0

cg_stoptol

KN_PARAM_CG_STOPTOL
#define KN_PARAM_CG_STOPTOL 1099
Specifies the relative stopping tolerance used for the conjugate gradient (CG) subproblem solves.
Default value: 1.0e2

convex

KN_PARAM_CONVEX
#define KN_PARAM_CONVEX 1114 # define KN_CONVEX_AUTO 0 # define KN_CONVEX_YES 1
Declare the problem as convex by setting
KN_CONVEX_YES
. Otherwise, Knitro will try to determine this automatically, but may only be able to do so for simple model forms. If your model is convex, setting this option toKN_CONVEX_YES
will cause Knitro to apply specializations and tunings that are often beneficial for convex models to speed up the solution. Currently this option is only active for the Interior/Direct algorithm, but may be applied to other algorithms in the future.Default value: 0

KN_PARAM_DATACHECK
#define KN_PARAM_DATACHECK 1087 # define KN_DATACHECK_NO 0 # define KN_DATACHECK_YES 1
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). The datacheck may have a nontrivial cost for large problems. It is turned on by default, but can be turned off for improved speed.
Default value: 1

delta

KN_PARAM_DELTA
#define KN_PARAM_DELTA 1020
Specifies the initial trust region radius scaling factor used to determine the initial trust region size.
Default value: 1.0e0

eval_fcga

KN_PARAM_EVAL_FCGA
#define KN_PARAM_EVAL_FCGA 1116 # define KN_EVAL_FCGA_NO 0 # define KN_EVAL_FCGA_YES 1
Use this option to tell Knitro that you are providing the first derivatives (i.e. gradients) in the same callback routine used for your function evaluations.
Default value: 0

honorbnds

KN_PARAM_HONORBNDS
#define KN_PARAM_HONORBNDS 1002 # define KN_HONORBNDS_NO 0 # define KN_HONORBNDS_ALWAYS 1 # define KN_HONORBNDS_INITPT 2
Indicates whether or not to enforce satisfaction of simple variable bounds throughout the optimization. The API function
KN_set_var_honorbnds()
can be used to set this option for each variable individually. This option and thebar_feasible
option may be useful in applications where functions are undefined outside the region defined by inequalities. 0 (no) Knitro does not require that the bounds on the variables be satisfied at intermediate iterates.
 1 (always) Knitro enforces that the initial point and all subsequent solution estimates satisfy the bounds on the variables.
 2 (initpt) Knitro enforces that the initial point satisfies the bounds on the variables.
Default value: 2

initpenalty

KN_PARAM_INITPENALTY
#define KN_PARAM_INITPENALTY 1097
Specifies the initial penalty parameter used in the Knitro merit functions. 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.
Default value: 1.0e1

linesearch

KN_PARAM_LINESEARCH
#define KN_PARAM_LINESEARCH 1095 # define KN_LINESEARCH_AUTO 0 # define KN_LINESEARCH_BACKTRACK 1 # define KN_LINESEARCH_INTERPOLATE 2
Indicates which linesearch strategy to use for the Interior/Direct or SQP algorithm to search for a new acceptable iterate. This option has no effect on the Interior/CG or Active Set algorithm.
 0 (auto) Let Knitro automatically choose the strategy.
 1 (backtrack) Use a simple backtracking scheme.
 2 (interpolate) Use a cubic interpolation scheme.
Default value: 0

linesearch_maxtrials

KN_PARAM_LINESEARCH_MAXTRIALS
#define KN_PARAM_LINESEARCH_MAXTRIALS 1044
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.
This option has no effect on the Interior/CG or Active Set algorithm.
Default value: 3

linsolver

KN_PARAM_LINSOLVER
#define KN_PARAM_LINSOLVER 1057 # define KN_LINSOLVER_AUTO 0 # define KN_LINSOLVER_INTERNAL 1 # define KN_LINSOLVER_HYBRID 2 # define KN_LINSOLVER_DENSEQR 3 # define KN_LINSOLVER_MA27 4 # define KN_LINSOLVER_MA57 5 # define KN_LINSOLVER_MKLPARDISO 6 # define KN_LINSOLVER_MA97 7 # define KN_LINSOLVER_MA86 8
Indicates which linear solver to use to solve linear systems arising in Knitro algorithms.
 0 (auto) Let Knitro automatically choose the linear solver.
 1 (internal) Not currently used; reserved for future use. Same as auto for now.
 2 (hybrid) Use a hybrid approach where the solver chosen depends on the particular linear system which needs to be solved.
 3 (qr) 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) Use the HSL MA27 sparse symmetric indefinite solver.
 5 (ma57) Use the HSL MA57 sparse symmetric indefinite solver.
 6 (mklpardiso) Use the Intel MKL PARDISO (parallel, deterministic) sparse symmetric indefinite solver.
 7 (ma97) Use the HSL MA97 (parallel, deterministic) sparse symmetric indefinite solver.
 8 (ma86) Use the HSL MA86 (parallel, nondeterministic) sparse symmetric indefinite solver.
Default value: 0
Note
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. This BLAS library is optimized for
Intel processors and can be selected by setting blasoption=intel.
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 userspecified BLAS can be used by Knitro. You may also achieve speedups
using multithreaded BLAS with these solvers by setting par_numthreads
>1 or
par_blasnumthreads
>1 when using the solvers.
Additionally, the HSL solvers MA86 and MA97 and the Intel MKL PARDISO solver are specifically
designed to exploit parallelism (beyond BLAS parallelism) to achieve speedups on large problems.
You may try setting par_numthreads
>1 or par_lsnumthreads
>1
(with par_blasnumthreads
=1) when using these
solvers, to obtain greater speedups.

linsolver_ooc

KN_PARAM_LINSOLVER_OOC
#define KN_PARAM_LINSOLVER_OOC 1076 # define KN_LINSOLVER_OOC_NO 0 # define KN_LINSOLVER_OOC_MAYBE 1 # define KN_LINSOLVER_OOC_YES 2
Indicates whether to use Intel MKL PARDISO outofcore solve of linear systems when
linsolver
= mklpardiso.This option is only active when
linsolver
= mklpardiso. 0 (no) Do not use Intel MKL PARDISO outofcore option.
 1 (maybe) Maybe solve outofcore depending on how much space is needed.
 2 (yes) Solve linear systems outofcore when using Intel MKL PARDISO.
Default value: 0
Note
See the Intel MKL PARDISO documentation for more details on how this option works.

linsolver_pivottol

KN_PARAM_LINSOLVER_PIVOTTOL
#define KN_PARAM_LINSOLVER_PIVOTTOL 1029
Specifies the initial pivot threshold used in factorization routines.
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 nonpositive, 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 illconditioned).Default value: 1.0e8

objrange

KN_PARAM_OBJRANGE
#define KN_PARAM_OBJRANGE 1026
Specifies the extreme limits of the objective function for purposes of determining unboundedness.
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.Default value: 1.0e20

presolve

KN_PARAM_PRESOLVE
#define KN_PARAM_PRESOLVE 1059 # define KN_PRESOLVE_NONE 0 # define KN_PRESOLVE_BASIC 1
Determine whether or not to use the Knitro presolver to try to simplify the model by removing variables or constraints.
 0 (none) Do not use Knitro presolver.
 1 (basic) Use the Knitro basic presolver.
Default value: 1

presolve_tol

KN_PARAM_PRESOLVE_TOL
#define KN_PARAM_PRESOLVE_TOL 1060
Determines the tolerance used by the Knitro presolver to remove variables and constraints from the model. If you believe the Knitro presolver is incorrectly modifying the model, use a smaller value for this tolerance (or turn the presolver off).
Default value: 1.0e6

restarts

KN_PARAM_RESTARTS
#define KN_PARAM_RESTARTS 1100
Specifies whether or not to enable automatic restarts in Knitro. When enabled, if a Knitro algorithm seems to be converging slowly or not converging, the algorithm will automatically restart, which may help with convergence.
 0 No automatic restarts allowed.
 n At most n>0 automatic restarts may be performed.
Default value: 0

restarts_maxit

KN_PARAM_RESTARTS_MAXIT
#define KN_PARAM_RESTARTS_MAXIT 1101
When restarts are enabled, this option can be used to specify a maximum number of iterations before enforcing a restart.
 0 No iteration limit on restarts enforced.
 n At most n>0 iterations are allowed without convergence before enforcing an automatic restart, if restarts are enabled.
Default value: 0

scale

KN_PARAM_SCALE
#define KN_PARAM_SCALE 1017 # define KN_SCALE_NEVER 0 # define KN_SCALE_NO 0 # define KN_SCALE_USER_INTERNAL 1 # define KN_SCALE_USER_NONE 2 # define KN_SCALE_INTERNAL 3
Specifies whether to perform problem scaling of the objective function, constraint functions, or possibly variables.
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.
 0 (no) No scaling is performed.
 1 (user_internal) User provided scaling is used if defined, otherwise Knitro internal scaling is applied.
 2 (user_none) User provided scaling is used if defined, otherwise no scaling is applied.
 3 (internal) Knitro internal scaling is applied.
Default value: 1

soc

KN_PARAM_SOC
#define KN_PARAM_SOC 1019 # define KN_SOC_NO 0 # define KN_SOC_MAYBE 1 # define KN_SOC_YES 2
Specifies whether or not to try second order corrections (SOC).
A second order correction may be beneficial for problems with highly nonlinear constraints.
 0 (no) No second order correction steps are attempted.
 1 (maybe) Second order correction steps may be attempted on some iterations.
 2 (yes) Second order correction steps are always attempted if the original step is rejected and there are nonlinear constraints.
Default value: 1
Derivatives options

derivcheck

KN_PARAM_DERIVCHECK
#define KN_PARAM_DERIVCHECK 1080 # define KN_DERIVCHECK_NONE 0 # define KN_DERIVCHECK_FIRST 1 # define KN_DERIVCHECK_SECOND 2 # define KN_DERIVCHECK_ALL 3
Determine whether or not to perform a derivative check on the model.
 0 (none) Do not perform a derivative check.
 1 (first) Check first derivatives only.
 2 (second) Check second derivatives (i.e. the Hessian) only.
 3 (all) Check both first and second derivatives.
Default value: 0

derivcheck_terminate

KN_PARAM_DERIVCHECK_TERMINATE
#define KN_PARAM_DERIVCHECK_TERMINATE 1088 # define KN_DERIVCHECK_STOPERROR 1 # define KN_DERIVCHECK_STOPALWAYS 2
Determine whether to always terminate after the derivative check or only when the derivative checker detects a possible error.
 1 (error) Terminate only when an error is detected.
 2 (always) Always terminate when the derivative check is finished.
Default value: 1

derivcheck_tol

KN_PARAM_DERIVCHECK_TOL
#define KN_PARAM_DERIVCHECK_TOL 1082
Specifies the relative tolerance used for detecting derivative errors, when the Knitro derivative checker is enabled.
Default value: 1.0e6

derivcheck_type

KN_PARAM_DERIVCHECK_TYPE
#define KN_PARAM_DERIVCHECK_TYPE 1081 # define KN_DERIVCHECK_FORWARD 1 # define KN_DERIVCHECK_CENTRAL 2
Specifies whether to use forward or central finite differencing for the derivative checker when it is enabled.
 1 (forward) Use forward finite differencing for the derivative checker.
 2 (central) Use central finite differencing for the derivative checker.
Default value: 1

gradopt

KN_PARAM_GRADOPT
#define KN_PARAM_GRADOPT 1007 # define KN_GRADOPT_EXACT 1 # define KN_GRADOPT_FORWARD 2 # define KN_GRADOPT_CENTRAL 3
Specifies how to compute the gradients of the objective and constraint functions.
 1 (exact) User provides a routine for computing the exact gradients.
 2 (forward) Knitro computes gradients by forward finite differences.
 3 (central) Knitro computes gradients by central finite differences.
Default value: 1
Note
It is highly recommended to provide exact gradients if at all possible as this greatly impacts the performance of the code.

hessian_no_f

KN_PARAM_HESSIAN_NO_F
#define KN_PARAM_HESSIAN_NO_F 1062 # define KN_HESSIAN_NO_F_FORBID 0 # define KN_HESSIAN_NO_F_ALLOW 1
Determines whether or not to allow Knitro to request Hessian (or Hessianvector product) evaluations without the objective component included. 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. Whenhessian_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 Hessianvector product) without the objective component. Usinghessian_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. userprovided exact Hessians), orhessopt=5
(i.e. userprovided exact Hessiansvector products). 0 (forbid) Knitro will not ask for Hessian evaluations without the objective component.
 1 (allow) Knitro may ask for Hessian evaluations without the objective component.
Default value: 0

hessopt

KN_PARAM_HESSOPT
#define KN_PARAM_HESSOPT 1008 # define KN_HESSOPT_EXACT 1 # define KN_HESSOPT_BFGS 2 # define KN_HESSOPT_SR1 3 # define KN_HESSOPT_PRODUCT_FINDIFF 4 # define KN_HESSOPT_PRODUCT 5 # define KN_HESSOPT_LBFGS 6 # define KN_HESSOPT_GAUSS_NEWTON 7
Specifies how to compute the (approximate) Hessian of the Lagrangian.
 1 (exact) User provides a routine for computing the exact Hessian.
 2 (bfgs) Knitro computes a (dense) quasiNewton BFGS Hessian.
 3 (sr1) Knitro computes a (dense) quasiNewton SR1 Hessian.
 4 (product_findiff) Knitro computes Hessianvector products using finitedifferences.
 5 (product) User provides a routine to compute the Hessianvector products.
 6 (lbfgs) Knitro computes a limitedmemory quasiNewton BFGS Hessian (its size is determined by the option lmsize).
 7 (gauss_newton) Knitro computes a GaussNewton approximation of the hessian (available for leastsquares only, and default value for leastsquares)
Default value: 1
Note
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 Hessianvector 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 quasiNewton 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.

lmsize

KN_PARAM_LMSIZE
#define KN_PARAM_LMSIZE 1038
Specifies the number of limited memory pairs stored when approximating the Hessian using the limitedmemory quasiNewton BFGS option. 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.
Default value: 10
Termination options

feastol

KN_PARAM_FEASTOL
#define KN_PARAM_FEASTOL 1022
Specifies the final relative stopping tolerance for the feasibility error.
Smaller values of feastol result in a higher degree of accuracy in the solution with respect to feasibility.
Default value: 1.0e6

feastol_abs

KN_PARAM_FEASTOLABS
#define KN_PARAM_FEASTOLABS 1023
Specifies the final absolute stopping tolerance for the feasibility error. Smaller values of
feastol_abs
result in a higher degree of accuracy in the solution with respect to feasibility.Default value: 1.0e3

fstopval

KN_PARAM_FSTOPVAL
#define KN_PARAM_FSTOPVAL 1086
Used to implement a custom stopping condition based on the objective function value. 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 offstopval
is less thanobjrange
.Default value:
KN_INFINITY

ftol

KN_PARAM_FTOL
#define KN_PARAM_FTOL 1090
The optimization process will terminate if the relative change in the objective function is less than
ftol
forftol_iters
consecutive feasible iterations.Default value: 1.0e15

ftol_iters

KN_PARAM_FTOL_ITERS
#define KN_PARAM_FTOL_ITERS 1091
The optimization process will terminate if the relative change in the objective function is less than
ftol
forftol_iters
consecutive feasible iterations.Default value: 5

infeastol

KN_PARAM_INFEASTOL
#define KN_PARAM_INFEASTOL 1056
Specifies the (relative) tolerance used for declaring infeasibility of a model.
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 forinfeastol
.Default value: 1.0e8

maxfevals

KN_PARAM_MAXFEVALS
#define KN_PARAM_MAXFEVALS 1085
Specifies the maximum number of function evaluations before termination. Values less than zero imply no limit.
Default value: 1 (unlimited)

maxit

KN_PARAM_MAXIT
#define KN_PARAM_MAXIT 1014
Specifies the maximum number of iterations before termination.
 0 Let Knitro automatically choose a value based on the problem type. Currently Knitro sets this value to 10000 for LPs/NLPs and 3000 for MIP problems.
 n At most n>0 iterations may be performed before terminating.
Default value: 0

maxtime_cpu

KN_PARAM_MAXTIMECPU
#define KN_PARAM_MAXTIMECPU 1024
Specifies, in seconds, the maximum allowable CPU time before termination.
Default value: 1.0e8

maxtime_real

KN_PARAM_MAXTIMEREAL
#define KN_PARAM_MAXTIMEREAL 1040
Specifies, in seconds, the maximum allowable real time before termination.
Default value: 1.0e8

opttol

KN_PARAM_OPTTOL
#define KN_PARAM_OPTTOL 1027
Specifies the final relative stopping tolerance for the KKT (optimality) error.
Smaller values of
opttol
result in a higher degree of accuracy in the solution with respect to optimality.Default value: 1.0e6

opttol_abs

KN_PARAM_OPTTOLABS
#define KN_PARAM_OPTTOLABS 1028
Specifies the final absolute stopping tolerance for the KKT (optimality) error.
Smaller values of
opttol_abs
result in a higher degree of accuracy in the solution with respect to optimality.Default value: 1.0e3

xtol

KN_PARAM_XTOL
#define KN_PARAM_XTOL 1030
The optimization process will terminate if the relative change in all components of the solution point estimate is less than
xtol
forxtol_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.Default value: 1.0e12

xtol_iters

KN_PARAM_XTOL_ITERS
#define KN_PARAM_XTOL_ITERS 1094
The optimization process will terminate if the relative change in the solution estimate is less than
xtol
forxtol_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.Default value: 0
Barrier options

bar_conic_enable

KN_PARAM_BAR_CONIC_ENABLE
#define KN_PARAM_BAR_CONIC_ENABLE 1113 # define KN_BAR_CONIC_ENABLE_NONE 0 # define KN_BAR_CONIC_ENABLE_SOC 1
Enable special treatments for conic constraints when using the Interior/Direct algorithm (has no affect when using the Interior/CG algorithm).
 0 (none) Do not apply any special treatment for conic constraints.
 1 (soc) Apply special treatments for any Second Order Cone (SOC) constraints identified in the model.
Default value: 0

bar_directinterval

KN_PARAM_BAR_DIRECTINTERVAL
#define KN_PARAM_BAR_DIRECTINTERVAL 1058
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.
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.Default value: 10

bar_feasible

KN_PARAM_BAR_FEASIBLE
#define KN_PARAM_BAR_FEASIBLE 1006 # define KN_BAR_FEASIBLE_NO 0 # define KN_BAR_FEASIBLE_STAY 1 # define KN_BAR_FEASIBLE_GET 2 # define KN_BAR_FEASIBLE_GET_STAY 3
Specifies whether special emphasis is placed on getting and staying feasible in the interiorpoint algorithms.
 0 (no) No special emphasis on feasibility.
 1 (stay) Iterates must satisfy inequality constraints once they become sufficiently feasible.
 2 (get) Special emphasis is placed on getting feasible before trying to optimize.
 3 (get_stay) Implement both options 1 and 2 above.
Default value: 0
Note
This option can only be used with the Interior/Direct and Interior/CG algorithms.
If
bar_feasible
= stay orbar_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 thatThe constant tol is determined by the option
bar_feasmodetol
.If
bar_feasible
= get orbar_feasible
= get_stay, Knitro will place special emphasis on first trying to get feasible before trying to optimize.

bar_feasmodetol

KN_PARAM_BAR_FEASMODETOL
#define KN_PARAM_BAR_FEASMODETOL 1021
Specifies the tolerance in equation that determines whether Knitro will force subsequent iterates to remain feasible.
The tolerance applies to all inequality constraints in the problem. This option only has an effect if option
bar_feasible
= stay orbar_feasible
= get_stay.Default value: 1.0e4

bar_initmu

KN_PARAM_BAR_INITMU
#define KN_PARAM_BAR_INITMU 1025
Specifies the initial value for the barrier parameter used with the barrier algorithms.
This option has no effect on the Active Set algorithm.
Default value: 1.0e1

bar_initpi_mpec

KN_PARAM_BAR_INITPI_MPEC
#define KN_PARAM_BAR_INITPI_MPEC 1093
Specifies the initial value for the MPEC penalty parameter used when solving problems with complementarity constraints using the barrier algorithms. If this value is nonpositive, then Knitro uses an internal formula to initialize the MPEC penalty parameter.
Default value: 0.0

bar_initpt

KN_PARAM_BAR_INITPT
#define KN_PARAM_BAR_INITPT 1009 # define KN_BAR_INITPT_AUTO 0 # define KN_BAR_INITPT_CONVEX 1 # define KN_BAR_INITPT_NEARBND 2 # define KN_BAR_INITPT_CENTRAL 3
Indicates initial point strategy for x, slacks and multipliers when using a barrier algorithm. 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.
 0 (auto) Let Knitro automatically choose the strategy.
 1 (convex) Initialization designed for convex models.
 2 (nearbnd) Initialization strategy that stays closer to the bounds.
 3 (central) Initialization strategy that is more central on doublebounded variables.
Default value: 0

bar_maxcrossit

KN_PARAM_BAR_MAXCROSSIT
#define KN_PARAM_BAR_MAXCROSSIT 1039
Specifies the maximum number of crossover iterations before termination.
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 interiorpoint solution is the final result.If Active Set crossover is unable to improve the approximate interiorpoint solution, then Knitro will restore the interiorpoint solution. In some cases (especially on largescale 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.
Default value: 0

bar_maxrefactor

KN_PARAM_BAR_MAXREFACTOR
#define KN_PARAM_BAR_MAXREFACTOR 1043
Indicates the maximum number of refactorizations of the KKT system per iteration of the Interior/Direct algorithm before reverting to a CG step. 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.
Default value: 1

bar_murule

KN_PARAM_BAR_MURULE
#define KN_PARAM_BAR_MURULE 1004 # define KN_BAR_MURULE_AUTOMATIC 0 # define KN_BAR_MURULE_AUTO 0 # define KN_BAR_MURULE_MONOTONE 1 # define KN_BAR_MURULE_ADAPTIVE 2 # define KN_BAR_MURULE_PROBING 3 # define KN_BAR_MURULE_DAMPMPC 4 # define KN_BAR_MURULE_FULLMPC 5 # define KN_BAR_MURULE_QUALITY 6
Indicates which strategy to use for modifying the barrier parameter in the barrier algorithms.
Not all strategies are available for both barrier algorithms, as described below. This option has no effect on the Active Set algorithm.
 0 (auto) Let Knitro automatically choose the strategy.
 1 (monotone) Monotonically decrease the barrier parameter. Available for both barrier algorithms.
 2 (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) Use a probing (affinescaling) step to dynamically determine the barrier parameter. Available only for the Interior/Direct algorithm.
 4 (dampmpc) Use a Mehrotra predictorcorrector type rule to determine the barrier parameter, with safeguards on the corrector step. Available only for the Interior/Direct algorithm.
 5 (fullmpc) Use a Mehrotra predictorcorrector type rule to determine the barrier parameter, without safeguards on the corrector step. Available only for the Interior/Direct algorithm.
 6 (quality) Minimize a quality function at each iteration to determine the barrier parameter. Available only for the Interior/Direct algorithm.
Default value: 0

bar_penaltycons

KN_PARAM_BAR_PENCONS
#define KN_PARAM_BAR_PENCONS 1050 # define KN_BAR_PENCONS_AUTO 0 # define KN_BAR_PENCONS_NONE 1 # define KN_BAR_PENCONS_ALL 2 # define KN_BAR_PENCONS_EQUALITIES 3
Indicates whether a penalty approach is applied to the constraints.
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.
 0 (auto) Let Knitro automatically choose the strategy.
 1 (none) No constraints are penalized.
 2 (all) A penalty approach is applied to all general constraints.
 3 (equalities) Apply a penalty approach to equality constraints only.
Default value: 0

bar_penaltyrule

KN_PARAM_BAR_PENRULE
#define KN_PARAM_BAR_PENRULE 1049 # define KN_BAR_PENRULE_AUTO 0 # define KN_BAR_PENRULE_SINGLE 1 # define KN_BAR_PENRULE_FLEX 2
Indicates which penalty parameter strategy to use for determining whether or not to accept a trial iterate. This option has no effect on the Active Set algorithm.
 0 (auto) Let Knitro automatically choose the strategy.
 1 (single) Use a single penalty parameter in the merit function to weight feasibility versus optimality.
 2 (flex) Use a more tolerant and flexible step acceptance procedure based on a range of penalty parameter values.
Default value: 0

bar_refinement

KN_PARAM_BAR_REFINEMENT
#define KN_PARAM_BAR_REFINEMENT 1079 # define KN_BAR_REFINEMENT_NO 0 # define KN_BAR_REFINEMENT_YES 1
Specifies whether to try to refine the barrier solution for better precision. 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.Default value: 0

bar_relaxcons

KN_PARAM_BAR_RELAXCONS
#define KN_PARAM_BAR_RELAXCONS 1077 # define KN_BAR_RELAXCONS_NONE 0 # define KN_BAR_RELAXCONS_EQS 1 # define KN_BAR_RELAXCONS_INEQS 2 # define KN_BAR_RELAXCONS_ALL 3
Indicates whether a relaxation approach is applied to the constraints.
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.
 0 (none) No constraints are relaxed.
 1 (eqs) A relaxation approach is applied to general equality constraints.
 2 (ineqs) A relaxation approach is applied to general inequality constraints.
 3 (all) A relaxation approach is applied to all general constraints.
Default value: 2

bar_slackboundpush

KN_PARAM_BAR_SLACKBOUNDPUSH
#define KN_PARAM_BAR_SLACKBOUNDPUSH 1102
Specifies the amount by which the barrier slack variables are initially pushed inside the bounds. A smaller value may be preferable when warmstarting from a point close to the solution.
Default value: 1.0e1

bar_switchobj

KN_PARAM_BAR_SWITCHOBJ
#define KN_PARAM_BAR_SWITCHOBJ 1104 # define KN_BAR_SWITCHOBJ_NONE 0 # define KN_BAR_SWITCHOBJ_SCALARPROX 1 # define KN_BAR_SWITCHOBJ_DIAGPROX 2
Indicates which objective function to use when the barrier algorithms switch to a pure feasibility phase.
 0 (none) No (or zero) objective.
 1 (scalarprox) Proximal point objective with scalar weighting.
 2 (diagprox) Proximal point objective with diagonal weighting.
Default value: 1

bar_switchrule

KN_PARAM_BAR_SWITCHRULE
#define KN_PARAM_BAR_SWITCHRULE 1061 # define KN_BAR_SWITCHRULE_AUTO 0 # define KN_BAR_SWITCHRULE_NEVER 1 # define KN_BAR_SWITCHRULE_MODERATE 2 # define KN_BAR_SWITCHRULE_AGGRESSIVE 3
Indicates whether or not the barrier algorithms will allow switching from an optimality phase to a pure feasibility phase. This option has no effect on the Active Set algorithm.
 0 (auto) Let Knitro determine the switching procedure.
 1 (never) Never switch to feasibility phase.
 2 (moderate) Allow switches to feasibility phase.
 3 (aggressive) Use a more aggressive switching rule.
Default value: 0

bar_watchdog

KN_PARAM_BAR_WATCHDOG
#define KN_PARAM_BAR_WATCHDOG 1089 # define KN_BAR_WATCHDOG_NO 0 # define KN_BAR_WATCHDOG_YES 1
Specifies whether to enable watchdog heuristic for barrier algorithms. 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.
Default value: 0
Activeset options

act_lpalg

KN_PARAM_ACT_LPALG
#define KN_PARAM_ACT_LPALG 1109 # define KN_ACT_LPALG_DEFAULT 0 # define KN_ACT_LPALG_PRIMAL 1 # define KN_ACT_LPALG_DUAL 2 # define KN_ACT_LPALG_BARRIER 3
Indicates which algorithm to use to solve linear programming (LP) subproblems when using the Knitro Active Set or SQP algorithms.
This 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.
 0 (default) use the default algorithm for the chosen LP solver.
 1 (primal) use a primal simplex algorithm.
 2 (dual) use a dual simplex algorithm.
 3 (barrier) use a barrier/interiorpoint algorithm.
Default value: 0

act_lpfeastol

KN_PARAM_ACT_LPFEASTOL
#define KN_PARAM_ACT_LPFEASTOL 1098
Specifies the feasibility tolerance used for linear programming subproblems solved when using the Active Set or SQP algorithms.
Default value: 1.0e8

act_lppenalty

KN_PARAM_ACT_LPPENALTY
#define KN_PARAM_ACT_LPPENALTY 1111 # define KN_ACT_LPPENALTY_ALL 1 # define KN_ACT_LPPENALTY_NONLINEAR 2 # define KN_ACT_LPPENALTY_DYNAMIC 3
Indicates whether to use a penalty formulation for linear programming subproblems in the Knitro Active Set or SQP algorithms.
 1 (all) penalize all constraints.
 2 (nonlinear) penalize only nonlinear constraints.
 3 (dynamic) dynamically choose which constraints to penalize.
Default value: 1

act_lppresolve

KN_PARAM_ACT_LPPRESOLVE
#define KN_PARAM_ACT_LPPRESOLVE 1110 # define KN_ACT_LPPRESOLVE_OFF 0 # define KN_ACT_LPPRESOLVE_ON 1
Indicates whether to apply a presolve for linear programming subproblems in the Knitro Active Set or SQP algorithms.
 0 (off) presolve turned off for LP subproblems.
 1 (on) presolve turned on for LP subproblems.
Default value: 0

act_lpsolver

KN_PARAM_ACT_LPSOLVER
#define KN_PARAM_ACT_LPSOLVER 1012 # define KN_ACT_LPSOLVER_INTERNAL 1 # define KN_ACT_LPSOLVER_CPLEX 2 # define KN_ACT_LPSOLVER_XPRESS 3
Indicates which linear programming simplex solver the Knitro Active Set or SQP algorithms use when solving internal LP subproblems.
This option has no effect on the Interior/Direct and Interior/CG algorithms.
 1 (internal) Knitro uses its default LP solver.
 2 (cplex) Knitro uses IBM ILOGCPLEX(R), provided the user has a valid CPLEX license. The CPLEX library is loaded dynamically after KN_solve() is called.
 3 (xpress) Knitro uses the FICO Xpress(R) solver, provided the user has a valid Xpress license. The Xpress library is loaded dynamically after KN_solve() is called.
Default value: 1
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 (in order): CPLEX 12.6, CPLEX 12.5, CPLEX 12.4, CPLEX 12.3, CPLEX 12.2, CPLEX 12.1, CPLEX 12.0, CPLEX 11.2, CPLEX 11.1, CPLEX 11.0, CPLEX 10.2, CPLEX 10.1, CPLEX 10.0, CPLEX 9.1, CPLEX 9.0, or CPLEX 8.0.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 librarycplex123.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", "cplex90.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.

act_parametric

KN_PARAM_ACT_PARAMETRIC
#define KN_PARAM_ACT_PARAMETRIC 1107 # define KN_ACT_PARAMETRIC_NO 0 # define KN_ACT_PARAMETRIC_MAYBE 1 # define KN_ACT_PARAMETRIC_YES 2
Indicates whether to use a parametric approach when solving linear programming (LP) subproblems when using the Knitro Active Set or SQP algorithms. A parametric approach will solve a sequence of closely related LPs instead of one LP. It may increase the cost of an activeset iteration, but perhaps lead to convergence in fewer iterations.
 0 (no) do not use a parametric solve (i.e. solve a single LP).
 1 (maybe) use a parametric solve sometimes.
 2 (yes) always try a parametric solve.
Default value: 1

act_qpalg

KN_PARAM_ACT_QPALG
#define KN_PARAM_ACT_QPALG 1092 # define KN_ACT_QPALG_AUTO 0 # define KN_ACT_QPALG_BAR_DIRECT 1 # define KN_ACT_QPALG_BAR_CG 2 # define KN_ACT_QPALG_ACT_CG 3
Indicates which algorithm to use to solve quadratic programming (QP) subproblems when using the Knitro Active Set or SQP algorithms.
This option has no effect on the Interior/Direct and Interior/CG algorithms.
 0 (auto) let Knitro automatically choose an algorithm, based on the problem characteristics.
 1 (direct) use the Interior/Direct algorithm.
 2 (cg) use the Interior/CG algorithm.
 3 (active) use the Active Set algorithm.
Default value: 0

cplexlibname

KN_PARAM_CPLEXLIB
#define KN_PARAM_CPLEXLIB 1048
See option
act_lpsolver
.

xpresslibname

KN_PARAM_XPRESSLIB
#define KN_PARAM_XPRESSLIB 1069
See option
act_lpsolver
.
MIP options

mip_branchrule

KN_PARAM_MIP_BRANCHRULE
#define KN_PARAM_MIP_BRANCHRULE 2002 # define KN_MIP_BRANCH_AUTO 0 # define KN_MIP_BRANCH_MOSTFRAC 1 # define KN_MIP_BRANCH_PSEUDOCOST 2 # define KN_MIP_BRANCH_STRONG 3
Specifies which branching rule to use for MIP branch and bound procedure.
 0 (auto) Let Knitro automatically choose the branching rule.
 1 (most_frac) Use most fractional (most infeasible) branching.
 2 (pseudcost) Use pseudocost branching.
 3 (strong) Use strong branching (see options
mip_strong_candlim
,mip_strong_level
andmip_strong_maxit
for further control of strong branching procedure).
Default value: 0

mip_debug

KN_PARAM_MIP_DEBUG
#define KN_PARAM_MIP_DEBUG 2013 # define KN_MIP_DEBUG_NONE 0 # define KN_MIP_DEBUG_ALL 1
Specifies debugging level for MIP solution.
 0 (none) No MIP debugging output created.
 1 (all) Write MIP debugging output to the file kdbg_mip.log.
Default value: 0

mip_gub_branch

KN_PARAM_MIP_GUB_BRANCH
#define KN_PARAM_MIP_GUB_BRANCH 2015 /* BRANCH ON GENERALIZED BOUNDS */ # define KN_MIP_GUB_BRANCH_NO 0 # define KN_MIP_GUB_BRANCH_YES 1
Specifies whether or not to branch on generalized upper bounds (GUBs).
 0 (no) Do not branch on GUBs.
 1 (yes) Allow branching on GUBs.
Default value: 0

mip_heuristic

KN_PARAM_MIP_HEURISTIC
#define KN_PARAM_MIP_HEURISTIC 2022 # define KN_MIP_HEURISTIC_AUTO 0 # define KN_MIP_HEURISTIC_NONE 1 # define KN_MIP_HEURISTIC_FEASPUMP 2 # define KN_MIP_HEURISTIC_MPEC 3
Specifies which MIP heuristic search approach to apply to try to find an initial integer feasible point.
If a heuristic search procedure is enabled, it will run for at most mip_heuristic_maxit iterations, before starting the branch and bound procedure.
 0 (auto) Let Knitro choose the heuristic to apply (if any).
 1 (none) No heuristic search applied.
 2 (feaspump) Apply feasibility pump heuristic.
 3 (mpec) Apply heuristic based on MPEC formulation.
Default value: 0

mip_heuristic_maxit

KN_PARAM_MIP_HEURISTIC_MAXIT
#define KN_PARAM_MIP_HEUR_MAXIT 2023
Specifies the maximum number of iterations to allow for MIP heuristic, if one is enabled.
Default value: 100

mip_heuristic_terminate

KN_PARAM_MIP_HEUR_TERMINATE
#define KN_PARAM_MIP_HEUR_TERMINATE 2033 # define KN_MIP_HEUR_TERMINATE_FEASIBLE 1 # define KN_MIP_HEUR_TERMINATE_LIMIT 2
Specifies the condition for terminating the MIP heuristic.
 1 (feasible) Terminate at first feasible point or iteration limit (whichever comes first).
 2 (limit) Always run to the iteration limit.
Default value: 1

mip_implications

KN_PARAM_MIP_IMPLICATNS
#define KN_PARAM_MIP_IMPLICATNS 2014 /* USE LOGICAL IMPLICATIONS */ # define KN_MIP_IMPLICATNS_NO 0 # define KN_MIP_IMPLICATNS_YES 1
Specifies whether or not to add constraints to the MIP derived from logical implications.
 0 (no) Do not add constraints from logical implications.
 1 (yes) Knitro adds constraints from logical implications.
Default value: 1

mip_integer_tol

KN_PARAM_MIP_INTEGERTOL
#define KN_PARAM_MIP_INTEGERTOL 2009
This value specifies the threshold for deciding whether or not a variable is determined to be an integer.
Default value: 1.0e8

mip_integral_gap_abs

KN_PARAM_MIP_INTGAPABS
#define KN_PARAM_MIP_INTGAPABS 2004
The absolute integrality gap stop tolerance for MIP.
Default value: 1.0e6

mip_integral_gap_rel

KN_PARAM_MIP_INTGAPREL
#define KN_PARAM_MIP_INTGAPREL 2005
The relative integrality gap stop tolerance for MIP.
Default value: 1.0e6

mip_intvar_strategy

KN_PARAM_MIP_INTVAR_STRATEGY
#define KN_PARAM_MIP_INTVAR_STRATEGY 2030 # define KN_MIP_INTVAR_STRATEGY_NONE 0 # define KN_MIP_INTVAR_STRATEGY_RELAX 1 # define KN_MIP_INTVAR_STRATEGY_MPEC 2
Specifies how to handle integer variables.
 0 (none) No special treatment applied.
 1 (relax) Relax all integer variables.
 2 (mpec) Convert all binary variables to complementarity constraints.
Default value: 0

mip_knapsack

KN_PARAM_MIP_KNAPSACK
#define KN_PARAM_MIP_KNAPSACK 2016 /* KNAPSACK CUTS */ # define KN_MIP_KNAPSACK_NO 0 /* NONE */ # define KN_MIP_KNAPSACK_INEQ 1 /* ONLY FOR INEQUALITIES */ # define KN_MIP_KNAPSACK_INEQ_EQ 2 /* FOR INEQS AND EQS */
Specifies rules for adding MIP knapsack cuts.
 0 (none) Do not add knapsack cuts.
 1 (ineqs) Add cuts derived from inequalities only.
 2 (ineqs_eqs) Add cuts derived from both inequalities and equalities.
Default value: 1

mip_lpalg

KN_PARAM_MIP_LPALG
#define KN_PARAM_MIP_LPALG 2019 # define KN_MIP_LPALG_AUTO 0 # define KN_MIP_LPALG_BAR_DIRECT 1 # define KN_MIP_LPALG_BAR_CG 2 # define KN_MIP_LPALG_ACT_CG 3
Specifies which algorithm to use for any linear programming (LP) subproblem solves that may occur in the MIP branch and bound procedure.
LP subproblems may arise if the problem is a mixed integer linear program (MILP), or if using
mip_method
= HQG. (Nonlinear programming subproblems use the algorithm specified by thealgorithm
option.) 0 (auto) Let Knitro automatically choose an algorithm, based on the problem characteristics.
 1 (direct) Use the Interior/Direct (barrier) algorithm.
 2 (cg) Use the Interior/CG (barrier) algorithm.
 3 (active) Use the Active Set (simplex) algorithm.
Default value: 0

mip_maxnodes

KN_PARAM_MIP_MAXNODES
#define KN_PARAM_MIP_MAXNODES 2021
Specifies the maximum number of nodes explored (0 means no limit).
Default value: 100000

mip_maxsolves

KN_PARAM_MIP_MAXSOLVES
#define KN_PARAM_MIP_MAXSOLVES 2008
Specifies the maximum number of subproblem solves allowed (0 means no limit).
Default value: 200000

mip_maxtime_cpu

KN_PARAM_MIP_MAXTIMECPU
#define KN_PARAM_MIP_MAXTIMECPU 2006
Specifies the maximum allowable CPU time in seconds for the complete MIP solution.
Use
maxtime_cpu
to additionally limit time spent per subproblem solve.Default value: 1.0e8

mip_maxtime_real

KN_PARAM_MIP_MAXTIMEREAL
#define KN_PARAM_MIP_MAXTIMEREAL 2007
Specifies the maximum allowable real time in seconds for the complete MIP solution.
Use
maxtime_real
to additionally limit time spent per subproblem solve.Default value: 1.0e8

mip_method

KN_PARAM_MIP_METHOD
#define KN_PARAM_MIP_METHOD 2001 # define KN_MIP_METHOD_AUTO 0 # define KN_MIP_METHOD_BB 1 # define KN_MIP_METHOD_HQG 2 # define KN_MIP_METHOD_MISQP 3
Specifies which MIP method to use.
 0 (auto) Let Knitro automatically choose the method.
 1 (BB) Use the standard branch and bound method.
 2 (HQG) Use the hybrid QuesadaGrossman method (for convex, nonlinear problems only).
 3 (MISQP) Use mixedinteger SQP method (allows for nonrelaxable integer variables).
Default value: 0

mip_nodealg

KN_PARAM_MIP_NODEALG
#define KN_PARAM_MIP_NODEALG 2032 # define KN_MIP_NODEALG_AUTO 0 # define KN_MIP_NODEALG_BAR_DIRECT 1 # define KN_MIP_NODEALG_BAR_CG 2 # define KN_MIP_NODEALG_ACT_CG 3 # define KN_MIP_NODEALG_ACT_SQP 4 # define KN_MIP_NODEALG_MULTI 5
Specifies which algorithm to use for standard node subproblem solves in MIP (same options as
algorithm
user option).Default value: 0

mip_outinterval

KN_PARAM_MIP_OUTINTERVAL
#define KN_PARAM_MIP_OUTINTERVAL 2011
Specifies node printing interval for
mip_outlevel
whenmip_outlevel
> 0. 1 Print output every node.
 2 Print output every 2nd node.
 N Print output every Nth node.
Default value: 10

mip_outlevel

KN_PARAM_MIP_OUTLEVEL
#define KN_PARAM_MIP_OUTLEVEL 2010 # define KN_MIP_OUTLEVEL_NONE 0 # define KN_MIP_OUTLEVEL_ITERS 1 # define KN_MIP_OUTLEVEL_ITERSTIME 2 # define KN_MIP_OUTLEVEL_ROOT 3
Specifies how much MIP information to print.
 0 (none) Do not print any MIP node information.
 1 (iters) Print one line of output for every node.
 2 (iterstime) Also print accumulated time for every node.
 3 (root) Also print detailed log from root node solve.
Default value: 1

mip_outsub

KN_PARAM_MIP_OUTSUB
#define KN_PARAM_MIP_OUTSUB 2012 # define KN_MIP_OUTSUB_NONE 0 # define KN_MIP_OUTSUB_YES 1 # define KN_MIP_OUTSUB_YESPROB 2
Specifies MIP subproblem solve debug output control. This output is only produced if
mip_debug
= 1 and appears in the filekdbg_mip.log
. 0 Do not print any debug output from subproblem solves.
 1 Subproblem debug output enabled, controlled by option outlev.
 2 Subproblem debug output enabled and print problem characteristics.
Default value: 0

mip_pseudoinit

KN_PARAM_MIP_PSEUDOINIT
#define KN_PARAM_MIP_PSEUDOINIT 2026 # define KN_MIP_PSEUDOINIT_AUTO 0 # define KN_MIP_PSEUDOINIT_AVE 1 # define KN_MIP_PSEUDOINIT_STRONG 2
Specifies the method used to initialize pseudocosts corresponding to variables that have not yet been branched on in the MIP method.
 0 Let Knitro automatically choose the method.
 1 Initialize using the average value of computed pseudocosts.
 2 Initialize using strong branching.
Default value: 0

mip_relaxable

KN_PARAM_MIP_RELAXABLE
#define KN_PARAM_MIP_RELAXABLE 2031 # define KN_MIP_RELAXABLE_NONE 0 # define KN_MIP_RELAXABLE_ALL 1
Specifies Whether integer variables are relaxable.
 0 (none) Integer variables are not relaxable.
 1 (all) All integer variables are relaxable.
Default value: 1

mip_rootalg

KN_PARAM_MIP_ROOTALG
#define KN_PARAM_MIP_ROOTALG 2018 # define KN_MIP_ROOTALG_AUTO 0 # define KN_MIP_ROOTALG_BAR_DIRECT 1 # define KN_MIP_ROOTALG_BAR_CG 2 # define KN_MIP_ROOTALG_ACT_CG 3 # define KN_MIP_ROOTALG_ACT_SQP 4 # define KN_MIP_ROOTALG_MULTI 5
Specifies which algorithm to use for the root node solve in MIP (same options as
algorithm
user option).Default value: 0

mip_rounding

KN_PARAM_MIP_ROUNDING
#define KN_PARAM_MIP_ROUNDING 2017 # define KN_MIP_ROUND_AUTO 0 # define KN_MIP_ROUND_NONE 1 /* DO NOT ATTEMPT ROUNDING */ # define KN_MIP_ROUND_HEURISTIC 2 /* USE FAST HEURISTIC */ # define KN_MIP_ROUND_NLP_SOME 3 /* SOLVE NLP IF LIKELY TO WORK */ # define KN_MIP_ROUND_NLP_ALWAYS 4 /* SOLVE NLP ALWAYS */
Specifies the MIP rounding rule to apply.
 0 (auto) Let Knitro choose the rounding rule.
 1 (none) No rounding heuristic is used.
 2 (heur_only) Round using a fast heuristic only.
 3 (nlp_sometimes) Round and solve a subproblem if likely to succeed.
 4 (nlp_always) Always round and solve a subproblem.
Default value: 0

mip_selectdir

KN_PARAM_MIP_SELECTDIR
#define KN_PARAM_MIP_SELECTDIR 2034 # define KN_MIP_SELECTDIR_DOWN 0 # define KN_MIP_SELECTDIR_UP 1
Specifies the MIP node selection direction rule (for tiebreakers) for choosing the next node in the branch and bound tree.
 0 (down) Choose the down (i.e. <=) node first.
 1 (up) Choose the up (i.e. >=) node first.
Default value: 0

mip_selectrule

KN_PARAM_MIP_SELECTRULE
#define KN_PARAM_MIP_SELECTRULE 2003 # define KN_MIP_SEL_AUTO 0 # define KN_MIP_SEL_DEPTHFIRST 1 # define KN_MIP_SEL_BESTBOUND 2 # define KN_MIP_SEL_COMBO_1 3
Specifies the MIP select rule for choosing the next node in the branch and bound tree.
 0 (auto) Let Knitro choose the node selection rule.
 1 (depth_first) Search the tree using a depth first procedure.
 2 (best_bound) Select the node with the best relaxation bound.
 3 (combo_1) Use depth first unless pruned, then best bound.
Default value: 0

mip_strong_candlim

KN_PARAM_MIP_STRONG_CANDLIM
#define KN_PARAM_MIP_STRONG_CANDLIM 2028
Specifies the maximum number of candidates to explore for MIP strong branching.
Default value: 10

mip_strong_level

KN_PARAM_MIP_STRONG_LEVEL
#define KN_PARAM_MIP_STRONG_LEVEL 2029
Specifies the maximum number of tree levels on which to perform MIP strong branching.
Default value: 10

mip_strong_maxit

KN_PARAM_MIP_STRONG_MAXIT
#define KN_PARAM_MIP_STRONG_MAXIT 2027
Specifies the maximum number of iterations to allow for MIP strong branching solves.
Default value: 1000

mip_terminate

KN_PARAM_MIP_TERMINATE
#define KN_PARAM_MIP_TERMINATE 2020 # define KN_MIP_TERMINATE_OPTIMAL 0 # define KN_MIP_TERMINATE_FEASIBLE 1
Specifies conditions for terminating the MIP algorithm.
 0 (optimal) Terminate at optimum.
 1 (feasible) Terminate at first integer feasible point.
Default value: 0
Multialgorithm options

ma_maxtime_cpu

KN_PARAM_MA_MAXTIMECPU
#define KN_PARAM_MA_MAXTIMECPU 1064
Specifies, in seconds, the maximum allowable CPU time before termination for the multialgorithm (“MA”) procedure (
alg=5
).Default value: 1.0e8

ma_maxtime_real

KN_PARAM_MA_MAXTIMEREAL
#define KN_PARAM_MA_MAXTIMEREAL 1065
Specifies, in seconds, the maximum allowable real time before termination for the multialgorithm (“MA”) procedure (
alg=5
).Default value: 1.0e8
Note
When using the multialgorithm procedure, the options maxtime_cpu
and
maxtime_real
control time limits for the individual algorithms,
while ma_maxtime_cpu
and ma_maxtime_real
impose time limits for
the overall procedure.

ma_outsub

KN_PARAM_MA_OUTSUB
#define KN_PARAM_MA_OUTSUB 1067 # define KN_MA_OUTSUB_NONE 0 # define KN_MA_OUTSUB_YES 1
Enable writing algorithm output to files for the multialgorithm (
alg=5
) procedure. 0 Do not write detailed algorithm output to files.
 1 Write detailed algorithm output to files named
knitro_ma_*.log
.
Default value: 0

ma_terminate

KN_PARAM_MA_TERMINATE
#define KN_PARAM_MA_TERMINATE 1063 # define KN_MA_TERMINATE_ALL 0 # define KN_MA_TERMINATE_OPTIMAL 1 # define KN_MA_TERMINATE_FEASIBLE 2 # define KN_MA_TERMINATE_ANY 3
Define the termination condition for the multialgorithm (
alg=5
) procedure. 0 Terminate after all algorithms have completed.
 1 Terminate at first locally optimal solution.
 2 Terminate at first feasible solution estimate.
 3 Terminate at first solution estimate of any type.
Default value: 1
Multistart options

ms_deterministic

KN_PARAM_MSDETERMINISTIC
#define KN_PARAM_MSDETERMINISTIC 1078 # define KN_MSDETERMINISTIC_NO 0 # define KN_MSDETERMINISTIC_YES 1
Indicates whether Knitro multistart procedure will be deterministic (when
ms_terminate
= 0). 0 (no) multithreaded multistart is nondeterministic.
 1 (yes) multithreaded multistart is deterministic (when
ms_terminate
= 0).
Default value: 1

ms_enable

KN_PARAM_MULTISTART
#define KN_PARAM_MULTISTART 1033 # define KN_MULTISTART_NO 0 # define KN_MULTISTART_YES 1
Indicates whether Knitro will solve from multiple start points to find a better local minimum.
 0 (no) Knitro solves from a single initial point.
 1 (yes) Knitro solves using multiple start points.
Default value: 0

ms_maxbndrange

KN_PARAM_MSMAXBNDRANGE
#define KN_PARAM_MSMAXBNDRANGE 1035
Specifies the maximum range that an unbounded variable can take when determining new start points.
If a variable is unbounded in one or both directions, then new start point values are restricted by the option. If is such a variable, then all initial values satisfy
where is the initial value of provided by the user, and and are the variable bounds (possibly infinite) on . This option has no effect unless
ms_enable
= yes.Default value: 1000.0

ms_maxsolves

KN_PARAM_MSMAXSOLVES
#define KN_PARAM_MSMAXSOLVES 1034
Specifies how many start points to try in multistart. This option has no effect unless
ms_enable
= yes. 0 Let Knitro automatically choose a value based on the problem size. The value is min(200, 10 N), where N is the number of variables in the problem.
 n Try n>0 start points.
Default value: 0

ms_maxtime_cpu

KN_PARAM_MSMAXTIMECPU
#define KN_PARAM_MSMAXTIMECPU 1036
Specifies, in seconds, the maximum allowable CPU time before termination.
The limit applies to the operation of Knitro since multistart began; in contrast, the value of
maxtime_cpu
limits how long Knitro iterates from a single start point. Therefore,ms_maxtime_cpu
should be greater thanmaxtime_cpu
. This option has no effect unlessms_enable
= yes.Default value: 1.0e8

ms_maxtime_real

KN_PARAM_MSMAXTIMEREAL
#define KN_PARAM_MSMAXTIMEREAL 1037
Specifies, in seconds, the maximum allowable real time before termination.
The limit applies to the operation of Knitro since multistart began; in contrast, the value of
maxtime_real
limits how long Knitro iterates from a single start point. Therefore,ms_maxtime_real
should be greater thanmaxtime_real
. This option has no effect unlessms_enable
= yes.Default value: 1.0e8

ms_num_to_save

KN_PARAM_MSNUMTOSAVE
#define KN_PARAM_MSNUMTOSAVE 1051
Specifies the number of distinct feasible points to save in a file named
knitro_mspoints.log
.Each point results from a Knitro solve from a different starting point, and must satisfy the absolute and relative feasibility tolerances. The file stores points in order from best objective to worst. Points are distinct if they differ in objective value or some component by the value of
ms_savetol
using a relative tolerance test. This option has no effect unlessms_enable
= yes.Default value: 0

ms_outsub

KN_PARAM_MS_OUTSUB
#define KN_PARAM_MS_OUTSUB 1068 # define KN_MS_OUTSUB_NONE 0 # define KN_MS_OUTSUB_YES 1
Enable writing algorithm output to files for the parallel multistart procedure.
 0 Do not write detailed algorithm output to files.
 1 Write detailed algorithm output to files named
knitro_ms_*.log
.
Default value: 0

ms_savetol

KN_PARAM_MSSAVETOL
#define KN_PARAM_MSSAVETOL 1052
Specifies the tolerance for deciding if two feasible points are distinct.
Points are distinct if they differ in objective value or some component by the value of
ms_savetol
using a relative tolerance test. A large value can cause the saved feasible points in the fileknitro_mspoints.log
to cluster around more widely separated points. This option has no effect unlessms_enable
= yes. andms_num_to_save
is positive.Default value: 1.0e6

ms_seed

KN_PARAM_MSSEED
#define KN_PARAM_MSSEED 1066
Seed value used to generate random initial points in multistart; should be a nonnegative integer.
Default value: 0

ms_startptrange

KN_PARAM_MSSTARTPTRANGE
#define KN_PARAM_MSSTARTPTRANGE 1055
Specifies the maximum range that each variable can take when determining new start points.
If a variable has upper and lower bounds and the difference between them is less than or equal to
ms_startptrange
, then new start point values for the variable can be any number between its upper and lower bounds.If the variable is unbounded in one or both directions, or the difference between bounds is greater than
ms_startptrange
, then new start point values are restricted by the option. If is such a variable, then all initial values satisfywhere is the initial value of provided by the user, and and are the variable bounds (possibly infinite) on . This option has no effect unless
ms_enable
= yes.Default value: 1.0e20

ms_terminate

KN_PARAM_MSTERMINATE
#define KN_PARAM_MSTERMINATE 1054 # define KN_MSTERMINATE_MAXSOLVES 0 # define KN_MSTERMINATE_OPTIMAL 1 # define KN_MSTERMINATE_FEASIBLE 2 # define KN_MSTERMINATE_ANY 3
Specifies the condition for terminating multistart.
This option has no effect unless
ms_enable
= yes. 0 Terminate after ms_maxsolves.
 1 Terminate after the first local optimal solution is found or ms_maxsolves, whichever comes first.
 2 Terminate after the first feasible solution estimate is found or ms_maxsolves, whichever comes first.
 3 Terminate after the first solution estimate of any type is found or ms_maxsolves, whichever comes first.
Default value: 0

par_msnumthreads

KN_PARAM_PAR_MSNUMTHREADS
#define KN_PARAM_PAR_MSNUMTHREADS 3005 # define KN_PAR_MSNUMTHREADS_AUTO 0
Specify the number of threads to use for multistart (when
ms_enable
= 1). 0 (auto) Let Knitro choose the number of threads (currently sets
par_msnumthreads
topar_numthreads
).  n>0 Use n threads for the multistart (solve n problems in parallel).
Default value: 0
 0 (auto) Let Knitro choose the number of threads (currently sets
Parallelism options

par_blasnumthreads

KN_PARAM_PAR_BLASNUMTHREADS
#define KN_PARAM_PAR_BLASNUMTHREADS 3003
Specify the number of threads to use for BLAS operations when
blasoption
= 1 (see Parallelism).Default value: 1

par_concurrent_evals

KN_PARAM_PAR_CONCURRENT_EVALS
#define KN_PARAM_PAR_CONCURRENT_EVALS 3002 # define KN_PAR_CONCURRENT_EVALS_NO 0 # define KN_PAR_CONCURRENT_EVALS_YES 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”). If it is not safe to have concurrent evaluations, then setting
par_concurrent_evals=0
, will put these evaluations in a critical region so that only one evaluation can take place at a time. Ifpar_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. See Parallelism. 0 (no) Do not allow concurrent callback evaluations.
 1 (yes) Allow concurrent callback evaluations.
Default value: 1

par_lsnumthreads

KN_PARAM_PAR_LSNUMTHREADS
#define KN_PARAM_PAR_LSNUMTHREADS 3004
Specify the number of threads to use for linear system solve operations when
linsolver
= 6 (see Parallelism).Default value: 1

par_numthreads

KN_PARAM_PAR_NUMTHREADS
#define KN_PARAM_PAR_NUMTHREADS 3001
Specify the number of threads to use for parallel (excluding BLAS) computing features (see Parallelism).
Default value: 1
Output options

debug

KN_PARAM_DEBUG
#define KN_PARAM_DEBUG 1031 # define KN_DEBUG_NONE 0 # define KN_DEBUG_PROBLEM 1 # define KN_DEBUG_EXECUTION 2
Controls the level of debugging output.
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. 0 (none) No debugging output.
 1 (problem) Print algorithm information to kdbg*.log
 output files.
 2 (execution) Print program execution information.
Default value: 0

newpoint

KN_PARAM_NEWPOINT
#define KN_PARAM_NEWPOINT 1001 # define KN_NEWPOINT_NONE 0 # define KN_NEWPOINT_SAVEONE 1 # define KN_NEWPOINT_SAVEALL 2
Specifies additional action to take after every iteration in a solve of 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. The “newpoint” feature in Knitro is currently only available for continuous problems (solved via
KN_solve()
). 0 (none) Knitro takes no additional action.
 1 (saveone) Knitro writes x and lambda to the
file
knitro_newpoint.log
. Previous contents of the file are overwritten.  2 (saveall) Knitro appends x and lambda to the
file
knitro_newpoint.log
. Warning: this option can generate a very large file. All iterates, including the start point, crossover points, and the final solution are saved. Each iterate also prints the objective value at the new point, except the initial start point.
Default value: 0

out_csvinfo

KN_PARAM_OUT_CSVINFO
#define KN_PARAM_OUT_CSVINFO 1096 # define KN_OUT_CSVINFO_NO 0 # define KN_OUT_CSVINFO_YES 1
Controls whether or not to generates a file
knitro_solve.csv
containing solve information in comma separated format. 0 (no) No solution information file is generated.
 1 (yes) The
knitro_solve.csv
solution file is generated.
Default value: 0

out_csvname

KN_PARAM_OUT_CSVNAME
#define KN_PARAM_OUT_CSVNAME 1106
Use to specify a custom csv filename when using
out_csvinfo
.Default value:
knitro_solve.csv

out_hints

KN_PARAM_OUT_HINTS
#define KN_PARAM_OUT_HINTS 1115 # define KN_OUT_HINTS_NO 0 # define KN_OUT_HINTS_YES 1
Specifies whether to print diagnostic hints (e.g. about user option settings) after solving.
 0 (no) Do not print any hints.
 1 (yes) Print diagnostic hints on occasion.
Default value: 1

outappend

KN_PARAM_OUTAPPEND
#define KN_PARAM_OUTAPPEND 1046 # define KN_OUTAPPEND_NO 0 # define KN_OUTAPPEND_YES 1
Specifies whether output should be started in a new file, or appended to existing files.
The option affects
knitro.log
and files produced whendebug
= 1. It does not affectknitro_newpoint.log
, which is controlled by optionnewpoint
. 0 (no) Erase any existing files when opening for output.
 1 (yes) Append output to any existing files.
Default value: 0

outdir

KN_PARAM_OUTDIR
#define KN_PARAM_OUTDIR 1047
Specifies a single directory as the location to write all output files.
The option should be a full pathname to the directory, and the directory must already exist.

outlev

KN_PARAM_OUTLEV
#define KN_PARAM_OUTLEV 1015 # define KN_OUTLEV_NONE 0 # define KN_OUTLEV_SUMMARY 1 # define KN_OUTLEV_ITER_10 2 # define KN_OUTLEV_ITER 3 # define KN_OUTLEV_ITER_VERBOSE 4 # define KN_OUTLEV_ITER_X 5 # define KN_OUTLEV_ALL 6
Controls the level of output produced by Knitro.
 0 (none) Printing of all output is suppressed.
 1 (summary) Print only summary information.
 2 (iter_10) Print basic information every 10 iterations.
 3 (iter) Print basic information at each iteration.
 4 (iter_verbose) Print basic information and the function count at each iteration.
 5 (iter_x) Print all the above, and the values of the solution vector x.
 6 (all) Print all the above, and the values of the constraints c at x and the Lagrange multipliers lambda.
Default value: 2

outmode

KN_PARAM_OUTMODE
#define KN_PARAM_OUTMODE 1016 # define KN_OUTMODE_SCREEN 0 # define KN_OUTMODE_FILE 1 # define KN_OUTMODE_BOTH 2
Specifies where to direct the output from Knitro.
 0 (screen) Output is directed to standard out (e.g., screen).
 1 (file) Output is sent to a file named
knitro.log
.  2 (both) Output is directed to both the screen and file
knitro.log
.
Default value: 0

outname

KN_PARAM_OUTNAME
#define KN_PARAM_OUTNAME 1105
Use to specify a custom filename when output is written to a file using
outmode
.Default value:
knitro.log
Tuner options

tuner

KN_PARAM_TUNER
#define KN_PARAM_TUNER 1070 # define KN_TUNER_OFF 0 # define KN_TUNER_ON 1
Indicates whether to invoke the KnitroTuner (see The KnitroTuner).
 0 (off) Do not invoke the KnitroTuner.
 1 (on) Invoke the KnitroTuner.
Default value: 0

tuner_maxtime_cpu

KN_PARAM_TUNER_MAXTIMECPU
#define KN_PARAM_TUNER_MAXTIMECPU 1072
Specifies, in seconds, the maximum allowable CPU time before terminating the KnitroTuner.
The limit applies to the operation of Knitro since the KnitroTuner began. In contrast, the value of
maxtime_cpu
places a time limit on each individual KnitroTuner solve for a particular option setting. Therefore,tuner_maxtime_cpu
should be greater thanmaxtime_cpu
. This option has no effect unlesstuner
= on.Default value: 1.0e8

tuner_maxtime_real

KN_PARAM_TUNER_MAXTIMEREAL
#define KN_PARAM_TUNER_MAXTIMEREAL 1073
Specifies, in seconds, the maximum allowable real time before terminating the KnitroTuner.
The limit applies to the operation of Knitro since the KnitroTuner began. In contrast, the value of
maxtime_real
places a time limit on each individual KnitroTuner solve for a particular option setting. Therefore,tuner_maxtime_real
should be greater thanmaxtime_real
. This option has no effect unlesstuner
= on.Default value: 1.0e8

tuner_optionsfile

KN_PARAM_TUNER_OPTIONSFILE
#define KN_PARAM_TUNER_OPTIONSFILE 1071
Can be used to specify the location of a Tuner options file (see The KnitroTuner).
Default value: NULL

tuner_outsub

KN_PARAM_TUNER_OUTSUB
#define KN_PARAM_TUNER_OUTSUB 1074 # define KN_TUNER_OUTSUB_NONE 0 # define KN_TUNER_OUTSUB_SUMMARY 1 # define KN_TUNER_OUTSUB_ALL 2
Enable writing additional Tuner subproblem solve output to files for the KnitroTuner procedure (
tuner=1
). 0 Do not write detailed solve output to files.
 1 Write summary solve output to a file named
knitro_tuner_summary.log
.  2 Write detailed individual solve output to files named
knitro_tuner_*.log
.
Default value: 0

tuner_terminate

KN_PARAM_TUNER_TERMINATE
#define KN_PARAM_TUNER_TERMINATE 1075 # define KN_TUNER_TERMINATE_ALL 0 # define KN_TUNER_TERMINATE_OPTIMAL 1 # define KN_TUNER_TERMINATE_FEASIBLE 2 # define KN_TUNER_TERMINATE_ANY 3
Define the termination condition for the KnitroTuner procedure (
tuner=1
). 0 Terminate after all solves have completed.
 1 Terminate at first locally optimal solution.
 2 Terminate at first feasible solution estimate.
 3 Terminate at first solution estimate of any type.
Default value: 0