10
$\begingroup$

I have used Gurobi and cplex for solving large scale LP problems with Pyomo. However, I do need to use open source solver. Any advise? glpk and cbc seems to be very slow in solving the problem (with 2e6 variables)

$\endgroup$
3
  • $\begingroup$ You probably need a good interior-point optimizer. I do not think any good open source interior-point code is available. Shameless promotion: Mosek.com is likely to be cheaper than the other commercial offerings. $\endgroup$ Aug 16, 2021 at 7:42
  • 2
    $\begingroup$ Did you try the barrier algorithm in Clp/Cbc (assuming this is a pure LP)? For large problems, this may be faster than the Simplex method. (But not as fast as Mosek). $\endgroup$ Aug 16, 2021 at 12:50
  • 1
    $\begingroup$ A Pyomo interface to HiGHS has been developed. Rather than hosting it ourselves, we suggested that it is made available via the Pyomo community. I'm in the process of tracking down whether this has happened. GLPK is a very poor LP solver. $\endgroup$ Sep 17, 2021 at 12:02

4 Answers 4

9
$\begingroup$

The Mittlemann benchmarks are an excellent benchmark as ever in particular these two:

Note that Pyomo doesn't have bindings for most of these locally. If you are just looking for high-level modeling language and are not tied to Python you could use the JuMP modeling language instead which uses Julia. Julia's excellent package system means many Open Source solvers are only an ]add Tulip, ]add Ipopt, ]add HiGHS (you should be aware this binding it is still under active development see GitHub for details) or ]add Clp in the command line away.

$\endgroup$
1
12
$\begingroup$

There is a new open source solver that looks quite promising, HiGHS:

https://www.maths.ed.ac.uk/hall/HiGHS/

But as pointed out by others, for mixed-integer programming problems, at the moment, open-source solvers can't compete on performance and reliability with commercial solvers.

$\endgroup$
8
  • 1
    $\begingroup$ I have clearly mentioned LP (not MILP ) I also know that open source solvers can't compete with commercial ones $\endgroup$ Aug 16, 2021 at 16:10
  • 3
    $\begingroup$ LP problems feature in HiGHS. If you have questions about this particular solver I'm sure @SparseRunner or @ MichaelFeldmeier would be happy to answer. $\endgroup$
    – TheSimpliFire
    Aug 16, 2021 at 18:53
  • 3
    $\begingroup$ Note also that HiGHS can easily be called from scipy.optimize.linprog. $\endgroup$
    – joni
    Aug 16, 2021 at 18:57
  • $\begingroup$ Does HiGHS link with Pyomo ? $\endgroup$ Aug 16, 2021 at 21:51
  • 1
    $\begingroup$ Any update on HiGHS-Pyomo linkage/interface ? $\endgroup$ Jul 8, 2022 at 12:54
3
$\begingroup$

If you mean by LP is referred to the linear programming (not mixed-integer linear programming), there are some open-source solvers like SoPlex and Clp which can be linked with Pyomo via Neos server but, I really do not know is there any way to connect those locally. If you meant is the mixed-integer linear programming one of the best options is SCIP, but as far as I know it's not quite free at all.

$\endgroup$
9
  • 1
    $\begingroup$ SoPlex is not opensource $\endgroup$ Aug 16, 2021 at 10:58
  • 4
    $\begingroup$ SoPlex is open source, it's just not free to use for commercial purposes. You can request its code from the developers. $\endgroup$ Aug 23, 2021 at 9:04
  • 6
    $\begingroup$ Open-source software must be free to distribute. You cannot re-distribute Soplex freely, hence it is not open-source. It just happens that the code is publicly available. $\endgroup$
    – mtanneau
    Sep 5, 2021 at 17:46
  • 1
    $\begingroup$ The HiGHS MIP solver is currently overtaking SCIP in performance - it solves more MIPLIB2017 problems in 7200s, but is not quite as fast. It's also true open-source (under the MIT License). $\endgroup$ Sep 17, 2021 at 11:59
  • 1
    $\begingroup$ @SparseRunner Is it possible to use HiGHS solver for Pyomo ? I need to solve a large LP (not MIP ) in Pyomo with an open source solver $\endgroup$ Sep 17, 2021 at 22:50
3
$\begingroup$

For large LPs you need an interior point solver.

On top of what others have mentioned, you can use CLP's interior point method, or, interestingly, just plain old IPOPT can work perfectly fine since it will also apply an interior point algorithm.

$\endgroup$
2
  • 1
    $\begingroup$ The HiGHS interior point solver is three times faster than Clp on the Mittelmann IPM benchmarks. We just don't appear publicly yet. IPOPT will be good, too. $\endgroup$ Sep 17, 2021 at 11:57
  • $\begingroup$ Do you have any update on Pyomo-HIGHS interface ? $\endgroup$ Jul 12, 2022 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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