Discrete dynamics

Hi Thomas,

first of all, thanks for the positive feedback!

In acados, typically only the problem functions are generated using CasADi, these are then compiled and linked against acados to create a problem specific solver.

Another kind of Code generation is the rendering of the C templates, which produce a function to generate an acados OCP solver/ integrator, a minimal main file to showcase how to call it, and a Makefile.
The Python interface is based on these templates and the Matlab interface supports this workflow as a way to go embedded.

For more background information, look for “code generation” in our paper.

As to the topic of this post:
Discrete Dynamics are supported from the C part of acados, but this option has indeed not been added to the interfaces yet.

C example:

Since your problem is quite specific and involves some options that are not part of the interfaces (yet), also regarding your other post, the main options I see for you is
a) to extend the interface for your needs
b) to generate your OCP solver directly in C

Best,
Jonathan