Skip to content

Commit

Permalink
add options for Knitro 12.2 (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
frapac authored May 13, 2020
1 parent d6002d4 commit b8fa6ca
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/kn_defines.jl
Original file line number Diff line number Diff line change
Expand Up @@ -569,3 +569,23 @@ if KNITRO_VERSION >= v"12.1"
const KN_PRESOLVEOP_TIGHTEN_NONE = Cint(0)
const KN_PRESOLVEOP_TIGHTEN_VARBND = Cint(1)
end
if KNITRO_VERSION >= v"12.2"
const KN_LINESEARCH_WEAKWOLFE = Cint(3)
# Tune factorization of KKT system
const KN_PARAM_BAR_LINSYS = Cint(1126)
const KN_BAR_LINSYS_AUTO = Cint(-1)
const KN_BAR_LINSYS_FULL = Cint(0)
const KN_BAR_LINSYS_COMPACT1 = Cint(1)
const KN_BAR_LINSYS_COMPACT2 = Cint(2)
# Add new ways to handle init point during presolve
const KN_PARAM_PRESOLVE_INITPT = Cint(1127)
const KN_PRESOLVE_INITPT_AUTO = Cint(-1)
const KN_PRESOLVE_INITPT_NOSHIFT = Cint(0)
const KN_PRESOLVE_INITPT_LINSHIFT = Cint(1)
const KN_PRESOLVE_INITPT_ANYSHIFT = Cint(2)
# QP penalty in active set algorithm
const KN_PARAM_ACT_QPPENALTY = Cint(1128)
const KN_ACT_QPPENALTY_AUTO = Cint(-1)
const KN_ACT_QPPENALTY_NONE = Cint(0)
const KN_ACT_QPPENALTY_ALL = Cint(1)
end
6 changes: 6 additions & 0 deletions src/kn_params.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ const KN_paramName2Indx = Dict(
"KN_PARAM_CONVEX" => Int32(1114),
"KN_PARAM_OUT_HINTS" => Int32(1115),
"KN_PARAM_EVAL_FCGA" => Int32(1116),
"KN_PARAM_BAR_LINSYS" => Int32(1126),
"KN_PARAM_PRESOLVE_INITPT" => Int32(1127),
"KN_PARAM_ACT_QPPENALTY" => Int32(1128),
"KN_PARAM_MIP_METHOD" => Int32(2001),
"KN_PARAM_MIP_BRANCHRULE" => Int32(2002),
"KN_PARAM_MIP_SELECTRULE" => Int32(2003),
Expand Down Expand Up @@ -335,6 +338,9 @@ const KNITRO_OPTIONS = String[
"presolveop_tighten", # KN_PARAM_PRESOLVEOP_TIGHTEN
"pre_redundancylevel", # KTR_CNT_REDUNDANCY_DETECTION
"pre_improvecoefficients", # KTR_IMPROVE_COEFFICIENTS
"bar_linsys", # KN_PARAM_BAR_LINSYS
"presolve_initpt", # KN_PARAM_PRESOLVE_INITPT
"act_qppenalty", # KN_PARAM_ACT_QPPENALTY
"option_file",
"tuner_file",
]

0 comments on commit b8fa6ca

Please sign in to comment.