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 non-default option settings.
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 |
---|---|---|
1 |
Indicates which algorithm to use to solve the problem |
|
2 |
Specifies the BLAS/LAPACK function library to use for basic vector and matrix computations |
|
3 |
Specifies a dynamic library name that contains object code for BLAS/LAPACK functions |
|
3 |
Specifies max limits on the magnitude of constraint and variable bounds |
|
2 |
Determines the maximum allowable number of inner conjugate gradient (CG) iterations |
|
3 |
Specifies number of nonzero elements per hessian column when computing preconditioner |
|
2 |
Specifies whether or not to apply preconditioning during CG iterations in barrier algorithms |
|
3 |
Relative stopping tolerance for CG subproblems |
|
1 |
Identify convex models and apply specializations often beneficial for convex models |
|
2 |
Specifies the target instruction set architecture for the machine on which Knitro is running |
|
|
2 |
Specifies whether to perform more extensive data checks |
3 |
Specifies the initial trust region radius scaling factor |
|
2 |
Specifies the relative cost of performing callback evaluations |
|
3 |
Specifies that gradients are provided together with functions in one callback |
|
1 |
Indicates whether or not to enforce satisfaction of simple variable bounds |
|
3 |
Initial penalty value used in Knitro merit function |
|
2 |
Specifies the initial point strategy used for the continuous algorithms |
|
3 |
Indicates the maximum allowable number of trial points during the linesearch |
|
2 |
Indicates which linesearch strategy to use for the Interior/Direct or SQP algorithm |
|
1 |
Indicates which linear solver to use to solve linear systems arising in Knitro algorithms |
|
3 |
Specifies the maximum number of iterative refinement steps when solving the linear system |
|
3 |
Controls node amalgamation for MA57, MA86 and MA97 linear system solvers |
|
3 |
Indicates whether to use Intel MKL PARDISO out-of-core solve of linear systems |
|
2 |
Specifies ordering method for linear system solvers |
|
3 |
Specifies the initial pivot threshold used in factorization routines |
|
2 |
Enables scaling for linear system solvers |
|
2 |
Initialization strategy for non-convex QPs and QCQPs |
|
3 |
Specifies the extreme limits of the objective function for purposes of determining unboundedness |
|
2 |
Specifies whether to enable automatic restarts |
|
3 |
Maximum number of iterations before restarting when restarts are enabled |
|
1 |
Specifies whether to perform problem scaling |
|
2 |
Specifies the strategy for variable scaling |
|
3 |
Specifies whether or not to try second order corrections (SOC) |
|
2 |
Specifies whether or not to invoke a warm-start strategy |
Derivatives options
Option name |
Importance |
Purpose |
---|---|---|
2 |
Specifies the initial scaling for the BFGS or L-BFGS Hessian approximation |
|
1 |
Determine whether or not to perform a derivative check on the model |
|
3 |
Determine whether or not to terminate after the derivative check |
|
3 |
Specifies the relative tolerance used for detecting derivative errors |
|
3 |
Specifies whether to use forward or central finite differencing for the derivative checker |
|
2 |
Enable noise estimation procedure when computing finite-difference gradients |
|
2 |
Specifies a relative stepsize when computing finite-difference gradients |
|
1 |
Specifies how to compute the gradients of the objective and constraint functions |
|
3 |
Determines whether or not to allow Knitro to request Hessian evaluations without the objective component included. |
|
1 |
Specifies how to compute the (approximate) Hessian of the Lagrangian |
|
2 |
Specifies the number of limited memory pairs stored when approximating the Hessian |
Termination options
Option name |
Importance |
Purpose |
---|---|---|
1 |
Specifies the final relative stopping tolerance for the feasibility error |
|
1 |
Specifies the final absolute stopping tolerance for the feasibility error |
|
2 |
Specifies the termination criteria when using finite-difference gradients |
|
2 |
Used to implement a custom stopping condition based on the objective function value |
|
2 |
The optimization process will terminate if feasible and the relative change in the objective function is less than ftol |
|
3 |
Number of consecutive feasible iterations where the relative change in the objective function is less than ftol before Knitro stops |
|
2 |
Specifies the (relative) tolerance used for declaring infeasibility of a model |
|
3 |
Stop if number of consecutive infeasible iterations where the relative change in the feasibility error is less than infeasftol reaches this value |
|
2 |
Specifies the maximum number of function evaluations before termination. |
|
1 |
Specifies the maximum number of iterations before termination |
|
2 |
Specifies, in seconds, the maximum allowable CPU time before termination |
|
1 |
Specifies, in seconds, the maximum allowable real time before termination |
|
1 |
Specifies the final relative stopping tolerance for the KKT (optimality) error |
|
1 |
Specifies the final absolute stopping tolerance for the KKT (optimality) error |
|
1 |
The optimization process will terminate if the relative change of the solution point estimate is less than xtol |
|
3 |
Number of consecutive iterations where change of the solution point estimate is less than xtol before Knitro stops |
Presolver options
Option name |
Importance |
Purpose |
---|---|---|
1 |
Determine whether or not to use the Knitro presolver |
|
2 |
Controls whether Knitro presolver can shift user-supplied initial point |
|
2 |
Knitro presolve level to enable |
|
2 |
Number of passes through the Knitro presolver |
|
3 |
Determines the tolerance used by the Knitro presolver |
|
2 |
Presolve operation to control detection and removal of redundant constraints |
|
2 |
Controls variable substitution in the Knitro presolver |
|
3 |
Tolerance for applying substitutions |
|
2 |
Determine whether bounds are tightened by the Knitro presolver |
Barrier options
Option name |
Importance |
Purpose |
---|---|---|
1 |
Enable special treatments for conic constraints in the Interior/Direct algorithm |
|
1 |
Controls the maximum number of consecutive conjugate gradient (CG) steps |
|
1 |
Specifies whether special emphasis is placed on getting and staying feasible |
|
3 |
Specifies the tolerance in equation that determines whether Knitro will force subsequent iterates to remain feasible |
|
2 |
Specifies the globalization strategy used |
|
2 |
Specifies the initial value for the barrier parameter |
|
3 |
Specifies the initial value for the MPEC penalty parameter |
|
2 |
Indicates initial point strategy for x, slacks and multipliers |
|
2 |
Indicates linear system form to use for Interior/Direct algorithm |
|
2 |
Indicates linear system storage approach to use for Interior/Direct algorithm |
|
2 |
Specifies the maximum number of corrector steps allowed for primal-dual steps |
|
3 |
Specifies the maximum number of crossover iterations before termination |
|
3 |
Maximum allowed barrier parameter value |
|
3 |
Indicates the maximum number of refactorizations of the KKT system per iteration |
|
3 |
Enables a heuristic approach when solving MPEC models |
|
1 |
Indicates which strategy to use for modifying the barrier parameter |
|
2 |
Indicates whether a penalty approach is applied to the constraints |
|
3 |
Indicates which penalty parameter strategy to use for determining whether or not to accept a trial iterate |
|
3 |
Specifies whether to try to refine the barrier solution for better precision |
|
2 |
Indicates whether a relaxation approach is applied to the constraints |
|
3 |
Indicates minimum amount by which initial slack variables are pushed inside the bounds |
|
3 |
Indicates objective function used when the barrier algorithms switch to a pure feasibility phase |
|
3 |
Indicates whether or not the barrier algorithms will allow switching from an optimality phase to a pure feasibility phase |
|
3 |
Specifies whether to enable watchdog heuristic |
Active-set options
Option name |
Importance |
Purpose |
---|---|---|
3 |
Indicates which algorithm to use for linear programming (LP) subproblems |
|
3 |
Feasibility tolerance for the linear programming solver in the Knitro Active Set or SQP algorithms |
|
1 |
Indicate whether to use penalty formulation for linear programming subproblems |
|
3 |
Controls presolve for linear programming subproblems (only when using Cplex or Xpress) |
|
1 |
Indicates which linear programming solver the Knitro Active Set or SQP algorithms use |
|
2 |
Solve parametric linear programming subproblems instead of standard LPs |
|
1 |
Indicates which algorithm to use to solve quadratic programming (QP) subproblems |
|
2 |
Indicate whether to use penalty formulation for quadratic programming subproblems in SQP |
|
3 |
Name of the Xpress library when act_lpsolver=KN_ACT_LPSOLVER_CPLEX |
|
3 |
Name of the Xpress library when act_lpsolver=KN_ACT_LPSOLVER_XPRESS |
MIP options
Option name |
Importance |
Purpose |
---|---|---|
1 |
Specifies which branching rule to use for MIP branch-and-bound procedure |
|
2 |
Specifies rules for adding clique cuts |
|
2 |
Specifies rules for adding flow cover cuts |
|
2 |
Specifies rules for adding probing cuts |
|
2 |
Specifies a limit on the number of cuts added to a node subproblem |
|
3 |
Specifies the MIP objective cutoff value |
|
2 |
Specifies how to apply the cutting plane procedure |
|
2 |
Specifies debugging level for MIP solution |
|
1 |
Specifies rules for adding Gomory mixed-integer cuts |
|
3 |
Specifies whether or not to branch on generalized upper bounds (GUBs) |
|
1 |
Specifies whether to enable the diving heuristic |
|
1 |
Specifies whether to enable the feasibility pump heuristic |
|
2 |
Specifies whether to enable large neighborhood search (LNS) heuristics |
|
1 |
Specifies whether to enable the local search heuristic |
|
2 |
Specifies the maximum number of iterations to allow for MIP heuristics |
|
3 |
Specifies whether to enable the MISQP heuristic |
|
1 |
Specifies whether to enable the MPEC heuristic |
|
1 |
Specifies the global strategy and effort for MIP heuristics |
|
2 |
Specifies the condition for terminating the MIP heuristic |
|
2 |
Specifies whether or not to add constraints to the MIP derived from logical implications |
|
3 |
Specifies the threshold for deciding whether or not a variable is determined to be an integer |
|
2 |
Specifies how to handle integer variables |
|
2 |
Specifies rules for adding MIP knapsack cuts |
|
2 |
Adds lift and project cuts for MIP |
|
2 |
Specifies which algorithm to use for any linear programming (LP) subproblem solves |
|
2 |
Specifies the maximum number of nodes explored (0 means no limit) |
|
3 |
Specifies the maximum number of subproblem solves allowed (0 means no limit) |
|
2 |
Specifies the maximum allowable CPU time in seconds for the complete MIP solution |
|
1 |
Specifies the maximum allowable real time in seconds for the complete MIP solution |
|
1 |
Specifies which MIP method to use |
|
2 |
Specifies rules for adding mixed integer rounding cuts |
|
3 |
Enable multi-start at the branch-and-bound level |
|
1 |
Specifies which algorithm to use for standard node subproblem solves in MIP |
|
1 |
Specifies the number of threads for the MIP branch-and-bound method |
|
1 |
The absolute optimality gap stop tolerance for MIP |
|
1 |
The relative optimality gap stop tolerance for MIP |
|
1 |
Specifies node printing interval for mip_outlevel when mip_outlevel > 0 |
|
1 |
Specifies how much MIP information to print |
|
3 |
Specifies MIP subproblem solve debug output control |
|
3 |
Specifies the method used to initialize pseudo-costs |
|
2 |
Specifies whether integer variables are relaxable |
|
2 |
Specifies whether to enable the MIP restart procedure |
|
2 |
Specifies which algorithm to use for the root node solve in MIP |
|
2 |
Specifies the MIP rounding rule to apply |
|
2 |
Specifies the MIP node selection direction rule for choosing the next node in the branch-and-bound tree |
|
1 |
Specifies the MIP select rule for choosing the next node in the branch-and-bound tree |
|
3 |
Specifies the maximum number of candidates to explore for MIP strong branching |
|
3 |
Specifies the maximum number of tree levels on which to perform MIP strong branching |
|
3 |
Specifies the maximum number of iterations to allow for MIP strong branching solves |
|
1 |
Specifies conditions for terminating the MIP algorithm |
|
2 |
Specifies rules for adding zero-half cuts |
Multi-algorithm options
Option name |
Importance |
Purpose |
---|---|---|
3 |
Specifies the maximum allowable CPU time before termination for the multi-algorithm procedure |
|
2 |
Specifies the maximum allowable real time before termination for the multi-algorithm procedure |
|
1 |
Enable writing algorithm output to files for the multi-algorithm procedure |
|
1 |
Define the termination condition for the multi-algorithm procedure |
Multi-start options
Option name |
Importance |
Purpose |
---|---|---|
1 |
Indicates whether Knitro will solve from multiple start points to find a better local minimum |
|
2 |
Specifies the clustering strategy used to select initial points for multi-start |
|
2 |
Specifies the maximum range that an unbounded variable can take when determining new start points |
|
1 |
Specifies how many start points to try in multi-start |
|
3 |
Specifies, in seconds, the maximum allowable CPU time before termination |
|
2 |
Specifies, in seconds, the maximum allowable real time before termination |
|
2 |
Specifies the number of distinct feasible points to save in a file named |
|
1 |
Specify the number of threads to use for multi-start |
|
2 |
Enable writing algorithm output to files for the parallel multi-start procedure |
|
2 |
Specifies the tolerance for deciding if two feasible points are distinct |
|
2 |
Seed value used to generate random initial points in multi-start |
|
1 |
Specifies the maximum range that each variable can take when determining new start points |
|
1 |
Specifies the condition for terminating multi-start |
|
3 |
The tolerance in (0,1] for the rule-based termination of multi-start |
Parallelism options
Option name |
Importance |
Purpose |
---|---|---|
2 |
Specifies the number of threads to use for BLAS operations |
|
1 |
Determines whether or not function and derivative evaluations can take place concurrently in parallel |
|
2 |
Specifies the number of threads to use for operations in the conic solver |
|
2 |
Specifies the number of threads to use for finite-difference gradients |
|
2 |
Specifies the number of threads to use for linear system solve operations |
|
1 |
Specifies the number of threads for the MIP branch-and-bound method |
|
1 |
Specifies the number of threads to use for altogether for any parallel computing features |
Output options
Option name |
Importance |
Purpose |
---|---|---|
2 |
Controls the level of debugging output |
|
2 |
Specifies additional action to take after every iteration in a solve of a continuous problem |
|
3 |
Specifies whether to create knitro_solve.csv information file |
|
3 |
Specify non-default filename when using |
|
2 |
Print diagnostic hints (e.g. on user option settings) after solving |
|
2 |
Specifies whether output should be started in a new file, or appended to existing files |
|
2 |
Specifies a single directory as the location to write all output files |
|
1 |
Controls the level of output produced by Knitro |
|
1 |
Specifies where to direct the output from Knitro |
|
2 |
Specify filename (default knitro.log) when directing output to a file via |
Tuner options
Option name |
Importance |
Purpose |
---|---|---|
1 |
Indicates whether to invoke the Knitro-Tuner |
|
2 |
Specifies the maximum allowable CPU time before terminating the Knitro-Tuner |
|
1 |
Specifies the maximum allowable real time before terminating the Knitro-Tuner |
|
1 |
Can be used to specify the location of a Tuner options file |
|
2 |
Enable writing additional Tuner subproblem solve output to files for the Knitro-Tuner procedure |
|
1 |
Define the termination condition for the Knitro-Tuner procedure |
General options
-
type
algorithm
-
type
alg
-
type
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
-
type
blasoption
-
type
KN_PARAM_BLASOPTION
#define KN_PARAM_BLASOPTION 1042 # define KN_BLASOPTION_AUTO -1 # define KN_BLASOPTION_KNITRO 0 # define KN_BLASOPTION_INTEL 1 # define KN_BLASOPTION_DYNAMIC 2 # define KN_BLASOPTION_BLIS 3 # define KN_BLASOPTION_APPLE 4
Specifies the BLAS/LAPACK function library to use for basic vector and matrix computations.
-1 (auto) Let Knitro automatically choose which BLAS to use.
0 (knitro) Use Knitro built-in functions.
1 (intel) Use Intel Math Kernel Library (MKL) functions on available platforms.
2 (dynamic) Use the dynamic library specified with option
blasoptionlib
.3 (blis) Use BLIS functions on available platforms (currently not available on Windows OS).
4 (apple) Use Apple Accelerate (only available on Mac with M1 processor).
Default value: -1
Note
BLAS and LAPACK functions from Intel Math Kernel Library
(MKL) are provided with the Knitro distribution.
The number of threads
to use for the MKL BLAS are specified with blas_numthreads
.
On platforms where Intel MKL and Apple Accelerate are not available, the Knitro
built-in functions are used by default.
BLAS (Basic Linear Algebra Subroutines) and LAPACK (Linear Algebra PACKage)
functions are used throughout Knitro for fundamental vector and
matrix calculations. The CPU time spent in these operations can be
measured by setting option debug
= 1 and examining the output
file kdbg_profile*.txt
. Some optimization problems are observed to
spend very little CPU time in BLAS/LAPACK operations, while others
spend more than 50%.
Be aware that the different function implementations can return slightly
different answers due to roundoff errors in double precision arithmetic.
Thus, changing the value of blasoption
sometimes alters the
iterates generated by Knitro, or even the final solution point.
The Knitro option uses built-in BLAS/LAPACK functions based on
standard netlib routines (www.netlib.org).
The intel option uses MKL functions written especially for x86 and
x86_64 processor architectures. On a machine running an Intel processor,
testing indicates that the MKL functions can
significantly reduce the CPU time in BLAS/LAPACK operations.
The dynamic option allows users to load any library that implements
the functions declared in the file include/blas_lapack.h
.
Specify the library name with option blasoptionlib
.
-
type
blasoptionlib
-
type
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.
-
type
bndrange
-
type
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
-
type
cg_maxit
-
type
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.
- -1
Let Knitro automatically determine a value.
0 Knitro will set a maximum value based on the problem size.
n At most n>0 CG iterations may be performed during one minor iteration of Knitro.
Default value: -1
-
type
cg_pmem
-
type
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
-
type
cg_precond
-
type
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
-
type
cg_stoptol
-
type
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.0e-2
-
type
convex
-
type
KN_PARAM_CONVEX
#define KN_PARAM_CONVEX 1114 # define KN_CONVEX_AUTO -1 # define KN_CONVEX_NO 0 # define KN_CONVEX_YES 1
Declare the problem as convex by setting
KN_CONVEX_YES
or non-convex by settingKN_CONVEX_NO
. Otherwise, Knitro will try to determine this automatically, but may only be able to do so for simple model forms such as QPs or QCQPs. If your model is specified as (or automatically determined to be) convex, this will cause Knitro to apply specializations and tunings that are often beneficial for convex models to speed up the solution. Currently this option is only active for the Interior/Direct algorithm, but may be applied to other algorithms in the future.Default value: -1
-
type
cpuplatform
-
type
KN_PARAM_CPUPLATFORM
#define KN_PARAM_CPUPLATFORM 1120 # define KN_CPUPLATFORM_AUTO -1 # define KN_CPUPLATFORM_COMPATIBLE 1 # define KN_CPUPLATFORM_SSE2 2 # define KN_CPUPLATFORM_AVX 3 # define KN_CPUPLATFORM_AVX2 4 # define KN_CPUPLATFORM_AVX512 5 /* EXPERIMENTAL */
This option can be used to specify the target instruction set architecture for the machine on which Knitro is running. This can be used, for example (especially using the setting
KN_CPUPLATFORM_COMPATIBLE
), to try to produce more consistent Knitro performance across various architectures (at the expense of, perhaps, slower performance on some platforms). This option is currently only used for the Intel Math Kernal Library (MKL) functions used inside Knitro.Default value: -1
-
type
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 non-trivial cost for large problems. It is turned on by default, but can be turned off for improved speed.
Default value: 1
-
type
delta
-
type
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
-
type
eval_cost
-
type
KN_PARAM_EVAL_COST
#define KN_PARAM_EVAL_COST 1159 # define KN_EVAL_COST_UNSPECIFIED 0 # define KN_EVAL_COST_INEXPENSIVE 1 # define KN_EVAL_COST_EXPENSIVE 2
Use this option to tell Knitro the relative cost of performing callback (e.g. function, gradient and Hessian) evaluations. Knitro will use this informaton to better tune its algorithms.
Default value: 0
-
type
eval_fcga
-
type
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
-
type
honorbnds
-
type
KN_PARAM_HONORBNDS
#define KN_PARAM_HONORBNDS 1002 # define KN_HONORBNDS_AUTO -1 # 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.-1 (auto) Knitro automatically determine the best setting.
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: -1
Note
Note that setting honorbnds
= 1 (always) or 2 (initpt) or using the default auto
option may cause Knitro to shift the value of a user-provided initial point so that it lies
sufficiently inside the (possibly presolved) bounds. Setting honorbnds
= 0 (no)
will prevent Knitro from shifting a user-provided initial point.
-
type
initpenalty
-
type
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
-
type
initpt_strategy
-
type
KN_PARAM_INITPT_STRATEGY
#define KN_PARAM_INITPT_STRATEGY 1158 # define KN_INITPT_STRATEGY_AUTO -1 # define KN_INITPT_STRATEGY_BASIC 1 # define KN_INITPT_STRATEGY_ADVANCED 2
Specifies the initial point strategy used for the continuous algorithms. Using a more advanced initial point strategy may produce a better initial point at the cost of more computation.
-1 (auto) Automatically determine the initial point strategy.
1 (basic) Try a basic initial point strategy.
2 (advanced) Try a more advanced initial point strategy.
Default value: -1
-
type
linesearch
-
type
KN_PARAM_LINESEARCH
#define KN_PARAM_LINESEARCH 1095 # define KN_LINESEARCH_AUTO 0 # define KN_LINESEARCH_BACKTRACK 1 # define KN_LINESEARCH_INTERPOLATE 2 # define KN_LINESEARCH_WEAKWOLFE 3
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.
3 (weakwolfe) Use a linesearch that satisfies the weak Wolfe conditions (unconstrained only).
Default value: 0
-
type
linesearch_maxtrials
-
type
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
-
type
linsolver
-
type
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, non-deterministic) 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.
Please read the notes under the blasoption user option in this section for more
details about the BLAS options in Knitro and how to make sure that the Intel MKL
BLAS or other user-specified BLAS can be used by Knitro. You may also achieve speedups
using multi-threaded BLAS with these solvers by setting numthreads
>1 or
blas_numthreads
>1 when using the solvers.
Additionally, the HSL solvers MA86 and MA97 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 numthreads
>1 or linsolver_numthreads
>1
(with blas_numthreads
=1) when using these
solvers, to obtain greater speedups.
-
type
linsolver_maxitref
-
type
KN_PARAM_LINSOLVER_MAXITREF
#define KN_PARAM_LINSOLVER_MAXITREF 1130
Indicates the maximum allowable number of iterative refinement steps applied when a linear system is solved inside Knitro. Iterative refinement steps may be applied when there are significant errors (e.g. large residuals) in the linear system solves. Applying more iterative refinement steps may improve the numerical accuracy of the linear solves at extra cost.
Default value: 2
-
type
linsolver_nodeamalg
-
type
KN_PARAM_LINSOLVER_NODEAMALG
#define KN_PARAM_LINSOLVER_NODEAMALG 1145
Controls the node amalgamation setting for the MA57, MA86 and MA97 linear solvers. A value of 0 indicates that the default value should be used for the given linear solver, while a positive value sets the node amalgamation parameter for the linear solver to that specific value.
Default value: 0
-
type
linsolver_ooc
-
type
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 out-of-core solve of linear systems when
linsolver
= mklpardiso.This option is only active when
linsolver
= mklpardiso.0 (no) Do not use Intel MKL PARDISO out-of-core option.
1 (maybe) Maybe solve out-of-core depending on how much space is needed.
2 (yes) Solve linear systems out-of-core when using Intel MKL PARDISO.
Default value: 0
Note
See the Intel MKL PARDISO documentation for more details on how this option works.
-
type
linsolver_ordering
-
type
KN_PARAM_LINSOLVER_ORDERING
#define KN_PARAM_LINSOLVER_ORDERING 1144 #define KN_LINSOLVER_ORDERING_AUTO -1 #define KN_LINSOLVER_ORDERING_BEST 0 #define KN_LINSOLVER_ORDERING_AMD 1 #define KN_LINSOLVER_ORDERING_METIS 2
Sets the ordering method used for the linear system solver.
-1 (auto) Let Knitro automatically choose the ordering strategy.
0 (best) Choose the best between AMD and METIS (try both).
1 (amd) Use AMD ordering (minimum degree for MKL PARDISO).
2 (metis) Use METIS ordering.
Default value: -1
-
type
linsolver_pivottol
-
type
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 non-positive, initially no pivoting will be performed. Smaller values may improve the speed of the code but higher values are recommended for more stability (for example, if the problem appears to be very ill-conditioned).Default value: 1.0e-8
-
type
linsolver_scaling
-
type
KN_PARAM_LINSOLVER_SCALING
#define KN_PARAM_LINSOLVER_SCALING 1156 # define KN_LINSOLVER_SCALING_NONE 0 # define KN_LINSOLVER_SCALING_ALWAYS 1 # define KN_LINSOLVER_SCALING_DYNAMIC 2
Enables scaling for the linear system solver. Applying scaling may allow for more accuracy in the linear system solves, but will generally make the linear system solves more expensive.
0 (none) Do not apply scaling in the linear system solves.
1 (always) Always apply scaling in the linear system solves.
2 (dynamic) Dynamically apply scaling in the linear system solves.
Default value: 0
-
type
ncvx_qcqp_init
-
type
KN_PARAM_NCVX_QCQP_INIT
#define KN_PARAM_NCVX_QCQP_INIT 1139 # define KN_NCVX_QCQP_INIT_AUTO -1 # define KN_NCVX_QCQP_INIT_NONE 0 # define KN_NCVX_QCQP_INIT_LINEAR 1 # define KN_NCVX_QCQP_INIT_HYBRID 2 # define KN_NCVX_QCQP_INIT_PENALTY 3 # define KN_NCVX_QCQP_INIT_CVXQUAD 4
Specifies the initialization strategy used for non-convex QPs and QCQPs. In particular, these strategies may be more likely to cause Knitro to find global or better local solutions on non-convex quadratic programs (QPs) or non-convex quadratically constrained quadratic programs (QCQPs).
-1 (auto) Knitro will automatically determine the strategy.
0 (none) No special initialization strategy is used.
1 (linear) Initialize by solving a linear relaxation.
2 (hybrid) Initialize by solving a hybrid formulation.
3 (penalty) Initialize by solving a penalty formulation.
4 (cvxquad) Initialize by solving a convex quadratic relaxation.
Default value: -1
-
type
objrange
-
type
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
-
type
restarts
-
type
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
-
type
restarts_maxit
-
type
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
-
type
scale
-
type
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
-
type
scale_vars
-
type
KN_PARAM_SCALE_VARS
#define KN_PARAM_SCALE_VARS 1153 # define KN_SCALE_VARS_NONE 0 # define KN_SCALE_VARS_BNDS 1
Specifies the strategy for scaling 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 (none) No variable scaling is performed.
1 (bnds) Scaling of variables is applied based on their bound values.
Default value: 0
-
type
soc
-
type
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
-
type
strat_warm_start
-
type
KN_PARAM_STRAT_WARM_START
#define KN_PARAM_STRAT_WARM_START 1118 # define KN_STRAT_WARM_START_NO 0 # define KN_STRAT_WARM_START_YES 1
Specifies whether or not to invoke a warm-start strategy.
A warm-start strategy may be beneficial when an initial point close to the solution can be provided. For example, this may occur when solving a sequence of closely related problems, and the solution from one problem can be used to initialize (or warm-start) the next problem in the sequence. The Knitro warm-start strategy will use this information to tune the algorithms to try to converge more quickly in this case. If the initial point is not sufficiently close to the solution, or is too infeasible, the warm-start strategy may not be helpful.
This option is currently only used for the Knitro barrier/interior-point algorithms. In this case it may also be useful to experiment with different (smaller than default) values for the initial barrier parameter
bar_initmu
. In general, the closer the initial point is to the solution, the smaller this value should be (Knitro will try by default to initialize this to a good value when applying a warm-start strategy).0 (no) No warm-start strategy is applied.
1 (yes) Knitro will apply a warm-start strategy with special tunings.
Default value: 0
Derivatives options
-
type
bfgs_scaling
-
type
KN_PARAM_BFGS_SCALING
#define KN_PARAM_BFGS_SCALING 1131 # define KN_BFGS_SCALING_DYNAMIC 0 # define KN_BFGS_SCALING_INVHESS 1 # define KN_BFGS_SCALING_HESS 2
Specify the initial scaling to use for the BFGS or L-BFGS Hessian approximation.
0 (dynamic) Dynamically choose which scaling to use.
1 (invhess) The scaling approximates the scale of the inverse Hessian.
2 (hess) The scaling approximates the scale of the Hessian.
Default value: 0
-
type
derivcheck
-
type
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
-
type
derivcheck_terminate
-
type
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
-
type
derivcheck_tol
-
type
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.0e-6
-
type
derivcheck_type
-
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
-
type
gradopt
-
type
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.
-
type
hessian_no_f
-
type
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 Hessian-vector 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 Hessian-vector 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. user-provided exact Hessians), orhessopt
=5
(i.e. user-provided exact Hessians-vector 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
-
type
hessopt
-
type
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) quasi-Newton BFGS Hessian.
3 (sr1) Knitro computes a (dense) quasi-Newton SR1 Hessian.
4 (product_findiff) Knitro computes Hessian-vector products using finite-differences.
5 (product) User provides a routine to compute the Hessian-vector products.
6 (lbfgs) Knitro computes a limited-memory quasi-Newton BFGS Hessian (its size is determined by the option lmsize).
7 (gauss_newton) Knitro computes a Gauss-Newton approximation of the hessian (available for least-squares only, and default value for least-squares)
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 Hessian-vector products (hessopt
= 5).
If neither can be provided but exact gradients are available
(i.e., gradopt
= 1), then hessopt
= 4 may be a good option.
This option is comparable in terms of robustness to the exact Hessian option
and typically not much slower in terms of time, provided that gradient
evaluations are not a dominant cost. However, this option is only available
for some algorithms.
If exact gradients cannot be provided, then one of the quasi-Newton options
is preferred. Options hessopt
= 2 and hessopt
= 3 are only
recommended for small problems (say, n < 1000) since they require working with
a dense Hessian approximation. Note that with these last two options, the
Hessian pattern will be ignored since Knitro computes a dense approximation.
Option hessopt
= 6 should be used for large problems.
-
type
lmsize
-
type
KN_PARAM_LMSIZE
#define KN_PARAM_LMSIZE 1038
Specifies the number of limited memory pairs stored when approximating the Hessian using the limited-memory quasi-Newton 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
-
type
feastol
-
type
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.0e-6
-
type
feastol_abs
-
type
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.0e-3
-
type
findiff_estnoise
-
type
KN_PARAM_FINDIFF_ESTNOISE
#define KN_PARAM_FINDIFF_ESTNOISE 1140 # define KN_FINDIFF_ESTNOISE_NO 0 # define KN_FINDIFF_ESTNOISE_YES 1 # define KN_FINDIFF_ESTNOISE_WITHCURV 2
This option can be used to enable an estimate of the noise in the model when using finite-difference gradients. This noise estimate can then be used to set a finite-difference steplength appropriate for the estimated noise level. This can improve performance on models with noise (e.g. noisy black-box optimization models). The cost of the noise estimation procedure is usually a few extra function evaluations.
0 (no) Do not enable any noise estimation procedure for finite-difference gradients.
1 (yes) Enable noise estimation procedure for finite-difference gradients.
2 (withcurv) Enable noise estimation and curvature factor for finite-difference gradients.
Default value: 0
-
type
findiff_relstepsize
-
type
KN_PARAM_FINDIFF_RELSTEPSIZE
#define KN_PARAM_FINDIFF_RELSTEPSIZE 1123
Specifies the relative stepsize used for finite-difference gradients during the optimization. This option sets the stepsize for all variables. The API function
KN_set_cb_relstepsizes()
can be used to customize the settings for individual variables. Note that this option has no affect on the finite-difference derivatives computed for the derivative checker (default values are always used here). It is only used for the finite-difference derivatives computed during the optimization.Default value: sqrt(eps) (forward-difference), eps^(1/3) (central difference)
-
type
findiff_terminate
-
type
KN_PARAM_FINDIFF_TERMINATE
#define KN_PARAM_FINDIFF_TERMINATE 1119 # define KN_FINDIFF_TERMINATE_NONE 0 # define KN_FINDIFF_TERMINATE_ERREST 1
This option specifies the termination criteria when using finite-difference gradients. The optimality (or KKT) conditions for nonlinear optimization depend on gradient values of the nonlinear objective and constraint functions (see Termination criteria). When using finite-difference gradients (e.g.
gradopt
> 1), there will typically be small errors in the computed gradients that will limit the precision in the solution (and the ability to satisfy the optimality conditions). By default, Knitro will try to estimate these finite-difference gradient errors and terminate when it seems that no more accuracy in the solution is possible. The solution will be treated as optimal as long as it is feasible and the optimality conditions are satisfied either by the optimality tolerances (opttol
andopttol_abs
) or the error estimates. On some problems, the error estimates may result in extra function evaluations on some iterations, but will often prevent extra iterations that produce no significant improvement in the solution. This special termination can be disabled by settingfindiff_terminate
= 0 (none).0 (none) No special criteria; use the standard stopping conditions.
1 (errest) Allow termination based on estimates of the finite-difference error (when no more significant progress is likely).
Default value: 1
-
type
fstopval
-
type
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
-
type
ftol
-
type
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.0e-15
-
type
ftol_iters
-
type
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
-
type
infeastol
-
type
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.0e-8
-
type
infeastol_iters
-
type
KN_PARAM_INFEASTOL_ITERS
#define KN_PARAM_INFEASTOL_ITERS 1124
The optimization process will terminate if the relative change in the feasibility error is less than
infeastol
forinfeastol_iters
consecutive infeasible iterations.Default value: 50
-
type
maxfevals
-
type
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)
-
type
maxit
-
type
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
-
type
maxtime_cpu
-
type
KN_PARAM_MAXTIMECPU
#define KN_PARAM_MAXTIMECPU 1024
Specifies, in seconds, the maximum allowable CPU time before termination.
Default value: 1.0e8
-
type
maxtime_real
-
type
KN_PARAM_MAXTIMEREAL
#define KN_PARAM_MAXTIMEREAL 1040
Specifies, in seconds, the maximum allowable real time before termination.
Default value: 1.0e8
-
type
opttol
-
type
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.0e-6
-
type
opttol_abs
-
type
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.0e-3
-
type
xtol
-
type
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.0e-12
-
type
xtol_iters
-
type
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
Presolver options
-
type
presolve
-
type
KN_PARAM_PRESOLVE
#define KN_PARAM_PRESOLVE 1059 # define KN_PRESOLVE_NO 0 # define KN_PRESOLVE_YES 1
Determine whether or not to use the Knitro presolver to try to simplify the model by removing variables or constraints.
0 (no) Do not use the Knitro presolver.
1 (yes) Enable the Knitro presolver.
Default value: 1
-
type
presolve_level
-
type
KN_PARAM_PRESOLVE_LEVEL
#define KN_PARAM_PRESOLVE_LEVEL 1122 # define KN_PRESOLVE_LEVEL_AUTO -1 # define KN_PRESOLVE_LEVEL_1 1 # define KN_PRESOLVE_LEVEL_2 2
Set the level of presolve operations to enable through the Knitro presolver. A higher presolve level enables more complex presolve operations.
-1 (auto) Let Knitro automatically choose the presolve level.
1 (level1) Enable the most basic presolve operations.
2 (level2) Enable more advanced presolve operations.
Default value: -1
-
type
presolve_initpt
-
type
KN_PARAM_PRESOLVE_INITPT
#define KN_PARAM_PRESOLVE_INITPT 1127 # define KN_PRESOLVE_INITPT_AUTO -1 # define KN_PRESOLVE_INITPT_NOSHIFT 0 # define KN_PRESOLVE_INITPT_LINSHIFT 1 # define KN_PRESOLVE_INITPT_ANYSHIFT 2
Control whether the Knitro presolver can shift a user-supplied initial point.
-1 (auto) Let Knitro automatically choose whether to allow shifting.
0 (noshift) Do not allow presolver to shift user-supplied initial point.
1 (linshift) Allow presolver to shift user-supplied initial point if it only appears in linear constraints.
2 (anyshift) Allow presolver to shift any user-supplied initial point.
Default value: -1
-
type
presolve_passes
-
type
KN_PARAM_PRESOLVE_PASSES
#define KN_PARAM_PRESOLVE_PASSES 1121
Set a maximum limit on the number of passes through the Knitro presolve operations.
Default value: 10
-
type
presolve_tol
-
type
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.0e-6
-
type
presolveop_redundant
-
type
KN_PARAM_PRESOLVEOP_REDUNDANT
#define KN_PARAM_PRESOLVEOP_REDUNDANT 1143 # define KN_PRESOLVEOP_REDUNDANT_NONE 0 # define KN_PRESOLVEOP_REDUNDANT_DUPCON 1 # define KN_PRESOLVEOP_REDUNDANT_DEPCON 2
Determine whether or not to enable the Knitro presolve operation to detect and remove redundant constraints.
0 (none) Do not remove redundant constraints.
1 (dupcon) Detect and remove duplicate constraints.
2 (depcon) Detect and remove linearly dependent constraints.
Default value: 1
-
type
presolveop_substitution
-
type
KN_PARAM_PRESOLVEOP_SUBSTITUTION
#define KN_PARAM_PRESOLVEOP_SUBSTITUTION 1146 # define KN_PRESOLVEOP_SUBSTITUTION_AUTO -1 # define KN_PRESOLVEOP_SUBSTITUTION_NONE 0 # define KN_PRESOLVEOP_SUBSTITUTION_SIMPLE 1 # define KN_PRESOLVEOP_SUBSTITUTION_ALL 2
Determine whether or not to enable the Knitro presolve operation to substitute out variables when possible.
-1 (auto) Automatically determined (may depend on the algorithm).
0 (none) Do not perform any variable substitution.
1 (simple) Enable simple substitutions involving doubleton equality constraints.
2 (all) Enable all possible variable substitutions.
Default value: -1
-
type
presolveop_substitution_tol
-
type
KN_PARAM_PRESOLVEOP_SUBSTITUTION_TOL
#define KN_PARAM_PRESOLVEOP_SUBSTITUTION_TOL 1147 Tolerance for applying a substitution. This is a relative tolerance on coefficients involved with the substituted variable. Higher values mean that less reductions will be applied (potentially improving numerical focus). Zero value means all possible substitutions are applied.
Default value: 1e-2
-
type
presolveop_tighten
-
type
KN_PARAM_PRESOLVEOP_TIGHTEN
#define KN_PARAM_PRESOLVEOP_TIGHTEN 1125 # define KN_PRESOLVEOP_TIGHTEN_AUTO -1 # define KN_PRESOLVEOP_TIGHTEN_NONE 0 # define KN_PRESOLVEOP_TIGHTEN_VARBND 1 # define KN_PRESOLVEOP_TIGHTEN_COEF 2 # define KN_PRESOLVEOP_TIGHTEN_ALL 3
Determine whether or not to enable the Knitro presolve operation to tighten variable bounds or coefficients.
-1 (auto) Automatically determined (may depend on the algorithm).
0 (none) Do not tighten variable bounds (unless it removes a constraint).
1 (varbnd) Enable tightening variable bounds always.
2 (coef) Enable tightening coefficients in linear constraints.
3 (all) Enable tightening variable bounds and coefficients.
Default value: -1
Barrier options
-
type
bar_conic_enable
-
type
KN_PARAM_BAR_CONIC_ENABLE
#define KN_PARAM_BAR_CONIC_ENABLE 1113 # define KN_BAR_CONIC_ENABLE_AUTO -1 # 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).
-1 (auto) Let Knitro automatically choose the strategy.
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: -1
-
type
bar_directinterval
-
type
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
-
type
bar_feasible
-
type
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 interior-point 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.
-
type
bar_feasmodetol
-
type
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.0e-4
-
type
bar_globalize
-
type
KN_PARAM_BAR_GLOBALIZE
#define KN_PARAM_BAR_GLOBALIZE 1155 # define KN_BAR_GLOBALIZE_NONE 0 # define KN_BAR_GLOBALIZE_KKT 1 # define KN_BAR_GLOBALIZE_FILTER 2
Specifies the globalization strategy used in the interior-point algorithms.
0 (none) No globalization strategy is applied.
1 (kkt) Apply a globalization strategy based on decreasing the KKT error.
2 (filter) Apply a globalization strategy using a filter based on the objective and constraint violation.
Default value: 2
-
type
bar_initmu
-
type
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.0e-1
-
type
bar_initpi_mpec
-
type
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 non-positive, then Knitro uses an internal formula to initialize the MPEC penalty parameter.
Default value: 0.0
-
type
bar_initpt
-
type
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 double-bounded variables.
Default value: 0
-
type
bar_linsys
-
type
KN_PARAM_BAR_LINSYS
#define KN_PARAM_BAR_LINSYS 1126 # define KN_BAR_LINSYS_AUTO -1 # define KN_BAR_LINSYS_FULL 0 # define KN_BAR_LINSYS_ELIMINATE_SLACKS 1 # define KN_BAR_LINSYS_ELIMINATE_BOUNDS 2 # define KN_BAR_LINSYS_ELIMINATE_INEQS 3
Indicates which linear system form is used inside the Interior/Direct algorithm for computing primal-dual steps. Eliminating more elements results in a smaller dimensional linear system (but also one that is, perhaps, less numerically stable). The bounds option may be preferable for very large problems with many bounded variables. The ineq option may generate significant speedups on models where the number of variables is small, but the number of inequality constraints is large.
-1 (auto) Let Knitro automatically choose the linear system form.
0 (full) Use the full linear system.
1 (slacks) Eliminate the slack variables.
2 (bounds) Eliminate the slack variables and bounds.
3 (ineqs) Eliminate the slack variables, bounds, and some inequalities.
Default value: -1
-
type
bar_linsys_storage
-
type
KN_PARAM_BAR_LINSYS_STORAGE
#define KN_PARAM_BAR_LINSYS_STORAGE 1129 # define KN_BAR_LINSYS_STORAGE_AUTO -1 # define KN_BAR_LINSYS_STORAGE_LOWMEM 1 # define KN_BAR_LINSYS_STORAGE_NORMAL 2
Indicates how to store in memory the linear systems used inside the Interior/Direct algorithm for computing primal-dual steps. The lowmem option uses one storage location for multiple linear systems. As a result it may use much less memory, but also may be less efficient when the Interior/Direct algorithm takes a lot of CG steps. The normal option uses separate storage for different linear systems.
-1 (auto) Let Knitro automatically choose the linear system storage approach.
1 (lowmem) Use common storage for multiple linear systems.
2 (normal) Use separate storage for different linear systems.
Default value: -1
-
type
bar_maxcorrectors
-
type
KN_PARAM_BAR_MAXCORRECTORS
#define KN_PARAM_BAR_MAXCORRECTORS 1117
Specifies the maximum number of corrector steps allowed for primal-dual steps.
If the value is positive and the algorithm used is Interior/Direct, then Knitro may add at most
bar_maxcorrectors
corrector steps to the primal-dual step to try to stay closer to the central path. This may speedup convergence on some models (although it may make the cost per iteration a little more expensive). If the value is negative, Knitro automatically determines the maximum number of corrector steps to apply.Default value: -1
-
type
bar_maxcrossit
-
type
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 interior-point solution is the final result.If Active Set crossover is unable to improve the approximate interior-point solution, then Knitro will restore the interior-point solution. In some cases (especially on large-scale problems or difficult degenerate problems) the cost of the crossover procedure may be significant – for this reason, crossover is disabled by default. Enabling crossover generally provides a more accurate solution than Interior/Direct or Interior/CG.
Default value: 0
-
type
bar_maxmu
-
type
KN_PARAM_BAR_MAXMU
#define KN_PARAM_BAR_MAXMU 1154
Specifies the maximum allowable value for the barrier parameter
used with the barrier algorithms.
Default value: 1.0e16
-
type
bar_maxrefactor
-
type
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
-
type
bar_mpec_heuristic
-
type
KN_PARAM_BAR_MPEC_HEURISTIC
#define KN_PARAM_BAR_MPEC_HEURISTIC 1142 # define KN_BAR_MPEC_HEURISTIC_NO 0 # define KN_BAR_MPEC_HEURISTIC_YES 1
Specifies whether or not to use a heuristic approach when solving MPEC models with the barrier algorithm. In some cases enabling this heuristic can speedup the convergence to the solution and provide a more precise solution on MPEC models (i.e., models with complementarity constraints – see Complementarity constraints).
0 (no) Do not enable the heuristic for MPEC models.
1 (yes) Enable the heuristic for MPEC models.
Default value: 0
-
type
bar_murule
-
type
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 (affine-scaling) step to dynamically determine the barrier parameter. Available only for the Interior/Direct algorithm.
4 (dampmpc) Use a Mehrotra predictor-corrector type rule to determine the barrier parameter, with safeguards on the corrector step. Available only for the Interior/Direct algorithm.
5 (fullmpc) Use a Mehrotra predictor-corrector type rule to determine the barrier parameter, without safeguards on the corrector step. Available only for the Interior/Direct algorithm.
6 (quality) Minimize a quality function at each iteration to determine the barrier parameter. Available only for the Interior/Direct algorithm.
Default value: 0
-
type
bar_penaltycons
-
type
KN_PARAM_BAR_PENCONS
#define KN_PARAM_BAR_PENCONS 1050 # define KN_BAR_PENCONS_AUTO -1 # define KN_BAR_PENCONS_NONE 0 # 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.
-1 (auto) Let Knitro automatically choose the strategy.
0 (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: -1
-
type
bar_penaltyrule
-
type
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
-
type
bar_refinement
-
type
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
-
type
bar_relaxcons
-
type
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
-
type
bar_slackboundpush
-
type
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 warm-starting from a point close to the solution.
Default value: 1.0e-1
-
type
bar_switchobj
-
type
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
-
type
bar_switchrule
-
type
KN_PARAM_BAR_SWITCHRULE
#define KN_PARAM_BAR_SWITCHRULE 1061 # define KN_BAR_SWITCHRULE_AUTO -1 # define KN_BAR_SWITCHRULE_NEVER 0 # 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.
-1 (auto) Let Knitro determine the switching procedure.
0 (never) Never switch to feasibility phase.
2 (moderate) Allow switches to feasibility phase.
3 (aggressive) Use a more aggressive switching rule.
Default value: -1
-
type
bar_watchdog
-
type
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
Active-set options
-
type
act_lpalg
-
type
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.
The barrier option is currently only active when using the CPLEX(R) or Xpress(R) LP solvers chosen via
act_lpsolver
.This option has no effect on the Interior/Direct and Interior/CG algorithms.
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/interior-point algorithm.
Default value: 0
-
type
act_lpfeastol
-
type
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.0e-8
-
type
act_lppenalty
-
type
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
-
type
act_lppresolve
-
type
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
-
type
act_lpsolver
-
type
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 ILOG-CPLEX(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 standard CPLEX library names in the system’s load path (in order of most recent releases starting with CPLEX 12.10).To override the automatic search and load a particular CPLEX library, set its name with the character type user option
cplexlibname
. Either supply the full path name in this option, or make sure the library resides in a directory that is listed in the operating system’s load path. For example, to specifically load the Windows CPLEX 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", "cplex123.dll");
If
act_lpsolver
= xpress then the Xpress shared object library or DLL must reside in the operating system’s load path. If this option is selected, Knitro will automatically look for the standard Xpress dll/shared library name.To override the automatic search and load a particular Xpress library, set its name with the character type user option
xpresslibname
. Either supply the full path name in this option, or make sure the library resides in a directory that is listed in the operating system’s load path.
-
type
act_parametric
-
type
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 active-set 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
-
type
act_qpalg
-
type
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
-
type
act_qppenalty
-
type
KN_PARAM_ACT_QPPENALTY
#define KN_PARAM_ACT_QPPENALTY 1128 # define KN_ACT_QPPENALTY_AUTO -1 # define KN_ACT_QPPENALTY_NONE 0 # define KN_ACT_QPPENALTY_ALL 1
Indicates whether to use a penalty formulation for quadratic programming subproblems in the Knitro SQP algorithm.
-1 (auto) let Knitro automatically decide.
0 (none) do not penalize constraints in QP subproblems.
1 (all) penalize all constraints in QP subproblems.
Default value: -1
-
type
cplexlibname
-
type
KN_PARAM_CPLEXLIB
#define KN_PARAM_CPLEXLIB 1048
See option
act_lpsolver
.
-
type
xpresslibname
-
type
KN_PARAM_XPRESSLIB
#define KN_PARAM_XPRESSLIB 1069
See option
act_lpsolver
.
MIP options
-
type
mip_branchrule
-
type
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 pseudo-cost 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
-
type
mip_clique
-
type
KN_PARAM_MIP_CLIQUE
#define KN_PARAM_MIP_CLIQUE 2038 # define KN_MIP_CLIQUE_AUTO -1 # define KN_MIP_CLIQUE_NONE 0 # define KN_MIP_CLIQUE_ROOT 1 # define KN_MIP_CLIQUE_TREE 2
Specifies rules for adding clique cuts.
-1 (auto) Automatically determine whether to add clique cuts.
0 (none) Do not add clique cuts.
1 (root) Add clique cuts derived from the root node only.
2 (tree) Add clique cuts derived at every node depending on the solution of the relaxation and the cut generation strategy.
Default value: -1
-
type
mip_cut_flowcover
-
type
KN_PARAM_MIP_CUT_FLOWCOVER
#define KN_PARAM_MIP_CUT_FLOWCOVER 2053 # define KN_MIP_CUT_FLOWCOVER_AUTO -1 # define KN_MIP_CUT_FLOWCOVER_NONE 0 # define KN_MIP_CUT_FLOWCOVER_ROOT 1 # define KN_MIP_CUT_FLOWCOVER_TREE 2
Specifies rules for adding flow cover cuts.
-1 (auto) Automatically determine whether to add flow cover cuts.
0 (none) Do not add flow cover cuts.
1 (root) Add flow cover cuts derived from the root node only.
2 (tree) Add flow cover cuts derived at every node depending on the solution of the relaxation and the cut generation strategy.
Default value: -1
-
type
mip_cut_probing
-
type
KN_PARAM_MIP_CUT_PROBING
#define KN_PARAM_MIP_CUT_PROBING 2052 # define KN_MIP_CUT_PROBING_AUTO -1 # define KN_MIP_CUT_PROBING_NONE 0 # define KN_MIP_CUT_PROBING_ROOT 1 # define KN_MIP_CUT_PROBING_TREE 2
Specifies rules for adding probing cuts.
-1 (auto) Automatically determine whether to add probing cuts.
0 (none) Do not add probing cuts.
1 (root) Add probing cuts derived from the root node only.
2 (tree) Add probing cuts derived at every node depending on the solution of the relaxation and the cut generation strategy.
Default value: -1
-
type
mip_cutfactor
-
type
KN_PARAM_MIP_CUTFACTOR
#define KN_PARAM_MIP_CUTFACTOR 2035
This value specifies a limit on the number of cuts added to a node subproblem. If non-negative, a maximum of
mip_cutfactor
times the number of constraints is possibly appended.Default value: 1.0
-
type
mip_cutoff
-
type
KN_PARAM_MIP_CUTOFF
#define KN_PARAM_MIP_CUTOFF 2044
This value specifies the objective cutoff value for MIP.
Default value: KN_INFINITY
-
type
mip_cutting_plane
-
type
KN_PARAM_MIP_CUTTINGPLANE
#define KN_PARAM_MIP_CUTTINGPLANE 2043 /*-- CUTTING PLANE */ # define KN_MIP_CUTTINGPLANE_NONE 0 /*-- NONE */ # define KN_MIP_CUTTINGPLANE_ROOT 1 /*-- IN THE ROOT */
Specifies when to apply the cutting plane procedure.
0 (none) No cutting plane procedure enabled.
1 (root) Perform cutting plane procedure at the root node only.
Default value: 1
-
type
mip_debug
-
type
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
-
type
mip_gomory
-
type
KN_PARAM_MIP_GOMORY
#define KN_PARAM_MIP_GOMORY 2051 /*-- GOMORY CUTS */ # define KN_MIP_GOMORY_AUTO -1 # define KN_MIP_GOMORY_NONE 0 /*-- NONE */ # define KN_MIP_GOMORY_ROOT 1 /*-- IN THE ROOT ONLY */ # define KN_MIP_GOMORY_TREE 2 /*-- IN THE WHOLE TREE */
Specifies rules for adding Gomory mixed-integer cuts.
-1 (auto) Automatically determine whether to add Gomory cuts.
0 (none) Do not add Gomory cuts.
1 (root) Add Gomory cuts derived from the root node only.
2 (tree) Add Gomory cuts derived at every node depending on the solution of the relaxation and the cut generation strategy.
Default value: -1
-
type
mip_gub_branch
-
type
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
-
type
mip_heuristic_diving
-
type
KN_PARAM_MIP_HEUR_DIVING
#define KN_PARAM_MIP_HEUR_DIVING 2042
Specifies whether or not to enable the MIP diving heuristic. This option is a bit-valued option where various diving heuristics can be enabled by activating the corresponding bit value as described below. Setting this option to -1 will use an automatic setting and setting the value to 0 will disable all diving heuristics. Otherwise, set this parameter value to the sum of the values for the individual diving heuristics you wish to enable. For example, to enable only the “fractional” and “linesearch” diving heuristics, you would set this option value to 9 (summing 1 for fractional and 8 for linesearch).
-1 (auto) Let Knitro determine automaticallyfrom
mip_heuristic_strategy
.1 (bit 0) Enable fractional diving heuristic.
2 (bit 1) Enable vector length diving heuristic.
4 (bit 2) Enable coefficient diving heuristic.
8 (bit 3) Enable linesearch diving heuristic.
16 (bit 4) Enable guided diving heuristic.
Default value: -1
-
type
mip_heuristic_feaspump
-
type
KN_PARAM_MIP_HEUR_FEASPUMP
#define KN_PARAM_MIP_HEUR_FEASPUMP 2040 # define KN_MIP_HEUR_FEASPUMP_AUTO -1 # define KN_MIP_HEUR_FEASPUMP_OFF 0 # define KN_MIP_HEUR_FEASPUMP_ON 1
Specifies whether or not to enable the MIP feasibility pump heuristic.
-1 (auto) Let Knitro determine automatically from
mip_heuristic_strategy
.0 (off) Feasibility pump heuristic is not applied.
1 (on) Feasibility pump heuristic is enabled.
Default value: -1
-
type
mip_heuristic_lns
-
type
KN_PARAM_MIP_HEUR_LNS
#define KN_PARAM_MIP_HEUR_LNS 2045
Specifies whether or not to enable the MIP large neighborhood search (LNS) heuristics. This option is a bit-valued option where various LNS heuristics can be enabled by activating the corresponding bit value as described below. Setting this option to -1 will use an automatic setting and setting the value to 0 will disable all LNS heuristics. Otherwise, set this parameter value to the sum of the values for the individual LNS heuristics you wish to enable. For example, to enable both the “RENS” and “RINS” LNS heuristics, you would set this option value to 3 (summing 1 for RENS and 2 for RINS).
-1 (auto) Let Knitro determine automatically from
mip_heuristic_strategy
.1 (bit 0) Enable relaxation enforced neighborhood search (RENS) heuristic.
2 (bit 1) Enable relaxation induced neighborhood search (RINS) heuristic.
Default value: -1
-
type
mip_heuristic_maxit
-
type
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
-
type
mip_heuristic_misqp
-
type
KN_PARAM_MIP_HEUR_MISQP
#define KN_PARAM_MIP_HEUR_MISQP 2049 # define KN_MIP_HEUR_MISQP_AUTO -1 # define KN_MIP_HEUR_MISQP_OFF 0 # define KN_MIP_HEUR_MISQP_ON 1
Specifies whether or not to enable the MIP MISQP heuristic.
-1 (auto) Let Knitro determine automatically from
mip_heuristic_strategy
.0 (off) MISQP heuristic is not applied.
1 (on) MISQP heuristic is enabled.
Default value: -1
-
type
mip_heuristic_mpec
-
type
KN_PARAM_MIP_HEUR_MPEC
#define KN_PARAM_MIP_HEUR_MPEC 2041 # define KN_MIP_HEUR_MPEC_AUTO -1 # define KN_MIP_HEUR_MPEC_OFF 0 # define KN_MIP_HEUR_MPEC_ON 1
Specifies whether or not to enable the MIP MPEC heuristic.
-1 (auto) Let Knitro determine automatically from
mip_heuristic_strategy
.0 (off) MPEC heuristic is not applied.
1 (on) MPEC heuristic is enabled.
Default value: -1
-
type
mip_heuristic_localsearch
-
type
KN_PARAM_MIP_HEUR_LOCALSEARCH
#define KN_PARAM_MIP_HEUR_LOCALSEARCH 2054 # define KN_MIP_HEUR_LOCALSEARCH_AUTO -1 # define KN_MIP_HEUR_LOCALSEARCH_OFF 0 # define KN_MIP_HEUR_LOCALSEARCH_ON 1
Specifies whether or not to enable the MIP local search heuristic.
-1 (auto) Let Knitro determine automatically from
mip_heuristic_strategy
.0 (off) Local search heuristic is not applied.
1 (on) Local search heuristic is enabled.
Default value: -1
-
type
mip_heuristic_strategy
-
type
KN_PARAM_MIP_HEUR_STRATEGY
#define KN_PARAM_MIP_HEUR_STRATEGY 2039 # define KN_MIP_HEUR_STRATEGY_AUTO -1 # define KN_MIP_HEUR_STRATEGY_NONE 0 # define KN_MIP_HEUR_STRATEGY_BASIC 1 # define KN_MIP_HEUR_STRATEGY_ADVANCED 2 # define KN_MIP_HEUR_STRATEGY_EXTENSIVE 3
Specifies the level of effort applied for the MIP heuristic search used to try to find an initial integer feasible point.
-1 (auto) Let Knitro choose the heuristic strategy to apply (if any).
0 (none) No heuristic search applied.
1 (basic) Apply basic heuristics.
2 (advanced) Apply more advanced heuristics.
3 (extensive) Apply most extensive heuristics.
Default value: -1
-
type
mip_heuristic_terminate
-
type
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
-
type
mip_implications
-
type
KN_PARAM_MIP_IMPLICATIONS
#define KN_PARAM_MIP_IMPLICATIONS 2014 /*-- USE LOGICAL IMPLICATIONS */ # define KN_MIP_IMPLICATIONS_NO 0 # define KN_MIP_IMPLICATIONS_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
-
type
mip_integer_tol
-
type
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.0e-8
-
type
mip_intvar_strategy
-
type
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
-
type
mip_knapsack
-
type
KN_PARAM_MIP_KNAPSACK
#define KN_PARAM_MIP_KNAPSACK 2016 /*-- KNAPSACK CUTS */ # define KN_MIP_KNAPSACK_AUTO -1 # define KN_MIP_KNAPSACK_NONE 0 /*-- NONE */ # define KN_MIP_KNAPSACK_ROOT 1 /*-- IN THE ROOT */ # define KN_MIP_KNAPSACK_TREE 2 /*-- IN THE WHOLE TREE */
Specifies rules for adding MIP knapsack cuts.
-1 (auto) Automatically determine whether to add knapsack cuts.
0 (none) Do not add knapsack cuts.
1 (root) Add knapsack cuts derived from the root node only.
2 (tree) Add knapsack cuts derived at every node depending on the solution of the relaxation and the cut generation strategy.
Default value: -1
-
type
mip_liftproject
-
type
KN_PARAM_MIP_LIFTPROJECT
#define KN_PARAM_MIP_LIFTPROJECT 2047 /*-- LIFT&PROJECT CUTS */ # define KN_MIP_LIFTPROJECT_AUTO -1 # define KN_MIP_LIFTPROJECT_NONE 0 /*-- NONE */ # define KN_MIP_LIFTPROJECT_ROOT 1 /*-- IN THE ROOT */
Specifies rules for adding lift and project cuts.
-1 (auto) Automatically determine whether to add lift and project cuts.
0 (none) Do not add lift and project cuts.
1 (root) Add lift and project cuts at the root node only.
Default value: -1
-
type
mip_lpalg
-
type
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
-
type
mip_maxnodes
-
type
KN_PARAM_MIP_MAXNODES
#define KN_PARAM_MIP_MAXNODES 2021
Specifies the maximum number of nodes explored (0 means no limit).
Default value: 0
-
type
mip_maxsolves
-
type
KN_PARAM_MIP_MAXSOLVES
#define KN_PARAM_MIP_MAXSOLVES 2008
Specifies the maximum number of subproblem solves allowed (0 means no limit).
Default value: 0
-
type
mip_maxtime_cpu
-
type
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
-
type
mip_maxtime_real
-
type
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
-
type
mip_method
-
type
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 Quesada-Grossman method (for convex, nonlinear problems only).
3 (MISQP) Use mixed-integer SQP method (allows for non-relaxable integer variables).
Default value: 0
-
type
mip_mir
-
type
KN_PARAM_MIP_MIR
#define KN_PARAM_MIP_MIR 2037 /*-- MIR CUTS */ # define KN_MIP_MIR_AUTO -1 # define KN_MIP_MIR_NONE 0 /*-- NONE */ # define KN_MIP_MIR_ROOT 1 /*-- IN THE ROOT */ # define KN_MIP_MIR_TREE 2 /*-- IN THE WHOLE TREE */
Specifies rules for adding mixed-integer rounding cuts.
-1 (auto) Let Knitro decide whether to add mixed-integer rounding cuts.
0 (none) Do not add mixed-integer rounding cuts.
1 (root) Add mixed-integer rounding cuts derived from the root node only.
2 (tree) Add mixed-integer rounding cuts derived at every node depending on the solution of the relaxation and the cut generation strategy.
Default value: -1
-
type
mip_multistart
-
type
KN_PARAM_MIP_MULTISTART
#define KN_PARAM_MIP_MULTISTART 2046 # define KN_MIP_MULTISTART_OFF 0 # define KN_MIP_MULTISTART_ON 1
Use to enable MIP multi-start at the branch-and-bound level.
0 (off) Do not enable MIP multi-start for branch-and-bound.
1 (on) Enable MIP multi-start for branch-and-bound.
Default value: 0
-
type
mip_nodealg
-
type
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
-
type
mip_numthreads
-
type
KN_PARAM_MIP_NUMTHREADS
#define KN_PARAM_MIP_NUMTHREADS 2048
Specify the number of threads to use for MIP branch-and-bound (when
mip_method
= 1).0 Let Knitro choose the number of threads.
n>0 Use n threads for the MIP branch-and-bound.
Default value: 0
-
type
mip_opt_gap_abs
-
type
KN_PARAM_MIP_OPTGAPABS
#define KN_PARAM_MIP_OPTGAPABS 2004
The absolute optimality gap stop tolerance for MIP.
Default value: 1.0e-6
-
type
mip_opt_gap_rel
-
type
KN_PARAM_MIP_OPTGAPREL
#define KN_PARAM_MIP_OPTGAPREL 2005
The relative optimality gap stop tolerance for MIP.
Default value: 1.0e-4
-
type
mip_outinterval
-
type
KN_PARAM_MIP_OUTINTERVAL
#define KN_PARAM_MIP_OUTINTERVAL 2011
Specifies node printing interval for
mip_outlevel
whenmip_outlevel
> 0.0 Let Knitro decide.
1 Print output every node.
2 Print output every 2nd node.
N Print output every Nth node.
Default value: 0
-
type
mip_outlevel
-
type
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: 2
-
type
mip_outsub
-
type
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
-
type
mip_pseudoinit
-
type
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 pseudo-costs 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 pseudo-costs.
2 Initialize using strong branching.
Default value: 0
-
type
mip_relaxable
-
type
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
-
type
mip_restart
-
type
KN_PARAM_MIP_RESTART
#define KN_PARAM_MIP_RESTART 2050 # define KN_MIP_RESTART_OFF 0 # define KN_MIP_RESTART_ON 1
Specifies whether to enable the MIP restart procedure.
0 (off) Do not enable the MIP restart procedure.
1 (on) Enable the MIP restart procedure.
Default value: 1
-
type
mip_rootalg
-
type
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
-
type
mip_rounding
-
type
KN_PARAM_MIP_ROUNDING
#define KN_PARAM_MIP_ROUNDING 2017 # define KN_MIP_ROUND_AUTO -1 # define KN_MIP_ROUND_NONE 0 /*-- 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.
-1 (auto) Let Knitro choose the rounding rule.
0 (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: -1
-
type
mip_selectdir
-
type
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
-
type
mip_selectrule
-
type
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
-
type
mip_strong_candlim
-
type
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
-
type
mip_strong_level
-
type
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
-
type
mip_strong_maxit
-
type
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
-
type
mip_terminate
-
type
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
-
type
mip_zerohalf
-
type
KN_PARAM_MIP_ZEROHALF
#define KN_PARAM_MIP_ZEROHALF 2036 # define KN_MIP_ZEROHALF_AUTO -1 # define KN_MIP_ZEROHALF_NONE 0 # define KN_MIP_ZEROHALF_ROOT 1 # define KN_MIP_ZEROHALF_TREE 2
Specifies rules for adding zero-half cuts.
-1 (auto) Automatically determine whether to add zero-half cuts.
0 (none) Do not add zero-half cuts.
1 (root) Add zero-half cuts derived from the root node only.
2 (tree) Add zero-half cuts derived at every node depending on the solution of the relaxation and the cut generation strategy.
Default value: -1
Multi-algorithm options
-
type
ma_maxtime_cpu
-
type
KN_PARAM_MA_MAXTIMECPU
#define KN_PARAM_MA_MAXTIMECPU 1064
Specifies, in seconds, the maximum allowable CPU time before termination for the multi-algorithm (“MA”) procedure (
alg
=5
).Default value: 1.0e8
-
type
ma_maxtime_real
-
type
KN_PARAM_MA_MAXTIMEREAL
#define KN_PARAM_MA_MAXTIMEREAL 1065
Specifies, in seconds, the maximum allowable real time before termination for the multi-algorithm (“MA”) procedure (
alg
=5
).Default value: 1.0e8
Note
When using the multi-algorithm 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.
-
type
ma_outsub
-
type
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 multi-algorithm (
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
-
type
ma_terminate
-
type
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 multi-algorithm (
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
Multi-Start options
-
type
ms_enable
-
type
KN_PARAM_MS_ENABLE
#define KN_PARAM_MULTISTART 1033 #define KN_PARAM_MS_ENABLE 1033 # define KN_MS_ENABLE_NO 0 # define KN_MS_ENABLE_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
-
type
ms_initpt_cluster
-
type
KN_PARAM_MS_INITPT_CLUSTER
#define KN_PARAM_MS_INITPT_CLUSTER 1149 # define KN_MS_INITPT_CLUSTER_NONE 0 # define KN_MS_INITPT_CLUSTER_SL 1
The strategy for clustering initial points in multi-start.
0 (none) Do not apply clustering.
1 (sl) Apply single linkage based clustering.
Default value: 0
-
type
ms_maxbndrange
-
type
KN_PARAM_MS_MAXBNDRANGE
#define KN_PARAM_MS_MAXBNDRANGE 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
-
type
ms_maxsolves
-
type
KN_PARAM_MS_MAXSOLVES
#define KN_PARAM_MS_MAXSOLVES 1034
Specifies how many start points to try in multi-start. This option has no effect unless
ms_enable
= yes.0 Let Knitro automatically choose a value based on the problem size and context. For stand-alone continuous models, the value is min(100, 10 N), where N is the number of variables in the problem. For node subproblems inside branch-and-bound, the default value is 8.
n Try n>0 start points.
Default value: 0
-
type
ms_maxtime_cpu
-
type
KN_PARAM_MS_MAXTIMECPU
#define KN_PARAM_MS_MAXTIMECPU 1036
Specifies, in seconds, the maximum allowable CPU time before termination.
The limit applies to the operation of Knitro since multi-start 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
-
type
ms_maxtime_real
-
type
KN_PARAM_MS_MAXTIMEREAL
#define KN_PARAM_MS_MAXTIMEREAL 1037
Specifies, in seconds, the maximum allowable real time before termination.
The limit applies to the operation of Knitro since multi-start 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
-
type
ms_num_to_save
-
type
KN_PARAM_MS_NUMTOSAVE
#define KN_PARAM_MS_NUMTOSAVE 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
-
type
ms_numthreads
-
type
KN_PARAM_MS_NUMTHREADS
#define KN_PARAM_MS_NUMTHREADS 1137
Specify the number of threads to use for multi-start (when
ms_enable
= 1).0 Let Knitro choose the number of threads (currently sets
ms_numthreads
based onnumthreads
).n>0 Use n threads for the multi-start (solve n problems in parallel).
Default value: 0
-
type
ms_outsub
-
type
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 multi-start procedure.
0 Do not write detailed algorithm output to files.
1 Write detailed algorithm output to files named
knitro_ms_*.log
.
Default value: 0
-
type
ms_savetol
-
type
KN_PARAM_MS_SAVETOL
#define KN_PARAM_MS_SAVETOL 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.0e-6
-
type
ms_seed
-
type
KN_PARAM_MS_SEED
#define KN_PARAM_MS_SEED 1066
Seed value used to generate random initial points in multi-start; should be a non-negative integer.
Default value: 0
-
type
ms_startptrange
-
type
KN_PARAM_MS_STARTPTRANGE
#define KN_PARAM_MS_STARTPTRANGE 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. Ifis 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: 1.0e20
-
type
ms_terminate
-
type
KN_PARAM_MS_TERMINATE
#define KN_PARAM_MS_TERMINATE 1054 # define KN_MS_TERMINATE_MAXSOLVES 0 # define KN_MS_TERMINATE_OPTIMAL 1 # define KN_MS_TERMINATE_FEASIBLE 2 # define KN_MS_TERMINATE_ANY 3 # define KN_MS_TERMINATE_RULEBASED 4
Specifies the condition for terminating multi-start.
This option has no effect unless
ms_enable
= yes.0 (maxsolves) Terminate after ms_maxsolves.
1 (optimal) Terminate after the first local optimal solution is found or ms_maxsolves, whichever comes first.
2 (feasible) Terminate after the first feasible solution estimate is found or ms_maxsolves, whichever comes first.
3 (any) Terminate after the first solution estimate of any type is found or ms_maxsolves, whichever comes first.
4 (rulebased) Terminate using rules that estimate when the probability of finding new local solutions is low.
Default value: 4
-
type
ms_terminaterule_tol
-
type
KN_PARAM_MS_TERMINATERULE_TOL
#define KN_PARAM_MS_TERMINATERULE_TOL 1160
The tolerance in (0,1] for the rule-based termination of multi-start. Specifying a non-positive value will enable an automatic tolerance selection. Values closer to 1 trigger termination sooner, while values closer to zero will trigger termination in more solves.
Default value: 0.0
Parallelism options
-
type
blas_numthreads
-
type
KN_PARAM_BLAS_NUMTHREADS
#define KN_PARAM_BLAS_NUMTHREADS 1135
Specify the number of threads to use for BLAS operations when
blasoption
= 1 (see Parallelism).Default value: 0 (Knitro will automatically set
blas_numthreads
based onnumthreads
)
-
type
concurrent_evals
-
type
KN_PARAM_CONCURRENT_EVALS
#define KN_PARAM_CONCURRENT_EVALS 1134 # define KN_CONCURRENT_EVALS_NO 0 # define KN_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
concurrent_evals
=0
, will put these evaluations in a critical region so that only one evaluation can take place at a time. Ifconcurrent_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
-
type
conic_numthreads
-
type
KN_PARAM_CONIC_NUMTHREADS
#define KN_PARAM_CONIC_NUMTHREADS 1138
Specify the number of threads to use for operations in the conic algorithm (when
bar_conic_enable
= 1).0 Let Knitro choose the number of threads (currently sets
conic_numthreads
based onnumthreads
).n>0 Use n threads for the conic solver.
Default value: 0
-
type
findiff_numthreads
-
type
KN_PARAM_FINDIFF_NUMTHREADS
#define KN_PARAM_FINDIFF_NUMTHREADS 1141
Specify the number of threads to use when computing finite-difference gradients (using more than 1 thread here is only beneficial when
concurrent_evals
=1
).0 Let Knitro choose the number of threads.
n>0 Use n threads for the finite-difference gradients.
Default value: 0
-
type
linsolver_numthreads
-
type
KN_PARAM_LINSOLVER_NUMTHREADS
#define KN_PARAM_LINSOLVER_NUMTHREADS 1136
Specify the number of threads to use for linear system solve operations when
linsolver
= 6 (see Parallelism).Default value: 0 (Knitro will automatically set
linsolver_numthreads
based onnumthreads
)
-
type
numthreads
-
type
KN_PARAM_NUMTHREADS
#define KN_PARAM_NUMTHREADS 1133
Specify the number of threads to use for parallel computing features (see Parallelism).
Default value: -1 (Knitro will automatically determine the number of threads to use and how to distribute them)
Output options
-
type
debug
-
type
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
-
type
newpoint
-
type
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, or after every new incumbent of the NLPBB algorithm.
For a continuous problem, an iteration of Knitro results in a new point that is closer to a solution. The new point includes values of x and Lagrange multipliers lambda.
For the NLPBB algorithm, the new incumbent includes values of x.
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
-
type
out_csvinfo
-
type
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
-
type
out_csvname
-
type
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
-
type
out_hints
-
type
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
-
type
outappend
-
type
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
-
type
outdir
-
type
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.
-
type
outlev
-
type
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
-
type
outmode
-
type
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
-
type
outname
-
type
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
-
type
tuner
-
type
KN_PARAM_TUNER
#define KN_PARAM_TUNER 1070 # define KN_TUNER_OFF 0 # define KN_TUNER_ON 1
Indicates whether to invoke the Knitro-Tuner (see The Knitro-Tuner).
0 (off) Do not invoke the Knitro-Tuner.
1 (on) Invoke the Knitro-Tuner.
Default value: 0
-
type
tuner_maxtime_cpu
-
type
KN_PARAM_TUNER_MAXTIMECPU
#define KN_PARAM_TUNER_MAXTIMECPU 1072
Specifies, in seconds, the maximum allowable CPU time before terminating the Knitro-Tuner.
The limit applies to the operation of Knitro since the Knitro-Tuner began. In contrast, the value of
maxtime_cpu
places a time limit on each individual Knitro-Tuner 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
-
type
tuner_maxtime_real
-
type
KN_PARAM_TUNER_MAXTIMEREAL
#define KN_PARAM_TUNER_MAXTIMEREAL 1073
Specifies, in seconds, the maximum allowable real time before terminating the Knitro-Tuner.
The limit applies to the operation of Knitro since the Knitro-Tuner began. In contrast, the value of
maxtime_real
places a time limit on each individual Knitro-Tuner 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
-
type
tuner_optionsfile
-
type
KN_PARAM_TUNER_OPTIONSFILE
#define KN_PARAM_TUNER_OPTIONSFILE 1071
Can be used to specify the location of a Tuner options file (see The Knitro-Tuner).
Default value: NULL
-
type
tuner_outsub
-
type
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 Knitro-Tuner 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
-
type
tuner_terminate
-
type
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 Knitro-Tuner 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