[英]How to pass MIP gap parameter to Gurobi with PULP
How to pass MIP gap parameter to Gurobi with PULP? 如何使用PULP将MIP间隙参数传递给Gurobi?
I tried: prob.solve(GUROBI_CMD(epgap = 0.9)) 我试过了:prob.solve(GUROBI_CMD(epgap = 0.9))
No luck 没运气
I used this wiki for all my failed attempts 我所有失败的尝试都使用了此Wiki
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. 看一下代码,我假设您必须提供与gurobi的文档中定义的参数(然后在调用gurobi的cli时传递这些参数),使其与纸浆的功能签名兼容。
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). 但是,如果您可以使用gurobipy(请阅读gurobi的文档),我可能建议您使用python-interface。 This would look like:
看起来像:
prob.solve(GUROBI(epgap = 0.9))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.