Following the accepted answer to

Assignment problem where assignments must be done sequentially

I would like to write a Python script which can solve the problem defined there. It's a Mixed Integer Linear Programming problem, thus I need an Open Source MILP solver, and a modeler. The constraints are probably very simple for you guys, but since I'm not familiar with MILP, it would be great if the modeler had an intuitive, easy to use API. Can you indicate me a Python modeler and solver which I can use to solve the problem? If you could also help me describing the MILP problem in the question above, using the modeler API, that would be great.

  • 3
    $\begingroup$ Take a look at the answer to this question: I've formulated my optimization model; now what?. You'll get to know commercial and open-source solvers, each with a Python API. And if you're looking for packages that call open-source solvers, check out this question: Interface for Cbc - COIN-OR $\endgroup$
    – EhsanK
    Jan 27 '20 at 14:03
  • 1
    $\begingroup$ In my opinion PuLP is outstanding : pypi.org/project/PuLP $\endgroup$
    – Kuifje
    Jan 27 '20 at 20:56
  • $\begingroup$ All the commercial solves have Python interfaces. I think mosek is a good one since I build it. $\endgroup$ Jan 28 '20 at 6:32
  • 1
    $\begingroup$ The MIPCL solver has a nice interface on python and easy to use. I think easier than other solvers with good performance. $\endgroup$
    – A.Omidi
    Jan 28 '20 at 8:16
  • 1
    $\begingroup$ HiGHS has the best truly open-source MIP solver, and a limited Python interface. $\endgroup$ Sep 17 '21 at 12:04

I find Pulp is extremely easy to use, versatile and has good performance. Check it out here: https://pythonhosted.org/PuLP/solvers.html


I'm not a Python user, but I've heard good things about Pyomo, which is an open-source modeling language. In addition to Pyomo, you would need a solver program (from among those they support), but you would not need to worry about any syntax issues related to the solver.

  • $\begingroup$ I second this, Pyomo is great and automatically connects to any solver with an ASL interface (which is most of the COIN-OR stuff). $\endgroup$ Jan 28 '20 at 14:02

A more recent alternative is Python-MIP. It has built-in support of COIN-OR CBC. In addition, right now it supports one commercial solver, namely Gurobi. According to its website, it provides access to advanced solver features like cut generation, lazy constraints, MIP starts and solution pools. Since Python-MIP is mentioned on the COIN-OR projects webpage, it seems that Python-MIP is going to be open source in the long run.


As suggested above, PULP is one of the open source solver. Apart from this, the best MILP solver available in open source is preferably offered in SCIP optimization suite. I think Google OR tools are built using SCIP only. Moreover, you can refer to COIN-OR where researchers from ORMS society have maintained their projects.

  • 5
    $\begingroup$ SCIP is not open source. You cannot use it freely for commercial use for instance. See the license agreement. $\endgroup$ Jan 29 '20 at 8:04
  • $\begingroup$ Pulp is actually not a solver but a modeling framework - will update my answer accordingly. $\endgroup$
    – CMichael
    Jan 29 '20 at 19:53
  • $\begingroup$ The HiGHS MIP solver is now as good as SCIP, and is truly open source. $\endgroup$ Sep 17 '21 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.