Get the iterations and ObjVal, while "model.optimize(mycallback)" is running
Answered
Hello together, I build a model to solve an Mixed integer LP. Thanks for your help and best wishes |
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Gerrit,
If you want to query simplex information you need to use the SIMPLEX callback, i.e. use where=2. Please have a look at the callback documentation and also at the callback examples in your Gurobi installation.
Cheers,
Matthias0 -
I also want to get the objective values (two objectives in my moo problem) in each iteration.
Callback function gives me some ideas. I know my model went through 19 simplex iterations. I need the values of obj1 & obj2 for each iteration. How can I get it in Python API (MIP problem)?0 -
Hi Tanmoy,
In that case, you would need to use ObjNumber to specify the objective you want to query.
Best regards,
Matthias0
Post is closed for comments.
Comments
4 comments