help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sqp


From: Juan Pablo Carbajal
Subject: Re: sqp
Date: Fri, 23 Sep 2011 23:28:00 +0200

On Fri, Sep 23, 2011 at 6:18 PM, John Pearson <address@hidden> wrote:
> I'm not sure that this is the proper way to address documentation issues but
> I think the
> help page for "sqp" (sequential quadratic programming) is inconsistent.
> Specifically there are two inconsistent
> definitions for the 3rd and 4th arguments (G and H).
>  -- 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
>
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
>
>

Hi,
I see no inconsistencies.
1. phi(X) is a scalar, but the argument X is a vector, phi: R^n -> R.
The gradient of a scalar function phi, is a vector itself, the vector
G.
2. The hessian is the jacobian of the gradient of phi, again, it
depends on the vector X and it returns a matrix: The hessian H.

If you refer as inconsistencies to the fact that equality constraints
are defined by the vector function g and inequalities by h, and then
the gradient is called G and the hessian H. Well, strictly speaking g,
and G are different symbols, but maybe it can be made more clear. I do
not known.

did I address your problem at all?


-- 
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]