File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 257257
258258# MOI.TimeLimitSec
259259
260- MOI. supports(model:: Optimizer , :: MOI.TimeLimitSec ) = true
260+ # We support `MOI.TimeLimitSec` only in newer versions of KNITRO because we
261+ # require `KN_PARAM_MAXTIME`.
262+ MOI. supports(:: Optimizer , :: MOI.TimeLimitSec ) = KNITRO. knitro_version() >= v" 15"
261263
262264MOI. get(model:: Optimizer , :: MOI.TimeLimitSec ) = model. time_limit_sec
263265
@@ -1006,7 +1008,9 @@ function MOI.supports_constraint(
10061008 :: Type{MOI.VectorOfVariables} ,
10071009 :: Type{MOI.Complements} ,
10081010)
1009- return true
1011+ # We don't support complementarity constraints in older versions of KNITRO
1012+ # because we require `KN_add_compcons`.
1013+ return KNITRO. knitro_version() >= v" 15"
10101014end
10111015
10121016function MOI. add_constraint(
Original file line number Diff line number Diff line change 2828@static if isdefined(@__MODULE__, :libknitro)
2929 # deps.jl must define a local installation.
3030 let version = has_knitro() ? knitro_version() : v" 15.0.0"
31- if v" 15 " <= version < v" 16"
31+ if v" 13 " <= version < v" 16"
3232 error(
3333 " You have installed version $version of Artelys Knitro, " *
3434 " which is not supported by KNITRO.jl. We require a version " *
35- " in [15 , 16)" ,
35+ " in [13 , 16)" ,
3636 )
3737 end
3838 end
You can’t perform that action at this time.
0 commit comments