Catalog PyPI
PACKAGE EXPLORERView in registry

affine-mpc

PyPI

Python bindings for the affine_mpc library

affinecontrolmodelmpcpredictive
Versions collected1
Direct dependencies6From release 0.2.0
Last observed20 Oct, 21:04 UTC

README

Version 0.2.0 documentation

affine_mpc logo affine_mpc

PyPI Build and Test Check Stubs Deploy Docs Publish to PyPI

affine_mpc is a library for model predictive control using discrete-time affine models, with C++ and Python interfaces. It is designed to support real-time control and rapid research prototyping with a focused set of common costs and constraints, along with live parameter updates.

Statement of Need

Researchers and engineers often need an MPC tool that sits between low-level QP assembly and large general-purpose control frameworks. affine_mpc aims to lower the barrier to entry for developing MPC controllers by reducing the amount of low-level problem assembly needed for common affine MPC workflows. affine_mpc focuses on discrete-time affine MPC problems with optional costs and constraints, efficient repeated solves, and workflows that support both experimentation in Python and integration in C++.

Highlights

  • Condensed and sparse MPC formulations behind a common interface
  • Move-blocking, linear interpolation, and B-spline input parameterizations
  • Optional input cost, state bounds, input bounds, and slew-rate constraints
  • Efficient OSQP-backed updates when the QP sparsity pattern is unchanged
  • Binary .npz logging via MPCLogger for plotting and post-run analysis

Documentation

The primary documentation lives at https://byu-rad-lab.github.io/affine_mpc/.

The Markdown source for the documentation lives in docs/.

Core C++ sources live under src/ and include/, Python bindings and package sources live under python/, and example workflows live under examples/.

Important Usage Notes

  • Fully configure the model, limits, weights, and references before calling initializeSolver()
  • OSQP sparsity is fixed at initialization; later updates must not introduce new nonzero structure
  • If a model coefficient or cost weight may become nonzero later, initialize with that structure already present

Community Standards

  • Contributing guide: CONTRIBUTING.md
  • Code of conduct: CODE_OF_CONDUCT.md
  • Citation metadata: CITATION.cff

Citation

If you use affine_mpc in research, please cite the project using the metadata in CITATION.cff.

License

This project is licensed under the BSD 3-Clause License. See LICENSE for details.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.07 Oct 20266

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:04 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:61885de491a439898caa9466726234806421c1a90f6c32fb3c020da3b1daf138