L-BFGS-B
3.0
Large-scale Bound-constrained Optimization
|
Go to the source code of this file.
Functions/Subroutines | |
subroutine | mainlb (n, m, x, l, u, nbd, f, g, factr, pgtol, ws, wy, sy, ss, wt, wn, snd, z, r, d, t, xp, wa, index, iwhere, indx2, task, iprint, csave, lsave, isave, dsave) |
This subroutine solves bound constrained optimization problems by using the compact formula of the limited memory BFGS updates. More... | |
subroutine mainlb | ( | integer | n, |
integer | m, | ||
double precision, dimension(n) | x, | ||
double precision, dimension(n) | l, | ||
double precision, dimension(n) | u, | ||
integer, dimension(n) | nbd, | ||
double precision | f, | ||
double precision, dimension(n) | g, | ||
double precision | factr, | ||
double precision | pgtol, | ||
double precision, dimension(n, m) | ws, | ||
double precision, dimension(n, m) | wy, | ||
double precision, dimension(m, m) | sy, | ||
double precision, dimension(m, m) | ss, | ||
double precision, dimension(m, m) | wt, | ||
double precision, dimension(2*m, 2*m) | wn, | ||
double precision, dimension(2*m, 2*m) | snd, | ||
double precision, dimension(n) | z, | ||
double precision, dimension(n) | r, | ||
double precision, dimension(n) | d, | ||
double precision, dimension(n) | t, | ||
double precision, dimension(n) | xp, | ||
double precision, dimension(8*m) | wa, | ||
integer, dimension(n) | index, | ||
integer, dimension(n) | iwhere, | ||
integer, dimension(n) | indx2, | ||
character*60 | task, | ||
integer | iprint, | ||
character*60 | csave, | ||
logical, dimension(4) | lsave, | ||
integer, dimension(23) | isave, | ||
double precision, dimension(29) | dsave | ||
) |
This subroutine solves bound constrained optimization problems by using the compact formula of the limited memory BFGS updates.
n | On entry n is the number of variables. On exit n is unchanged. |
m | On entry m is the maximum number of variable metric corrections allowed in the limited memory matrix. On exit m is unchanged. |
x | On entry x is an approximation to the solution. On exit x is the current approximation. |
l | On entry l is the lower bound of x. On exit l is unchanged. |
u | On entry u is the upper bound of x. On exit u is unchanged. |
nbd | On entry nbd represents the type of bounds imposed on the variables, and must be specified as follows: nbd(i)=
|
f | On first entry f is unspecified. On final exit f is the value of the function at x. |
g | On first entry g is unspecified. On final exit g is the value of the gradient at x. |
factr | On entry factr >= 0 is specified by the user. The iteration will stop when (f^k - f^{k+1})/max{|f^k|,|f^{k+1}|,1} <= factr*epsmch where epsmch is the machine precision, which is automatically generated by the code. On exit factr is unchanged. |
pgtol | On entry pgtol >= 0 is specified by the user. The iteration will stop when max{|proj g_i | i = 1, ..., n} <= pgtol where pg_i is the ith component of the projected gradient. On exit pgtol is unchanged. |
ws | On entry this stores S, a set of s-vectors, that defines the limited memory BFGS matrix. On exit this array is unchanged. |
wy | On entry this stores Y, a set of y-vectors, that defines the limited memory BFGS matrix. On exit this array is unchanged. |
sy | On entry this stores S'Y, that defines the limited memory BFGS matrix. On exit this array is unchanged. |
ss | On entry this stores S'S, that defines the limited memory BFGS matrix. On exit this array is unchanged. |
wt | On entry this stores the Cholesky factorization of (theta*S'S+LD^(-1)L'), that defines the limited memory BFGS matrix. See eq. (2.26) in [3]. On exit this array is unchanged. |
wn | working array used to store the LEL^T factorization of the indefinite matrix K = [-D -Y'ZZ'Y/theta L_a'-R_z' ] [L_a -R_z theta*S'AA'S ] where E = [-I 0] [ 0 I] |
snd | working array used to store the lower triangular part of N = [Y' ZZ'Y L_a'+R_z'] [L_a +R_z S'AA'S ] |
z | working array used at different times to store the Cauchy point and the Newton point. |
r | working array |
d | working array |
t | working array |
xp | working array used to safeguard the projected Newton direction |
wa | working array |
index | In subroutine freev, index is used to store the free and fixed variables at the Generalized Cauchy Point (GCP). |
iwhere | working array used to record the status of the vector x for GCP computation. iwhere(i)=
|
indx2 | working array Within subroutine cauchy, indx2 corresponds to the array iorder. In subroutine freev, a list of variables entering and leaving the free set is stored in indx2, and it is passed on to subroutine formk with this information. |
task | working string indicating the current job when entering and leaving this subroutine. |
iprint | It controls the frequency and type of output generated:
|
csave | working string |
lsave | working array |
isave | working array |
dsave | working array |
Definition at line 128 of file mainlb.f.
References active(), cauchy(), cmprlb(), errclb(), formk(), formt(), freev(), lnsrlb(), matupd(), prn1lb(), prn2lb(), prn3lb(), projgr(), subsm(), and timer().
Referenced by setulb().