Installing COIN-OR for PuLP

1.1k views Asked by At

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

1

There are 1 answers

1
kabdulla On
  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