help page for "sqp" (sequential quadratic programming) is inconsistent. Specifically there are two inconsistent
-- Function File: [X, OBJ, INFO, ITER, NF, LAMBDA] = sqp (X0, PHI)
-- Function File: [...] = sqp (X0, PHI, G)
-- Function File: [...] = sqp (X0, PHI, G, H)
-- Function File: [...] = sqp (X0, PHI, G, H, LB, UB)
-- Function File: [...] = sqp (X0, PHI, G, H, LB, UB, MAXITER)
-- Function File: [...] = sqp (X0, PHI, G, H, LB, UB, MAXITER,
TOLERANCE)
Solve the nonlinear program
min phi (x)
x
subject to
g(x) = 0
h(x) >= 0
lb <= x <= ub
THen it says:
When supplied, the gradient function must be of the form
G = gradient (X)
in which X is a vector and G is a vector.
When supplied, the Hessian function must be of the form
H = hessian (X)
in which X is a vector and H is a matrix.
The third and fourth arguments are function handles pointing to
functions that compute the equality constraints and the inequality
constraints, respectively.
Calling G the gradient of X doesn't make any sense to me. IF X is a vector it's gradient should be a matrix in any event,
either g is a constraint or it isn't. If it is a constraint it isn't a gradient and similarly H isn't a Hessian but an inequality constraint. WHich are they? They can't be both!
Best regards and thanks for your great work in making Octave a great open source software tool.
John
--
John E. Pearson