Is it possible to formulate an OCP with time horizon as a state variable

Hi all,

I wonder if one can use ACADOS also to formulate an OCP problem with the time horizon also as a state variable, such as {s}=[T, x, u]. In casadi, one can specify any variable as a state variable, and set dt=T/N as one of the constraints. Any suggestion is welcomed. Thanks a lot.

Hi,
since the acados problem formulation needs to fit into the OCP structure.
I guess this discussion is interesting for you

And the time optimal example just added to acados last week, see: