11
$\begingroup$

What are the handiest optimization parsers out there? Is COIN-OR's PyPy being used actively? I am currently trying to do an optimization project in Python, but I am used to using MATLAB + YALMIP combination, so I need some advice!

$\endgroup$
  • $\begingroup$ PuLP hands down (if linear) $\endgroup$ – Kuifje Nov 19 at 20:38
5
$\begingroup$

Given you are a MATLAB+Yalmip user you may prefer Cvxpy. Cvxpy is particularly useful if you do nonlinear models. Mosek also includes 2 Python interfaces where the so called Fusion interface may be the most interesting for you.

Here you find a comparison of Cvxpy, Pyomo and Fusion for some large scale problems.

$\endgroup$
  • $\begingroup$ I tried it, that's really like YALMIP. I was overwhelmed with the notation of other parsers, this works great! Note: The documentation of CVXPY says MOSEK can not solve Exponential Cone problems, which is not true anymore I guess, so just flagging here... $\endgroup$ – independentvariable Nov 20 at 23:25
  • $\begingroup$ We will get it fixed. $\endgroup$ – ErlingMOSEK Nov 21 at 8:20
6
$\begingroup$

I think the two most common are PuLP and Pyomo. Some commercial solvers also have dedicated Python packages, e.g., Gurobipy and docplex.

Related: I've formulated my optimization model; now what?

$\endgroup$
6
$\begingroup$

Handiest optimization package in python is Pyomo(in my opinion). I recommend that because of the following specifications:

  1. There is a google group ( in addition to se and or.se) that you can ask for help if you stacked.
  2. You can use all the pythonic facilities to write your model
  3. There are enough books, tutorials and documents about it.
  4. Pyomo is an active and well developed package.
  5. You can also use many available solvers to solve your model written in Pyomo.
  6. You can easily use solvers on Neos server to solve the model.
$\endgroup$

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.