Open gabrieldlm opened 6 months ago
If you solve the optimal control problem by writing it as an NLP, you can get the Lagrange multipliers from the solver. These can be used to construct costate trajectories.
Thanks , by "writeing it as an NLP" you mean as in the rocket.py example ? I´m using the api calls used in race_car.py.
It's not clear to me what you exactly mean by the "adjoint state" here. Do you define the necessary conditions for optimality for the continuous time system using (Pontryagin's)? If you write the problem as an (finite dimensional) NLP, the interface will give you Lagrange multipliers corresponding to simple bounds and nonlinear bounds (lam_x
and lam_g
respectively). In many cases, you can relate these Lagrange multipliers to costate trajectories for the continuous time problem. The mapping will depend on how you do your discretization.
Hi, is there anyway of accessing the adjoint state after solving a optimal control problem?