Skip to content

Commit 6ac9397

Browse files
mmghannamOpt-MuccaJoao-Dionisio
authored
Expose Matrix types (#959)
* Create branch * start of tests * Added extra dimension * Update tests * First working test * First working test * Expr from matrix variables test * Working version of ExprCons with le * Can now add linear matrix constraints * More robust Matrix classes * add todo * Clean up addMatrixCons function * Add MatrixVar methods * Update TODOs * Add getter functions to matrixConstraint class@ git push * Add checks for missing numpy * Add matrix API to readthedocs * Add minor grammar stuff. Add GCG to similar software * Remove universal build. Add type asserts * Update pipelines to include numpy * Add numpy as a dependency * Remove cimports for now * Support adding MatrixExprCons in addConss * Changed tests a bit * Support querying solution values using MatrixExpr * Add a test * Remove SCIP bug from tests. Already reported * Update CHANGELOG * Add info for 5.4.0 release * Make numpy a dependency (not just at build time) * Most comments addressed * Add test for documentation * Fix documentation * Add solution value accessing to docs * Format test file * Update docs/tutorials/matrix.rst Co-authored-by: Mohammed Ghannam <ghannam@zib.de> * Update docs/tutorials/matrix.rst Co-authored-by: Mohammed Ghannam <ghannam@zib.de> * Expose Matrix types --------- Co-authored-by: Mark Turner <turner@zib.de> Co-authored-by: Joao-Dionisio <up201606210@up.pt> Co-authored-by: Mark Turner <64978342+Opt-Mucca@users.noreply.github.com> Co-authored-by: João Dionísio <57299939+Joao-Dionisio@users.noreply.github.com>
1 parent a0165ec commit 6ac9397

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
### Changed
77
### Removed
88

9-
## 5.4.0 - 2024.02.24
9+
## 5.4.1 - 2024.02.24
1010
### Added
1111
- Added option to get Lhs, Rhs of nonlinear constraints
1212
- Added cutoffNode and test

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
print("Assuming that SCIP is installed globally, because SCIPOPTDIR is undefined.\n")
2020

2121
else:
22+
2223
# check whether SCIP is installed in the given directory
2324
if os.path.exists(os.path.join(scipoptdir, "include")):
2425
includedir = os.path.abspath(os.path.join(scipoptdir, "include"))
@@ -108,7 +109,7 @@
108109

109110
setup(
110111
name="PySCIPOpt",
111-
version="5.4.0",
112+
version="5.4.1",
112113
description="Python interface and modeling environment for SCIP",
113114
long_description=long_description,
114115
long_description_content_type="text/markdown",

src/pyscipopt/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
from pyscipopt.Multidict import multidict
1111
from pyscipopt.scip import Model
1212
from pyscipopt.scip import Variable
13+
from pyscipopt.scip import MatrixVariable
1314
from pyscipopt.scip import Constraint
15+
from pyscipopt.scip import MatrixConstraint
1416
from pyscipopt.scip import Benders
1517
from pyscipopt.scip import Benderscut
1618
from pyscipopt.scip import Branchrule
@@ -26,6 +28,9 @@
2628
from pyscipopt.scip import LP
2729
from pyscipopt.scip import readStatistics
2830
from pyscipopt.scip import Expr
31+
from pyscipopt.scip import MatrixExpr
32+
from pyscipopt.scip import MatrixExprCons
33+
from pyscipopt.scip import ExprCons
2934
from pyscipopt.scip import quicksum
3035
from pyscipopt.scip import quickprod
3136
from pyscipopt.scip import exp

src/pyscipopt/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '5.4.0'
1+
__version__ = '5.4.1'

tests/test_matrix_variable.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pprint
33
import pytest
44
from pyscipopt import Model, Variable, log, exp, cos, sin, sqrt
5-
from pyscipopt.scip import Expr, MatrixExpr, MatrixVariable, MatrixExprCons, MatrixConstraint, ExprCons
5+
from pyscipopt import Expr, MatrixExpr, MatrixVariable, MatrixExprCons, MatrixConstraint, ExprCons
66
from time import time
77

88
import numpy as np

0 commit comments

Comments
 (0)