-
-
Notifications
You must be signed in to change notification settings - Fork 674
Description
(split out from #31962)
We add cvxpy
for disciplined convex programming and extensions as an optional package.
- cvxpy (home · repo · releases · PyPI)
- It can call many backend solvers -- including most that we currently have as MIP backends, so it may be suitable as a replacement for our homegrown backend code
- Promising route to add support for the HiGHS LP/MIP solvers via the scipy cython interface to their vendored HiGHS
- supports differentiable programming
- PR: CBC.solve_via_data: Work around broken CyLP infeasibility detection cvxpy/cvxpy#1703 - Work around broken CyLP infeasibility detection
We add a new MIP backend solver="CVXPY"
. Using solver="CVXPY/ECOS"
, solver="CVXPY/GLPK"
, etc., CVXPY can be asked to use a specific solver.
When also cylp
is installed (from #33487, upgraded here), the new solver backend "CVXPY/CBC"
becomes the default (unless Gurobi or CPLEX are available), thus replacing the similar functionality of the CBC backend provided by sage_numerical_backend_coin
.
Details about dependencies: Requirements listed in
cvxpy's setup.py:
python_requires='>=3.6',
install_requires=["osqp >= 0.4.1",
"ecos >= 2",
"scs >= 1.1.6",
"numpy >= 1.15",
"scipy >= 1.1.0"],
So the new dependencies are:
- osqp (operator splitting quadratic program) (home · repo · PyPI)
- ecos (embedded conic solver) (repo · PyPI)
- SCS (splitting conic solver) (repo · PyPI)
In addition, osqp's requirements.txt lists:
numpy >= 1.7
, scipy >= 0.13.2
, qdldl
which adds:
Finally, qldl-python depends on pybind11 (already an SPKG)
See also:
- Meta-ticket: Use Python optimization interfaces: CVXPY, SCIP, or-tools, PuLP, Pyomo, cylp... #26511 Meta-ticket: Use Python optimization interfaces: PuLP, Pyomo, cylp...
- Package ortools #33493 package ortools - provides some more backends
Follow-ups:
- Upgrade optional package cbc to 2.10.x, remove sage_numerical_backends_coin #30644 Remove
sage_numerical_backends_coin
, Upgrade optional package cbc to 2.10.7
Depends on #34228
CC: @dimpase @yuan-zhou @sheerluck @dcoudert @seblabbe @maxale @kiwifb @isuruf @tkralphs
Component: packages: optional
Author: Matthias Koeppe, Andrey Belgorodski
Reviewer: Martin Pépin
Issue created by migration from https://trac.sagemath.org/ticket/34251