scipopt / PySCIPOpt

Python interface for the SCIP Optimization Suite
https://pyscipopt.readthedocs.io/en/latest/
MIT License
810 stars 252 forks source link

feat: pyscipopt for poor dummy laymans #786

Closed dzmitry-lahoda closed 7 months ago

dzmitry-lahoda commented 9 months ago

Is your feature request related to a problem? Please describe.

I want solver magic, free, easy to install, solve any numbers

Describe the solution you'd like

Free. Use SCIP with IPOPT MUMPS instead of HSL or other proprietary libs.

Dummy. Static compile with GMP to allow solutions on various numbers, and optimization after.

Layman. Cannot easy built all, so please publish it to PyPi by default.

Opt-Mucca commented 9 months ago

So to clarify: You want GMP shipped with the default SCIP through pip install pyscipopt? This should be manageable for Linux / Mac (Windows is the one that is probably an issue)

dzmitry-lahoda commented 9 months ago

Linux x86_64 (Debian) pip install pyscipopt (deployed here https://pypi.org/project/PySCIPOpt/ or under alternative name on PyPi). Better under same package name, so CVXPY can use it without rebinding to new name.

GMP enabled in SCIP and SOPLEX - yes.

IPOPT enabled with MUMPS - yes.

IPOPT for NLP.

MUMPS because of good licence and way to get code into Docker/VM/CI/Nix package super easy automatically.

dzmitry-lahoda commented 9 months ago

IPOPT depends on

A sparse symmetric indefinite linear solver. Ipopt needs to obtain the solution of sparse, symmetric, indefinite linear systems, and for this it relies on third-party code.

Currently, the following linear solvers can be used:

MA27 from the [HSL Mathematical Software Library](http://www.hsl.rl.ac.uk/)
MA57 from the [HSL Mathematical Software Library](http://www.hsl.rl.ac.uk/)
HSL_MA77 from the [HSL Mathematical Software Library](http://www.hsl.rl.ac.uk/)
HSL_MA86 from the [HSL Mathematical Software Library](http://www.hsl.rl.ac.uk/)
HSL_MA97 from the [HSL Mathematical Software Library](http://www.hsl.rl.ac.uk/)
[MUMPS](http://mumps.enseeiht.fr/) (MUltifrontal Massively Parallel sparse direct Solver)
PARDISO (Parallel Sparse Direct Solver) from [Pardiso Project](http://www.pardiso-project.org/) or Intel MKL. Note that current versions from Pardiso Project typically offer much better performance than the one from Intel MKL.
[SPRAL](https://github.com/ralna/spral) (Sparse Parallel Robust Algorithms Library)
[WSMP](http://researcher.ibm.com/view_project.php?id=1426) (Watson Sparse Matrix Package)

From these, only SPRAL and MUMPS are suited for autobuild and deploy. HSL,WSMP, PARADISO not.

Default IPOPT checks for HSL.

Opt-Mucca commented 9 months ago

The current shipped build should have everything that you listed but GMP. We're currently preparing for the release of SCIP 9.0, and I will organise the new PyPI upload when that is done (and add GMP to the shipped version). This will probably take a few weeks

Opt-Mucca commented 7 months ago

@dzmitry-lahoda We just uploaded a new version to PyPI that includes GMP and SCIP 9.0.0. Can you check if this works for you?

dzmitry-lahoda commented 7 months ago

Hello @Opt-Mucca, Thank you . I installed new version and run against our cases. Our code works. At least I noticed some cases were infeasible on 4.4.0, become feasible (so all such cases are really feasible if count on fingers). Not yet seen GMP warnings yet, will update it see any.