L-BFGS-B  3.0
Large-scale Bound-constrained Optimization
cauchy.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine cauchy (n, x, l, u, nbd, g, iorder, iwhere, t, d, xcp, m, wy, ws, sy, wt, theta, col, head, p, c, wbp, v, nseg, iprint, sbgnrm, info, epsmch)
 Compute the Generalized Cauchy Point along the projected gradient direction. More...
 

Function/Subroutine Documentation

◆ cauchy()

subroutine cauchy ( integer  n,
double precision, dimension(n)  x,
double precision, dimension(n)  l,
double precision, dimension(n)  u,
integer, dimension(n)  nbd,
double precision, dimension(n)  g,
integer, dimension(n)  iorder,
integer, dimension(n)  iwhere,
double precision, dimension(n)  t,
double precision, dimension(n)  d,
double precision, dimension(n)  xcp,
integer  m,
double precision, dimension(n, col)  wy,
double precision, dimension(n, col)  ws,
double precision, dimension(m, m)  sy,
double precision, dimension(m, m)  wt,
double precision  theta,
integer  col,
integer  head,
double precision, dimension(2*m)  p,
double precision, dimension(2*m)  c,
double precision, dimension(2*m)  wbp,
double precision, dimension(2*m)  v,
integer  nseg,
integer  iprint,
double precision  sbgnrm,
integer  info,
double precision  epsmch 
)

For given x, l, u, g (with sbgnrm > 0), and a limited memory BFGS matrix B defined in terms of matrices WY, WS, WT, and scalars head, col, and theta, this subroutine computes the generalized Cauchy point (GCP), defined as the first local minimizer of the quadratic

       Q(x + s) = g's + 1/2 s'Bs

along the projected gradient direction P(x-tg,l,u). The routine returns the GCP in xcp.

Parameters
nOn entry n is the dimension of the problem.
On exit n is unchanged.
xOn entry x is the starting point for the GCP computation.
On exit x is unchanged.
lOn entry l is the lower bound of x.
On exit l is unchanged.
uOn entry u is the upper bound of x.
On exit u is unchanged.
nbdOn entry nbd represents the type of bounds imposed on the variables, and must be specified as follows: nbd(i)=
  • 0 if x(i) is unbounded,
  • 1 if x(i) has only a lower bound,
  • 2 if x(i) has both lower and upper bounds, and
  • 3 if x(i) has only an upper bound.
On exit nbd is unchanged.
gOn entry g is the gradient of f(x). g must be a nonzero vector.
On exit g is unchanged.
iorderiorder will be used to store the breakpoints in the piecewise linear path and free variables encountered.
On exit,
  • iorder(1),...,iorder(nleft) are indices of breakpoints which have not been encountered;
  • iorder(nleft+1),...,iorder(nbreak) are indices of encountered breakpoints; and
  • iorder(nfree),...,iorder(n) are indices of variables which have no bound constraits along the search direction.
iwhereOn entry iwhere indicates only the permanently fixed (iwhere=3) or free (iwhere= -1) components of x.
On exit iwhere records the status of the current x variables. iwhere(i)=
  • -3 if x(i) is free and has bounds, but is not moved
  • 0 if x(i) is free and has bounds, and is moved
  • 1 if x(i) is fixed at l(i), and l(i) .ne. u(i)
  • 2 if x(i) is fixed at u(i), and u(i) .ne. l(i)
  • 3 if x(i) is always fixed, i.e., u(i)=x(i)=l(i)
  • -1 if x(i) is always free, i.e., it has no bounds.
tworking array; will be used to store the break points.
dthe Cauchy direction P(x-tg)-x
xcpreturns the GCP on exit
mOn entry m is the maximum number of variable metric corrections used to define the limited memory matrix.
On exit m is unchanged.
wsOn entry this stores S, a set of s-vectors, that defines the limited memory BFGS matrix.
On exit this array is unchanged.
wyOn entry this stores Y, a set of y-vectors, that defines the limited memory BFGS matrix.
On exit this array is unchanged.
syOn entry this stores S'Y, that defines the limited memory BFGS matrix.
On exit this array is unchanged.
wtOn entry this stores the Cholesky factorization of (theta*S'S+LD^(-1)L'), that defines the limited memory BFGS matrix.
On exit this array is unchanged.
thetaOn entry theta is the scaling factor specifying B_0 = theta I.
On exit theta is unchanged.
colOn entry col is the actual number of variable metric corrections stored so far.
On exit col is unchanged.
headOn entry head is the location of the first s-vector (or y-vector) in S (or Y).
On exit col is unchanged.
pwill be used to store the vector p = W^(T)d.
cwill be used to store the vector c = W^(T)(xcp-x).
wbpwill be used to store the row of W corresponding to a breakpoint.
vworking array
nsegOn exit nseg records the number of quadratic segments explored in searching for the GCP.
iprintvariable that must be set by the user.
It controls the frequency and type of output generated:
  • iprint<0 no output is generated;
  • iprint=0 print only one line at the last iteration;
  • 0<iprint<99 print also f and |proj g| every iprint iterations;
  • iprint=99 print details of every iteration except n-vectors;
  • iprint=100 print also the changes of active set and final x;
  • iprint>100 print details of every iteration including x and g;
When iprint > 0, the file iterate.dat will be created to summarize the iteration.
sbgnrmOn entry sbgnrm is the norm of the projected gradient at x.
On exit sbgnrm is unchanged.
infoOn entry info is 0. On exit info =
  • 0 for normal return,
  • = nonzero for abnormal return when the the system used in routine bmv is singular.
epsmchmachine precision epsilon

Definition at line 130 of file cauchy.f.

References bmv(), and hpsolb().

Referenced by mainlb().

Here is the call graph for this function:
Here is the caller graph for this function: