Constrained dynamic optimization with fmincon
Mostrar comentarios más antiguos
Hello,
I am trying to use fmincon to solve a dynamic optimization problem:

where u are my control variables, x are my state variables and T are terminal constraints that depend on the state variables. I know that in theory in a dynamic optimization problem there are adjoint variables that vary with time and that are defined with regards to the constraints. The optimality conditions depend on those adjoint variables (optimality conditions based on Pontryagin's principle).
In my case, I need T to be equal to 0 (within a specific tolerance). Not knowing how to solve a dynamic optimization problem with Matlab, I have taken these contraints into consideration by creating a new optimization function Jnew= w1*J+ w2 * T and I try to minimize Jnew.
For example I set w2 by keeping the tolerance I want for T in mind, e.g. if I want T to be around 1e-3 and w1*J has an order of magnitude of 1 at optimum (based on calculations run previously without the contraint), I set w2 to 1e3 to have the same order of magnitude for my two terms at the "optimum", so that fmincon doesn't just consider one term over the other. However I feel this is a somewhat arbitrary way to set the weights. And the problem is that they remain constant in all iterations.
I just don't know if this is a legitimate way to apply fmincon, if the way I have formulated my problem allows me to obtain a minimum that satisfies the optimality conditions. I know fmincon is not a dynamic solver and it doesn't consider adjoint variables, especially since I directly define the constraints myself as a sum.
Can anyone with some knowledge on the subject or has been confronted with a similar problem help me out please?
I would really appreciate it.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Get Started with Optimization Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!