Evaluate gradient of objective or Lagrangian function, gradient of general constraint functions, and Hessian of Lagrangian
[cjac,indvar,indfun,H,ICNH,IRNH]=csgrsh(x,v,grlagf)
x is the current estimate of the solution
the current estimate of the Lagrange multipliers
a scalar with possible values 0 and 1, 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 grlagf is not given, grlagf defaults to 0.
non zero elements of the sparse constraint Jacobian matrix
variable indices of non zero elements of the sparse constraint Jacobian matrix
general constraint function indices of non zero elements of the sparse constraint Jacobian matrix
real vector, value of the Hessian matrix of the objective function evaluated at X. H(i) gives the value of the nonzero in row IRNH(i) and column ICNH(i). Only the upper triangular part of the Hessian is stored.
an array which gives the column indices of the nonzeros of the Hessian matrix of the objective function evaluated at X.
an array which gives the row indices of the nonzeros of the Hessian matrix of the objective function evaluated at X.
Compute the Hessian matrix of the Lagrangian function of a problem initially written in Standard Input Format (SIF). Also compute the Hessian matrix of the Lagrangian function of the problem.
cjac
is an array which gives the values
of the nonzeros of the gradients of the objective, or Lagrangian,
and general constraint functions evaluated at X
and V
. The i-th entry of
cjac
gives the value of the derivative with
respect to variable indvar(i)
of function
indfun(i)
. indfun(i) = 0
indicates the objective function whenever
grlagf
is 0 or the lagrangian function when
grlagf
is 1, while indfun(i) = j >
0
indicates the j-th general constraint function.
H
is an array which gives the values of
entries of the upper triangular part of the Hessian matrix of the
Lagrangian function, stored in coordinate form, i.e., the entry
H(i)
is the derivative with respect to
variables with indices X(IRNH(i))
and
X(ICNH(i))
.
Serge Steer, INRIA
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