问题
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