2
$\begingroup$

I am looking for a MINLP solver that works with Pyomo models which can be used in the Google Colab environment. I have already found MindtPy but it doesn't work in google colab.

$\endgroup$

1 Answer 1

2
$\begingroup$

There are so many MINLP solvers out there that this isn't really a well-defined question.

Anyway, here's how you can get some:

# Install some solvers
# GLPK probably includes GLPK_MI which does MIP
!apt-get install -y -qq glpk-utils  

# CBC does MIP
!apt-get install -y -qq coinor-cbc  

# Ipopt does MINLP
!wget -N -q "https://ampl.com/dl/open/ipopt/ipopt-linux64.zip"
!unzip -o -q ipopt-linux64

# Bonmin does MINLP by mixing CBC and Ipopt
!wget -N -q "https://ampl.com/dl/open/bonmin/bonmin-linux64.zip"
!unzip -o -q bonmin-linux64

# Couenne is another MINLP solver
!wget -N -q "https://ampl.com/dl/open/couenne/couenne-linux64.zip"
!unzip -o -q couenne-linux64

#OSQP is a fast solver for quadratic programs. This makes it available via Python
!pip install osqp

#XPRESS is a commercial solver of many sorts of programs including MIPs. This installs it along with a community license that makes it free, but only for smallish problems
!pip install xpress

When you're done, the solvers will be located at:

glpk      /usr/bin/glpsol
cbc       /usr/bin/cbc
ipopt     /content/ipopt
bonmin    /content/bonmin
couenne   /content/couenne
osqp      available via import in Python
xpress    available via import in Python

Further tests and explanations of some of the above are available here.

$\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.