python - Tuning multiple Gurobi models at once - Stack Overflow

admin2025-04-30  4

i want to tune the hyper parameters of Gurobi for several optimization problems at once. I have a folder with several .lp files.

At the moment i am using this code to tune one model in Python:

model = gp.read("model.lp")
model.tune()

But this code only works for one instance of my problem. I want to tune several problem instances at once. Thanks!

i want to tune the hyper parameters of Gurobi for several optimization problems at once. I have a folder with several .lp files.

At the moment i am using this code to tune one model in Python:

model = gp.read("model.lp")
model.tune()

But this code only works for one instance of my problem. I want to tune several problem instances at once. Thanks!

Share Improve this question edited Jan 7 at 8:46 Max Berktold asked Jan 6 at 17:04 Max BerktoldMax Berktold 635 bronze badges 2
  • You'll need to edit your question to show the full code of how you are iterating over the models – AirSquid Commented Jan 6 at 20:01
  • Try to use mps files instead of lp files. You lose accuracy with lp files. – Riley Commented Jan 9 at 6:47
Add a comment  | 

1 Answer 1

Reset to default 1

This is possible, but only via the command line tool grbtune

https://docs.gurobi.com/projects/optimizer/en/current/features/tuning.html#command-line-tuning

转载请注明原文地址:http://anycun.com/QandA/1745955873a91442.html