nosnoc
nosnoc is an open-source MATLAB
software package for NOnSmooth Numerical Optimal Control.
The Python
package nosnoc_py
with similar functionality is available as well.
Documnetation is avilable here.
A detailed overview of the theory and methods behind nosnoc can be found in the course material of the Summer School on Direct Methods for Optimal Control of Nonsmooth Systems.
nosnoc is a tool for numerically solving optimal control problems with nonsmooth dynamical systems that have switches and/or state jumps. It supports:
Automatic discretization via the FESD method:
Automatic reformulations of systems with state jumps:
Solving nonsmooth nonlinear programs via homotopy methods:
With nosnoc, one can solve optimal control problems subject to several classes of hybrid and nonsmooth systems:
Users may directly provide a DCS or the problem in a standard form which is automatically reformulated into a DCS. nosnoc discretizes a Dynamic Complementarity System (DCS) with the FESD method and solves the resulting MPCCs.
nosnoc requires CasADi
version 3.5.5 and Matlab version R2021b or later.
Install CasADi
and make sure it is added to your MATLAB
path.
For CasADi
installation instructions follow visit: https://web.casadi.org/get/
Clone this repository
git clone --recursive https://github.com/nurkanovic/nosnoc.git
Open the nosnoc
folder in Matlab and run the install_nosnoc
script
>> install_nosnoc
Note that IPOPT
is shipped with CasADi
. More information including detailed documentation can be found on its homepage
Go to the nosnoc_py repository for more info.
The interface of nosnoc is based on the symbolic modeling framework CasADi. User inputs should be provided as CasADi
expressions.
To get started, we recommend you look into our example libraries for:
Finite Elements with Switch Detection for Direct Optimal Control of Nonsmooth Systems \ A.Nurkanović, M. Sperl, S. Albrecht, M. Diehl \ Numerische Mathematik (2024): 1-48
@article{Nurkanovic2024,
title={Finite elements with switch detection for direct optimal control of nonsmooth systems},
author={Nurkanovi{\'c}, Armin and Sperl, Mario and Albrecht, Sebastian and Diehl, Moritz},
journal={Numerische Mathematik},
pages={1--48},
year={2024},
publisher={Springer}
}
Finite Elements with Switch Detection for numerical optimal control of nonsmooth dynamical systems with set-valued heaviside step functions \ A. Nurkanović, A. Pozharskiy, J. Frey, M. Diehl\ Nonlinear Analysis: Hybrid Systems 54, 101518
@article{Nurkanovic2024a,
title={Finite Elements with Switch Detection for numerical optimal control of nonsmooth dynamical systems with set-valued heaviside step functions},
author={Nurkanovi{\'c}, Armin and Pozharskiy, Anton and Frey, Jonathan and Diehl, Moritz},
journal={Nonlinear Analysis: Hybrid Systems},
volume={54},
pages={101518},
year={2024},
publisher={Elsevier}
}
A Time-Freezing Approach for Numerical Optimal Control of Nonsmooth Differential Equations with State Jumps \ A. Nurkanović, T. Sartor, S. Albrecht, M. Diehl \ IEEE Control Systems Letters 2021
The Time-Freezing Reformulation for Numerical Optimal Control of Complementarity Lagrangian Systems with State Jumps \ A. Nurkanović, S. Albrecht, B. Brogliato, M. Diehl \ Automatica 158 (2023): 111295.
Continuous Optimization for Control of Hybrid Systems with Hysteresis via Time-Freezing \ A.Nurkanović , M. Diehl \ IEEE Control Systems Letters 2022
nosnoc: A Software Package for Numerical Optimal Control of Nonsmooth Systems \ A.Nurkanović , M. Diehl \ IEEE Control Systems Letters 2022
@article{Nurkanovic2022,
title={nosnoc: A software package for numerical optimal control of nonsmooth systems},
author={Nurkanovi{\'c}, Armin and Diehl, Moritz},
journal={IEEE Control Systems Letters},
volume={6},
pages={3110--3115},
year={2022},
publisher={IEEE}
}
CasADi - A software framework for nonlinear optimization and optimal control \ J.A.E. Andersson, J. Gillis, G. Horn, J.B. Rawlings, M. Diehl \ Mathematical Programming Computation, 2019
On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming \ A. Wächter, L. T. Biegler Mathematical programming, 2006
If you have questions, remarks, or comments, you are strongly encouraged to report them by creating a new issue on this Github page.
Feel free to contact one of the main developers directly: Armin Nurkanović (armin.nurkanovic@imtek.uni-freiburg.de), Anton Pozharskiy (anton.pozharskiy@imtek.uni-freiburg.de), Jonathan Frey (jonathan.frey@imtek.uni-freiburg.de).
Success stories and source code contributions are very welcome.