Hi everyone 
I’m using the Python interface of acados and would like to implement a minimum-time optimal control problem that includes auxiliary algebraic variables appearing in the constraints.
In this problem, the final time T should be an optimisation variable solved by ACADOS — not a fixed parameter.
The setup is inspired by “Optimal Path Planning of CAVs (Connected and Autonomous Vehicles)”, where additional algebraic variables (λ, s) are introduced to handle collision-avoidance constraints.
I want acados to optimise the final time T together with the state, control, and algebraic variables, i.e.
The algebraic variables z only appear in the constraint equations (e.g., contact or collision-avoidance constraints), not in the system dynamics.
What I need help with
1. How can I make T an optimisation variable?
Should it be treated as an algebraic variable, a control variable with zero dynamics, or handled through a time-scaling trick?
2. How can I include algebraic variables (z) that appear only in constraints?
Do they have to be part of the implicit DAE formulation (f_impl_expr), or can they be declared separately as additional optimisation variables?
3. Are there any examples or templates showing this kind of setup?
Ideally, something that combines a minimum-time objective with auxiliary algebraic constraints (DAE or implicit form).
Thanks a lot for your help.
