How to pass MIP gap parameter to Gurobi with PULP

2019-06-10 00:19发布

How to pass MIP gap parameter to Gurobi with PULP?

I tried: prob.solve(GUROBI_CMD(epgap = 0.9))

No luck

I used this wiki for all my failed attempts

1条回答
地球回转人心会变
2楼-- · 2019-06-10 00:29

Looking at the code, i would assume, that you have to give the arguments as defined in gurobi's docs (these are then passed when calling gurobi's cli), compatible with pulp's function-signature.

prob.solve(GUROBI_CMD(options=['MIPGap=0.9']))

But i probably recommend using the python-interface if you got gurobipy working (read gurobi's docs). This would look like:

prob.solve(GUROBI(epgap = 0.9))
查看更多
登录 后发表回答