Skip to content

Releases: do-mpc/do-mpc

v4.6.4

20 Nov 15:44
df90c2a
Compare
Choose a tag to compare

Release notes

Please see the notes of release v4.6.3.

v4.6.3

20 Nov 14:57
88b8ccc
Compare
Choose a tag to compare

Minor changes

  • The penalty term (rterm) of the MPC formulation can now be customized. For more information, see the documentation
  • All CasADI integrator options can now be accessed via the simulator.settings syntax. For more information see the documentation
  • The settings attribute of the MPC and Simulator classes is now called _settings. It can be accessed via the settings method. The user interface remains identical.
  • Minor bug fixes in the documentation an the Simulator class

v4.6.2

26 Oct 12:43
6c8882a
Compare
Choose a tag to compare

Minor changes

  • Added new settings attribute in _mpc.py
  • Added citation file

v4.6.1

11 Sep 13:07
1b390c5
Compare
Choose a tag to compare

Minor changes

  • Fixed #387
  • do-mpc can now be installed either as:
pip install do_mpc

or

pip install do_mpc[full]

Only with the full installation, optional features are available, e.g.:

  • ONNX conversion
  • OPCUA

Backend changes

  • Fixed readthedosc configuration according to the new specification
  • New setup for requirement files (splitting the pip requirements files according to this description):
    • requirements.txt lists the base requirements for the do-mpc core features.
    • requirements_full.txt is a superset of requirements and includes optional do-mpc features (e.g. ONNX conversion).
    • requirements_docs.txt is a superset of the full requirements and includes the packages required to build the docs.

v4.6.0

24 May 16:20
7e9bbf7
Compare
Choose a tag to compare

Major changes

For detailed information on the major changes, please visit our website www.do-mpc.com.

OPC UA module

Building on the opcua-asnycio library, do-mpc now facilitates plant communication and software-in-the-loop testing with OPC UA.

  • Core MPC modules can automatically derive and OPC UA client
  • A local OPC UA server can be configured with namespace derived from clients for testing purposes

Interoperability with deep learning toolboxes through ONNX

do-mpc now supports the open neural network exchange (ONNX) standard.

  • Incorporate neural networks previously trained in Tensorflow, Pytorch, Matlab, etc. (with an option to export ONNX models)
  • Convert ONNX models to CasADi expressions (the backbone of do-mpc).

Improved interface for settings in the MPC, MHE, Simulator, etc.

All do-mpc core modules now have the important new attribute settings.
Previously, settings were passed to set_param. This method is still available and wraps the new interface. The new method has important advantages:

  1. The settings attribute can be printed to see the current configuration.
  2. Context help is available in most IDEs (e.g. VS Code) to see the available settings, the type and a description.

Relaunch of documentation

We have significantly improved our documentation with a polished new look and included typing information for an improved workflow.

v4.5.1

28 Mar 08:59
Compare
Choose a tag to compare

Please see the changes for v.4.5.0. This is a minor update to fix the installation routine of do-mpc.

v4.5.0

28 Mar 07:11
cc5fa5e
Compare
Choose a tag to compare

Major changes

Linear control

  • Newly implemented class LinearModel. The linear model can be created by:
    • linearizing a regular (nonlinear) Model instance
    • passing system matrices (A,B,C,D)
    • creating (linear) equations in LinearModel with the well known syntax used in Model.
  • Discretize a (continuous-time) LinearModel.
  • Setup the new discrete-time linear quadratic regulator (LQR) controller class

Data-based system identification with neural networks

  • Use neural networks as system models in do-mpc
    • ONNXConversion can convert a previously trained and stored neural network to a CasADi graph
    • ONNX files can be exported from most major neural network frameworks (e.g. tensorflow, pytorch, matlab, ...)
    • Some limitations to the neural network operations apply.

Minor changes

Compile NLP

  • The MHE, MPC classes can now export and compile the NLP.
  • Compiled NLPs can be loaded and solved. This may result in faster optimization times.

Improved sampling tools for data generation

  • Optional parameters in __init__ of Sampler, SamplingPlanner, DataHandler that are passed to set_param. This allows for a more concise setup.
  • SamplingPlanner method product to create cartesian product (grid) of input variables to create test cases.

Simulator

  • Simulator.make_step() can now be called without control input for autonomous systems.

Bug fixes

  • Example files now import do-mpc relative path with os.path.join to yield a OS agnostic implementation.
  • MHE class can now be created without estimating parameters.
  • Solves visualization bug described in #340

Backend

  • Significant code refactoring
    • Many modules (e.g. controller.py) were getting to large
    • Individual files (e.g. _mpc.py) in subfolder do_mpc/controller/ for large classes
    • User-facing classes (e.g. MPC) imported in do_mpc/controller/__init__.py.
      • Imported such that do_mpc.controller.MPC still yields the MPC class
      • No changes in front-end for users
    • Recursive documentation with Sphinx / Readthedocs is fully automated now. Important considerations:
      • Private files (marked as e.g. _mpc.py) are not documented
      • Imported modules are documented (e.g. the imported MPC class.
      • Importing with from casadi import * could result in documentation of CasADi package in do-mpc. This is avoided by:
        • Explicitly excluding certain packages (e.g. casadi) to be documented.
        • Marking functions or classes as private with _Name.
        • Using the __all__ = [...] variable to mark in certain files the list of elements that should be documented.

v4.4.0

19 Aug 11:16
Compare
Choose a tag to compare

Major changes

  • MHE/MPC bounds on optimiziation variables can now be changed after calling mhe.setup() and mpc.setup() respectively (fixes #289). The simplest way to set bounds is the mhe.bounds and mpc.bounds property (docs)
  • More granular control over the bounds is now possible, e.g. choosing different values for each time-step of the horizon or for different collocation points (if that makes sense). For this purpose two now properties lb_opt_x and ub_opt_x are now documented and accessible to the user. These properties are indexed similarly to the property opt_x. Importantly, setting new values on these structure automatically considers the scaling factors.
  • The do-mpc model can now be pickled. Pickling is restricted, however and requires (error messages are thrown otherwise):
    • the model class must be setup
    • the model must use SX symbolic variables
  • Enhanced warmstarting: The solver is now supplied with a guess for the dual variables

Minor changes

  • Bug fix: MPCData.prediction was previously unable to query algebraic states _z.
  • Fixed #283: Algebraic states can now be plotted with the graphics package

v4.3.5

18 May 16:57
Compare
Choose a tag to compare

Minor fixes

  • Setup for release in v4.3.4 was incomplete.

v4.3.4

18 May 16:48
490f2c8
Compare
Choose a tag to compare

Minor fixes

  • model.aux can now be queried before calling model.setup()
  • Some typos in documentation