<< cgr CUTEr cidh >>

CUTEr >> CUTEr > cgrdh

cgrdh

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

Calling Sequence

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

Parameters

x

real vector, the variable

v

real vector

options

where options is a 2-dimensional boolean vector

g

gradient of the objective function

cjac

gradients of the general constraint functions

h

the Hessian of the Lagrangian

Description

cgrdh Evaluate gradient of objective or Lagrangian function, gradients of general constraint functions, and Hessian of Lagrangian.

[g,cjac,h]=cgrdh(x,v) returns the gradient of the objective function in g, the gradients of the general constraint functions in cjac, and the Hessian of the Lagrangian in h. The Hessian is stored as a full matrix. cjac(i,j) contains the partial derivative of the i-th constraint with respect to the j-th variable.

[g,cjac,h]=cgrdh(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 %t if the user wants the transpose of the Jacobian, where the i,j-th component is the partial derivative of the j-th constraint with respect to the i-th variable. If options is not given, jtrans defaults to %f.

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

Examples

sifdecode(get_sif_path()+'sif/BT1.SIF',TMPDIR+'/BT1')
buildprob(TMPDIR+'/BT1')
[x,bl,bu,v,cl,cu,equatn,linear] = csetup(TMPDIR+'/BT1/OUTSDIF.d');
[G,CJAC,H]=cgrdh(x,v)

Authors

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


Report an issue
<< cgr CUTEr cidh >>