Scilab Function

csgrsh - Evaluate gradient of objective or Lagrangian function, gradient of general constraint functions, and Hessian of Lagrangian

Calling Sequence

[g,cjac,h] = csgrsh(x,v,options)

Parameters

Description

[g,cjac,h]=csgrsh(x,v) returns the sparse gradient of the objective function in g, the sparse constraint Jacobian matrix in cjac, and the sparse Hessian of the Lagrangian in h.

The i,j-th nonzero entry in cjac corresponds to the partial derivative of the i-th constraint with respect to the j-th variable.

The i,j-th nonzero entry in h corresponds to the partial derivative of the Lagrangian function with respect to the i-th and j-th variables. Since the Hessian is symmetric, only the upper triangular entries are returned.

[g,cjac,h]=csgrsh(x,v,options), where options is a 2-dimensional vector, allows cjac to be transposed and requests the gradient of the Lagrangian to be placed in g.

options( 1 ) = jtrans, set to 1 if the user wants the transpose of the Jacobian, where the i,j-th nonzero entry is the partial derivative of the j-th constraint with respect to the i-th variable. If options is not given, jtrans defaults to 0.

options( 2 ) = grlagf, set to 1 if the gradient of the Lagrangian is required and set to 0 if the gradient of the objective function is sought. If options is not given, grlagf defaults to 0.

Author

Bibliography

Based on CUTEr authored by

Nicholas I.M. Gould - n.gould@rl.ac.uk - RAL

Dominique Orban - orban@ece.northwestern.edu - Northwestern

Philippe L. Toint - Philippe.Toint@fundp.ac.be - FUNDP

see http://hsl.rl.ac.uk/cuter-www