Behrouz Beheshti
Behrouz Beheshti

Reputation: 1143

Installing COIN-OR for PuLP

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

Answers (1)

kabdulla
kabdulla

Reputation: 5419

  1. Install the solver. This will depend on solver and your operating system, but should be fairly googleable.

  2. Check its installed and pulp can access it by running:

    import pulp

    pulp.pulpTestAll()

This will try all solvers and confirm which available.

  1. Solve your model using 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

Related Questions