Skip to main content

pyomo-pounce

Pyomo solver plugin for POUNCE, a pure-Rust interior-point NLP solver (a Rust port of IPOPT).

POUNCE speaks the AMPL NL/SOL protocol, so Pyomo drives it through the AMPL Solver Library interface — exactly how Pyomo integrates with IPOPT.

Installation

pip install pyomo-pounce

That single command pulls in the pounce-solver dependency, which ships a per-platform wheel bundling the pounce executable. After install, pounce is on your PATH and Pyomo finds it automatically.

Usage

import pyomo_pounce  # registers the solver — REQUIRED before SolverFactory('pounce')
from pyomo.environ import *

model = ConcreteModel()
model.x = Var(initialize=0.5)
model.obj = Objective(expr=(model.x - 2)**2)

solver = SolverFactory('pounce')
result = solver.solve(model, tee=True)
print(f"x* = {value(model.x)}")  # 2.0

import pyomo_pounce is required. Without it, SolverFactory('pounce') raises a clear UnknownSolver / "plugin not registered" error — it does not silently run some other pounce. With it imported, the plugin runs the pounce binary bundled in the pounce-solver wheel, independent of PATH. Only a source/dev install without that wheel falls back to a pounce on PATH, in which case the plugin warns.

To see exactly which binary will run (and whether a stale or unrelated pounce earlier on PATH would shadow it), call:

import pyomo_pounce
pyomo_pounce.check_binary()

The check compares the git commit embedded in pounce --about, not the version string — two builds can share the same X.Y.Z while differing in behavior (as a binary from before/after a fix does).

Solver Options

Pass options the same way as IPOPT:

solver = SolverFactory('pounce')
solver.options['max_iter'] = 1000
solver.options['tol'] = 1e-10
solver.options['print_level'] = 5

Options are forwarded to POUNCE's OptionsList (ipopt.opt-compatible keys).

Local development / unsupported platforms

If pounce-solver does not ship a wheel for your platform, the pip install fails on the dependency. Two workarounds:

  1. Build POUNCE from source and put it on PATH — the plugin resolves pounce via shutil.which, so any binary on PATH works:

    # in the pounce repo
    cargo build --release --bin pounce
    export PATH="$PWD/target/release:$PATH"
    pip install --no-deps pyomo-pounce pyomo
    
  2. Install pounce-solver from source via maturin:

    cd pounce/python && maturin develop --release
    # then `cargo install --path ../crates/pounce-cli` to get the CLI
    # since maturin develop does not bundle the binary.
    pip install pyomo-pounce
    

License

EPL-2.0, same as POUNCE.

Download files

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

Source Distribution

pyomo_pounce-0.9.0.tar.gz (57.3 kB view details)

Uploaded Source

Built Distribution

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

pyomo_pounce-0.9.0-py3-none-any.whl (40.5 kB view details)

Uploaded Python 3

File details

Details for the file pyomo_pounce-0.9.0.tar.gz.

File metadata

  • Download URL: pyomo_pounce-0.9.0.tar.gz
  • Upload date:
  • Size: 57.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyomo_pounce-0.9.0.tar.gz
Algorithm Hash digest
SHA256 e18bd962ce2094c9796fc3ea807dbebea29b77947d59f42378fc1556fc47bde6
MD5 1c7fdd54b1676ba74178c9179dff8978
BLAKE2b-256 ffe97ce90951ebcadb900f2046953c939f0a2182cb630357013ddcb307daccd0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyomo_pounce-0.9.0.tar.gz:

Publisher: release-pyomo-pounce.yml on jkitchin/pounce

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyomo_pounce-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: pyomo_pounce-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 40.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyomo_pounce-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06fcd6c13126d398f169a8e581424b23ef4898e3810997c0239b6003f632057a
MD5 bd794b6bda7df3db21f8452e6fe96f45
BLAKE2b-256 8b8f38af63bb8c32f3b85825d832e213187e7655ffba27b27e004b332edf4b1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyomo_pounce-0.9.0-py3-none-any.whl:

Publisher: release-pyomo-pounce.yml on jkitchin/pounce

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.11.0

2 files

0.10.0

2 files

This release

0.9.0 This release

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page