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
User parameters cannot be set after beginning the optimization
process; i.e., for users of the Knitro callable library,
after making the first call to KTR_solve()
or KTR_mip_solve()
.
In addition, the gradopt
and hessopt
options
must be set before calling KTR_init_problem() or
KTR_mip_init_problem() and remain unchanged after being set.
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 
datacheck 
2  Specifies whether to perform more extensive data checks 
delta 
3  Specifies the initial trust region radius scaling factor 
honorbnds 
1  Indicates whether or not to enforce satisfaction of simple variable bounds 
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 
maxcgit 
2  Determines the maximum allowable number of inner conjugate gradient (CG) iterations 
objrange 
3  Specifies the extreme limits of the objective function for purposes of determining unboundedness 
pivot 
3  Specifies the initial pivot threshold used in factorization routines 
presolve_tol 
3  Determines the tolerance used by the Knitro presolver 
presolve 
1  Determine whether or not to use the Knitro presolver 
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_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 
derivcheck 
1  Determine whether or not to perform a derivative check on the model 
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_abs 
1  Specifies the final absolute stopping tolerance for the feasibility error 
feastol 
1  Specifies the final relative stopping tolerance for the feasibility error 
fstopval 
2  Used to implement a custom stopping condition based on the objective function value 
ftol_iters 
3  Number of consecutive iterations where the relative change in the objective function is less than ftol before Knitro stops 
ftol 
2  The optimization process will terminate if the relative change in the objective function is less than ftol 
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_abs 
1  Specifies the final absolute stopping tolerance for the KKT (optimality) error 
opttol 
1  Specifies the final relative stopping tolerance for the KKT (optimality) error 
xtol_iters 
3  Number of consecutive iterations where change of the solution point estimate is less than xtol before Knitro stops 
xtol 
1  The optimization process will terminate if the relative change of the solution point estimate is less than xtol 
Barrier options
Option name  Importance  Purpose 
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_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_lpsolver 
1  Indicates which linear programming simplex solver the Knitro Active Set or SQP algorithms use 
act_qpalg 
1  Indicates which algorithm to use to solve quadratic programming (QP) subproblems 
cplexlibname 
3  Name of the Xpress library when act_lpsolver=KTR_ACT_LPSOLVER_CPLEX 
xpresslibname 
3  Name of the Xpress library when act_lpsolver=KTR_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_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_heuristic 
1  Specifies which MIP heuristic search approach to apply 
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_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 
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 
Tuner options
Option name  Importance  Purpose 
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 
tuner 
1  Indicates whether to invoke the KnitroTuner 
General options

algorithm

KTR_PARAM_ALG
#define KTR_PARAM_ALGORITHM 1003 #define KTR_PARAM_ALG 1003 # define KTR_ALG_AUTOMATIC 0 # define KTR_ALG_AUTO 0 # define KTR_ALG_BAR_DIRECT 1 # define KTR_ALG_BAR_CG 2 # define KTR_ALG_ACT_CG 3 # define KTR_ALG_ACT_SQP 4 # define KTR_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

presolve

KTR_PARAM_PRESOLVE
#define KTR_PARAM_PRESOLVE 1059 # define KTR_PRESOLVE_NONE 0 # define KTR_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

KTR_PARAM_PRESOLVE_TOL
#define KTR_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

datacheck

KTR_PARAM_DATACHECK
#define KTR_PARAM_DATACHECK 1087 # define KTR_DATACHECK_NO 0 # define KTR_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

scale

KTR_PARAM_SCALE
#define KTR_PARAM_SCALE 1017 # define KTR_SCALE_NEVER 0 # define KTR_SCALE_NO 0 # define KTR_SCALE_USER_INTERNAL 1 # define KTR_SCALE_USER_NONE 2 # define KTR_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

honorbnds

KTR_PARAM_HONORBNDS
#define KTR_PARAM_HONORBNDS 1002 # define KTR_HONORBNDS_NO 0 # define KTR_HONORBNDS_ALWAYS 1 # define KTR_HONORBNDS_INITPT 2
Indicates whether or not to enforce satisfaction of simple variable bounds throughout the optimization. The API function
KTR_set_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

linesearch

KTR_PARAM_LINESEARCH
#define KTR_PARAM_LINESEARCH 1095 # define KTR_LINESEARCH_AUTO 0 # define KTR_LINESEARCH_BACKTRACK 1 # define KTR_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

KTR_PARAM_LINESEARCH_MAXTRIALS
#define KTR_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

maxcgit

KTR_PARAM_MAXCGIT
#define KTR_PARAM_MAXCGIT 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

delta

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

pivot

KTR_PARAM_PIVOT
#define KTR_PARAM_PIVOT 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
pivot
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

soc

KTR_PARAM_SOC
#define KTR_PARAM_SOC 1019 # define KTR_SOC_NO 0 # define KTR_SOC_MAYBE 1 # define KTR_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

blasoption

KTR_PARAM_BLASOPTION
#define KTR_PARAM_BLASOPTION 1042 # define KTR_BLASOPTION_KNITRO 0 # define KTR_BLASOPTION_INTEL 1 # define KTR_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
.
The MKL is not included with the free student edition of Knitro.
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

KTR_PARAM_BLASOPTIONLIB
#define KTR_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
. The source fileblasAcmlExample.c
inexamples/C
provides a wrapper for the AMD Core Math Library (ACML), suitable for machines with an AMD processor. Instructions are given in the file for creating a BLAS/LAPACK dynamic library from the ACML. The operating system’s load path must be configured to find the dynamic library.
Note
This option has no effect unless blasoption
= 2.

linsolver

KTR_PARAM_LINSOLVER
#define KTR_PARAM_LINSOLVER 1057 # define KTR_LINSOLVER_AUTO 0 # define KTR_LINSOLVER_INTERNAL 1 # define KTR_LINSOLVER_HYBRID 2 # define KTR_LINSOLVER_DENSEQR 3 # define KTR_LINSOLVER_MA27 4 # define KTR_LINSOLVER_MA57 5 # define KTR_LINSOLVER_MKLPARDISO 6
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 sparse symmetric indefinite solver.
Default value: 0
Note
The QR linear solver, the HSL MA57 linear solver and the Intel MKL PARDISO solver
all make frequent use of
Basic Linear Algebra Subroutines (BLAS) for internal linear algebra operations.
If using option linsolver
= qr, linsolver
= ma57 or
linsolver
= mklpardiso
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.

linsolver_ooc

KTR_PARAM_LINSOLVER_OOC
#define KTR_PARAM_LINSOLVER_OOC 1076 # define KTR_LINSOLVER_OOC_NO 0 # define KTR_LINSOLVER_OOC_MAYBE 1 # define KTR_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.

objrange

KTR_PARAM_OBJRANGE
#define KTR_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
Derivatives options

gradopt

KTR_PARAM_GRADOPT
#define KTR_PARAM_GRADOPT 1007 # define KTR_GRADOPT_EXACT 1 # define KTR_GRADOPT_FORWARD 2 # define KTR_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.

hessopt

KTR_PARAM_HESSOPT
#define KTR_PARAM_HESSOPT 1008 # define KTR_HESSOPT_EXACT 1 # define KTR_HESSOPT_BFGS 2 # define KTR_HESSOPT_SR1 3 # define KTR_HESSOPT_PRODUCT_FINDIFF 4 # define KTR_HESSOPT_PRODUCT 5 # define KTR_HESSOPT_LBFGS 6 # define KTR_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.

hessian_no_f

KTR_PARAM_HESSIAN_NO_F
#define KTR_PARAM_HESSIAN_NO_F 1062 # define KTR_HESSIAN_NO_F_FORBID 0 # define KTR_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

lmsize

KTR_PARAM_LMSIZE
#define KTR_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

derivcheck

KTR_PARAM_DERIVCHECK
#define KTR_PARAM_DERIVCHECK 1080 # define KTR_DERIVCHECK_NONE 0 # define KTR_DERIVCHECK_FIRST 1 # define KTR_DERIVCHECK_SECOND 2 # define KTR_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_type

KTR_PARAM_DERIVCHECK_TYPE
#define KTR_PARAM_DERIVCHECK_TYPE 1081 # define KTR_DERIVCHECK_FORWARD 1 # define KTR_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

derivcheck_tol

KTR_PARAM_DERIVCHECK_TOL
#define KTR_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_terminate

KTR_PARAM_DERIVCHECK_TERMINATE
#define KTR_PARAM_DERIVCHECK_TERMINATE 1088 # define KTR_DERIVCHECK_STOPERROR 1 # define KTR_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
Termination options

opttol

KTR_PARAM_OPTTOL
#define KTR_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

KTR_PARAM_OPTTOLABS
#define KTR_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

feastol

KTR_PARAM_FEASTOL
#define KTR_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

KTR_PARAM_FEASTOLABS
#define KTR_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

infeastol

KTR_PARAM_INFEASTOL
#define KTR_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

xtol

KTR_PARAM_XTOL
#define KTR_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

KTR_PARAM_XTOL_ITERS
#define KTR_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

fstopval

KTR_PARAM_FSTOPVAL
#define KTR_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 thanKTR_INFBOUND
.Default value:
KTR_INFBOUND

ftol

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

ftol_iters

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

maxit

KTR_PARAM_MAXIT
#define KTR_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

maxfevals

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

maxtime_cpu

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

maxtime_real

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

bar_initpt

KTR_PARAM_BAR_INITPT
#define KTR_PARAM_BAR_INITPT 1009 # define KTR_BAR_INITPT_AUTO 0 # define KTR_BAR_INITPT_STRAT1 1 # define KTR_BAR_INITPT_STRAT2 2 # define KTR_BAR_INITPT_STRAT3 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 (strat1) Initialization strategy 1.
 2 (strat2) Initialization strategy 2.
 3 (strat3) Initialization strategy 3.
Default value: 0

bar_initmu

KTR_PARAM_BAR_INITMU
#define KTR_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_murule

KTR_PARAM_BAR_MURULE
#define KTR_PARAM_BAR_MURULE 1004 # define KTR_BAR_MURULE_AUTOMATIC 0 # define KTR_BAR_MURULE_AUTO 0 # define KTR_BAR_MURULE_MONOTONE 1 # define KTR_BAR_MURULE_ADAPTIVE 2 # define KTR_BAR_MURULE_PROBING 3 # define KTR_BAR_MURULE_DAMPMPC 4 # define KTR_BAR_MURULE_FULLMPC 5 # define KTR_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_feasible

KTR_PARAM_BAR_FEASIBLE
#define KTR_PARAM_BAR_FEASIBLE 1006 # define KTR_BAR_FEASIBLE_NO 0 # define KTR_BAR_FEASIBLE_STAY 1 # define KTR_BAR_FEASIBLE_GET 2 # define KTR_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

KTR_PARAM_BAR_FEASMODETOL
#define KTR_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_switchrule

KTR_PARAM_BAR_SWITCHRULE
#define KTR_PARAM_BAR_SWITCHRULE 1061 # define KTR_BAR_SWITCHRULE_AUTO 0 # define KTR_BAR_SWITCHRULE_NEVER 1 # define KTR_BAR_SWITCHRULE_LEVEL1 2 # define KTR_BAR_SWITCHRULE_LEVEL2 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 (level1) Allow switches to feasibility phase.
 3 (level2) Use a more aggressive switching rule.
Default value: 0

bar_directinterval

KTR_PARAM_BAR_DIRECTINTERVAL
#define KTR_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_initpi_mpec

KTR_PARAM_BAR_INITPI_MPEC
#define KTR_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_penaltycons

KTR_PARAM_BAR_PENCONS
#define KTR_PARAM_BAR_PENCONS 1050 # define KTR_BAR_PENCONS_AUTO 0 # define KTR_BAR_PENCONS_NONE 1 # define KTR_BAR_PENCONS_ALL 2 # define KTR_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

KTR_PARAM_BAR_PENRULE
#define KTR_PARAM_BAR_PENRULE 1049 # define KTR_BAR_PENRULE_AUTO 0 # define KTR_BAR_PENRULE_SINGLE 1 # define KTR_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_maxcrossit

KTR_PARAM_BAR_MAXCROSSIT
#define KTR_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

KTR_PARAM_BAR_MAXREFACTOR
#define KTR_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_refinement

KTR_PARAM_BAR_REFINEMENT
#define KTR_PARAM_BAR_REFINEMENT 1079 # define KTR_BAR_REFINEMENT_NO 0 # define KTR_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

KTR_PARAM_BAR_RELAXCONS
#define KTR_PARAM_BAR_RELAXCONS 1077 # define KTR_BAR_RELAXCONS_NONE 0 # define KTR_BAR_RELAXCONS_EQS 1 # define KTR_BAR_RELAXCONS_INEQS 2 # define KTR_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_watchdog

KTR_PARAM_BAR_WATCHDOG
#define KTR_PARAM_BAR_WATCHDOG 1089 # define KTR_BAR_WATCHDOG_NO 0 # define KTR_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_lpsolver

KTR_PARAM_ACT_LPSOLVER
#define KTR_PARAM_ACT_LPSOLVER 1012 # define KTR_ACT_LPSOLVER_INTERNAL 1 # define KTR_ACT_LPSOLVER_CPLEX 2 # define KTR_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 KTR_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 KTR_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):KTR_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_qpalg

KTR_PARAM_ACT_QPALG
#define KTR_PARAM_ACT_QPALG 1092 # define KTR_ACT_QPALG_AUTO 0 # define KTR_ACT_QPALG_BAR_DIRECT 1 # define KTR_ACT_QPALG_BAR_CG 2 # define KTR_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

xpresslibname

KTR_PARAM_XPRESSLIB
#define KTR_PARAM_XPRESSLIB 1069
See option
act_lpsolver
.

cplexlibname

KTR_PARAM_CPLEXLIB
#define KTR_PARAM_CPLEXLIB 1048
See option
act_lpsolver
.
MIP options

mip_method

KTR_PARAM_MIP_METHOD
#define KTR_PARAM_MIP_METHOD 2001 # define KTR_MIP_METHOD_AUTO 0 # define KTR_MIP_METHOD_BB 1 # define KTR_MIP_METHOD_HQG 2 # define KTR_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

KTR_PARAM_MIP_NODEALG
#define KTR_PARAM_MIP_NODEALG 2032 # define KTR_MIP_NODEALG_AUTO 0 # define KTR_MIP_NODEALG_BAR_DIRECT 1 # define KTR_MIP_NODEALG_BAR_CG 2 # define KTR_MIP_NODEALG_ACT_CG 3 # define KTR_MIP_NODEALG_ACT_SQP 4 # define KTR_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_rootalg

KTR_PARAM_MIP_ROOTALG
#define KTR_PARAM_MIP_ROOTALG 2018 # define KTR_MIP_ROOTALG_AUTO 0 # define KTR_MIP_ROOTALG_BAR_DIRECT 1 # define KTR_MIP_ROOTALG_BAR_CG 2 # define KTR_MIP_ROOTALG_ACT_CG 3 # define KTR_MIP_ROOTALG_ACT_SQP 4 # define KTR_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_lpalg

KTR_PARAM_MIP_LPALG
#define KTR_PARAM_MIP_LPALG 2019 # define KTR_MIP_LPALG_AUTO 0 # define KTR_MIP_LPALG_BAR_DIRECT 1 # define KTR_MIP_LPALG_BAR_CG 2 # define KTR_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_selectrule

KTR_PARAM_MIP_SELECTRULE
#define KTR_PARAM_MIP_SELECTRULE 2003 # define KTR_MIP_SEL_AUTO 0 # define KTR_MIP_SEL_DEPTHFIRST 1 # define KTR_MIP_SEL_BESTBOUND 2 # define KTR_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_branchrule

KTR_PARAM_MIP_BRANCHRULE
#define KTR_PARAM_MIP_BRANCHRULE 2002 # define KTR_MIP_BRANCH_AUTO 0 # define KTR_MIP_BRANCH_MOSTFRAC 1 # define KTR_MIP_BRANCH_PSEUDOCOST 2 # define KTR_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_rounding

KTR_PARAM_MIP_ROUNDING
#define KTR_PARAM_MIP_ROUNDING 2017 # define KTR_MIP_ROUND_AUTO 0 # define KTR_MIP_ROUND_NONE 1 /* DO NOT ATTEMPT ROUNDING */ # define KTR_MIP_ROUND_HEURISTIC 2 /* USE FAST HEURISTIC */ # define KTR_MIP_ROUND_NLP_SOME 3 /* SOLVE NLP IF LIKELY TO WORK */ # define KTR_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) Do not round if a node is infeasible.
 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_heuristic

KTR_PARAM_MIP_HEURISTIC
#define KTR_PARAM_MIP_HEURISTIC 2022 # define KTR_MIP_HEURISTIC_AUTO 0 # define KTR_MIP_HEURISTIC_NONE 1 # define KTR_MIP_HEURISTIC_FEASPUMP 2 # define KTR_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

KTR_PARAM_MIP_HEURISTIC_MAXIT
#define KTR_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

KTR_PARAM_MIP_HEUR_TERMINATE
#define KTR_PARAM_MIP_HEUR_TERMINATE 2033 # define KTR_MIP_HEUR_TERMINATE_FEASIBLE 1 # define KTR_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_knapsack

KTR_PARAM_MIP_KNAPSACK
#define KTR_PARAM_MIP_KNAPSACK 2016 /* KNAPSACK CUTS */ # define KTR_MIP_KNAPSACK_NO 0 /* NONE */ # define KTR_MIP_KNAPSACK_INEQ 1 /* ONLY FOR INEQUALITIES */ # define KTR_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_implications

KTR_PARAM_MIP_IMPLICATNS
#define KTR_PARAM_MIP_IMPLICATNS 2014 /* USE LOGICAL IMPLICATIONS */ # define KTR_MIP_IMPLICATNS_NO 0 # define KTR_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_pseudoinit

KTR_PARAM_MIP_PSEUDOINIT
#define KTR_PARAM_MIP_PSEUDOINIT 2026 # define KTR_MIP_PSEUDOINIT_AUTO 0 # define KTR_MIP_PSEUDOINIT_AVE 1 # define KTR_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_gub_branch

KTR_PARAM_MIP_GUB_BRANCH
#define KTR_PARAM_MIP_GUB_BRANCH 2015 /* BRANCH ON GENERALIZED BOUNDS */ # define KTR_MIP_GUB_BRANCH_NO 0 # define KTR_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_intvar_strategy

KTR_PARAM_MIP_INTVAR_STRATEGY
#define KTR_PARAM_MIP_INTVAR_STRATEGY 2030 # define KTR_MIP_INTVAR_STRATEGY_NONE 0 # define KTR_MIP_INTVAR_STRATEGY_RELAX 1 # define KTR_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_integer_tol

KTR_PARAM_MIP_INTEGERTOL
#define KTR_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

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

mip_integral_gap_rel

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

mip_terminate

KTR_PARAM_MIP_TERMINATE
#define KTR_PARAM_MIP_TERMINATE 2020 # define KTR_MIP_TERMINATE_OPTIMAL 0 # define KTR_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

mip_maxnodes

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

mip_maxsolves

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

mip_maxtime_cpu

KTR_PARAM_MIP_MAXTIMECPU
#define KTR_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

KTR_PARAM_MIP_MAXTIMEREAL
#define KTR_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_outinterval

KTR_PARAM_MIP_OUTINTERVAL
#define KTR_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

KTR_PARAM_MIP_OUTLEVEL
#define KTR_PARAM_MIP_OUTLEVEL 2010 # define KTR_MIP_OUTLEVEL_NONE 0 # define KTR_MIP_OUTLEVEL_ITERS 1 # define KTR_MIP_OUTLEVEL_ITERSTIME 2 # define KTR_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

KTR_PARAM_MIP_OUTSUB
#define KTR_PARAM_MIP_OUTSUB 2012 # define KTR_MIP_OUTSUB_NONE 0 # define KTR_MIP_OUTSUB_YES 1 # define KTR_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_debug

KTR_PARAM_MIP_DEBUG
#define KTR_PARAM_MIP_DEBUG 2013 # define KTR_MIP_DEBUG_NONE 0 # define KTR_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_relaxable

KTR_PARAM_MIP_RELAXABLE
#define KTR_PARAM_MIP_RELAXABLE 2031 # define KTR_MIP_RELAXABLE_NONE 0 # define KTR_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_strong_candlim

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

mip_strong_level

KTR_PARAM_MIP_STRONG_LEVEL
#define KTR_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

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

ma_terminate

KTR_PARAM_MA_TERMINATE
#define KTR_PARAM_MA_TERMINATE 1063 # define KTR_MA_TERMINATE_ALL 0 # define KTR_MA_TERMINATE_OPTIMAL 1 # define KTR_MA_TERMINATE_FEASIBLE 2 # define KTR_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

ma_outsub

KTR_PARAM_MA_OUTSUB
#define KTR_PARAM_MA_OUTSUB 1067 # define KTR_MA_OUTSUB_NONE 0 # define KTR_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_maxtime_cpu

KTR_PARAM_MA_MAXTIMECPU
#define KTR_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

KTR_PARAM_MA_MAXTIMEREAL
#define KTR_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.
Multistart options

ms_enable

KTR_PARAM_MULTISTART
#define KTR_PARAM_MULTISTART 1033 # define KTR_MULTISTART_NO 0 # define KTR_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_deterministic

KTR_PARAM_MSDETERMINISTIC
#define KTR_PARAM_MSDETERMINISTIC 1078 # define KTR_MSDETERMINISTIC_NO 0 # define KTR_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

par_msnumthreads

KTR_PARAM_PAR_MSNUMTHREADS
#define KTR_PARAM_PAR_MSNUMTHREADS 3005 # define KTR_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

ms_seed

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

ms_startptrange

KTR_PARAM_MSSTARTPTRANGE
#define KTR_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
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 the minimum of
ms_startptrange
andms_maxbndrange
, 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

KTR_PARAM_MSTERMINATE
#define KTR_PARAM_MSTERMINATE 1054 # define KTR_MSTERMINATE_MAXSOLVES 0 # define KTR_MSTERMINATE_OPTIMAL 1 # define KTR_MSTERMINATE_FEASIBLE 2 # define KTR_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

ms_maxbndrange

KTR_PARAM_MSMAXBNDRANGE
#define KTR_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

KTR_PARAM_MSMAXSOLVES
#define KTR_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

KTR_PARAM_MSMAXTIMECPU
#define KTR_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

KTR_PARAM_MSMAXTIMEREAL
#define KTR_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_savetol

KTR_PARAM_MSSAVETOL
#define KTR_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_num_to_save

KTR_PARAM_MSNUMTOSAVE
#define KTR_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

KTR_PARAM_MS_OUTSUB
#define KTR_PARAM_MS_OUTSUB 1068 # define KTR_MS_OUTSUB_NONE 0 # define KTR_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
Parallelism options

par_concurrent_evals

KTR_PARAM_PAR_CONCURRENT_EVALS
#define KTR_PARAM_PAR_CONCURRENT_EVALS 3002 # define KTR_PAR_CONCURRENT_EVALS_NO 0 # define KTR_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_numthreads

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

par_blasnumthreads

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

par_lsnumthreads

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

outmode

KTR_PARAM_OUTMODE
#define KTR_PARAM_OUTMODE 1016 # define KTR_OUTMODE_SCREEN 0 # define KTR_OUTMODE_FILE 1 # define KTR_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

outlev

KTR_PARAM_OUTLEV
#define KTR_PARAM_OUTLEV 1015 # define KTR_OUTLEV_NONE 0 # define KTR_OUTLEV_SUMMARY 1 # define KTR_OUTLEV_ITER_10 2 # define KTR_OUTLEV_ITER 3 # define KTR_OUTLEV_ITER_VERBOSE 4 # define KTR_OUTLEV_ITER_X 5 # define KTR_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

outdir

KTR_PARAM_OUTDIR
#define KTR_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.
Note
The option should not be changed after calling KTR_init_problem()
or KTR_mip_init_problem()
.

debug

KTR_PARAM_DEBUG
#define KTR_PARAM_DEBUG 1031 # define KTR_DEBUG_NONE 0 # define KTR_DEBUG_PROBLEM 1 # define KTR_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

outappend

KTR_PARAM_OUTAPPEND
#define KTR_PARAM_OUTAPPEND 1046 # define KTR_OUTAPPEND_NO 0 # define KTR_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
Note
The option should not be changed after calling KTR_init_problem().

newpoint

KTR_PARAM_NEWPOINT
#define KTR_PARAM_NEWPOINT 1001 # define KTR_NEWPOINT_NONE 0 # define KTR_NEWPOINT_SAVEONE 1 # define KTR_NEWPOINT_SAVEALL 2 # define KTR_NEWPOINT_USER 3
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
KTR_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.  3 (user) If a user callback function is defined with
KTR_set_newpt_callback()
, then Knitro will invoke the callback function after every iteration.
Default value: 0
Tuner options

tuner

KTR_PARAM_TUNER
#define KTR_PARAM_TUNER 1070 # define KTR_TUNER_OFF 0 # define KTR_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_optionsfile

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

tuner_outsub

KTR_PARAM_TUNER_OUTSUB
#define KTR_PARAM_TUNER_OUTSUB 1074 # define KTR_TUNER_OUTSUB_NONE 0 # define KTR_TUNER_OUTSUB_SUMMARY 1 # define KTR_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

KTR_PARAM_TUNER_TERMINATE
#define KTR_PARAM_TUNER_TERMINATE 1075 # define KTR_TUNER_TERMINATE_ALL 0 # define KTR_TUNER_TERMINATE_OPTIMAL 1 # define KTR_TUNER_TERMINATE_FEASIBLE 2 # define KTR_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

tuner_maxtime_cpu

KTR_PARAM_TUNER_MAXTIMECPU
#define KTR_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

KTR_PARAM_TUNER_MAXTIMEREAL
#define KTR_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