Closed mzy2240 closed 1 year ago
Of course I could check the native attribute name for each solvers (most of them are just timelimit
), but I am thinking those work might be duplicated (when creating wrappers like COPT.jl
and Gurobi.jl
you probably already went through the same process).
We can't do this in AmplNLWriter because there is no way to set this uniformly across solvers via the AMPL interface.
You'll need to use set_optimizer_attribute(model, "xxx", value)
where xxx
is the solver-specific string.
When using gurobi with AMPL,
set_time_limit_sec
will raiseMathOptInterface.UnsupportedAttribute{MathOptInterface.TimeLimitSec}: Attribute MathOptInterface.TimeLimitSec() is not supported by the model
Considering many users may actually use Gurobi/CPLEX/XPRESS/COPT with AMPL license, can we provide a generic attribute
TimeLimitSec
similar toCOPT.jl
Gurobi.jl
?