Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
69d1207
Merge origin/master into base-model
Joao-Dionisio Nov 12, 2026
e9b3e1a
Add ExactModel skeleton and move the exact LP classes to exact.pxi
Joao-Dionisio Nov 12, 2026
92b5d6a
Apply batched suggestions from code review
Joao-Dionisio Nov 12, 2026
508ac8d
Move BaseModel to basemodel.pxi
Joao-Dionisio Nov 12, 2026
0316de4
Move getConsVars to BaseModel
Joao-Dionisio Nov 13, 2026
39c094f
Export ExactModel with the exact LP operations and deprecate the Mode…
Joao-Dionisio Nov 13, 2026
b322c8e
Add exact wrapper subclasses chosen by the factories, with value gett…
Joao-Dionisio Nov 13, 2026
a644918
Spell out the floating-point markers and source paths in the base-mod…
Joao-Dionisio Nov 15, 2026
df410c5
Move the Benders methods to Model
Joao-Dionisio Nov 15, 2026
10e9029
Move the fp LP, probing LP and IIS methods to Model and add raising c…
Joao-Dionisio Nov 15, 2026
b1d99bb
Move isLPSolBasic to Model and format the stub file
Joao-Dionisio Nov 15, 2026
194be26
Move the methods SCIP cannot serve in exact mode to Model
Joao-Dionisio Nov 15, 2026
80c2844
Drop the pinned BaseModel method list
Joao-Dionisio Nov 15, 2026
a9d91c3
Merge remote-tracking branch 'origin/master' into base-model
Joao-Dionisio Nov 20, 2026
794dc9e
Return SCIP_RESULT from ExactModel.branchLP, document inherited Model…
Joao-Dionisio Nov 20, 2026
780b0e6
Move addConss/addMatrixCons/getObjVal to Model and solution print/wri…
Joao-Dionisio Nov 22, 2026
8fdadb7
Move the copy constructor (sourceModel and copy options) from BaseMod…
Joao-Dionisio Nov 22, 2026
0ed6c44
Move Python plugin include methods to Model, explain Model-only attri…
Joao-Dionisio Nov 22, 2026
f7162f1
Raise on Model.enableExactSolving(True), wrap exact SCIP instances as…
Joao-Dionisio Nov 22, 2026
6593b8e
Forbid instantiating BaseModel directly, reword Model/BaseModel/Exact…
Joao-Dionisio Nov 22, 2026
8f7130a
Merge branch 'master' into base-model
Joao-Dionisio Nov 22, 2026
ddfe881
Enable exact solving in ExactModel.__init__ instead of a BaseModel hook
Joao-Dionisio Nov 25, 2026
ea799ee
Apply batched suggestions from code review
Joao-Dionisio Nov 25, 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased
### Added
- Added `ExactModel`, which enables SCIP's exact solving mode on construction, and the new types `ExactVariable`, `ExactSolution`, `ExactEvent` and `ExactBoundChange`. Full support for exact solving should come in the next major release.
- Added the following methods with tests: `nodesSharePath()`, `nodesGetCommonAncestor()`, `getFocusDepth()`, `getRootNode()`, `wasNodeLastBranchParent()`
- Added `getCountedSols()` to retrieve the solutions collected by `count()` (#906)
- Added docstrings to the bundled stubs in release wheels for Python 3.10 and later.
Expand All @@ -19,6 +20,8 @@
### Changed
- Replaced SCIP constant classes with `IntEnum` and `IntFlag`, including enum return values and type annotations (#1286).
- Speed up enum-returning getters and plugin callbacks with precomputed lookup tables
- Deprecated `Model.enableExactSolving()`, `Model.isExact()`, `Model.allowNegSlackExact()`, `Model.branchLPExact()` and `Model.addRowExact()`
- Split `Model` into `BaseModel` (methods shared with exact solving) and `Model(BaseModel)` (floating-point methods). The public-facing `Model` is unchanged, `BaseModel` is only used internally.
- Replaced `format()` with f-strings in examples
- Refactor general expression conversion into per-class `to_scip_expr` recursion
- Made expression fields read-only to prevent accidental runtime modification
Expand Down
3 changes: 2 additions & 1 deletion docs/api/model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Model API
#########

.. autoclass:: pyscipopt.Model
:members:
:members:
:inherited-members:
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
6 changes: 6 additions & 0 deletions src/pyscipopt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@

# export user-relevant objects:
from pyscipopt.Multidict import multidict as multidict
from pyscipopt.scip import BaseModel as BaseModel
Comment thread
Joao-Dionisio marked this conversation as resolved.
Resolved
from pyscipopt.scip import Model as Model
from pyscipopt.scip import ExactModel as ExactModel
from pyscipopt.scip import ExactVariable as ExactVariable
from pyscipopt.scip import ExactSolution as ExactSolution
from pyscipopt.scip import ExactEvent as ExactEvent
from pyscipopt.scip import ExactBoundChange as ExactBoundChange
from pyscipopt.scip import Variable as Variable
from pyscipopt.scip import MatrixVariable as MatrixVariable
from pyscipopt.scip import Constraint as Constraint
Expand Down
Loading
Loading