How to pass MIP gap parameter to Gurobi with PULP

自闭症网瘾萝莉.ら 提交于 2019-12-08 09:14:35

问题


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:


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))


来源:https://stackoverflow.com/questions/46374529/how-to-pass-mip-gap-parameter-to-gurobi-with-pulp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!