I have solved simple MILP problems with PuLP and I believe ‘model.solve()’ without any parameters refers to the default solver. But for harder problems, it keeps running and and I can’t get a result. I’m wondering how I can install and add free solvers (i.e. not CPLEX or Gurobi) as a solver. I found COIN-OR but I couldn’t find the right structure and documentation to use it. Any help would be greatly appreciated. Regards, Behrouz
问问题
624 次
1 回答
0
安装求解器。这将取决于求解器和您的操作系统,但应该是相当可搜索的。
检查它的安装和纸浆可以通过运行访问它:
import pulp
pulp.pulpTestAll()
这将尝试所有求解器并确认哪些可用。
- 使用 解决您的模型
model.solve(solver)
。例如model.solve(pulp.COIN_CMD())
更多信息:https ://scaron.info/blog/linear-programming-in-python-with-pulp.html
于 2019-08-22T20:39:07.783 回答