HILO-MPC is a toolbox for easy, flexible and fast development of machine-learning-supported optimal control and estimation problems
Project description
HILO-MPC
HILO-MPC is a Python toolbox for easy, flexible and fast realization of machine-learning-supported optimal control, and estimation problems developed mainly at the Control and Cyber-Physical Systems Laboratory, TU Darmstadt, and the Laboratory for Systems Theory and Control, Otto von Guericke University. It can be used for model predictive control, moving horizon estimation, Kalman filters, solving optimal control problems and has interfaces to embedded model predictive control tools.
HILO-MPC can interface directly to TensorFlow and PyTorch to create machine learning models and the CasADi framework to efficiently build control and estimation problems. The machine learning models can be used (almost) everywhere in the setup of these problems.
Currently the following machine learning models are supported:
- Feedforward neural networks
- Gaussian processes
The following machine learning models are currently under development:
- Bayesian neural network
- Recurrent neural network
At the moment the following MPC and optimal control problems can be solved:
- Reference tracking nonlinear MPC
- Trajectory tracking nonlinear MPC
- Path following nonlinear MPC
- Economic nonlinear MPC
- Linear MPC
- Traditional optimal control problems
All the nonlinear MPCs support soft constraints, time-variant systems, time-varying parameters and can be used to solve minimum-time problems. They work for continuous-time and discrete-time models, in DAE or ODE form. Linear MPC is currently limited towards discrete-time models.
A rich set of examples is available, spanning:
- NMPC for bioreactors using hybrid first principle and learned models
- Trajectory tracking and path following model predictive control with learning and obstacle avoidance
- Output feedback MPC of a continuous stirred tank reactor with a Gaussian process prediction model
- Learning NMPC control using a neural network
- Simple LQR, PID
- Moving horizon estimation, extended Kalman filter, unscented Kalman filter, and particle filter for a continuous stirred tank reactor
Installation
Using Poetry (recommended):
poetry install
Optional extras:
- Plotting backends:
poetry install -E viz - Data utilities:
poetry install -E ml
From PyPI using pip:
pip install hilo-mpc
Python support: 3.10–3.12 (aligned to current CasADi wheels). Newer versions may work once CasADi adds support.
Optional Dependencies
HILO-MPC uses a minimal core installation by default. Additional features require optional dependencies, which are kept optional to avoid forcing users to install heavy packages they may not need.
Installation with Extras
Install specific feature sets using Poetry extras:
# Machine learning utilities (scikit-learn)
poetry install -E ml
# Plotting backends (Bokeh, Matplotlib)
poetry install -E viz
# TensorFlow backend for neural networks
poetry install -E tensorflow
# PyTorch backend for neural networks
poetry install -E pytorch
# Install multiple extras
poetry install -E ml -E viz -E tensorflow
Or with pip:
pip install hilo-mpc[ml,viz,tensorflow]
Optional Package Versions
| Extra | Packages | Version Constraints | Purpose |
|---|---|---|---|
ml |
scikit-learn | ≥0.19.2 | Data preprocessing and normalization |
viz |
Bokeh | ≥2.3.0 | Interactive plotting |
| Matplotlib | ≥3.0.0 | Static plotting | |
tensorflow |
TensorFlow | ≥2.8.0 | Neural network training (TensorFlow backend) |
| TensorBoard | ≥2.8.0 | Training visualization | |
pytorch |
PyTorch | ≥1.2.0 | Neural network training (PyTorch backend) |
| TorchVision | ≥0.4.0 | PyTorch utilities |
Note: The package will raise informative errors if you try to use features that require uninstalled optional dependencies. This design keeps the core installation lightweight while allowing users to install only what they need.
Core Dependencies: CasADi, NumPy, SciPy, pandas, and prettytable are installed automatically with the base package.
Documentation
The documentation can be found here. Note that this documentation is not complete and will be updated over time.
Citing HILO-MPC
If you use HILO-MPC for your research, please cite the following publication:
- J. Pohlodek, B. Morabito, C. Schlauch, P. Zometa, R. Findeisen. Flexible development and evaluation of machine-learning-supported optimal control and estimation methods via HILO-MPC. arXiv. 2022.
@misc{pohlodek2022hilompc,
title = {Flexible development and evaluation of machine-learning-supported optimal control and estimation methods via {HILO-MPC}},
author = {Pohlodek, Johannes and Morabito, Bruno and Schlauch, Christian and Zometa, Pablo and Findeisen, Rolf},
publisher = {arXiv},
year = {2022},
doi = {10.48550/ARXIV.2203.13671}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hilo_mpc-2.1.1.tar.gz.
File metadata
- Download URL: hilo_mpc-2.1.1.tar.gz
- Upload date:
- Size: 222.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e8809b86be9458a913ea41616907144cbc90217f67c733a16ec6be37f562747
|
|
| MD5 |
90fe3815ce3d3da4408276f8b0af2f22
|
|
| BLAKE2b-256 |
a56019043690ef750d8275b3043b5205c94ffff0ff03010a269a582ec1f7041b
|
Provenance
The following attestation bundles were made for hilo_mpc-2.1.1.tar.gz:
Publisher:
python-publish.yml on hilo-mpc/hilo-mpc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hilo_mpc-2.1.1.tar.gz -
Subject digest:
1e8809b86be9458a913ea41616907144cbc90217f67c733a16ec6be37f562747 - Sigstore transparency entry: 1059644043
- Sigstore integration time:
-
Permalink:
hilo-mpc/hilo-mpc@52f1614cbfc62ab4cf8a28e873adfe3ca959b3ea -
Branch / Tag:
refs/tags/v2.1.1 - Owner: https://github.com/hilo-mpc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@52f1614cbfc62ab4cf8a28e873adfe3ca959b3ea -
Trigger Event:
release
-
Statement type:
File details
Details for the file hilo_mpc-2.1.1-py3-none-any.whl.
File metadata
- Download URL: hilo_mpc-2.1.1-py3-none-any.whl
- Upload date:
- Size: 277.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1100544cc0d661f0729fce16fc2689098d35239a0c895f6861b0b986428b5e96
|
|
| MD5 |
b5f13496809c03c76c8f49780017d8b4
|
|
| BLAKE2b-256 |
3152cece1e6e15e727a665a118a9f3e9c74eed5db85d55e6bb9f57ecc7cec982
|
Provenance
The following attestation bundles were made for hilo_mpc-2.1.1-py3-none-any.whl:
Publisher:
python-publish.yml on hilo-mpc/hilo-mpc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hilo_mpc-2.1.1-py3-none-any.whl -
Subject digest:
1100544cc0d661f0729fce16fc2689098d35239a0c895f6861b0b986428b5e96 - Sigstore transparency entry: 1059644044
- Sigstore integration time:
-
Permalink:
hilo-mpc/hilo-mpc@52f1614cbfc62ab4cf8a28e873adfe3ca959b3ea -
Branch / Tag:
refs/tags/v2.1.1 - Owner: https://github.com/hilo-mpc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@52f1614cbfc62ab4cf8a28e873adfe3ca959b3ea -
Trigger Event:
release
-
Statement type: