Equality constraints are denoted in g(·) and the states x(t)and inputs u(t) are limited by box constraints X t and U t ,respectively. Using a direct method implies the discretizationwith a finite timespan ∆t of the continuous problem to obtaina static optimization problem: