Parameters cannot be set after KNITRO begins solving; i.e. after solveProblem
is called. They may be set again after restart_problem
. In most cases, parameter values are not validated until initializeProblem
or solveProblem
is called.
Note: The gradopt and hessopt user options must be set before calling initializeProblem
, and cannot be changed after calling these functions.
Parameters may be set using their integer identifier, e.g.
setOption(kp, KTR_PARAM_OUTLEV, KTR_OUTLEV_ALL)
setOption(kp, KTR_PARAM_MIP_OUTINTERVAL, int32(1))
setOption(kp, KTR_PARAM_MIP_MAXNODES, int32(10000))
or using their string names, e.g.
setOption(kp, "mip_method", KTR_MIP_METHOD_BB)
setOption(kp, "algorithm", KTR_ALG_ACT_CG)
setOption(kp, "outmode", KTR_OUTMODE_SCREEN)
The full list of integer identifiers are available in src/ktr_defines.jl
, and prefixed by KTR_PARAM_
. For more details, see the official documentation.