Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2da8fa6
Annotate straightforward PySCIPOpt stub APIs
jonathanberthias Oct 2, 2026
097dfbb
Annotate constraint inputs and solution indexing
jonathanberthias Oct 2, 2026
2e21447
Annotate LP row and column mutation APIs
jonathanberthias Oct 2, 2026
daa3504
Annotate file operation paths and statistics reader
jonathanberthias Oct 2, 2026
d907df4
Complete LP basis and parameter annotations
jonathanberthias Oct 2, 2026
c6d5df9
Keep LP enum inputs incomplete
jonathanberthias Oct 3, 2026
fcf1087
Annotate matrix variable getter array types
jonathanberthias Oct 3, 2026
6b36dba
Annotate probing LP pricing controls and result
jonathanberthias Oct 3, 2026
5b45f84
Annotate variable metadata and object pointer returns
jonathanberthias Oct 3, 2026
2f30363
Annotate solution construction and stage checks
jonathanberthias Oct 3, 2026
ea87208
Annotate memory debugging helpers
jonathanberthias Oct 3, 2026
6d81a26
Annotate UTF-8 string conversion helper
jonathanberthias Oct 3, 2026
0739dab
Annotate event and stage name cache helpers
jonathanberthias Oct 3, 2026
74bfc5f
Annotate expression constructors and metadata methods
jonathanberthias Oct 3, 2026
dd76970
Annotate matrix expression evaluation result
jonathanberthias Oct 3, 2026
b904447
Keep bound change and LP basis enum values incomplete
jonathanberthias Oct 3, 2026
77ded31
Annotate parent branching collections and root absence
jonathanberthias Oct 3, 2026
ac637cc
Annotate constraint factory inputs and outputs
jonathanberthias Oct 3, 2026
f4cfdbf
Annotate expression numeric metadata fields
jonathanberthias Oct 3, 2026
86f23ac
Annotate nonlinear expression addition input
jonathanberthias Oct 3, 2026
4abc930
Enable unused ignore and deprecation checks in mypy
jonathanberthias Oct 13, 2026
09700b9
Mark deprecated PySCIPOpt APIs in the stubs
jonathanberthias Oct 13, 2026
a9cd772
Annotate user data, model ownership, and matrix rounding
jonathanberthias Oct 13, 2026
9943000
Document expanded stub annotations in the changelog
jonathanberthias Oct 13, 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased
### Added
- Added more type annotations and deprecation markers to the stubs.
### Fixed
### Changed
### Removed
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Homepage = "https://github.com/SCIP-Interfaces/PySCIPOpt"
norecursedirs = ["check"]
testpaths = ["tests"]

[tool.mypy]
warn_unused_ignores = true
enable_error_code = ["deprecated"]

[tool.setuptools]
include-package-data = false

Expand Down
8 changes: 4 additions & 4 deletions src/pyscipopt/recipes/infeasibilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def get_infeasible_constraints(orig_model: Model, verbose: bool = False):
model.optimize()

n_infeasibilities_detected = 0
for c in binary:
if model.isInfinity(model.getVal(binary[c])) or model.isGT(model.getVal(binary[c]), 0):
for name in binary:
Comment thread
Joao-Dionisio marked this conversation as resolved.
if model.isInfinity(model.getVal(binary[name])) or model.isGT(model.getVal(binary[name]), 0):
n_infeasibilities_detected += 1
print("Constraint %s is causing an infeasibility." % c)
print("Constraint %s is causing an infeasibility." % name)

if verbose:
if n_infeasibilities_detected > 0:
Expand All @@ -47,4 +47,4 @@ def get_infeasible_constraints(orig_model: Model, verbose: bool = False):
else:
print("Model is feasible.")

return n_infeasibilities_detected, aux
return n_infeasibilities_detected, aux
Loading
Loading