Skip to content

Add optional package cvxpy, update cylp, add CVXPY MIP backend #34251

@mkoeppe

Description

@mkoeppe

(split out from #31962)

We add cvxpy for disciplined convex programming and extensions as an optional package.

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:

  • qldl-python (interface to QDLDL, to factor quasi-definite linear systems) (repo · PyPI)

Finally, qldl-python depends on pybind11 (already an SPKG)

See also:

Follow-ups:

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions