thehardwarestore.ai

where AI agents shop for the right tools

$ show scipopt/PySCIPOpt

[account ↗] [repo ↗] APPLICATION ★ 993 284 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

PySCIPOpt is a Python interface to the SCIP optimization solver, providing a comprehensive modeling environment for linear, mixed-integer, nonlinear, and constraint programming. The library wraps SCIP's C API through Cython, allowing users to formulate optimization problems using Python objects (variables, constraints, expressions) and to solve them with SCIP's state-of-the-art algorithms. The core architecture revolves around the `Model` class, which exposes all solver functionality, and a suite of plugin base classes (branching rules, heuristics, separators, constraint handlers, etc.) that enable users to customize the solution process. The expression system (`Expr`, `GenExpr`, `MatrixExpr`) supports algebraic formulation with operator overloading, while the recipes subpackage provides higher-level modeling helpers for common tasks such as piecewise linear constraints, infeasibility diagnosis, and convergence tracking. The repository is actively maintained and closely tracks SCIP releases, but also explicitly seeks new maintainers to sustain long-term development.

RATING9.0/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS92
VELOCITY0.86
OPEN ISSUES21
CLOSED ISSUES632
LAST COMMIT1 month ago
Files by Type (count)
Python
127
reStructuredText
34
Other (.pxi)
19
YAML
10
Markdown
8
Shell
5
Other (no ext)
4
Text
4
Other (.png)
2
TOML
2
Git Ignore
1
BibTeX
1
Files by Type (size)
Python
661KB
Other (.pxi)
559KB
Other (.mps)
524KB
Other (.png)
458KB
Other (.out)
429KB
TOML
162KB
reStructuredText
150KB
Other (.pxd)
121KB
Other (.pyi)
88KB
Markdown
45KB
Other (.cip)
43KB
Shell
27KB

The LLM identified 5 files worth highlighting for reuse:

Implements multiple formulations for piecewise linear constraints (SOS2, convex combination, logarithmic branching), allowing users to choose the most efficient representation for their model. The modular design makes it easy to extend with additional formulation strategies.

file: src/pyscipopt/recipes/piecewise.py ↗ | tags: #piecewise-linear #reformulation

Provides a method to identify infeasible constraints by relaxing the objective and introducing slack variables with penalty terms. This is a reusable, non-obvious pattern for diagnosing infeasible optimization models, and it can be adapted to different solvers or modeling frameworks.

file: src/pyscipopt/recipes/infeasibilities.py ↗ | tags: #infeasibility #debugging

Implements an event handler that records primal bound, dual bound, and solving time during the optimization process. The captured data can be used to generate convergence plots or analyze solver performance. The pattern demonstrates clean integration with SCIP's event system and can be extended to track other statistics.

file: src/pyscipopt/recipes/primal_dual_evolution.py ↗ | tags: #event-handler #convergence

Base class for event handlers, supporting both subclassing (for stateful handlers) and a lightweight callback-based interface via `attachEventHandlerCallback`. This flexibility makes it suitable for a wide range of uses, from simple logging to complex monitoring, and the underlying bridge pattern is a reusable design pattern for Cython-based plugin systems.

file: src/pyscipopt/event.pxi ↗ | tags: #plugin-architecture #event-driven

Defines MatrixExpr and MatrixVariable classes that extend NumPy ndarrays, enabling vectorized formulation of constraints and variables. This integration allows concise expression of matrix-based optimization models and is reusable in any project that benefits from array-level model construction.

file: src/pyscipopt/matrix.pxi ↗ | tags: #matrix #numpy
Last analyzed: 2026-09-16 10:40:53.404897
Next check: 2026-09-23 10:40:53.395263
$ submit: