Update mipgap after each subproblem
AnsweredHi,
The problem that I work on requires solving the same model with a different set of constraints until the predetermined time limit. However, I would like to update/force the optimality gap dynamically as let newgap:= min(0.01, (xy)/x) where x and y are the solutions from the previous subproblem.
Currently I use gurobi_options "timelim=100 mipgap=newgap"; but it gives the following message
"Expected a numeric value for mipgap, not newgap"
May I know how to resolve this issue?
Thanks.
0

It appears you are setting an AMPL gurobi_options string. Is newgap an AMPL parameter? Then you need to use an AMPL string expression in an option statement like this:
option gurobi_options ("timelim=100 mipgap=" & newgap);
The ( parentheses ) signal to AMPL that you are using an expression to form the option string, and & is the AMPL string concatenation operator.
0
Please sign in to leave a comment.
Comments
1 comment