Skip to main content

solver-support

A generic, domain-agnostic pipeline for running constraint-modelling and planning solvers: Conjure / Savile Row (+ SAT/CP backends), Fast Downward, SymK, ENHSP, and UPF-constructed models. It handles the mechanics that every such run needs — building solver command lines from a model registry, spawning subprocesses with timeouts and clean teardown, naming the per-run files, parsing solver output into a uniform timing / cost-layer model, and driving the horizon (increasing-difficulty) loop.

It carries no notion of any particular problem domain or objective. A consumer supplies:

  • its own model registry (a models.yaml) via a config path — the loader is generic, the model content is the consumer's;
  • its scoring / objective strategy via injection — the core reports the raw objective a solver emits and lets the consumer interpret it (is-this-an- optimisation-model, how to read the objective, any reporting multiplier).

Status

Alpha. The pipeline is in day-to-day use by two consumers and is covered by its own test suite, but this is the first public release and the API may still shift between 0.x versions.

The package ships unwired: a bare import solver_support gives a pipeline that resolves no model registry and interprets no objective, because it has no way to guess either. A consumer registers its scoring, registry paths, warning logger and UPF CLI once, before first use.

Installation

pip install solver-support

Requires Python 3.9 or newer (3.9.6 is the system Python on macOS, and is supported deliberately). The only runtime dependencies are psutil and PyYAML.

Usage

See docs/injection-api.md for the four injection points a consumer wires — model-registry paths, objective extraction, warning logger, UPF CLI — with a worked example.

Docs

  • injection-api.md — the four seams a consumer wires.
  • solver-runner.md — running a solver as a subprocess: SolverResult, timeout vs duration, phases.
  • timing-model.md — how solver timing is recorded, how the backends map onto one shape, and the invariants parsers rely on.

Development

Clone and install editable. A consumer under development alongside it is normally installed into the same virtualenv, so both are importable and edits to either take effect immediately:

git clone https://github.com/ott2/solver-support
pip install -e solver-support

Tests

pytest tests/ — the core's own suite, and the home for solver-level development. It runs against solver_support alone: no consumer need be installed, and none is imported.

Since the core ships unwired, a test that needs a seam wired wires a stand-in (tests/conftest.py):

fixture supplies
fixture_registry a ModelRegistry over tests/fixtures/models.yaml, this suite's own synthetic config — never a consumer's
wired_stdout_score a consumer-style Score: N extractor, so a score reaches solver_stats
wired_timeout_score a consumer-style extractor for a salvaged timeout solution

Wiring a fixture config rather than mocking the registry keeps the real loader and accessors in the path. Anything a test needs from the registry goes in tests/fixtures/models.yaml, keeping its shape faithful to a real consumer config — that shape is the contract the loader implements.

Licence

BSD-3-Clause — see LICENSE.

By András Salamon, with Claude Opus 4.8 and 5.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solver_support-0.1.1.tar.gz (106.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solver_support-0.1.1-py3-none-any.whl (71.5 kB view details)

Uploaded Python 3

File details

Details for the file solver_support-0.1.1.tar.gz.

File metadata

  • Download URL: solver_support-0.1.1.tar.gz
  • Upload date:
  • Size: 106.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for solver_support-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dc260f3cd96a32d11a31ec77d795c810032ab65c36994a040990dee80febbc69
MD5 7218d3706fe754e8159ac1e403ef418d
BLAKE2b-256 75ed991bbfa6601e125a45c743f271e99426c2b2edcaa4cd3e04ea8c39d7c2e8

See more details on using hashes here.

File details

Details for the file solver_support-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: solver_support-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 71.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for solver_support-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4bc3f6868708ead66ffd38c362fc927c387609d700180194b35c80db442b357a
MD5 fa9531a605e41611221bf9dc2d9b5da9
BLAKE2b-256 d82e9d8c35c08a433e0157fc1f473f21832b81bd9eee4275ffd11047f9d59d44

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page