Reputation: 1143
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
Upvotes: 1
Views: 1228
Reputation: 5419
Install the solver. This will depend on solver and your operating system, but should be fairly googleable.
Check its installed and pulp can access it by running:
import pulp
pulp.pulpTestAll()
This will try all solvers and confirm which available.
model.solve(solver)
. For example model.solve(pulp.COIN_CMD())
More here: https://scaron.info/blog/linear-programming-in-python-with-pulp.html
Upvotes: 1