Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
cd8baaa
Adapt to SCIP 11 API changes and add symmetry handler plugin
Joao-Dionisio Oct 8, 2026
446ce29
Adjust tests for SCIP 11 behaviour changes
Joao-Dionisio Oct 8, 2026
998cd19
Add support for exact solving
Joao-Dionisio Oct 10, 2026
bb6d190
Simplify rational cleanup in exact methods
Joao-Dionisio Oct 10, 2026
8714af4
Guard float setters and invalid values in exact mode
Joao-Dionisio Oct 13, 2026
46677e2
Drop redundant exact checks and deprecated implint type
Joao-Dionisio Oct 13, 2026
b2659cd
Adjust exact solution test to SCIP master behaviour
Joao-Dionisio Oct 24, 2026
3554c10
Move exact helpers and exact LP classes to exact.pxi
Joao-Dionisio Oct 24, 2026
6226e79
Add ExactModel with exact variable setters
Joao-Dionisio Oct 24, 2026
becac9d
Add ExactVariable with rational getters
Joao-Dionisio Oct 24, 2026
bdf44db
Override bound, fixing, aggregation and dive methods on ExactModel
Joao-Dionisio Oct 24, 2026
77f9726
Override objective offset and linear constraint methods on ExactModel
Joao-Dionisio Oct 25, 2026
4164bb5
Override solution, bound and statistics methods on ExactModel
Joao-Dionisio Oct 25, 2026
ad18a27
Finish ExactModel API: plugin methods, stubs and changelog
Joao-Dionisio Oct 25, 2026
7d265b5
Reject setObjlimit on ExactModel
Joao-Dionisio Oct 25, 2026
6ebe175
Make ExactModel numeric helpers exact: zero tolerance, inf, Fraction …
Joao-Dionisio Oct 25, 2026
f238fbb
Return RowExact from ExactModel.getRowLinear; add RowExact/ColumnExac…
Joao-Dionisio Oct 25, 2026
3fba037
Drop stubs/todo entry only reported by mypy 1.19; CI's mypy 2.x does …
Joao-Dionisio Oct 25, 2026
c3af97f
Document removed 6.0.0 exact methods and the RowExact/ColumnExact get…
Joao-Dionisio Oct 25, 2026
6582d28
Detect infinity explicitly in _asRational instead of catching Overflo…
Joao-Dionisio Oct 25, 2026
f585e67
Drop string rational inputs; convert with Fraction directly and compa…
Joao-Dionisio Oct 25, 2026
97f5ccd
Split Model into BaseModel and Model, moving fp-only methods and Colu…
Joao-Dionisio Nov 5, 2026
a2fda0e
Pin the BaseModel surface and lint it for fp markers and Model-only c…
Joao-Dionisio Nov 5, 2026
7e2bf79
Split the Model stub into BaseModel and Model
Joao-Dionisio Nov 5, 2026
e7e42d2
Move getBipartiteGraphRepresentation, copyLargeNeighborhoodSearch and…
Joao-Dionisio Nov 5, 2026
27ad996
Merge branch 'base-model' into exact-solving so ExactModel subclasses…
Joao-Dionisio Nov 5, 2026
76a9f6d
Merge remote-tracking branch 'origin/master' into scip11
Joao-Dionisio Nov 5, 2026
e10edf2
Merge branch 'scip11' into exact-solving
Joao-Dionisio Nov 5, 2026
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
- `Expr` and `GenExpr` support `__pos__` magic method like `+Expr` or `+GenExpr`
- Added type annotations to most methods on the `Model` class
- Added tests for `getRowLinear()` and extended existing testing for `isActive()`
- Added `ExactModel` and `ExactVariable` for exact (rational) solving with SCIP 11; their ordinary methods take and return `Fraction`s, and `RowExact`/`ColumnExact` gained getters
### Fixed
- Fixed Cython 3.3 compatibility (#1248)
- Made `test_markDoNotAggrVar_and_getStatus` robust to SCIP presolve changes by discovering the aggregated/multi-aggregated variables instead of hardcoding them
Expand All @@ -42,6 +43,7 @@
- Extended `structured_optimization_trace` recipe to support context-managed JSONL tracing with final `run_end` records, alongside the existing attach-style in-memory tracing.
- Integration tests now run in the merge queue before merging instead of after pushing to `master` (#1249)
### Removed
- Removed `Model.enableExactSolving()`, `Model.isExact()`, `Model.allowNegSlackExact()`, `Model.branchLPExact()` and `Model.addRowExact()`; use `ExactModel`, which exposes the last three as `allowNegSlack()`, `branchLP()` and `addRow()`
- `SumExpr`.coefs has been removed; its values were always 1.0 (#1258)
- Deprecated `getOp` method in `GenExpr` (#1259)
- Deprecated inner enumerate class `Operator` (#1259)
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ class StubGenerator:
# Classes that should have @disjoint_base decorator
# These are user-facing classes that should not be structurally compatible
DISJOINT_BASE_CLASSES = {
'Benders', 'Benderscut', 'BoundChange', 'Branchrule', 'Column', 'ColumnExact',
'BaseModel', 'Benders', 'Benderscut', 'BoundChange', 'Branchrule', 'Column', 'ColumnExact',
'Conshdlr', 'Constant', 'Constraint', 'Cutsel', 'DomainChanges', 'Event',
'Eventhdlr', 'Expr', 'ExprCons', 'GenExpr', 'Heur', 'IIS', 'IISfinder',
'LP', 'Model', 'NLRow', 'Node', 'Nodesel', 'PowExpr', 'Presol', 'Pricer',
'LP', 'NLRow', 'Node', 'Nodesel', 'PowExpr', 'Presol', 'Pricer',
'ProdExpr', 'Prop', 'Reader', 'Relax', 'Row', 'RowExact', 'Sepa', 'Solution',
'SumExpr', 'Term', 'UnaryExpr', 'Variable', '_VarArray',
}
Expand Down
5 changes: 5 additions & 0 deletions src/pyscipopt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

# export user-relevant objects:
from pyscipopt.Multidict import multidict as multidict
from pyscipopt.scip import BaseModel as BaseModel
from pyscipopt.scip import Model as Model
from pyscipopt.scip import ExactModel as ExactModel
from pyscipopt.scip import ExactVariable as ExactVariable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a separate variable type?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the variable? Because I felt like there were enough differing methods to justify this, and that's not the case with the other stuff.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just to tidy things up more nicely.

from pyscipopt.scip import Variable as Variable
from pyscipopt.scip import MatrixVariable as MatrixVariable
from pyscipopt.scip import Constraint as Constraint
Expand All @@ -25,6 +28,8 @@
from pyscipopt.scip import Prop as Prop
from pyscipopt.scip import Reader as Reader
from pyscipopt.scip import Sepa as Sepa
from pyscipopt.scip import Symhdlr as Symhdlr
from pyscipopt.scip import SymComp as SymComp
from pyscipopt.scip import LP as LP
from pyscipopt.scip import IISfinder as IISfinder
from pyscipopt.scip import PY_SCIP_LPPARAM as SCIP_LPPARAM
Expand Down
2 changes: 1 addition & 1 deletion src/pyscipopt/benders.pxi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##@file benders.pxi
#@brief Base class of the Benders decomposition Plugin
cdef class Benders:
cdef public Model model
cdef public BaseModel model
cdef public str name
cdef SCIP_BENDERS* _benders

Expand Down
2 changes: 1 addition & 1 deletion src/pyscipopt/benderscut.pxi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##@file benderscut.pxi
#@brief Base class of the Benderscut Plugin
cdef class Benderscut:
cdef public Model model
cdef public BaseModel model
cdef public Benders benders
cdef public str name

Expand Down
2 changes: 1 addition & 1 deletion src/pyscipopt/branchrule.pxi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##@file branchrule.pxi
#@brief Base class of the Branchrule Plugin
cdef class Branchrule:
cdef public Model model
cdef public BaseModel model

def branchfree(self):
'''frees memory of branching rule'''
Expand Down
2 changes: 1 addition & 1 deletion src/pyscipopt/conshdlr.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#@brief base class of the Constraint Handler plugin

cdef class Conshdlr:
cdef public Model model
cdef public BaseModel model
cdef public str name

def consfree(self):
Expand Down
2 changes: 1 addition & 1 deletion src/pyscipopt/cutsel.pxi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##@file cutsel.pxi
#@brief Base class of the Cutsel Plugin
cdef class Cutsel:
cdef public Model model
cdef public BaseModel model

def cutselfree(self):
'''frees memory of cut selector'''
Expand Down
2 changes: 1 addition & 1 deletion src/pyscipopt/event.pxi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##@file event.pxi
#@brief Base class of the Event Handler Plugin
cdef class Eventhdlr:
cdef public Model model
cdef public BaseModel model
cdef public str name
# eventtypes caught via `Model.catchEvent`, auto-dropped on `eventexit`.
cdef list _caught_events
Expand Down
Loading