Skip to main content

Pyomo solver plugin for the POUNCE interior-point NLP solver

Project description

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
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

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.

Project details


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.5.0.tar.gz (4.7 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.5.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyomo_pounce-0.5.0.tar.gz
Algorithm Hash digest
SHA256 762568088c2665933208d9f1ce595643439aa681440bb583b024da04d3eef7b8
MD5 2a9e215f3607cc8d625b09d2503cc3c5
BLAKE2b-256 aafadd7b9a5a208f5e86c736f075bac0b7c7ab14fccd36673b9648f7be8bcfd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyomo_pounce-0.5.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.5.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pyomo_pounce-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8404b27028e4462adc14e2d7d87c070af99060b72742bb3c919c88f71b239cc
MD5 d136f262a2ff30b9ee8195d31d7a2738
BLAKE2b-256 663a8b08e5339d28e06de488e2d3781a01ec5c443eafcc1565b1c8fae9c0b5a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyomo_pounce-0.5.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.

Supported by

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