Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a82b36f
build/pkgs/cvxpy: New pip package
mkoeppe Jun 12, 2021
7bd56e3
sage.numerical.backends.cvxpy_backend: New
mkoeppe Mar 10, 2022
1999add
src/sage/numerical/backends/cvxpy_backend.pyx: Implement MixedInteger…
mkoeppe Mar 12, 2022
cf742f7
CVXPYBackend.set_objective: Fix up
mkoeppe Mar 12, 2022
460ab69
CVXPYBackend.get_variable_value: Convert array to float, fix doctests
mkoeppe Mar 12, 2022
1688557
src/sage/numerical/backends/generic_backend.pyx: Make Cvxpy/cbc the d…
mkoeppe Mar 12, 2022
a9d2851
CVXPYBackend.add_variable: Handle coefficients
mkoeppe Mar 12, 2022
6e04252
src/sage/numerical/backends/cvxpy_backend.pyx: Increase abs tol in do…
mkoeppe Mar 12, 2022
08d7a7d
adding some code from ppl_backend.pyx to cvxpy_backend.{pyx,pxd}
sheerluck Mar 12, 2022
e00601f
CVXPYBackend.is_variable_{boolean,integer,continuous}: Implement
mkoeppe Mar 13, 2022
555ea6b
src/sage/numerical/backends/cvxpy_backend.pyx: Fix up some doctests
mkoeppe Mar 13, 2022
cded277
CVXPYBackend.objective_coefficient: Fix up
mkoeppe Mar 13, 2022
c9611aa
build/pkgs/cylp: Add patch from https://github.com/coin-or/CyLP/pull/150
mkoeppe Mar 14, 2022
ee48b3c
build/pkgs/cvxpy: Use https://github.com/cvxpy/cvxpy/pull/1707
mkoeppe Mar 14, 2022
bc60f61
build/pkgs/cylp: Add another commit from https://github.com/coin-or/C…
mkoeppe Mar 16, 2022
4d0b57b
src/sage/numerical/backends/cvxpy_backend_test.py: New
mkoeppe Mar 20, 2022
2624479
build/pkgs/cylp: Update to 0.91.5, remove patches
mkoeppe Mar 27, 2022
7a76391
build/pkgs/cvxpy/requirements.txt: Update git ref
mkoeppe Mar 27, 2022
7cf3d6f
build/pkgs/cvxpy: Make it a normal package, add dependencies qdldl_py…
mkoeppe Jul 30, 2022
f6396e1
build/pkgs/{ecos,osqp}_python: Renamed from ecos, osqp
mkoeppe Jul 30, 2022
a4fc1d5
build/pkgs/ecos_python/dependencies: Add suitesparse
mkoeppe Jul 30, 2022
dc9ed47
build/pkgs/{ecos,osqp}_python: Use --no-build-isolation
mkoeppe Jul 30, 2022
532ab01
src/sage/numerical/backends/cvxpy_backend.pyx: Make doctests pass
mkoeppe Jul 30, 2022
260eed0
build/pkgs/cylp/spkg-install.in: Use --no-build-isolation
mkoeppe Jul 30, 2022
e680333
src/sage/numerical/backends/cvxpy_backend.pyx: Store constraint names
mkoeppe Jul 30, 2022
5c0291d
src/sage/numerical/backends/cvxpy_backend.pyx: Use our column names w…
mkoeppe Jul 30, 2022
2dd0c06
src/sage/numerical/backends/cvxpy_backend.pyx: Convert lower, upper v…
mkoeppe Jul 30, 2022
188a840
src/sage/combinat/matrices/dancing_links.pyx: Make doctest more flexible
mkoeppe Jul 30, 2022
55fc4fb
build/pkgs/{cvxpy,scs,osqp_python,ecos_python,qdldl_python}: Add dist…
mkoeppe Aug 5, 2022
18e7434
build/pkgs/osqp_python/dependencies: Add cmake
mkoeppe Aug 6, 2022
11e4de8
build/pkgs/ecos_python/dependencies: Remove suitesparse
mkoeppe Aug 6, 2022
9a1eeec
build/pkgs/cylp/SPKG.rst: Add more detailed license info
mkoeppe Sep 20, 2022
b9c92ae
src/sage/numerical/backends/cvxpy_backend.pyx: Add doc for init args
mkoeppe Sep 24, 2022
5b840bd
src/sage/numerical/backends: Remove unnecessary imports, muffle unuse…
mkoeppe Sep 24, 2022
7132302
src/sage/numerical/backends: Fix copy-pasted typos in documentation (…
mkoeppe Sep 24, 2022
b5cbc5a
src/sage/numerical/backends/cvxpy_backend.pyx: Add to doc
mkoeppe Sep 24, 2022
83ce468
build/pkgs/scs/spkg-install.in: Use --no-build-isolation
mkoeppe Sep 25, 2022
539c970
src/sage/numerical/backends/cvxpy_backend.pyx: Update doctest output …
mkoeppe Sep 25, 2022
98c38c1
Merge tag '9.8.beta3' into t/34251/add_optional_package_cvxpy
mkoeppe Nov 15, 2022
7211f42
build/pkgs/cvxpy: Update to 1.2.2
mkoeppe Nov 15, 2022
7346fd1
build/pkgs/scs: Update to 3.2.2
mkoeppe Nov 15, 2022
666e973
Merge tag '9.8.beta7' into t/34251/add_optional_package_cvxpy
mkoeppe Jan 19, 2023
ba9fcbc
build/pkgs/cvxpy: Update to 1.3.0
mkoeppe Jan 19, 2023
7515564
build/pkgs/osqp_python: Update to 0.6.2.post8
mkoeppe Jan 19, 2023
91cbc21
build/pkgs/ecos_python: Update to 2.0.12
mkoeppe Jan 19, 2023
7ff5766
build/pkgs/qdldl_python: Update to 0.1.5.post3
mkoeppe Jan 19, 2023
92a2a58
Merge remote-tracking branch 'upstream/develop' into t/34251/add_opti…
mkoeppe Feb 13, 2023
9aaf463
Merge branch 'develop' into t/34251/add_optional_package_cvxpy
dimpase Feb 20, 2023
c28b396
Merge remote-tracking branch 'upstream/develop' into t/34251/add_opti…
mkoeppe Mar 19, 2023
9f75342
src/sage/numerical/backends/cvxpy_backend.pyx: Fix for linter
mkoeppe Mar 19, 2023
0324f53
remove unicode
dimpase Mar 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions build/pkgs/cvxpy/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cvxpy: A domain-specific language for modeling convex optimization problems in Python.
======================================================================================

Description
-----------

A domain-specific language for modeling convex optimization problems in Python.

License
-------

Apache License, Version 2.0

Upstream Contact
----------------

https://pypi.org/project/cvxpy/

5 changes: 5 additions & 0 deletions build/pkgs/cvxpy/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=cvxpy-VERSION.tar.gz
sha1=8c87f8f8c2177f917ec2fad7d2b510787ffdf72d
md5=408b0a3140750299207f61de95b4ed6e
cksum=3643150234
upstream_url=https://pypi.io/packages/source/c/cvxpy/cvxpy-VERSION.tar.gz
4 changes: 4 additions & 0 deletions build/pkgs/cvxpy/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$(PYTHON) numpy scipy glpk cvxopt osqp_python ecos_python scs | $(PYTHON_TOOLCHAIN)

----------
All lines of this file are ignored except the first.
1 change: 1 addition & 0 deletions build/pkgs/cvxpy/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cvxpy
1 change: 1 addition & 0 deletions build/pkgs/cvxpy/install-requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cvxpy
1 change: 1 addition & 0 deletions build/pkgs/cvxpy/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.3.0
3 changes: 3 additions & 0 deletions build/pkgs/cvxpy/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd src
# --no-build-isolation to ignore the numpy version pin in pyproject.toml
sdh_pip_install --no-build-isolation .
1 change: 1 addition & 0 deletions build/pkgs/cvxpy/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
6 changes: 5 additions & 1 deletion build/pkgs/cylp/SPKG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ A Python interface for CLP, CBC, and CGL
License
-------

Eclipse Public License
Eclipse Public License (EPL) version 2 (without a Secondary Licenses Notice).

Note: This license is incompatible with the GPL according to
https://www.gnu.org/licenses/license-list.html#EPL2;
see also the discussion in :trac:`26511`.

Upstream Contact
----------------
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/cylp/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=cylp-VERSION.tar.gz
sha1=54965f2ae9b914df7817dffd53bc34925a6fadd4
md5=a4f50e6b24a7fcd2e890a9e7e8825437
cksum=4132703858
sha1=1c2d20933abc48ed2fefc1ae45d8f9492fc2eef2
md5=ac0308a916dac5dd84f831dbc0fba5c5
cksum=1532166313
upstream_url=https://pypi.io/packages/source/c/cylp/cylp-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/cylp/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.91.4
0.91.5
88,285 changes: 0 additions & 88,285 deletions build/pkgs/cylp/patches/e619c4b94e279e96842da0d38ae657f06f1e9415.patch

This file was deleted.

4 changes: 2 additions & 2 deletions build/pkgs/cylp/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cd src
#export CYLP_USE_CYTHON=1
# use pkg-config to discover coin installation
unset COIN_INSTALL_DIR
sdh_pip_install .
# --no-build-isolation to ignore the numpy version pin in pyproject.toml
sdh_pip_install --no-build-isolation .
20 changes: 20 additions & 0 deletions build/pkgs/ecos_python/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ecos_python: Embedded Cone Solver (Python wrapper)
==================================================

Description
-----------

This is the Python package for ECOS: Embedded Cone Solver.

It vendors ECOS.

License
-------

GPLv3

Upstream Contact
----------------

https://pypi.org/project/ecos/

5 changes: 5 additions & 0 deletions build/pkgs/ecos_python/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=ecos-VERSION.tar.gz
sha1=7afce63aec44522052e05fa2e1c82e12fe20fd45
md5=a76939695aa07f8ab2f01a532732f348
cksum=2810151369
upstream_url=https://pypi.io/packages/source/e/ecos/ecos-VERSION.tar.gz
4 changes: 4 additions & 0 deletions build/pkgs/ecos_python/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$(PYTHON) numpy scipy | $(PYTHON_TOOLCHAIN)

----------
All lines of this file are ignored except the first.
1 change: 1 addition & 0 deletions build/pkgs/ecos_python/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ecos
1 change: 1 addition & 0 deletions build/pkgs/ecos_python/install-requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ecos
1 change: 1 addition & 0 deletions build/pkgs/ecos_python/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.0.12
3 changes: 3 additions & 0 deletions build/pkgs/ecos_python/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd src
# --no-build-isolation to ignore the numpy version pin in pyproject.toml
sdh_pip_install --no-build-isolation .
1 change: 1 addition & 0 deletions build/pkgs/ecos_python/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
20 changes: 20 additions & 0 deletions build/pkgs/osqp_python/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
osqp_python: The Operator Splitting QP Solver (Python wrapper)
==============================================================

Description
-----------

This is the Python wrapper for OSQP: The Operator Splitting QP Solver.

It vendors OSQP.

License
-------

Apache 2.0

Upstream Contact
----------------

https://pypi.org/project/osqp/

5 changes: 5 additions & 0 deletions build/pkgs/osqp_python/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=osqp-VERSION.tar.gz
sha1=d69d05b87c03aaaf80ac0bb11e1a68746cf8c486
md5=ae46dc55aa4ff7a2009db756f2b61d98
cksum=2780901429
upstream_url=https://pypi.io/packages/source/o/osqp/osqp-VERSION.tar.gz
4 changes: 4 additions & 0 deletions build/pkgs/osqp_python/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$(PYTHON) qdldl_python numpy scipy | $(PYTHON_TOOLCHAIN) cmake

----------
All lines of this file are ignored except the first.
1 change: 1 addition & 0 deletions build/pkgs/osqp_python/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
osqp
1 change: 1 addition & 0 deletions build/pkgs/osqp_python/install-requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
osqp
1 change: 1 addition & 0 deletions build/pkgs/osqp_python/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.6.2.post8
3 changes: 3 additions & 0 deletions build/pkgs/osqp_python/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd src
# --no-build-isolation to ignore the numpy version pin in pyproject.toml
sdh_pip_install --no-build-isolation .
1 change: 1 addition & 0 deletions build/pkgs/osqp_python/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
18 changes: 18 additions & 0 deletions build/pkgs/qdldl_python/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
qdldl_python: QDLDL, a free LDL factorization routine (Python wrapper)
======================================================================

Description
-----------

QDLDL, a free LDL factorization routine.

License
-------

Apache 2.0

Upstream Contact
----------------

https://pypi.org/project/qdldl/

5 changes: 5 additions & 0 deletions build/pkgs/qdldl_python/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=qdldl-VERSION.tar.gz
sha1=af76c57ca1787f5e44e42f6c9f916b84ae599f1f
md5=63d719bd8073c1661a1baa6b510b8aad
cksum=105675620
upstream_url=https://pypi.io/packages/source/q/qdldl/qdldl-VERSION.tar.gz
4 changes: 4 additions & 0 deletions build/pkgs/qdldl_python/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$(PYTHON) pybind11 numpy scipy | $(PYTHON_TOOLCHAIN) cmake

----------
All lines of this file are ignored except the first.
1 change: 1 addition & 0 deletions build/pkgs/qdldl_python/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
qdldl-python
1 change: 1 addition & 0 deletions build/pkgs/qdldl_python/install-requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
qdldl
1 change: 1 addition & 0 deletions build/pkgs/qdldl_python/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.5.post3
2 changes: 2 additions & 0 deletions build/pkgs/qdldl_python/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd src
sdh_pip_install .
1 change: 1 addition & 0 deletions build/pkgs/qdldl_python/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
18 changes: 18 additions & 0 deletions build/pkgs/scs/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
scs: Splitting conic solver
===========================

Description
-----------

scs: splitting conic solver

License
-------

MIT

Upstream Contact
----------------

https://pypi.org/project/scs/

5 changes: 5 additions & 0 deletions build/pkgs/scs/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=scs-VERSION.tar.gz
sha1=309a035e5031f7a51c4992d5ad6c9236a406adc2
md5=c984027aea923fa88e2f73c61bc06dd0
cksum=1688898932
upstream_url=https://pypi.io/packages/source/s/scs/scs-VERSION.tar.gz
4 changes: 4 additions & 0 deletions build/pkgs/scs/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$(PYTHON) numpy | $(PYTHON_TOOLCHAIN) cmake

----------
All lines of this file are ignored except the first.
1 change: 1 addition & 0 deletions build/pkgs/scs/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scs
1 change: 1 addition & 0 deletions build/pkgs/scs/install-requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scs
1 change: 1 addition & 0 deletions build/pkgs/scs/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.2
3 changes: 3 additions & 0 deletions build/pkgs/scs/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd src
# --no-build-isolation to ignore the numpy version pin in pyproject.toml
sdh_pip_install --no-build-isolation .
1 change: 1 addition & 0 deletions build/pkgs/scs/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
4 changes: 2 additions & 2 deletions src/sage/combinat/matrices/dancing_links.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ cdef class dancing_linksWrapper:
sage: d = dlx_solver(rows)
sage: p,x = d.to_milp()
sage: p
Boolean Program (no objective, 4 variables, 4 constraints)
Boolean Program (no objective, 4 variables, ... constraints)
sage: x
MIPVariable with 4 binary components

Expand All @@ -1041,7 +1041,7 @@ cdef class dancing_linksWrapper:
Maximization:
<BLANKLINE>
<BLANKLINE>
Constraints:
Constraints:...
one 1 in 0-th column: 1.0 <= x_0 + x_1 <= 1.0
one 1 in 1-th column: 1.0 <= x_0 + x_2 <= 1.0
one 1 in 2-th column: 1.0 <= x_0 + x_1 <= 1.0
Expand Down
40 changes: 40 additions & 0 deletions src/sage/numerical/backends/cvxpy_backend.pxd
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
##############################################################################
# Copyright (C) 2010 Nathann Cohen <[email protected]>
# Copyright (C) 2022 Matthias Koeppe <[email protected]>
# Distributed under the terms of the GNU General Public License (GPL)
# The full text of the GPL is available at:
# http://www.gnu.org/licenses/
##############################################################################

from sage.numerical.backends.generic_backend cimport GenericBackend

cdef class CVXPYBackend(GenericBackend):

cdef object variables
cdef object problem
cdef object prob_name
cdef object constraint_names

cdef object _cvxpy_solver
cdef object _cvxpy_solver_args

cdef list objective_coefficients
cdef list Matrix

cdef list row_lower_bound
cdef list row_upper_bound
cdef list col_lower_bound
cdef list col_upper_bound

cpdef int add_variable(self,
lower_bound=*,
upper_bound=*,
binary=*,
continuous=*,
integer=*,
obj=*,
name=*,
coefficients=*) \
except -1

cpdef cvxpy_problem(self)
Loading