Hello,
while trying to understand why I couldn't get solutions satisfying the equality constraint with sqp, I noticed the following, as examplified in the enclosed file (octave3.0.1 on Ubuntu, can't change the version). The program draws an ellipse, as defined by a center, a quadratic form and some level. The initial code computes points in the reduced referential, then apply a rotation and a translation into ordinary coordinates.
The next step is to find a point on the ellipse where the coordinates product is maximum. To use sqp, the opposite of the coordinate product is taken as the objective function. The constraint is expressed in terms of the ellipse definition. I compared three methods:
1) use sqp with objective value and gradient, as well as equality value, gradient and hessian
2) use sqp with objective value, gradient and hessian, as well as equality value, gradient and hessian
3) express the augmented problem using Lagrange multiplier, iterativelly cancel out the gradient with a Newton method
The conclusion: method 1 and 3 give the same result, while method 2 give a lower power, but the solution doesn't validate the equality constraint. In particular, I noticed that the lambda as returned by method 1 has only one non-zero component, while the lambda of method 2 (with hessian) contains two non-zero components. Any hint ?
Regards
Pascal
sqp_demo.m