SolverPilot
Current version:
0.4.1. This release includes the accumulated post-0.4 correctness/trust hardening, faster LP verification and bounded equality recovery. See the 0.4.1 release guide.
The previous 0.4 release repaired near-indefinite QP certificates and added explicit global QP/MIQP/MINLP, generalized power cones, CPU PDLP, bounded LP witness recovery and reuse observations. Historical 0.1.0rc2 correctness/trust hardening remains in place. The 0.4 guide preserves that release's original scope.
Version 0.4.1 includes the post-0.4 development described below. Run
solverpilot-doctor (or python -m solverpilot.cli.doctor) for imported-code identity, installed-package
ownership and feature maturity. See the ordered hardening record.
The explicit exact LP/MILP certificate API is included in 0.4.1. Its execution is qualified separately and requires exact SCIP and VIPR executables; these external executables are not bundled. An explicit cuOpt GPU LP adapter is also under development; it requires separate hardware qualification and is not automatically selected. An experimental learned LP selector adds training and held-out evaluation tools; it does not enable automatic production routing. The subsequent public-workload challenge failed its promotion gate, so the synthetic-trained policy remains experimental. The follow-up robust LP work adds conservative abstention, public retraining and independently checked residual-bound recovery. The production evidence workflow adds stable execution identity, explicit export policies, and a complete capacity study with independent template-contract checks, named comparisons and replay. The production pilot kit provides a public reference case, two clean installation checks and Persian participant instructions. The audit follow-up repairs bound/report consistency and scenario controls, and adds reproducible mutation and matched-HiGHS comparisons with explicit limits on performance and user-productivity claims. The next repeated-LP qualification adds opt-in native HiGHS model reuse, separate validation/certificate timings and broader analytic/public checks. Learned routing remains experimental. The semantic contracts and verification guide covers the subsequent NumPy/CasADi repairs, explicit proof policies, bounded verification reuse, aggregate orchestration budgets, convex-QP sensitivities, vector OA, rigorous elementary domain bounds and risk/uncertainty helpers. These changes are included in 0.4.1; historical measurements retain their original artifact identities. The next convex modeling package adds bounded exact QCQP-to-RSOC recognition, explicit PWL epigraph/graph helpers and a complete inventory/CVaR example with an independent finite oracle. Its comparison runner can apply common numerical optimality checks to every measured interface. The LP certificate performance follow-up removes redundant bound multipliers from LP lower bounds, accelerates exact box propagation and adds capped equality recovery with unchanged numerical tolerances.
SolverPilot is a trust-aware optimization runtime and modeling layer for Python. It combines a small matrix-first solve API for LP/MILP/convex QP with a higher-level semantic modeling system that can compile into conic, smooth nonlinear, certified convex binary MINLP, and constraint-programming execution paths.
The project is deliberately conservative about claims: candidate solutions are independently validated where possible, backend capabilities are version/evidence aware, and local or backend-reported success is not silently promoted to a stronger proof category.
What SolverPilot provides
SolverPilot has two complementary layers.
Core runtime
- canonical
LinearProblem/QuadraticProblemrepresentations; - LP, MILP, and continuous convex-QP execution;
- explicit or capability-aware backend routing;
- independent candidate validation and objective recomputation;
- infeasibility diagnostics;
- portfolio/fallback execution;
- repeated-solve
Sessionsupport; - auditable production-routing decisions with learned LP performance routing disabled.
Extended modeling platform — Track P P0–P9
- semantic
Model,Variable,Parameter, and expression DAG; - parameter-aware compile cache and partial recompilation;
- backend Capability Protocol 2.0 with version-bound evidence;
- exact/restricted bridge and reformulation infrastructure with transformation tapes;
PersistentSessionwith fail-closed native-patch vs rebuild decisions;- SOC/RSOC/PSD conic representation and validation;
- smooth continuous NLP + automatic differentiation through the pinned CasADi verification path;
- proof-aware certified convex binary MINLP orchestration;
- integer/Boolean/interval constraint programming with an exhaustive reference backend and optional OR-Tools CP-SAT.
The extended APIs are canonically imported from submodules such as solverpilot.model, solverpilot.conic, solverpilot.nlp, solverpilot.minlp, solverpilot.globalopt, and solverpilot.cp. The M30-frozen top-level solverpilot.__all__ surface remains unchanged in this release.
Verified trust, evaluation, extension, and application layers
The current release keeps the S2–S10 additive layers and adds correctness/trust hardening discovered during adversarial review of 0.1.0rc1. The historical 0.0.40rc2 artifacts remain separate provenance and are not overwritten.
solverpilot.io: strict local JSON/CSV ingestion, bounded reads, explicit mapping, content hashes, and source provenance;solverpilot.evaluation: direct-run oracle construction and decomposed quality/runtime/failure regret;solverpilot.intelligence: versioned pre-solve feature schema, leakage audit, and simple train-only OOD/shift diagnostics;solverpilot.reporting: claim-safe structured explanations for coreSolveResult;solverpilot.extensions: explicit trusted-code extension staging without creating a second backend/bridge registry;solverpilot.applications.tsp: exact small-instance references, conservative heuristics, independent validation, MILP and restricted CP compilation;solverpilot.applications.routing: CVRP/VRPTW model, validation, timelines, diagnostics, exact small-instance reference, MILP, and conservative heuristics;solverpilot.history: explicit opt-in local SQLite history that excludes raw solution vectors and raw problem arrays by design.
These APIs remain submodule-scoped and do not change the frozen 78-symbol top-level API.
Supported problem families and guarantee boundary
| Family | Current support | Guarantee boundary |
|---|---|---|
| LP | ✅ solve | validated candidate + backend termination semantics |
| MILP | ✅ solve | validated candidate/integrality + backend termination semantics |
| Continuous convex QP | ✅ solve | validated candidate; bridge-specific optimality claims stay conservative |
| Semantic LP/MILP/QP modeling | ✅ | compiles to canonical core IR |
| Indicator constraints | ✅ restricted exact bridges | fixed-state simplification or finite-bound-certified Big-M; otherwise fail-closed |
| SOC | ✅ direct Clarabel + original validation | conservative independent original-domain bounds when dual evidence is available |
| RSOC | ✅ direct Clarabel + original validation | reconstructed duals and exact cone membership checks |
| PSD | ✅ direct Clarabel + original validation | independent bounds require conservative PSD evidence; generic matrices can remain unverified |
| Exponential / power / generalized power | ✅ direct Clarabel | numerical original-space validation; independent dual certification remains unsupported |
| Smooth continuous NLP | ✅ optional | local-optimal candidate only after validation/KKT checks; no global NLP proof |
| Convex binary MINLP | ✅ restricted | globally_proven is solver-certified inside the certified P8 binary/convex scope; independently_verified_global remains false until the full proof chain is independently reconstructed |
| Nonconvex QP / MIQP | ✅ explicit GlobalQuadraticProblem / SCIP |
solver-reported numerical global bound; original candidate validation |
| General integer/nonconvex MINLP | ✅ explicit bounded factorable SCIP path | nonlinear equality/two-sided rows, abs/max/min and interval-certified indicators; no independent generic global proof |
| CPU PDLP | ✅ optional LP / diagonal convex QP | isolated worker; explicit selection |
| Constraint programming | ✅ reference solver | exhaustive proof only within reference state budget |
| OR-Tools CP-SAT | ✅ optional | exact verified integration target: OR-Tools 9.15.6755 |
| TSP application | ✅ reference / MILP / restricted CP / heuristics | independent route validation; only exhaustive reference paths issue an independent optimality proof |
| CVRP / VRPTW application | ✅ reference / MILP / heuristics | independent route/timeline validation; exponential reference solver is for small instances only |
Important current limitations
- The learned production solver selector remains disabled; OOD diagnostics are not calibrated model-confidence probabilities.
- The S4 feature schema currently targets canonical LP/MILP/convex-QP fingerprints; conic/NLP/MINLP/CP/TSP/VRP do not yet share that learned-selector feature contract.
solverpilot.reporting.explain_resultand the automatic history adapters are centered on coreSolveResult/LinearProblem/QuadraticProblem; application-specific TSP/VRP results have their own validators rather than a unified report/history adapter today.- Extension activation is transactional under the manager's documented ownership assumptions, but caller-owned
BackendRegistry/BridgeRegistryobjects must not be mutated concurrently outside the manager during activation. - Local-file symlink/path checks are fail-closed for static paths, but they are not a sandbox against a hostile process racing filesystem entries between validation and open.
HistoryStoreis a local plaintext SQLite store. It is opt-in and minimizes persisted solver/problem payloads, but it is not encrypted and caller-supplied metadata can still contain sensitive information.- TSP/VRP exact reference algorithms are exponential and intentionally state-budgeted; the routing layer does not yet claim pickup-and-delivery, split delivery, stochastic travel time, live traffic, or real-time redispatch support.
- Exact SCIP and cuOpt GPU execution adapters are included as explicit integrations in 0.4.1; external executables/hardware remain separately required, and readiness probes cannot qualify execution. See the 0.4 guide.
Requirements
Base runtime:
- Python 3.12, 3.13, or 3.14
- NumPy
>=2.2,<3 - SciPy
>=1.15,<2
Optional integrations are installed separately. OR-Tools 9.15 provides Python 3.12–3.14 wheels upstream; SolverPilot still requires its own cross-platform qualification before public support is promoted.
Installation
From PyPI
Install the latest published release from PyPI:
python -m pip install solverpilot
From the repository before PyPI publication
git clone https://github.com/Amirhosseinheidari/SolverPilot.git
cd solverpilot
python -m pip install .
For development:
python -m pip install ".[test]"
python -m pytest
Quick Start — LP
import numpy as np
from solverpilot import LinearProblem, solve
problem = LinearProblem.from_data(
A=[[1.0, 1.0]],
c=[1.0, 2.0],
variable_lower=[0.0, 0.0],
variable_upper=[1.0, 1.0],
constraint_lower=[1.0],
constraint_upper=[np.inf],
)
result = solve(problem)
print(result.status.value) # valid_optimal
print(result.objective) # 1.0
print(result.x) # approximately [1.0, 0.0]
print(result.validation.valid) # True
Full example: examples/01_lp_basic.py
Core examples
Linear Programming (LP)
Use LinearProblem for continuous linear models. Lower/upper row arrays represent
constraint_lower <= A @ x <= constraint_upper.
Full example: examples/01_lp_basic.py
Mixed-Integer Linear Programming (MILP)
Integer structure is declared through VariableDomain.
Full example: examples/02_milp_binary.py
Continuous convex QP
QuadraticProblem uses:
0.5 * x.T @ P @ x + q.T @ x + objective_offset
Full example: examples/03_qp_convex.py
Semantic modeling
The extended modeling layer builds a symbolic model and compiles it into the appropriate execution IR.
from solverpilot.model import Model
m = Model("semantic-lp")
x = m.variable(2, lower=0.0, upper=5.0, name="x")
m.add(x[0] + x[1] >= 1.0)
m.minimize(2.0 * x[0] + x[1])
compiled = m.compile()
result = compiled.solve()
print(type(compiled.execution_ir).__name__) # LinearProblem
print(result.status.value)
print(result.objective)
Parameters preserve semantic structure while allowing data changes and compiler-cache reuse:
cost = m.parameter(2, value=[2.0, 1.0], name="cost")
See examples/08_semantic_model.py and the Extended Modeling API.
Conic modeling
The semantic layer supports SOC, RSOC, and PSD representation/validation.
from solverpilot.model import Model
from solverpilot.conic import ConicProblem
m = Model("soc")
x = m.variable(2)
t = m.variable(lower=0.0)
m.soc(t, x)
m.minimize(t)
compiled = m.compile(use_cache=False)
assert isinstance(compiled.execution_ir, ConicProblem)
Representation support is intentionally broader than verified solver support. PSD and generic quadratic-conic solving are not automatically authorized by the current backend conformance evidence.
See examples/09_conic_model.py.
Smooth nonlinear programming (NLP)
Install the pinned verification dependency:
python -m pip install "solverpilot[nlp]"
Example:
from solverpilot.model import Model
m = Model("nlp")
x = m.variable(lower=-4.0, upper=4.0)
m.minimize((x - 1.25) ** 4 + 0.2 * (x - 1.25) ** 2)
result = m.solve(x0=[0.0])
print(result.validation.valid)
print(result.local_optimal_candidate)
print(result.globally_proven) # False for generic NLP
SolverPilot does not claim global optimality for generic NLPs. The optional CasADi/Ipopt path promotes a candidate only after independent primal/objective validation and recomputed KKT stationarity checks.
See examples/10_nlp_optional.py.
Certified convex binary MINLP
Install the NLP verification dependency:
python -m pip install "solverpilot[minlp]"
The current MINLP layer is intentionally narrow: binary discrete variables + certified convex supported nonlinear structure. It provides exact binary enumeration and an Outer Approximation orchestrator.
from solverpilot.model import Model
m = Model("binary-minlp")
x = m.variable(lower=0.0, upper=3.0)
z = m.binary()
m.minimize((x - 2.0) ** 2 + 0.2 * (1 - z))
result = m.compile().solve()
print(result.algorithm)
print(result.globally_proven)
globally_proven=True is emitted only when the certified scope, original-space validation, and bound-closure conditions all pass. In 0.2 this is a solver-certified proof under the compiler's convexity assumptions, not an independently reconstructed end-to-end proof; inspect result.proof_scope and result.independently_verified_global. General integer, nonconvex, nonlinear-equality, and indicator+MINLP compositions remain fail-closed.
See examples/11_minlp_optional.py.
Constraint programming (CP)
The CP layer is separate from the LP/MILP runtime; CP semantics are not silently converted to MILP.
A dependency-free exhaustive reference backend is included for small models:
from solverpilot.cp import CPModel
m = CPModel("tiny-cp")
x = m.int_var(0, 2, "x")
y = m.int_var(0, 2, "y")
m.add_all_different([x, y])
m.minimize(x + y)
result = m.solve()
print(result.objective)
print(result.validation.valid)
See examples/12_cp_reference.py.
For CP-SAT:
python -m pip install "solverpilot[cp]"
The integration is locked to OR-Tools 9.15.6755 in this release candidate. The native CP-SAT solve runs in an isolated subprocess so an earlier SciPy/HiGHS solve cannot poison OR-Tools with a conflicting HiGHS shared-library ABI. SolverPilot transfers only canonical JSON CP IR/results across that boundary and independently revalidates the assignment/objective in the parent process. Supported CP families include integer/Boolean variables, interval variables, linear constraints, AllDifferent, ExactlyOne, allowed Table, Element, Circuit, NoOverlap, Cumulative, and integer min/max objectives.
See examples/13_cp_sat_optional.py.
Choosing a backend
For the matrix-first runtime, omit backend for deterministic capability-aware routing:
result = solve(problem)
print(result.trace.backend)
Or request a backend explicitly:
result = solve(problem, backend="scipy-highs-ipm")
The Capability Protocol 2.0 extended layer is available under solverpilot.capabilities and can represent version-bound support, restrictions, verification evidence, incremental-update channels, starts, callbacks, and result artifacts without upgrading legacy declarations to verified claims.
CLI:
solverpilot-backend-health
solverpilot-capabilities --verify
Full example: examples/04_choose_backend.py
Understanding SolveResult
The matrix-first solve() API returns SolveResult.
| Field | Meaning |
|---|---|
result.status |
SolverPilot public status (PublicStatus) |
result.objective |
accepted/recomputed candidate objective where applicable |
result.x |
candidate vector, or None without a candidate |
result.validation |
independent candidate validation report |
result.diagnostics |
optional infeasibility diagnostics |
result.backend_status |
raw backend termination text |
result.trace |
executed backend and phase timings |
result.plan |
planner decision for automatic routing |
Candidate-bearing success statuses are exposed only after validation. INFEASIBLE, UNBOUNDED, and INFEASIBLE_OR_UNBOUNDED normally reflect backend termination unless separate certificate/diagnostic evidence is explicitly recorded.
See examples/06_validation_diagnostics.py.
Infeasible problems and diagnostics
Diagnostics are opt-in:
result = solve(problem, diagnose_infeasible=True)
print(result.status.value)
print(result.diagnostics)
See examples/05_infeasible.py.
Repeated solves and persistence
Lightweight Session
Session tracks problem revisions and reports reuse conservatively.
See examples/07_reoptimization_session.py.
Track P PersistentSession
solverpilot.session.PersistentSession binds a semantic Model to one backend lifecycle. Each update is routed through one of:
cold_buildnative_patchsafe_rebuildfull_rebuildno_mutation_reuse
A native patch is selected only when the exact granular capability and persistent-lifecycle evidence are verified. Reuse is not treated as a universal performance win.
Optional solver dependencies
| Extra | Install | Purpose |
|---|---|---|
| HiGHS | python -m pip install "solverpilot[highs]" |
public highspy native adapter |
| OSQP | python -m pip install "solverpilot[osqp]" |
public OSQP Python adapter |
| SCIP | python -m pip install "solverpilot[scip]" |
PySCIPOpt adapter |
| Global | python -m pip install "solverpilot[global]" |
explicit SCIP nonconvex QP/MIQP/bounded MINLP |
| PDLP | python -m pip install "solverpilot[pdlp]" |
isolated CPU LP/diagonal convex QP |
| NLopt | python -m pip install "solverpilot[nlopt]" |
NLopt SLSQP integration |
| CasADi | python -m pip install "solverpilot[casadi]" |
pinned CasADi 3.7.2 verification bridge |
| Clarabel | python -m pip install "solverpilot[clarabel]" |
direct convex conic solver, including PSD, exponential and power cones |
| Conic | python -m pip install "solverpilot[conic]" |
CasADi-based conic verification path |
| NLP | python -m pip install "solverpilot[nlp]" |
CasADi 3.7.2 + Ipopt path |
| MINLP | python -m pip install "solverpilot[minlp]" |
dependencies for certified binary MINLP orchestration |
| CP | python -m pip install "solverpilot[cp]" |
OR-Tools CP-SAT 9.15.6755 |
| Native bundle | python -m pip install "solverpilot[native]" |
HiGHS + OSQP + PySCIPOpt + NLopt |
| Open-source bundle | python -m pip install "solverpilot[open-source]" |
same open-source native solver set as the current bundle |
| Benchmarking | python -m pip install "solverpilot[benchmark]" |
benchmark/research tooling |
An upstream package being installable is not by itself SolverPilot integration evidence. Release qualification remains platform/version specific.
What is not supported or not claimed yet
- learned LP performance routing in production;
- nonconvex or integer variables in the existing convex
QuadraticProblem; use the separateGlobalQuadraticProblem; - independent verification for every PSD matrix or transcendental cone dual;
- independent global optimality for arbitrary NLP/MINLP functions;
- nonsmooth atoms on the smooth Ipopt path; supported abs/max/min are available on the explicit bounded global path;
- exact SCIP and GPU execution adapters; readiness probes alone do not qualify them;
- nonlinear equalities/two-sided nonlinear constraints in the current MINLP proof path;
- global indicator bodies without a provable finite interval enclosure;
- automatic guarantee that repeated solves use native warm starts/factorization reuse;
- automatic independent certificates for every infeasible/unbounded backend termination;
Per-call tolerances=ValidationTolerances(...) is available on solve() and
solve_production(). The 0.4 scope table
maps each research item to its implemented API and remaining boundary.
See Known Limitations.
Examples
Core/runtime:
01_lp_basic.py— LP02_milp_binary.py— binary MILP03_qp_convex.py— convex QP04_choose_backend.py— backend selection05_infeasible.py— diagnostics06_validation_diagnostics.py— result validation07_reoptimization_session.py— repeated solves
Extended modeling:
08_semantic_model.py— semantic model/compiler09_conic_model.py— SOC representation10_nlp_optional.py— optional smooth NLP11_minlp_optional.py— optional certified binary MINLP12_cp_reference.py— dependency-free CP reference backend13_cp_sat_optional.py— optional OR-Tools CP-SAT14_persistent_session_optional.py— persistent semantic-model session
New in 0.4: global optimization,
generalized power, and
PDLP/certificate recovery.
See all 24 examples in examples/README.md.
API Reference
- Stable top-level Public API
- Extended Modeling API
- Current frozen top-level API snapshot
- Current core backend contract
- Track P merge provenance
Trust and provenance
The original frozen Track P P0–P9 bundle was verified before forward-porting:
- source bundle SHA-256:
6cc282b9428450ab7bbc39cd6c768de2da2fc092f8d7f79cbbf319f657df24a2 - internal checksum rows:
816 - checksum mismatches:
0 - original Track P final version:
0.0.40 - OR-Tools qualification target:
9.15.6755
Frozen historical Track P documents remain under docs/history/track-p-p0-p9-frozen/. They intentionally retain the old OptiMind naming as provenance; the current public brand and namespace are SolverPilot / solverpilot.
Production routing
solve_production() remains conservative. The historical learned LP selector remains disabled; merging Track P does not authorize a new empirical performance-ranking claim.
Development, security, and release status
Normal CI targets Python 3.12–3.14. The exact-artifact cross-platform release qualification workflow remains the authority for public release support.
License
SolverPilot is licensed under the Apache License 2.0. Apache-2.0 permits commercial and closed-source use subject to its terms. It does not grant trademark rights.
Version 0.2 guide
See the 0.2 guide for new APIs, installation, numerical guarantees, batch limits and examples.
Metadata
Release files for solverpilot 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| solverpilot-0.4.1.tar.gz | 516.5 kB | With provenance | Details for solverpilot-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| solverpilot-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for solverpilot-0.4.1-py3-none-any.whl |
Total release size: 1.1 MB
Release files / solverpilot-0.4.1.tar.gz
| Download URL | solverpilot-0.4.1.tar.gz |
|---|---|
| Size | 516.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ea8f7bc424d33f3a5c125eb794694181f38d127267e92ac1e7d69883bf87359
|
|
BLAKE2b-256 checksum How to use checksums |
89543e9496eb3f2f2645a34a5318c8c6836523c150951e47397802a2a17a2e27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / solverpilot-0.4.1-py3-none-any.whl
| Download URL | solverpilot-0.4.1-py3-none-any.whl |
|---|---|
| Size | 570.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7abdd4b46a3bedfa564bbbc3105709c90af81fc507c5b45278fa7ca9a8e1c46d
|
|
BLAKE2b-256 checksum How to use checksums |
1732fddc39706b5947a849729a77cb6527ea16680b2acc9e9a240404445bd6c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logSecurity for solverpilot 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for solverpilot-0.4.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.