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 248248
249249# MOI.TimeLimitSec
250250
251- MOI. supports (model:: Optimizer , :: MOI.TimeLimitSec ) = true
251+ # We support `MOI.TimeLimitSec` only in newer versions of KNITRO because we
252+ # require `KN_PARAM_MAXTIME`.
253+ MOI. supports (:: Optimizer , :: MOI.TimeLimitSec ) = knitro_version () >= v " 15"
252254
253255MOI. get (model:: Optimizer , :: MOI.TimeLimitSec ) = model. time_limit_sec
254256
@@ -997,7 +999,9 @@ function MOI.supports_constraint(
997999 :: Type{MOI.VectorOfVariables} ,
9981000 :: Type{MOI.Complements} ,
9991001)
1000- return true
1002+ # We don't support complementarity constraints in older versions of KNITRO
1003+ # because we require `KN_add_compcons`.
1004+ return knitro_version () >= v " 15"
10011005end
10021006
10031007function 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