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)
- 1,895
- 2
- 13
- 39
- 1,326
- 1
- 6
- 20
-
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. – ErlingMOSEK Aug 16 '21 at 07:42
-
2Did 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). – Erwin Kalvelagen Aug 16 '21 at 12:50
-
1A 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. – SparseRunner Sep 17 '21 at 12:02
4 Answers
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.
- 3,188
- 8
- 24
-
1I have clearly mentioned LP (not MILP ) I also know that open source solvers can't compete with commercial ones – Optimization team Aug 16 '21 at 16:10
-
3LP problems feature in HiGHS. If you have questions about this particular solver I'm sure @SparseRunner or @ MichaelFeldmeier would be happy to answer. – ə̷̶̸͇̘̜́̍͗̂̄︣͟ Aug 16 '21 at 18:53
-
3
-
-
Someone has been developing a Pyomo interface to HiGHS. We suggested that they make it available via the Pyomo community. I'm in the process of tracking down whether this has happened. – SparseRunner Sep 17 '21 at 11:56
-
Not open-source mip solver but I was able to model mip problem in cp-sat solver and performance was slower but comparable to gurobi solver. Of course I was maybe lucky but no free mip solver was able to compete. Maybe users should give a try to other types of solvers (sat, constraint solvers ...). – gregy4 Jan 12 '22 at 16:44
-
1
-
Is there a resource/tutorial on how one can use such a solver having just theoretical background on LP? I have use solvers like MOSEK and Gurobi indirectly by formulating my problem in Python or Julia but its highly non-trivial how to use HiGHS. – Marion Sep 27 '22 at 23:15
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.
- 4,007
- 6
- 21
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.
- 8,832
- 2
- 13
- 49
-
1
-
4SoPlex is open source, it's just not free to use for commercial purposes. You can request its code from the developers. – Nikos Kazazakis Aug 23 '21 at 09:04
-
6Open-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. – mtanneau Sep 05 '21 at 17:46
-
1The 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). – SparseRunner Sep 17 '21 at 11:59
-
The HiGHS simplex solver is significantly faster than Soplex and, for normal LP problems, is about as fast as Clp. – SparseRunner Sep 17 '21 at 12:00
-
1@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 – Optimization team Sep 17 '21 at 22:50
-
Almost. A prototype Pyomo-HiGHS interface has been written, and yesterday I was in touch with Pyomo about it. There is a clear desire to write a good Pyomo-HiGHS interface, so it will happen in time. Maybe not soon enough for you! – SparseRunner Sep 18 '21 at 23:35
-
1@SparseRunner Do you have any update on Pyomo-HIGHS interface ? – Optimization team Jul 12 '22 at 09:01
-
pip install highspy now works on MacOS and Linux, a major step towards a Pyomo-HiGHS interface – SparseRunner Sep 23 '22 at 15:43
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.
- 12,121
- 17
- 59
-
1The 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. – SparseRunner Sep 17 '21 at 11:57
-