I have a question regarding the implementation of a Multiphase Optimal Control Problem (OCP) with Model Predictive Control (MPC) using
Python interface. I noticed that the example provided in
examples/acados_python/mocp_transition_example/main.py performs the transition at a specific time. However, in my case, the transition depends on a function of the system’s states. Can you guide me on how to implement this? Could you also provide some examples?
having state depended switches is a significantly more difficult problem. You cannot implement it directly in acados nor with the concept of multi-phase/multi-stage optimal control problems. It the latter it is assumed that switching sequence is known.
If you want to optimize over sequence and timing at the same time, you are in the realm of nonsmooh/hybrid optimal control.
What is your specific example? We have other tools and methods in our group that can deal with it (search for nosnoc and nosnoc_py on github).