fminunc: Interior Point Algorithm
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hey guys,
I was recently trying to give initial values for the dual-variables (Lagrange-Multipliers and Slack-Variables) in fmincon. You can see the old question here .
As I had to find out, that this is not possible, I am trying to implement an algorithm for the non-linear constrained optimization on my own, trying to do this as time efficient as possible.
So my idea was to just include the constraints with Lagrange-Multipliers, Penalty-Functions and Slack-Variables on my own.
I was reading literature and included the constraints as follows:
%%Lagrangian
L=cost(u)+y'*equality(u)'+z'*(inequality(u)'+s)-bar*(ones(1,e)*log(s));
Where "equality" is a function containing all the equality constraints, and respectively inequality is a function containing all the inequality constraints.
"y" is a vector with the Langrange-Multipliers for the equality-constraints, "z" are the Langrange-Multipliers for the inequlity-constraints and "s" are the slack-variables for the inequality-constraints. The last term is a barrier-function for the slack-varibales.
So what I am trying to do right now, is to minimze over this new objective function with the 'quasi-newton'-method in fminunc.
But... it doesn't yet work properly and the constraints get violated.
So as I'm not too familiar with optimization, my question is:
Is my approach correct or am I missing something? Is it sufficient to just include the constraints as described above, and apply the Newton-Method on this new objective function?
Hope someone can help me with this one.
Thanks!
0 commentaires
Réponses (2)
Matt J
le 26 Oct 2017
Modifié(e) : Matt J
le 26 Oct 2017
No, it won't work that way. Replacing the constrained problem with an unconstrained minimization of the Lagrangian works only if you already know the optimal values of the dual variables. Even then, I believe it only works for convex problems.
5 commentaires
Matt J
le 28 Oct 2017
Modifié(e) : Matt J
le 28 Oct 2017
No, you would sum the final values of the lambdas.
Again, supposing that fmincon chooses lambda=0 in any given run as the starting point for the dual variables, the scheme should be equivalent to resuming from the previous lambda.
Either way, you are feeding forward information on the Lagrangian in each pass through fmincon, so it has to be beneficial somehow.
Matt J
le 28 Oct 2017
Modifié(e) : Matt J
le 28 Oct 2017
Another thing you could try is to apply FMINUNC with unknowns (u,y,z,s) to the function
F(u,y,z,s)= norm( [LagrangianGradient(u,y,z.^2) ; equality(u);
(inequality(u)+s.^2); inequality(u).*z.^2] )^2
This is similar to what you attempted in your posted question, but here F=0 does correspond to an optimal point and the positivity of slack and Lagrange multipliers is enforced inherently by the squaring s.^2 and z.^2.
0 commentaires
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!