Tue 08 Mar 2011 04:31:47 PM UTC, original submission:
Dear Octave Developers,
The nonlinear optimization routine "sqp" seems to not deal properly with the case where the qp subproblem turns out to be infeasible (either because the actual nonlinear program is infeasible or because the local constraint linearization gave rise to an infeasible problem).
To show the error, you may execute the following lines of code (to which I am attaching two necessary .m files, which defines the equality constraints and the objective function).
x0 = zeros(2,1);
xmin = [-1;-1];
xmax = [ 0;0];
[xopt, obj, info, iter] = sqp (x0, "objfun", "eqcon", [], xmin, xmax);
Specifically, the chosen example is infeasible. The routine sqp returns an error at the following lines:
if (! isempty (A))
t = ((A_new - A)'*lambda);
y -= t;
endif
because lambda is an empty vector due to the fact the qp subproblem was infeasible.
I briefly skimmed the relevant chapter of Nocedal and Wright optimization book, which maybe was used as a reference for writing the code, and the solution does not seem trivial and may involve using slack variables and large linear penalties to ensure that the qp sub-problems are always feasible at each iteration.
I may try to explore this path if the Team thinks it is useful. In the short term I would suggest adding a check, right after the qp call, to detect if it was infeasible and in such case exist sqp and return a code for infeasible problem.
Thanks and please let me know if I can be of any help with this.
Gabriele Pannocchia
|