lbfgsb3c/0000755000176200001440000000000013627435412011746 5ustar liggesuserslbfgsb3c/NAMESPACE0000644000176200001440000000031113625774746013176 0ustar liggesusers# Generated by roxygen2: do not edit by hand export(lbfgsb3) export(lbfgsb3c) export(lbfgsb3f) export(lbfgsb3x) importFrom(Rcpp,evalCpp) importFrom(methods,is) useDynLib(lbfgsb3c, .registration=TRUE) lbfgsb3c/LICENSE.note0000644000176200001440000000304613511470416013715 0ustar liggesusersThe repository for the original Fortran code by Nocedal and Morales states: Condition for Use: This software is freely available, but we expect that all publications describing work using this software , or all commercial products using it, quote at least one of the references given below. This software is released under the "New BSD License" (aka "Modified BSD License" or "3-clause license"). References R. H. Byrd, P. Lu and J. Nocedal. A Limited Memory Algorithm for Bound Constrained Optimization, (1995), SIAM Journal on Scientific and Statistical Computing , 16, 5, pp. 1190-1208. C. Zhu, R. H. Byrd and J. Nocedal. L-BFGS-B: Algorithm 778: L-BFGS-B, FORTRAN routines for large scale bound constrained optimization (1997), ACM Transactions on Mathematical Software, Vol 23, Num. 4, pp. 550 - 560. J.L. Morales and J. Nocedal. L-BFGS-B: Remark on Algorithm 778: L-BFGS-B, FORTRAN routines for large scale bound constrained optimization (2011), ACM Transactions on Mathematical Software, Vol 38, Num. 1, pp. 7:1 - 7:4. Minor modifications to this code were made by John C Nash to allow it to work within R. This code can be used under the same BSD 3-clause license. The wrapper code and other materials in the package are released under GPL-2 license. All have been written by John C Nash. Help of Berend Hasselman is gratefully acknowledged. Minor modifications to the code were also made by Matthew Fidler to allow direct C calling and some additional optimiation options. These were relaesed under GPL-2.lbfgsb3c/README.md0000644000176200001440000000143713511470416013225 0ustar liggesusers[![Travis-CI Build Status](https://travis-ci.org/nlmixrdevelopment/lbfgsb3c.svg?branch=master)](https://travis-ci.org/nlmixrdevelopment/lbfgsb3c) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/nlmixrdevelopment/lbfgsb3c?branch=master&svg=true)](https://ci.appveyor.com/project/nlmixrdevelopment/lbfgsb3c) # libfgsb3c interface from C This is the fork of the libfgsb3 from cran with the following differences: - The return type has changed is is very similar to what `optim` returns - Allows a direct C/C++ interface through a R registered function, similar to C interface to `optim` with 2 additional arguments. - Allows adjustment of tolerances for minimization success. - Added `xtolAtol` and `xtolRtol` minimization success criterion. - Added `maxit` termination lbfgsb3c/man/0000755000176200001440000000000013625551253012521 5ustar liggesuserslbfgsb3c/man/lbfgsb3c.Rd0000644000176200001440000001620613625774410014504 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lbfgsb3.R \name{lbfgsb3c} \alias{lbfgsb3c} \alias{lbfgsb3} \alias{lbfgsb3f} \alias{lbfgsb3x} \title{Interfacing wrapper for the Nocedal - Morales LBFGSB3 (Fortran) limited memory BFGS solver.} \usage{ lbfgsb3c( par, fn, gr = NULL, lower = -Inf, upper = Inf, control = list(), ..., rho = NULL ) lbfgsb3( par, fn, gr = NULL, lower = -Inf, upper = Inf, control = list(), ..., rho = NULL ) lbfgsb3f( par, fn, gr = NULL, lower = -Inf, upper = Inf, control = list(), ..., rho = NULL ) lbfgsb3x( par, fn, gr = NULL, lower = -Inf, upper = Inf, control = list(), ..., rho = NULL ) } \arguments{ \item{par}{A parameter vector which gives the initial guesses to the parameters that will minimize \code{fn}. This can be named, for example, we could use par=c(b1=1, b2=2.345, b3=0.123)} \item{fn}{A function that evaluates the objective function to be minimized. This can be a R function or a Rcpp function pointer.} \item{gr}{If present, a function that evaluates the gradient vector for the objective function at the given parameters computing the elements of the sum of squares function at the set of parameters \code{start}. This can be a R function or a Rcpp function pointer.} \item{lower}{Lower bounds on the parameters. If a single number, this will be applied to all parameters. Default -Inf.} \item{upper}{Upper bounds on the parameters. If a single number, this will be applied to all parameters. Default Inf.} \item{control}{An optional list of control settings. See below in details.} \item{...}{Any data needed for computation of the objective function and gradient.} \item{rho}{An Environment to use for function evaluation. If present the arguments in ... are ignored. Otherwise the ... are converted to an environment for evaluation.} } \value{ A list of the following items \itemize{ \item{par} The best set of parameters found. \item{value} The value of fn corresponding to par. \item{counts} A two-element integer vector giving the number of calls to fn and gr respectively. This excludes any calls to fn to compute a finite-difference approximation to the gradient. \item{convergence} An integer code. 0 indicates successful completion } } \description{ Interfacing wrapper for the Nocedal - Morales LBFGSB3 (Fortran) limited memory BFGS solver. } \details{ See the notes below for a general appreciation of this package. The control list can contain: \itemize{ \item{trace} If positive, tracing information on the progress of the optimization is produced. Higher values may produce more tracing information: for method "L-BFGS-B" there are six levels of tracing. (To understand exactly what these do see the source code: higher levels give more detail.) \item{factr} controls the convergence of the "L-BFGS-B" method. Convergence occurs when the reduction in the objective is within this factor of the machine tolerance. Default is 1e7, that is a tolerance of about 1e-8. \item{pgtol} helps control the convergence of the "L-BFGS-B" method. It is a tolerance on the projected gradient in the current search direction. This defaults to zero, when the check is suppressed. \item{abstol} helps control the convergence of the "L-BFGS-B" method. It is an absolute tolerance difference in x values. This defaults to zero, when the check is suppressed. \item{reltol} helps control the convergence of the "L-BFGS-B" method. It is an relative tolerance difference in x values. This defaults to zero, when the check is suppressed. \item{lmm} is an integer giving the number of BFGS updates retained in the "L-BFGS-B" method, It defaults to 5. \item{maxit} maximum number of iterations. \item{iprint} Provided only for compatibility with older codes. This control is no longer active.) \item{info} a boolean to indicate if more optimization information is captured and output in a $info list } } \note{ This package is a wrapper to the Fortran code released by Nocedal and Morales. This poses several difficulties for an R package. While the \code{.Fortran()} tool exists for the interfacing, we must be very careful to align the arguments with those of the Fortran subroutine, especially in type and storage. A more annoying task for interfacing the Fortran code is that Fortran WRITE or PRINT statements must all be replaced with calls to special R-friendly output routines. Unfortunately, the Fortran is full of output statements. Worse, we may wish to be able to suppress such output, and there are thus many modifications to be made. This means that an update of the original code cannot be simply plugged into the R package \code{src} directory. Finally, and likely because L-BFGS-B has a long history, the Fortran code is far from well-structured. For example, the number of function and gradient evaluations used is returned as the 34'th element of an integer vector. There does not appear to be an easy way to stop the program after some maximum number of such evaluations have been performed. On the other hand, the version of L-BFGS-B in \code{optim()} is a \code{C} translation of a now-lost Fortran code. It does not implement the improvements Nocedal and Morales published in 2011. Hence, despite its deficiencies, this wrapper has been prepared. In addition to the above reasons for the original lbfgsb3 package, this additional package allows C calling of L-BFGS-B 3.0 by a program as well as adjustments to the tolerances that were not present in the original CRAN package. Also adjustments were made to have outputs conform with R's optim routine. } \examples{ # Rosenbrock's banana function n=3; p=100 fr = function(x) { f=1.0 for(i in 2:n) { f=f+p*(x[i]-x[i-1]**2)**2+(1.0-x[i])**2 } f } grr = function(x) { g = double(n) g[1]=-4.0*p*(x[2]-x[1]**2)*x[1] if(n>2) { for(i in 2:(n-1)) { g[i]=2.0*p*(x[i]-x[i-1]**2)-4.0*p*(x[i+1]-x[i]**2)*x[i]-2.0*(1.0-x[i]) } } g[n]=2.0*p*(x[n]-x[n-1]**2)-2.0*(1.0-x[n]) g } x = c(a=1.02, b=1.02, c=1.02) (opc <- lbfgsb3c(x,fr, grr)) (op <- lbfgsb3(x,fr, grr, control=list(trace=1))) (opx <- lbfgsb3x(x,fr, grr)) (opf <- lbfgsb3f(x,fr, grr)) } \references{ Morales, J. L.; Nocedal, J. (2011). "Remark on 'algorithm 778: L-BFGS-B: Fortran subroutines for large-scale bound constrained optimization' ". ACM Transactions on Mathematical Software 38: 1. Byrd, R. H.; Lu, P.; Nocedal, J.; Zhu, C. (1995). "A Limited Memory Algorithm for Bound Constrained Optimization". SIAM J. Sci. Comput. 16 (5): 1190-1208. Zhu, C.; Byrd, Richard H.; Lu, Peihuang; Nocedal, Jorge (1997). "L-BFGS-B: Algorithm 778: L-BFGS-B, FORTRAN routines for large scale bound constrained optimization". ACM Transactions on Mathematical Software 23 (4): 550-560. } \seealso{ Packages \code{\link{optim}} and \code{optimx}. } \author{ Matthew Fidler (move to C and add more options for adjustments), John C Nash (of the wrapper and edits to Fortran code to allow R output) Ciyou Zhu, Richard Byrd, Jorge Nocedal, Jose Luis Morales (original Fortran packages) } \keyword{nonlinear} \keyword{optimization} \keyword{parameter} lbfgsb3c/DESCRIPTION0000644000176200001440000000347313627435412013463 0ustar liggesusersPackage: lbfgsb3c Type: Package Title: Limited Memory BFGS Minimizer with Bounds on Parameters with optim() 'C' Interface Version: 2020-3.2 Authors@R: c(person(given = c("Matthew", "L"), family = "Fidler", role = c("aut", "cre"), email = "matthew.fidler@gmail.com"), person(given = c("John", "C"), family = "Nash", role = c("aut"), email = "nashjc@uottawa.ca"), person(given = "Ciyou", family = "Zhu", role = "aut"), person(given = "Richard", family = "Byrd", role = "aut"), person(given = "Jorge", family = "Nocedal", role = "aut"), person(given = c("Jose", "Luis"), family = "Morales", role = "aut")) Maintainer: Matthew L Fidler Description: Interfacing to Nocedal et al. L-BFGS-B.3.0 (See ) limited memory BFGS minimizer with bounds on parameters. This is a fork of 'lbfgsb3'. This registers a 'R' compatible 'C' interface to L-BFGS-B.3.0 that uses the same function types and optimization as the optim() function (see writing 'R' extensions and source for details). This package also adds more stopping criteria as well as allowing the adjustment of more tolerances. License: GPL-2 Depends: R (>= 3.0.2) Imports: Rcpp (>= 0.12.3), numDeriv, methods Suggests: optimx, microbenchmark, testthat, knitr, pkgbuild, rmarkdown, RcppArmadillo LinkingTo: Rcpp (>= 0.12.3), RcppArmadillo Encoding: UTF-8 VignetteBuilder: knitr NeedsCompilation: yes RoxygenNote: 7.0.2 Author: Matthew L Fidler [aut, cre], John C Nash [aut], Ciyou Zhu [aut], Richard Byrd [aut], Jorge Nocedal [aut], Jose Luis Morales [aut] Packaged: 2020-03-02 16:38:23 UTC; matt Repository: CRAN Date/Publication: 2020-03-03 11:10:02 UTC lbfgsb3c/build/0000755000176200001440000000000013627233177013051 5ustar liggesuserslbfgsb3c/build/vignette.rds0000644000176200001440000000031113627233177015403 0ustar liggesusersb```b`f@&0rH$''妠 ts 2sRq.HICB t0XXT%igwI-HK î?"5lP5,n _@ ,s\ܠL t7`~΢r=xA$Gs=ʕXVr7Klbfgsb3c/tests/0000755000176200001440000000000013513627745013116 5ustar liggesuserslbfgsb3c/tests/testthat/0000755000176200001440000000000013627435412014750 5ustar liggesuserslbfgsb3c/tests/testthat/test-genrose.R0000644000176200001440000000225713511470416017513 0ustar liggesusersgenrose.f <- function(x, gs = NULL) { # objective function ## One generalization of the Rosenbrock banana valley # function (n parameters) n <- length(x) if (is.null(gs)) { gs = 100 } fval <- 1 + sum(gs * (x[1:(n - 1)]^2 - x[2:n])^2 + (x[2:n] - 1)^2) return(fval) } genrose.g <- function(x, gs = NULL) { # vectorized gradient for genrose.f # Ravi Varadhan 2009-04-03 n <- length(x) if (is.null(gs)) { gs = 100 } gg <- as.vector(rep(0, n)) tn <- 2:n tn1 <- tn - 1 z1 <- x[tn] - x[tn1]^2 z2 <- 1 - x[tn] gg[tn] <- 2 * (gs * z1 - z2) gg[tn1] <- gg[tn1] - 4 * gs * x[tn1] * z1 gg } context("Unconstrained Genrose test with gradient") nn <- 100 xx <- rep(3, nn) lo <- -Inf up <- Inf test_that("100u", { ans100u <- lbfgsb3c(xx, genrose.f, genrose.g, gs = 10) expect_equal(1, ans100u$value) }) context("Unconstrained Genrose test without gradient") ans100un <- lbfgsb3c(xx, genrose.f, gr = NULL, gs = 10) test_that("100u", { ans100un <- lbfgsb3c(xx, genrose.f, gs = 10) expect_equal(1, ans100un$value) }) lbfgsb3c/tests/testthat/test-bounds.R0000644000176200001440000000104713511470416017337 0ustar liggesuserscontext("Bounds") test_that("bounds test", { bt.f<-function(x){ sum(x*x) } bt.g<-function(x){ gg<-2.0*x } n<-4 lower<-rep(0,n) upper<-lower ## to get arrays set ## bdmsk<-rep(1,n) ## bdmsk[(trunc(n/2)+1)]<-0 for (i in 1:n) { lower[i]<-1.0*(i-1)*(n-1)/n upper[i]<-1.0*i*(n+1)/n } xx<-0.5*(lower+upper) abt <- lbfgsb3c(xx, bt.f, bt.g, lower=lower, upper=upper, control=list(trace=0, iprint=0)) expect_equal(abt$par, c(0, 0.75, 1.5, 2.25)) }) lbfgsb3c/tests/testthat/test-cyq.R0000644000176200001440000000605113511470416016641 0ustar liggesusers# Ref: Fletcher, R. (1965) Function minimization without # calculating derivatives -- a review, # Computer J., 8, 33-41. # Note we do not have all components here e.g., .jsd, .h ## context("Fletcher's Chebyquad problem") cyq.f <- function(x) { rv <- cyq.res(x) f <- sum(rv * rv) } cyq.res <- function(x) { # Fletcher's chebyquad function m = n -- residuals n <- length(x) res <- rep(0, n) # initialize for (i in 1:n) { #loop over resids rr <- 0 for (k in 1:n) { z7 <- 1 z2 <- 2 * x[k] - 1 z8 <- z2 j <- 1 while (j < i) { z6 <- z7 z7 <- z8 z8 <- 2 * z2 * z7 - z6 # recurrence to compute Chebyshev polynomial j <- j + 1 } # end recurrence loop rr <- rr + z8 } # end loop on k rr <- rr/n if (2 * trunc(i/2) == i) { rr <- rr + 1/(i * i - 1) } res[i] <- rr } # end loop on i res } cyq.jac <- function(x) { # Chebyquad Jacobian matrix n <- length(x) cj <- matrix(0, n, n) for (i in 1:n) { # loop over rows for (k in 1:n) { # loop over columns (parameters) z5 <- 0 cj[i, k] <- 2 z8 <- 2 * x[k] - 1 z2 <- z8 z7 <- 1 j <- 1 while (j < i) { # recurrence loop z4 <- z5 z5 <- cj[i, k] cj[i, k] <- 4 * z8 + 2 * z2 * z5 - z4 z6 <- z7 z7 <- z8 z8 <- 2 * z2 * z7 - z6 j <- j + 1 } # end recurrence loop cj[i, k] <- cj[i, k]/n } # end loop on k } # end loop on i cj } cyq.g <- function(x) { cj <- cyq.jac(x) rv <- cyq.res(x) gg <- as.vector(2 * rv %*% cj) } # nn <- c(2, 3, 5, 8, 10, 20, 30) nn <- c(2, 3, 5, 8) for (n in nn) { str <- paste0("Chebyquad in ", n, " parameters"); context(str) test_that(str, { lower <- rep(-10, n) upper <- rep(10, n) bdmsk <- rep(1, n) # free all parameters x0 <- 1:n x0 <- x0/(n + 1) # Initial value suggested by Fletcher ans <- lbfgsb3c(x0, cyq.f, cyq.g, lower, upper, control = list()) if (n == 2){ expect_equal(c(0.211, 0.789), round(ans$par, 3)) expect_equal(0, round(ans$value, 3)) } else if (n == 3){ expect_equal(c(0.146, 0.5, 0.854), round(ans$par, 3)) expect_equal(0, round(ans$value, 3)) } else if (n == 5){ expect_equal(c(0.084, 0.313, 0.5, 0.687, 0.916), round(ans$par, 3)) expect_equal(0, round(ans$value, 3)) } else if (n == 8){ expect_equal(c(0.043, 0.193, 0.266, 0.5, 0.5, 0.734, 0.807, 0.957), round(ans$par, 3)) expect_equal(0.004, round(ans$value, 3)) } }) } lbfgsb3c/tests/testthat.R0000644000176200001440000000007413511470416015067 0ustar liggesuserslibrary(testthat) library(lbfgsb3c) test_check("lbfgsb3c") lbfgsb3c/src/0000755000176200001440000000000013627233177012541 5ustar liggesuserslbfgsb3c/src/blas.f0000644000176200001440000001425013511470416013622 0ustar liggesusersc c L-BFGS-B is released under the “New BSD License” (aka “Modified BSD License” c or “3-clause license”) c Please read attached file License.txt c double precision function dnrm2(n,x,incx) integer n,incx double precision x(n) c ********** c c Function dnrm2 c c Given a vector x of length n, this function calculates the c Euclidean norm of x with stride incx. c c The function statement is c c double precision function dnrm2(n,x,incx) c c where c c n is a positive integer input variable. c c x is an input array of length n. c c incx is a positive integer variable that specifies the c stride of the vector. c c Subprograms called c c FORTRAN-supplied ... abs, max, sqrt c c MINPACK-2 Project. February 1991. c Argonne National Laboratory. c Brett M. Averick. c c ********** integer i double precision scale dnrm2 = 0.0d0 scale = 0.0d0 do 10 i = 1, n, incx scale = max(scale, abs(x(i))) 10 continue if (scale .eq. 0.0d0) return do 20 i = 1, n, incx dnrm2 = dnrm2 + (x(i)/scale)**2 20 continue dnrm2 = scale*sqrt(dnrm2) return end c====================== The end of dnrm2 =============================== subroutine daxpy(n,da,dx,incx,dy,incy) c c constant times a vector plus a vector. c uses unrolled loops for increments equal to one. c jack dongarra, linpack, 3/11/78. c double precision dx(*),dy(*),da integer i,incx,incy,ix,iy,m,mp1,n c if(n.le.0)return if (da .eq. 0.0d0) return if(incx.eq.1.and.incy.eq.1)go to 20 c c code for unequal increments or equal increments c not equal to 1 c ix = 1 iy = 1 if(incx.lt.0)ix = (-n+1)*incx + 1 if(incy.lt.0)iy = (-n+1)*incy + 1 do 10 i = 1,n dy(iy) = dy(iy) + da*dx(ix) ix = ix + incx iy = iy + incy 10 continue return c c code for both increments equal to 1 c c c clean-up loop c 20 m = mod(n,4) if( m .eq. 0 ) go to 40 do 30 i = 1,m dy(i) = dy(i) + da*dx(i) 30 continue if( n .lt. 4 ) return 40 mp1 = m + 1 do 50 i = mp1,n,4 dy(i) = dy(i) + da*dx(i) dy(i + 1) = dy(i + 1) + da*dx(i + 1) dy(i + 2) = dy(i + 2) + da*dx(i + 2) dy(i + 3) = dy(i + 3) + da*dx(i + 3) 50 continue return end c====================== The end of daxpy =============================== subroutine dcopy(n,dx,incx,dy,incy) c c copies a vector, x, to a vector, y. c uses unrolled loops for increments equal to one. c jack dongarra, linpack, 3/11/78. c double precision dx(*),dy(*) integer i,incx,incy,ix,iy,m,mp1,n c if(n.le.0)return if(incx.eq.1.and.incy.eq.1)go to 20 c c code for unequal increments or equal increments c not equal to 1 c ix = 1 iy = 1 if(incx.lt.0)ix = (-n+1)*incx + 1 if(incy.lt.0)iy = (-n+1)*incy + 1 do 10 i = 1,n dy(iy) = dx(ix) ix = ix + incx iy = iy + incy 10 continue return c c code for both increments equal to 1 c c c clean-up loop c 20 m = mod(n,7) if( m .eq. 0 ) go to 40 do 30 i = 1,m dy(i) = dx(i) 30 continue if( n .lt. 7 ) return 40 mp1 = m + 1 do 50 i = mp1,n,7 dy(i) = dx(i) dy(i + 1) = dx(i + 1) dy(i + 2) = dx(i + 2) dy(i + 3) = dx(i + 3) dy(i + 4) = dx(i + 4) dy(i + 5) = dx(i + 5) dy(i + 6) = dx(i + 6) 50 continue return end c====================== The end of dcopy =============================== double precision function ddot(n,dx,incx,dy,incy) c c forms the dot product of two vectors. c uses unrolled loops for increments equal to one. c jack dongarra, linpack, 3/11/78. c double precision dx(*),dy(*),dtemp integer i,incx,incy,ix,iy,m,mp1,n c ddot = 0.0d0 dtemp = 0.0d0 if(n.le.0)return if(incx.eq.1.and.incy.eq.1)go to 20 c c code for unequal increments or equal increments c not equal to 1 c ix = 1 iy = 1 if(incx.lt.0)ix = (-n+1)*incx + 1 if(incy.lt.0)iy = (-n+1)*incy + 1 do 10 i = 1,n dtemp = dtemp + dx(ix)*dy(iy) ix = ix + incx iy = iy + incy 10 continue ddot = dtemp return c c code for both increments equal to 1 c c c clean-up loop c 20 m = mod(n,5) if( m .eq. 0 ) go to 40 do 30 i = 1,m dtemp = dtemp + dx(i)*dy(i) 30 continue if( n .lt. 5 ) go to 60 40 mp1 = m + 1 do 50 i = mp1,n,5 dtemp = dtemp + dx(i)*dy(i) + dx(i + 1)*dy(i + 1) + * dx(i + 2)*dy(i + 2) + dx(i + 3)*dy(i + 3) + dx(i + 4)*dy(i + 4) 50 continue 60 ddot = dtemp return end c====================== The end of ddot ================================ subroutine dscal(n,da,dx,incx) c c scales a vector by a constant. c uses unrolled loops for increment equal to one. c jack dongarra, linpack, 3/11/78. c modified 3/93 to return if incx .le. 0. c double precision da,dx(*) integer i,incx,m,mp1,n,nincx c if( n.le.0 .or. incx.le.0 )return if(incx.eq.1)go to 20 c c code for increment not equal to 1 c nincx = n*incx do 10 i = 1,nincx,incx dx(i) = da*dx(i) 10 continue return c c code for increment equal to 1 c c c clean-up loop c 20 m = mod(n,5) if( m .eq. 0 ) go to 40 do 30 i = 1,m dx(i) = da*dx(i) 30 continue if( n .lt. 5 ) return 40 mp1 = m + 1 do 50 i = mp1,n,5 dx(i) = da*dx(i) dx(i + 1) = da*dx(i + 1) dx(i + 2) = da*dx(i + 2) dx(i + 3) = da*dx(i + 3) dx(i + 4) = da*dx(i + 4) 50 continue return end c====================== The end of dscal =============================== lbfgsb3c/src/init.c0000644000176200001440000000161113511470416013636 0ustar liggesusers#include "../inst/include/lbfgsb3c.h" #include #include #include // for NULL #include void lbfgsb3C_(int n, int lmm, double *x, double *lower, double *upper, int *nbd, double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int iprint, double atol, double rtol, double *g); SEXP _lbfgsb3c_lbfgsb3cpp(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); void R_init_lbfgsb3c(DllInfo *info){ R_CallMethodDef callMethods[] = { {"_lbfgsb3c_lbfgsb3cpp", (DL_FUNC) &_lbfgsb3c_lbfgsb3cpp, 7}, {NULL, NULL, 0} }; // C callable to assign environments. R_RegisterCCallable("lbfgsb3c", "lbfgsb3C_", (DL_FUNC) lbfgsb3C_); R_registerRoutines(info, NULL, callMethods, NULL, NULL); R_useDynamicSymbols(info, FALSE); } lbfgsb3c/src/lbfgsb.f0000755000176200001440000042346313625551177014167 0ustar liggesusersc c L-BFGS-B is released under the "New BSD License" (aka "Modified BSD License" c or "3-clause license") c Please read attached file License.txt c c=========== L-BFGS-B (version 3.0. April 25, 2011 =================== c c This is a modified version of L-BFGS-B. Minor changes in the updated c code appear preceded by a line comment as follows c c c-jlm-jn c c Major changes are described in the accompanying paper: c c Jorge Nocedal and Jose Luis Morales, Remark on "Algorithm 778: c L-BFGS-B: Fortran Subroutines for Large-Scale Bound Constrained c Optimization" (2011). To appear in ACM Transactions on c Mathematical Software, c c The paper describes an improvement and a correction to Algorithm 778. c It is shown that the performance of the algorithm can be improved c significantly by making a relatively simple modication to the subspace c minimization phase. The correction concerns an error caused by the use c of routine dpmeps to estimate machine precision. c c The total work space **wa** required by the new version is c c 2*m*n + 11m*m + 5*n + 8*m c c the old version required c c 2*m*n + 12m*m + 4*n + 12*m c c c J. Nocedal Department of Electrical Engineering and c Computer Science. c Northwestern University. Evanston, IL. USA c c c J.L Morales Departamento de Matematicas, c Instituto Tecnologico Autonomo de Mexico c Mexico D.F. Mexico. c c March 2011 c c============================================================================= c JN 20150118 change name setulb to lbfgsb3 c MLF 20180818 changed name back lbfgsb3 in c wrapper subroutine setulb(n, m, x, l, u, nbd, f, g, factr, pgtol, wa, + iwa, itask, iprint, icsave, lsavei, isave, dsave) c Berend noted earlier format beyond column 72 integer lsavei(4) integer n, m, iprint, itask, icsave, + nbd(n), iwa(3*n), isave(44) double precision f, factr, pgtol, x(n), l(n), u(n), g(n), c c-jlm-jn + wa(2*m*n + 5*n + 11*m*m + 8*m), dsave(29) logical lsave(4) c ************ c c Subroutine setulb c c This subroutine partitions the working arrays wa and iwa, and c then uses the limited memory BFGS method to solve the bound c constrained optimization problem by calling mainlb. c (The direct method will be used in the subspace minimization.) c c n is an integer variable. c On entry n is the dimension of the problem. c On exit n is unchanged. c c m is an integer variable. c On entry m is the maximum number of variable metric corrections c used to define the limited memory matrix. c On exit m is unchanged. c c x is a double precision array of dimension n. c On entry x is an approximation to the solution. c On exit x is the current approximation. c c l is a double precision array of dimension n. c On entry l is the lower bound on x. c On exit l is unchanged. c c u is a double precision array of dimension n. c On entry u is the upper bound on x. c On exit u is unchanged. c c nbd is an integer array of dimension n. c On entry nbd represents the type of bounds imposed on the c variables, and must be specified as follows: c nbd(i)=0 if x(i) is unbounded, c 1 if x(i) has only a lower bound, c 2 if x(i) has both lower and upper bounds, and c 3 if x(i) has only an upper bound. c On exit nbd is unchanged. c c f is a double precision variable. c On first entry f is unspecified. c On final exit f is the value of the function at x. c c g is a double precision array of dimension n. c On first entry g is unspecified. c On final exit g is the value of the gradient at x. c c factr is a double precision variable. c On entry factr >= 0 is specified by the user. The iteration c will stop when c c (f^k - f^{k+1})/max{|f^k|,|f^{k+1}|,1} <= factr*epsmch c c where epsmch is the machine precision, which is automatically c generated by the code. Typical values for factr: 1.d+12 for c low accuracy; 1.d+7 for moderate accuracy; 1.d+1 for extremely c high accuracy. c On exit factr is unchanged. c c pgtol is a double precision variable. c On entry pgtol >= 0 is specified by the user. The iteration c will stop when c c max{|proj g_i | i = 1, ..., n} <= pgtol c c where pg_i is the ith component of the projected gradient. c On exit pgtol is unchanged. c c wa is a double precision working array of length c (2mmax + 5)nmax + 12mmax^2 + 12mmax. c c iwa is an integer working array of length 3nmax. c c itask is an integer indicating c the current job when entering and quitting this subroutine. c c iprint is an integer variable that must be set by the user. c It controls the frequency and type of output generated: c iprint<0 no output is generated; c iprint=0 print only one line at the last iteration; c 0100 print details of every iteration including x and g; c When iprint > 0, the file iterate.dat will be created to c summarize the iteration. c c icsave is a working integer c c lsave is a logical working array of dimension 4. c On exit with 'task' = NEW_X, the following information is c available: c If lsave(1) = .true. then the initial X has been replaced by c its projection in the feasible set; c If lsave(2) = .true. then the problem is constrained; c If lsave(3) = .true. then each variable has upper and lower c bounds; c c isave is an integer working array of dimension 44. c On exit with 'task' = NEW_X, the following information is c available: c isave(22) = the total number of intervals explored in the c search of Cauchy points; c isave(26) = the total number of skipped BFGS updates before c the current iteration; c isave(30) = the number of current iteration; c isave(31) = the total number of BFGS updates prior the current c iteration; c isave(33) = the number of intervals explored in the search of c Cauchy point in the current iteration; c isave(34) = the total number of function and gradient c evaluations; c isave(36) = the number of function value or gradient c evaluations in the current iteration; c if isave(37) = 0 then the subspace argmin is within the box; c if isave(37) = 1 then the subspace argmin is beyond the box; c isave(38) = the number of free variables in the current c iteration; c isave(39) = the number of active constraints in the current c iteration; c n + 1 - isave(40) = the number of variables leaving the set of c active constraints in the current iteration; c isave(41) = the number of variables entering the set of active c constraints in the current iteration. c c dsave is a double precision working array of dimension 29. c On exit with 'task' = NEW_X, the following information is c available: c dsave(1) = current 'theta' in the BFGS matrix; c dsave(2) = f(x) in the previous iteration; c dsave(3) = factr*epsmch; c dsave(4) = 2-norm of the line search direction vector; c dsave(5) = the machine precision epsmch generated by the code; c dsave(7) = the accumulated time spent on searching for c Cauchy points; c dsave(8) = the accumulated time spent on c subspace minimization; c dsave(9) = the accumulated time spent on line search; c dsave(11) = the slope of the line search function at c the current point of line search; c dsave(12) = the maximum relative step length imposed in c line search; c dsave(13) = the infinity norm of the projected gradient; c dsave(14) = the relative step length in the line search; c dsave(15) = the slope of the line search function at c the starting point of the line search; c dsave(16) = the square of the 2-norm of the line search c direction vector. c c Subprograms called: c c L-BFGS-B Library ... mainlb. c c c References: c c [1] R. H. Byrd, P. Lu, J. Nocedal and C. Zhu, ``A limited c memory algorithm for bound constrained optimization'', c SIAM J. Scientific Computing 16 (1995), no. 5, pp. 1190--1208. c c [2] C. Zhu, R.H. Byrd, P. Lu, J. Nocedal, ``L-BFGS-B: a c limited memory FORTRAN code for solving bound constrained c optimization problems'', Tech. Report, NAM-11, EECS Department, c Northwestern University, 1994. c c (Postscript files of these papers are available via anonymous c ftp to eecs.nwu.edu in the directory pub/lbfgs/lbfgs_bcm.) c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ c-jlm-jn integer lws,lr,lz,lt,ld,lxp,lwa, + lwy,lsy,lss,lwt,lwn,lsnd if (lsavei(1) .eq. 1) then lsave(1) = .true. else lsave(1) = .false. endif if (lsavei(2) .eq. 1) then lsave(2) = .true. else lsave(2) = .false. endif if (lsavei(3) .eq. 1) then lsave(3) = .true. else lsave(3) = .false. endif if (lsavei(4) .eq. 1) then lsave(4) = .true. else lsave(4) = .false. endif cj integer ia(10) cj ia(1) = itask cj call intpr(' The incoming task no. is ', -1, itask, 1) cw write(6,*) ' The incoming task no. is ', itask if ((itask .lt. 1) .or. (itask .gt. 26)) then cx call intpr("TASK NOT IN VALID RANGE", -1, 0,0) itask = -999 return endif c if (task .eq. 'START') then if (itask .eq. 2) then isave(1) = m*n isave(2) = m**2 isave(3) = 4*m**2 isave(4) = 1 ! ws m*n isave(5) = isave(4) + isave(1) ! wy m*n isave(6) = isave(5) + isave(1) ! wsy m**2 isave(7) = isave(6) + isave(2) ! wss m**2 isave(8) = isave(7) + isave(2) ! wt m**2 isave(9) = isave(8) + isave(2) ! wn 4*m**2 isave(10) = isave(9) + isave(3) ! wsnd 4*m**2 isave(11) = isave(10) + isave(3) ! wz n isave(12) = isave(11) + n ! wr n isave(13) = isave(12) + n ! wd n isave(14) = isave(13) + n ! wt n isave(15) = isave(14) + n ! wxp n isave(16) = isave(15) + n ! wa 8*m endif lws = isave(4) lwy = isave(5) lsy = isave(6) lss = isave(7) lwt = isave(8) lwn = isave(9) lsnd = isave(10) lz = isave(11) lr = isave(12) ld = isave(13) lt = isave(14) lxp = isave(15) lwa = isave(16) call mainlb(n,m,x,l,u,nbd,f,g,factr,pgtol, + wa(lws),wa(lwy),wa(lsy),wa(lss), wa(lwt), + wa(lwn),wa(lsnd),wa(lz),wa(lr),wa(ld),wa(lt),wa(lxp), + wa(lwa), + iwa(1),iwa(n+1),iwa(2*n+1),itask,iprint, + icsave,lsave,isave(22),dsave) return end c======================= The end of setulb ============================= c mainlb here 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, itask, + iprint, icsave, lsave, isave, dsave) implicit none logical lsave(4) integer n, m, iprint, itask, icsave, nbd(n), index(n), + iwhere(n), indx2(n), isave(23) double precision f, factr, pgtol, + x(n), l(n), u(n), g(n), z(n), r(n), d(n), t(n), c-jlm-jn + xp(n), + wa(8*m), + ws(n, m), wy(n, m), sy(m, m), ss(m, m), + wt(m, m), wn(2*m, 2*m), snd(2*m, 2*m), dsave(29) c ************ c c Subroutine mainlb c c This subroutine solves bound constrained optimization problems by c using the compact formula of the limited memory BFGS updates. c c n is an integer variable. c On entry n is the number of variables. c On exit n is unchanged. c c m is an integer variable. c On entry m is the maximum number of variable metric c corrections allowed in the limited memory matrix. c On exit m is unchanged. c c x is a double precision array of dimension n. c On entry x is an approximation to the solution. c On exit x is the current approximation. c c l is a double precision array of dimension n. c On entry l is the lower bound of x. c On exit l is unchanged. c c u is a double precision array of dimension n. c On entry u is the upper bound of x. c On exit u is unchanged. c c nbd is an integer array of dimension n. c On entry nbd represents the type of bounds imposed on the c variables, and must be specified as follows: c nbd(i)=0 if x(i) is unbounded, c 1 if x(i) has only a lower bound, c 2 if x(i) has both lower and upper bounds, c 3 if x(i) has only an upper bound. c On exit nbd is unchanged. c c f is a double precision variable. c On first entry f is unspecified. c On final exit f is the value of the function at x. c c g is a double precision array of dimension n. c On first entry g is unspecified. c On final exit g is the value of the gradient at x. c c factr is a double precision variable. c On entry factr >= 0 is specified by the user. The iteration c will stop when c c (f^k - f^{k+1})/max{|f^k|,|f^{k+1}|,1} <= factr*epsmch c c where epsmch is the machine precision, which is automatically c generated by the code. c On exit factr is unchanged. c c pgtol is a double precision variable. c On entry pgtol >= 0 is specified by the user. The iteration c will stop when c c max{|proj g_i | i = 1, ..., n} <= pgtol c c where pg_i is the ith component of the projected gradient. c On exit pgtol is unchanged. c c ws, wy, sy, and wt are double precision working arrays used to c store the following information defining the limited memory c BFGS matrix: c ws, of dimension n x m, stores S, the matrix of s-vectors; c wy, of dimension n x m, stores Y, the matrix of y-vectors; c sy, of dimension m x m, stores S'Y; c ss, of dimension m x m, stores S'S; c yy, of dimension m x m, stores Y'Y; c wt, of dimension m x m, stores the Cholesky factorization c of (theta*S'S+LD^(-1)L'); see eq. c (2.26) in [3]. c c wn is a double precision working array of dimension 2m x 2m c used to store the LEL^T factorization of the indefinite matrix c K = [-D -Y'ZZ'Y/theta L_a'-R_z' ] c [L_a -R_z theta*S'AA'S ] c c where E = [-I 0] c [ 0 I] c c snd is a double precision working array of dimension 2m x 2m c used to store the lower triangular part of c N = [Y' ZZ'Y L_a'+R_z'] c [L_a +R_z S'AA'S ] c c z(n),r(n),d(n),t(n), xp(n),wa(8*m) are double precision working arrays. c z is used at different times to store the Cauchy point and c the Newton point. c xp is used to safeguard the projected Newton direction c c sg(m),sgo(m),yg(m),ygo(m) are double precision working arrays. c c index is an integer working array of dimension n. c In subroutine freev, index is used to store the free and fixed c variables at the Generalized Cauchy Point (GCP). c c iwhere is an integer working array of dimension n used to record c the status of the vector x for GCP computation. c iwhere(i)=0 or -3 if x(i) is free and has bounds, c 1 if x(i) is fixed at l(i), and l(i) .ne. u(i) c 2 if x(i) is fixed at u(i), and u(i) .ne. l(i) c 3 if x(i) is always fixed, i.e., u(i)=x(i)=l(i) c -1 if x(i) is always free, i.e., no bounds on it. c c indx2 is an integer working array of dimension n. c Within subroutine cauchy, indx2 corresponds to the array iorder. c In subroutine freev, a list of variables entering and leaving c the free set is stored in indx2, and it is passed on to c subroutine formk with this information. c c task is a working string of characters of length 60 indicating c the current job when entering and leaving this subroutine. c c iprint is an INTEGER variable that must be set by the user. c It controls the frequency and type of output generated: c iprint<0 no output is generated; c iprint=0 print only one line at the last iteration; c 0100 print details of every iteration including x and g; c When iprint > 0, the file iterate.dat will be created to c summarize the iteration. c c icsave is a working integer c c lsave is a logical working array of dimension 4. c c isave is an integer working array of dimension 23. c c dsave is a double precision working array of dimension 29. c c c Subprograms called c c L-BFGS-B Library ... cauchy, subsm, lnsrlb, formk, c c errclb, prn1lb, prn2lb, prn3lb, active, projgr, c c freev, cmprlb, matupd, formt. c c Minpack2 Library ... timer c c Linpack Library ... dcopy, ddot. c c c References: c c [1] R. H. Byrd, P. Lu, J. Nocedal and C. Zhu, ``A limited c memory algorithm for bound constrained optimization'', c SIAM J. Scientific Computing 16 (1995), no. 5, pp. 1190--1208. c c [2] C. Zhu, R.H. Byrd, P. Lu, J. Nocedal, ``L-BFGS-B: FORTRAN c Subroutines for Large Scale Bound Constrained Optimization'' c Tech. Report, NAM-11, EECS Department, Northwestern University, c 1994. c c [3] R. Byrd, J. Nocedal and R. Schnabel "Representations of c Quasi-Newton Matrices and their use in Limited Memory Methods'', c Mathematical Programming 63 (1994), no. 4, pp. 129-156. c c (Postscript files of these papers are available via anonymous c ftp to eecs.nwu.edu in the directory pub/lbfgs/lbfgs_bcm.) c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ logical prjctd,cnstnd,boxed,updatd,wrk integer i,k,nintol,iback,nskip, + head,col,iter,itail,iupdat, + nseg,nfgv,info,ifun, + iword,nfree,nact,ileave,nenter cj itmp for use in R output integer itmp double precision theta,fold,ddot,dr,rr,tol, + xstep,sbgnrm,ddum,dnorm,dtd,epsmch, + cpu1,cpu2,sbtime,lnscht,time1,time2, + gd,gdold,stp,stpmx,time double precision one,zero parameter (one=1.0d0,zero=0.0d0) if (itask .eq. 2) then epsmch = epsilon(one) cj Arbitrarily zero these. time1 = 0.0 c Initialize counters and scalars when task='START'. c for the limited memory BFGS matrices: col = 0 head = 1 theta = one iupdat = 0 updatd = .false. iback = 0 itail = 0 iword = 0 nact = 0 ileave = 0 nenter = 0 fold = zero dnorm = zero cpu1 = zero gd = zero stpmx = zero sbgnrm = zero stp = zero gdold = zero dtd = zero c for operation counts: iter = 0 nfgv = 0 nseg = 0 nintol = 0 nskip = 0 nfree = n ifun = 0 c for stopping tolerance: tol = factr*epsmch c for measuring running time: cy cachyt = 0 sbtime = 0 lnscht = 0 c 'word' records the status of subspace solutions. c$$$ word = '---' c 'info' records the termination information. info = 0 cw itfile = 8 cw leave itfile to avoid messing up subroutines cw if (iprint .ge. 1) then c open a summary file 'iterate.dat' cw open (8, file = 'iterate.dat', status = 'unknown') cw endif c Check the input arguments for errors. call errclb(n,m,factr,l,u,nbd,itask,info,k) c ERROR return if ((itask .ge. 9) .and. (itask .le. 19)) then call prn3lb(n,x,f,itask,iprint,info,k) return endif call prn1lb(n,m,l,u,x,iprint,epsmch) c Initialize iwhere & project x onto the feasible set. call active(n,l,u,nbd,x,iwhere,iprint,prjctd,cnstnd,boxed) c The end of the initialization. else c restore local variables. prjctd = lsave(1) cnstnd = lsave(2) boxed = lsave(3) updatd = lsave(4) nintol = isave(1) cy itfile = isave(3) iback = isave(4) nskip = isave(5) head = isave(6) col = isave(7) itail = isave(8) iter = isave(9) iupdat = isave(10) nseg = isave(12) nfgv = isave(13) info = isave(14) ifun = isave(15) iword = isave(16) nfree = isave(17) nact = isave(18) ileave = isave(19) nenter = isave(20) theta = dsave(1) fold = dsave(2) tol = dsave(3) dnorm = dsave(4) epsmch = dsave(5) cpu1 = dsave(6) cy cachyt = dsave(7) sbtime = dsave(8) lnscht = dsave(9) time1 = dsave(10) gd = dsave(11) stpmx = dsave(12) sbgnrm = dsave(13) stp = dsave(14) gdold = dsave(15) dtd = dsave(16) c After returning from the driver go to the point where execution c is to resume. c if (task(1:5) .eq. 'FG_LN') goto 666 if (itask .eq. 20) goto 666 c if (task(1:5) .eq. 'NEW_X') goto 777 if (itask .eq. 1) goto 777 c if (task(1:5) .eq. 'FG_ST') goto 111 if (itask .eq. 21) goto 111 c if (task(1:4) .eq. 'STOP') then c if (itask .eq. 3) then c if (task(7:9) .eq. 'CPU') then c NOTE: Cannot happen in R driver. c restore the previous iterate. c call dcopy(n,t,1,x,1) c call dcopy(n,r,1,g,1) c f = fold c endif c goto 999 c endif endif c Compute f0 and g0. c task = 'FG_START' itask = 21 c return to the driver to calculate f and g; reenter at 111. goto 1000 111 continue nfgv = 1 c Compute the infinity norm of the (-) projected gradient. call projgr(n,l,u,nbd,x,g,sbgnrm) cx if (iprint .ge. 1) then cx call intpr("At iterate", -1, iter, 1) cx call dblepr(" f=",-1, f, 1) cx call dblepr(" |proj g|= ",-1, sbgnrm, 1) cx endif if (sbgnrm .le. pgtol) then c terminate the algorithm. c task = 'CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL' itask = 7 goto 999 endif c ----------------- the beginning of the loop -------------------------- 222 continue if (iprint .ge. 99) then itmp = iter + 1 cx call intpr('ITERATION ', -1, itmp, 1) endif iword = -1 c if (.not. cnstnd .and. col .gt. 0) then c skip the search for GCP. call dcopy(n,x,1,z,1) wrk = updatd nseg = 0 goto 333 endif cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c Compute the Generalized Cauchy Point (GCP). c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cj call timer(cpu1) cpu1 = 0.0d0 call cauchy(n,x,l,u,nbd,g,indx2,iwhere,t,d,z, + m,wy,ws,sy,wt,theta,col,head, + wa(1),wa(2*m+1),wa(4*m+1),wa(6*m+1),nseg, + iprint, sbgnrm, info, epsmch) if (info .ne. 0) then c singular triangular system detected; refresh the lbfgs memory. cx call intpr(' Singular triangular system detected;', -1,0,0) cx call intpr( cx + ' refresh the lbfgs memory and restart the iteration.', cx + -1,0,0) info = 0 col = 0 head = 1 theta = one iupdat = 0 updatd = .false. cpu2 = 0.0d0 cy cachyt = cachyt + cpu2 - cpu1 goto 222 endif cpu2 = 0.0d0 cy cachyt = cachyt + cpu2 - cpu1 nintol = nintol + nseg c Count the entering and leaving variables for iter > 0; c find the index set of free and active variables at the GCP. call freev(n,nfree,index,nenter,ileave,indx2, + iwhere,wrk,updatd,cnstnd,iprint,iter) nact = n - nfree 333 continue c If there are no free variables or B=theta*I, then c skip the subspace minimization. if (nfree .eq. 0 .or. col .eq. 0) goto 555 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c Subspace minimization. c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cpu1 = 0.0d0 c Form the LEL^T factorization of the indefinite c matrix K = [-D -Y'ZZ'Y/theta L_a'-R_z' ] c [L_a -R_z theta*S'AA'S ] c where E = [-I 0] c [ 0 I] if (wrk) call formk(n,nfree,index,nenter,ileave,indx2,iupdat, + updatd,wn,snd,m,ws,wy,sy,theta,col,head,info) if (info .ne. 0) then c nonpositive definiteness in Cholesky factorization; c refresh the lbfgs memory and restart the iteration. cw if(iprint .ge. 1) write (6, 1006) if(iprint .ge. 1) then cx call intpr( cx + ' Nonpositive definiteness in Cholesky factorization in formk;', cx + -1, 0, 0) cx call intpr( cx + ' refresh the lbfgs memory and restart the iteration.', cx + -1, 0, 0) endif info = 0 col = 0 head = 1 theta = one iupdat = 0 updatd = .false. cj call timer(cpu2) cpu2 = 0.0d0 sbtime = sbtime + cpu2 - cpu1 goto 222 endif c compute r=-Z'B(xcp-xk)-Z'g (using wa(2m+1)=W'(xcp-x) c from 'cauchy'). call cmprlb(n,m,x,g,ws,wy,sy,wt,z,r,wa,index, + theta,col,head,nfree,cnstnd,info) if (info .ne. 0) goto 444 c-jlm-jn call the direct method. call subsm( n, m, nfree, index, l, u, nbd, z, r, xp, ws, wy, + theta, x, g, col, head, iword, wa, wn, iprint, info) 444 continue if (info .ne. 0) then c singular triangular system detected; c refresh the lbfgs memory and restart the iteration. cw if(iprint .ge. 1) write (6, 1005) cx call intpr(' Singular triangular system detected;', -1,0,0) cx call intpr( cx + ' refresh the lbfgs memory and restart the iteration.', cx + -1,0,0) info = 0 col = 0 head = 1 theta = one iupdat = 0 updatd = .false. cj call timer(cpu2) cpu2 = 0.0d0 sbtime = sbtime + cpu2 - cpu1 goto 222 endif cj call timer(cpu2) cpu2 = 0.0d0 sbtime = sbtime + cpu2 - cpu1 555 continue cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c Line search and optimality tests. c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c Generate the search direction d:=z-x. do 40 i = 1, n d(i) = z(i) - x(i) 40 continue cj call timer(cpu1) cpu1 = 0.0d0 666 continue call lnsrlb(n,l,u,nbd,x,f,fold,gd,gdold,g,d,r,t,z,stp,dnorm, + dtd,xstep,stpmx,iter,ifun,iback,nfgv,info,itask, + boxed,cnstnd,icsave,isave(22),dsave(17)) if (info .ne. 0 .or. iback .ge. 20) then c restore the previous iterate. call dcopy(n,t,1,x,1) call dcopy(n,r,1,g,1) f = fold if (col .eq. 0) then c abnormal termination. if (info .eq. 0) then info = -9 c restore the actual number of f and g evaluations etc. nfgv = nfgv - 1 ifun = ifun - 1 iback = iback - 1 endif c task = 'ABNORMAL_TERMINATION_IN_LNSRCH' itask = 5 iter = iter + 1 goto 999 else c refresh the lbfgs memory and restart the iteration. cw if(iprint .ge. 1) write (6, 1008) if(iprint .ge. 1) then cx call intpr( cx + ' Bad direction in the line search;', cx + -1, 0, 0) cx call intpr( cx + ' refresh the lbfgs memory and restart the iteration.', cx + -1, 0, 0) endif if (info .eq. 0) nfgv = nfgv - 1 info = 0 col = 0 head = 1 theta = one iupdat = 0 updatd = .false. c task = 'RESTART_FROM_LNSRCH' itask = 22 cj call timer(cpu2) cpu2 = 0.0d0 lnscht = lnscht + cpu2 - cpu1 goto 222 endif c else if (task(1:5) .eq. 'FG_LN') then else if (itask .eq. 20) then c return to the driver for calculating f and g; reenter at 666. goto 1000 else c calculate and print out the quantities related to the new X. cj call timer(cpu2) cpu2 = 0.0d0 lnscht = lnscht + cpu2 - cpu1 iter = iter + 1 c Compute the infinity norm of the projected (-)gradient. call projgr(n,l,u,nbd,x,g,sbgnrm) c Print iteration information. call prn2lb(f,iprint,iter, + sbgnrm,iback,xstep) goto 1000 endif 777 continue c Test for termination. if (sbgnrm .le. pgtol) then c terminate the algorithm. c task = 'CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL' itask = 7 goto 999 endif ddum = max(abs(fold), abs(f), one) if ((fold - f) .le. tol*ddum) then c terminate the algorithm. c task = 'CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH' itask = 8 if (iback .ge. 10) info = -5 c i.e., to issue a warning if iback>10 in the line search. goto 999 endif c Compute d=newx-oldx, r=newg-oldg, rr=y'y and dr=y's. do 42 i = 1, n r(i) = g(i) - r(i) 42 continue rr = ddot(n,r,1,r,1) if (stp .eq. one) then dr = gd - gdold ddum = -gdold else dr = (gd - gdold)*stp call dscal(n,stp,d,1) ddum = -gdold*stp endif if (dr .le. epsmch*ddum) then c skip the L-BFGS update. nskip = nskip + 1 updatd = .false. cw if (iprint .ge. 1) write (6,1004) dr, ddum cx if (iprint .ge. 1) then cx call dblepr(' ys =',-1, dr, 1) cx call dblepr(' BFGS update skipped for +gs=',-1, ddum, 1) cx endif cw 1004 format (' ys=',1p,e10.3,' -gs=',1p,e10.3,' BFGS update SKIPPED') goto 888 endif cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c Update the L-BFGS matrix. c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc updatd = .true. iupdat = iupdat + 1 c Update matrices WS and WY and form the middle matrix in B. call matupd(n,m,ws,wy,sy,ss,d,r,itail, + iupdat,col,head,theta,rr,dr,stp,dtd) c Form the upper half of the pds T = theta*SS + L*D^(-1)*L'; c Store T in the upper triangular of the array wt; c Cholesky factorize T to J*J' with c J' stored in the upper triangular of wt. call formt(m,wt,sy,ss,col,theta,info) if (info .ne. 0) then c nonpositive definiteness in Cholesky factorization; c refresh the lbfgs memory and restart the iteration. cw if(iprint .ge. 1) write (6, 1007) if (iprint .ge. 1) then cx call intpr( cx + ' Nonpositive definiteness in Cholesky factorization in formt;', cx + -1, 0, 0) cx call intpr( cx + ' refresh the lbfgs memory and restart the iteration.', cx + -1, 0, 0) endif info = 0 col = 0 head = 1 theta = one iupdat = 0 updatd = .false. goto 222 endif c Now the inverse of the middle matrix in B is c [ D^(1/2) O ] [ -D^(1/2) D^(-1/2)*L' ] c [ -L*D^(-1/2) J ] [ 0 J' ] 888 continue c -------------------- the end of the loop ----------------------------- goto 222 999 continue cj call timer(time2) time2 = 0.0d0 time = time2 - time1 call prn3lb(n,x,f,itask,iprint,info,k) 1000 continue c Save local variables. lsave(1) = prjctd lsave(2) = cnstnd lsave(3) = boxed lsave(4) = updatd isave(1) = nintol cy isave(3) = itfile isave(4) = iback isave(5) = nskip isave(6) = head isave(7) = col isave(8) = itail isave(9) = iter isave(10) = iupdat isave(12) = nseg isave(13) = nfgv isave(14) = info isave(15) = ifun isave(16) = iword isave(17) = nfree isave(18) = nact isave(19) = ileave isave(20) = nenter dsave(1) = theta dsave(2) = fold dsave(3) = tol dsave(4) = dnorm dsave(5) = epsmch dsave(6) = cpu1 cy dsave(7) = cachyt dsave(8) = sbtime dsave(9) = lnscht dsave(10) = time1 dsave(11) = gd dsave(12) = stpmx dsave(13) = sbgnrm dsave(14) = stp dsave(15) = gdold dsave(16) = dtd cw 1001 format (//,'ITERATION ',i5) cw 1002 format cw + (/,'At iterate',i5,4x,'f= ',1p,d12.5,4x,'|proj g|= ',1p,d12.5) cw 1003 format (2(1x,i4),5x,'-',5x,'-',3x,'-',5x,'-',5x,'-',8x,'-',3x, cw + 1p,2(1x,d10.3)) cw 1004 format (' ys=',1p,e10.3,' -gs=',1p,e10.3,' BFGS update SKIPPED') cw 1005 format (/, cw +' Singular triangular system detected;',/, cw +' refresh the lbfgs memory and restart the iteration.') cw 1006 format (/, cw +' Nonpositive definiteness in Cholesky factorization in formk;',/, cw +' refresh the lbfgs memory and restart the iteration.') cw 1007 format (/, cw +' Nonpositive definiteness in Cholesky factorization in formt;',/, cw +' refresh the lbfgs memory and restart the iteration.') cw 1008 format (/, cw +' Bad direction in the line search;',/, cw +' refresh the lbfgs memory and restart the iteration.') return end c======================= The end of mainlb ============================= subroutine active(n, l, u, nbd, x, iwhere, iprint, + prjctd, cnstnd, boxed) logical prjctd, cnstnd, boxed integer n, iprint, nbd(n), iwhere(n) double precision x(n), l(n), u(n) c ************ c c Subroutine active c c This subroutine initializes iwhere and projects the initial x to c the feasible set if necessary. c c iwhere is an integer array of dimension n. c On entry iwhere is unspecified. c On exit iwhere(i)=-1 if x(i) has no bounds c 3 if l(i)=u(i) c 0 otherwise. c In cauchy, iwhere is given finer gradations. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer nbdd,i double precision zero parameter (zero=0.0d0) c Initialize nbdd, prjctd, cnstnd and boxed. nbdd = 0 prjctd = .false. cnstnd = .false. boxed = .true. c Project the initial x to the easible set if necessary. do 10 i = 1, n if (nbd(i) .gt. 0) then if (nbd(i) .le. 2 .and. x(i) .le. l(i)) then if (x(i) .lt. l(i)) then prjctd = .true. x(i) = l(i) endif nbdd = nbdd + 1 else if (nbd(i) .ge. 2 .and. x(i) .ge. u(i)) then if (x(i) .gt. u(i)) then prjctd = .true. x(i) = u(i) endif nbdd = nbdd + 1 endif endif 10 continue c Initialize iwhere and assign values to cnstnd and boxed. do 20 i = 1, n if (nbd(i) .ne. 2) boxed = .false. if (nbd(i) .eq. 0) then c this variable is always free iwhere(i) = -1 c otherwise set x(i)=mid(x(i), u(i), l(i)). else cnstnd = .true. if (nbd(i) .eq. 2 .and. u(i) - l(i) .le. zero) then c this variable is always fixed iwhere(i) = 3 else iwhere(i) = 0 endif endif 20 continue cx if (iprint .ge. 0) then cx if (prjctd) then cx call intpr('initial X infeasible. Restart with projection.', cx + -1, 0, 0) cx endif cx if (.not. cnstnd) then cx call intpr('This problem is unconstrained.', -1, 0,0) cx endif cx endif cw if (iprint .gt. 0) write (6,1001) nbdd cx if (iprint .gt. 0) then cx call intpr(' Variables exactly at bounds for X0 ',-1, cx + nbdd, 1) cx endif cw 1001 format (/,'At X0 ',i9,' variables are exactly at the bounds') return end c======================= The end of active ============================= subroutine bmv(m, sy, wt, col, v, p, info) integer m, col, info double precision sy(m, m), wt(m, m), v(2*col), p(2*col) c ************ c c Subroutine bmv c c This subroutine computes the product of the 2m x 2m middle matrix c in the compact L-BFGS formula of B and a 2m vector v; c it returns the product in p. c c m is an integer variable. c On entry m is the maximum number of variable metric corrections c used to define the limited memory matrix. c On exit m is unchanged. c c sy is a double precision array of dimension m x m. c On entry sy specifies the matrix S'Y. c On exit sy is unchanged. c c wt is a double precision array of dimension m x m. c On entry wt specifies the upper triangular matrix J' which is c the Cholesky factor of (thetaS'S+LD^(-1)L'). c On exit wt is unchanged. c c col is an integer variable. c On entry col specifies the number of s-vectors (or y-vectors) c stored in the compact L-BFGS formula. c On exit col is unchanged. c c v is a double precision array of dimension 2col. c On entry v specifies vector v. c On exit v is unchanged. c c p is a double precision array of dimension 2col. c On entry p is unspecified. c On exit p is the product Mv. c c info is an integer variable. c On entry info is unspecified. c On exit info = 0 for normal return, c = nonzero for abnormal return when the system c to be solved by dtrsl is singular. c c Subprograms called: c c Linpack ... dtrsl. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer i,k,i2 double precision sum if (col .eq. 0) return c PART I: solve [ D^(1/2) O ] [ p1 ] = [ v1 ] c [ -L*D^(-1/2) J ] [ p2 ] [ v2 ]. c solve Jp2=v2+LD^(-1)v1. p(col + 1) = v(col + 1) do 20 i = 2, col i2 = col + i sum = 0.0d0 do 10 k = 1, i - 1 sum = sum + sy(i,k)*v(k)/sy(k,k) 10 continue p(i2) = v(i2) + sum 20 continue c Solve the triangular system call dtrsl(wt,m,col,p(col+1),11,info) if (info .ne. 0) return c solve D^(1/2)p1=v1. do 30 i = 1, col p(i) = v(i)/sqrt(sy(i,i)) 30 continue c PART II: solve [ -D^(1/2) D^(-1/2)*L' ] [ p1 ] = [ p1 ] c [ 0 J' ] [ p2 ] [ p2 ]. c solve J^Tp2=p2. call dtrsl(wt,m,col,p(col+1),01,info) if (info .ne. 0) return c compute p1=-D^(-1/2)(p1-D^(-1/2)L'p2) c =-D^(-1/2)p1+D^(-1)L'p2. do 40 i = 1, col p(i) = -p(i)/sqrt(sy(i,i)) 40 continue do 60 i = 1, col sum = 0.d0 do 50 k = i + 1, col sum = sum + sy(k,i)*p(col+k)/sy(i,i) 50 continue p(i) = p(i) + sum 60 continue return end c======================== The end of bmv =============================== 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) implicit none integer n, m, head, col, nseg, iprint, info, + nbd(n), iorder(n), iwhere(n) double precision theta, epsmch, + x(n), l(n), u(n), g(n), t(n), d(n), xcp(n), + wy(n, col), ws(n, col), sy(m, m), + wt(m, m), p(2*m), c(2*m), wbp(2*m), v(2*m) c ************ c c Subroutine cauchy c c For given x, l, u, g (with sbgnrm > 0), and a limited memory c BFGS matrix B defined in terms of matrices WY, WS, WT, and c scalars head, col, and theta, this subroutine computes the c generalized Cauchy point (GCP), defined as the first local c minimizer of the quadratic c c Q(x + s) = g's + 1/2 s'Bs c c along the projected gradient direction P(x-tg,l,u). c The routine returns the GCP in xcp. c c n is an integer variable. c On entry n is the dimension of the problem. c On exit n is unchanged. c c x is a double precision array of dimension n. c On entry x is the starting point for the GCP computation. c On exit x is unchanged. c c l is a double precision array of dimension n. c On entry l is the lower bound of x. c On exit l is unchanged. c c u is a double precision array of dimension n. c On entry u is the upper bound of x. c On exit u is unchanged. c c nbd is an integer array of dimension n. c On entry nbd represents the type of bounds imposed on the c variables, and must be specified as follows: c nbd(i)=0 if x(i) is unbounded, c 1 if x(i) has only a lower bound, c 2 if x(i) has both lower and upper bounds, and c 3 if x(i) has only an upper bound. c On exit nbd is unchanged. c c g is a double precision array of dimension n. c On entry g is the gradient of f(x). g must be a nonzero vector. c On exit g is unchanged. c c iorder is an integer working array of dimension n. c iorder will be used to store the breakpoints in the piecewise c linear path and free variables encountered. On exit, c iorder(1),...,iorder(nleft) are indices of breakpoints c which have not been encountered; c iorder(nleft+1),...,iorder(nbreak) are indices of c encountered breakpoints; and c iorder(nfree),...,iorder(n) are indices of variables which c have no bound constraits along the search direction. c c iwhere is an integer array of dimension n. c On entry iwhere indicates only the permanently fixed (iwhere=3) c or free (iwhere= -1) components of x. c On exit iwhere records the status of the current x variables. c iwhere(i)=-3 if x(i) is free and has bounds, but is not moved c 0 if x(i) is free and has bounds, and is moved c 1 if x(i) is fixed at l(i), and l(i) .ne. u(i) c 2 if x(i) is fixed at u(i), and u(i) .ne. l(i) c 3 if x(i) is always fixed, i.e., u(i)=x(i)=l(i) c -1 if x(i) is always free, i.e., it has no bounds. c c t is a double precision working array of dimension n. c t will be used to store the break points. c c d is a double precision array of dimension n used to store c the Cauchy direction P(x-tg)-x. c c xcp is a double precision array of dimension n used to return the c GCP on exit. c c m is an integer variable. c On entry m is the maximum number of variable metric corrections c used to define the limited memory matrix. c On exit m is unchanged. c c ws, wy, sy, and wt are double precision arrays. c On entry they store information that defines the c limited memory BFGS matrix: c ws(n,m) stores S, a set of s-vectors; c wy(n,m) stores Y, a set of y-vectors; c sy(m,m) stores S'Y; c wt(m,m) stores the c Cholesky factorization of (theta*S'S+LD^(-1)L'). c On exit these arrays are unchanged. c c theta is a double precision variable. c On entry theta is the scaling factor specifying B_0 = theta I. c On exit theta is unchanged. c c col is an integer variable. c On entry col is the actual number of variable metric c corrections stored so far. c On exit col is unchanged. c c head is an integer variable. c On entry head is the location of the first s-vector (or y-vector) c in S (or Y). c On exit col is unchanged. c c p is a double precision working array of dimension 2m. c p will be used to store the vector p = W^(T)d. c c c is a double precision working array of dimension 2m. c c will be used to store the vector c = W^(T)(xcp-x). c c wbp is a double precision working array of dimension 2m. c wbp will be used to store the row of W corresponding c to a breakpoint. c c v is a double precision working array of dimension 2m. c c nseg is an integer variable. c On exit nseg records the number of quadratic segments explored c in searching for the GCP. c c sg and yg are double precision arrays of dimension m. c On entry sg and yg store S'g and Y'g correspondingly. c On exit they are unchanged. c c iprint is an INTEGER variable that must be set by the user. c It controls the frequency and type of output generated: c iprint<0 no output is generated; c iprint=0 print only one line at the last iteration; c 0100 print details of every iteration including x and g; c When iprint > 0, the file iterate.dat will be created to c summarize the iteration. c c sbgnrm is a double precision variable. c On entry sbgnrm is the norm of the projected gradient at x. c On exit sbgnrm is unchanged. c c info is an integer variable. c On entry info is 0. c On exit info = 0 for normal return, c = nonzero for abnormal return when the the system c used in routine bmv is singular. c c Subprograms called: c c L-BFGS-B Library ... hpsolb, bmv. c c Linpack ... dscal dcopy, daxpy. c c c References: c c [1] R. H. Byrd, P. Lu, J. Nocedal and C. Zhu, ``A limited c memory algorithm for bound constrained optimization'', c SIAM J. Scientific Computing 16 (1995), no. 5, pp. 1190--1208. c c [2] C. Zhu, R.H. Byrd, P. Lu, J. Nocedal, ``L-BFGS-B: FORTRAN c Subroutines for Large Scale Bound Constrained Optimization'' c Tech. Report, NAM-11, EECS Department, Northwestern University, c 1994. c c (Postscript files of these papers are available via anonymous c ftp to eecs.nwu.edu in the directory pub/lbfgs/lbfgs_bcm.) c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ logical xlower,xupper,bnded integer i,j,col2,nfree,nbreak,pointr, + ibp,nleft,ibkmin,iter integer nprt double precision f1,f2,dt,dtm,tsum,dibp,zibp,dibp2,bkmin, + tu,tl,wmc,wmp,wmw,ddot,tj,tj0,neggi,sbgnrm, + f2_org double precision one,zero parameter (one=1.0d0,zero=0.0d0) c Check the status of the variables, reset iwhere(i) if necessary; c compute the Cauchy direction d and the breakpoints t; initialize c the derivative f1 and the vector p = W'd (for theta = 1). if (sbgnrm .le. zero) then cx if (iprint .ge. 0) then cx call intpr('Subgnorm =0, GCP = X.', -1, 0, 0) cx endif cw if (iprint .ge. 0) write (6,*) 'Subgnorm = 0. GCP = X.' call dcopy(n,x,1,xcp,1) return endif bnded = .true. nfree = n + 1 nbreak = 0 ibkmin = 0 bkmin = zero col2 = 2*col f1 = zero cw if (iprint .ge. 99) write (6,3010) cx if (iprint .ge. 99) then cx call intpr('--- CAUCHY entered---',-1,0,0) cx endif c We set p to zero and build it up as we determine d. do 20 i = 1, col2 p(i) = zero 20 continue c In the following loop we determine for each variable its bound c status and its breakpoint, and update p accordingly. c Smallest breakpoint is identified. do 50 i = 1, n neggi = -g(i) if (iwhere(i) .ne. 3 .and. iwhere(i) .ne. -1) then c if x(i) is not a constant and has bounds, c compute the difference between x(i) and its bounds. if (nbd(i) .le. 2) tl = x(i) - l(i) if (nbd(i) .ge. 2) tu = u(i) - x(i) c If a variable is close enough to a bound c we treat it as at bound. xlower = nbd(i) .le. 2 .and. tl .le. zero xupper = nbd(i) .ge. 2 .and. tu .le. zero c reset iwhere(i). iwhere(i) = 0 if (xlower) then if (neggi .le. zero) iwhere(i) = 1 else if (xupper) then if (neggi .ge. zero) iwhere(i) = 2 else if (abs(neggi) .le. zero) iwhere(i) = -3 endif endif pointr = head if (iwhere(i) .ne. 0 .and. iwhere(i) .ne. -1) then d(i) = zero else d(i) = neggi f1 = f1 - neggi*neggi c calculate p := p - W'e_i* (g_i). do 40 j = 1, col p(j) = p(j) + wy(i,pointr)* neggi p(col + j) = p(col + j) + ws(i,pointr)*neggi pointr = mod(pointr,m) + 1 40 continue if (nbd(i) .le. 2 .and. nbd(i) .ne. 0 + .and. neggi .lt. zero) then c x(i) + d(i) is bounded; compute t(i). nbreak = nbreak + 1 iorder(nbreak) = i t(nbreak) = tl/(-neggi) if (nbreak .eq. 1 .or. t(nbreak) .lt. bkmin) then bkmin = t(nbreak) ibkmin = nbreak endif else if (nbd(i) .ge. 2 .and. neggi .gt. zero) then c x(i) + d(i) is bounded; compute t(i). nbreak = nbreak + 1 iorder(nbreak) = i t(nbreak) = tu/neggi if (nbreak .eq. 1 .or. t(nbreak) .lt. bkmin) then bkmin = t(nbreak) ibkmin = nbreak endif else c x(i) + d(i) is not bounded. nfree = nfree - 1 iorder(nfree) = i if (abs(neggi) .gt. zero) bnded = .false. endif endif 50 continue c The indices of the nonzero components of d are now stored c in iorder(1),...,iorder(nbreak) and iorder(nfree),...,iorder(n). c The smallest of the nbreak breakpoints is in t(ibkmin)=bkmin. if (theta .ne. one) then c complete the initialization of p for theta not= one. call dscal(col,theta,p(col+1),1) endif c Initialize GCP xcp = x. call dcopy(n,x,1,xcp,1) if (nbreak .eq. 0 .and. nfree .eq. n + 1) then c is a zero vector, return with the initial xcp as GCP. cw if (iprint .gt. 100) write (6,1010) (xcp(i), i = 1, n) cx if (iprint .gt. 100) then cx nprt = n cx if (nprt .gt. 5) nprt = 5 cx call dblepr('Cauchy X[1:5] = ',-1, xcp, nprt) cx endif return endif c Initialize c = W'(xcp - x) = 0. do 60 j = 1, col2 c(j) = zero 60 continue c Initialize derivative f2. f2 = -theta*f1 f2_org = f2 if (col .gt. 0) then call bmv(m,sy,wt,col,p,v,info) if (info .ne. 0) return f2 = f2 - ddot(col2,v,1,p,1) endif dtm = -f1/f2 tsum = zero nseg = 1 cx if (iprint .ge. 99) then cw + write (6,*) 'There are ',nbreak,' breakpoints ' cx call intpr('no. of breakpoints =',-1, nbreak, 1) cx endif c If there are no breakpoints, locate the GCP and return. if (nbreak .eq. 0) goto 888 nleft = nbreak iter = 1 tj = zero c------------------- the beginning of the loop ------------------------- 777 continue c Find the next smallest breakpoint; c compute dt = t(nleft) - t(nleft + 1). tj0 = tj if (iter .eq. 1) then c Since we already have the smallest breakpoint we need not do c heapsort yet. Often only one breakpoint is used and the c cost of heapsort is avoided. tj = bkmin ibp = iorder(ibkmin) else if (iter .eq. 2) then c Replace the already used smallest breakpoint with the c breakpoint numbered nbreak > nlast, before heapsort call. if (ibkmin .ne. nbreak) then t(ibkmin) = t(nbreak) iorder(ibkmin) = iorder(nbreak) endif c Update heap structure of breakpoints c (if iter=2, initialize heap). endif call hpsolb(nleft,t,iorder,iter-2) tj = t(nleft) ibp = iorder(nleft) endif dt = tj - tj0 cx if (dt .ne. zero .and. iprint .ge. 100) then cw write (6,4011) nseg,f1,f2 cx call intpr('Piece ',-1, nseg, 1) cx call dblepr('f1 at start point =',-1, f1, 1) cx call dblepr('f2 at start point =',-1, f1, 1) cw write (6,5010) dt cx call dblepr('Distance to the next break point = ', cx + -1, dt, 1) cx call dblepr('Distance to the stationary point = ', cx + -1, dtm, 1) cw write (6,6010) dtm cx endif c If a minimizer is within this interval, locate the GCP and return. if (dtm .lt. dt) goto 888 c Otherwise fix one variable and c reset the corresponding component of d to zero. tsum = tsum + dt nleft = nleft - 1 iter = iter + 1 dibp = d(ibp) d(ibp) = zero if (dibp .gt. zero) then zibp = u(ibp) - x(ibp) xcp(ibp) = u(ibp) iwhere(ibp) = 2 else zibp = l(ibp) - x(ibp) xcp(ibp) = l(ibp) iwhere(ibp) = 1 endif cw if (iprint .ge. 100) write (6,*) 'Variable ',ibp,' is fixed.' cx if (iprint .ge. 100) cx + call intpr('Variable fixed, index ',-1,ibp, 1) if (nleft .eq. 0 .and. nbreak .eq. n) then c all n variables are fixed, c return with xcp as GCP. dtm = dt goto 999 endif c Update the derivative information. nseg = nseg + 1 dibp2 = dibp**2 c Update f1 and f2. c temporarily set f1 and f2 for col=0. f1 = f1 + dt*f2 + dibp2 - theta*dibp*zibp f2 = f2 - theta*dibp2 if (col .gt. 0) then c update c = c + dt*p. call daxpy(col2,dt,p,1,c,1) c choose wbp, c the row of W corresponding to the breakpoint encountered. pointr = head do 70 j = 1,col wbp(j) = wy(ibp,pointr) wbp(col + j) = theta*ws(ibp,pointr) pointr = mod(pointr,m) + 1 70 continue c compute (wbp)Mc, (wbp)Mp, and (wbp)M(wbp)'. call bmv(m,sy,wt,col,wbp,v,info) if (info .ne. 0) return wmc = ddot(col2,c,1,v,1) wmp = ddot(col2,p,1,v,1) wmw = ddot(col2,wbp,1,v,1) c update p = p - dibp*wbp. call daxpy(col2,-dibp,wbp,1,p,1) c complete updating f1 and f2 while col > 0. f1 = f1 + dibp*wmc f2 = f2 + 2.0d0*dibp*wmp - dibp2*wmw endif f2 = max(epsmch*f2_org,f2) if (nleft .gt. 0) then dtm = -f1/f2 goto 777 c to repeat the loop for unsearched intervals. else if(bnded) then f1 = zero f2 = zero dtm = zero else dtm = -f1/f2 endif c------------------- the end of the loop ------------------------------- 888 continue cx if (iprint .ge. 99) then cw write (6,*) cw write (6,*) 'GCP found in this segment' cw write (6,4010) nseg,f1,f2 cx call intpr('Piece ',-1, nseg, 1) cx call dblepr('f1 at start point =',-1, f1, 1) cx call dblepr('f2 at start point =',-1, f1, 1) cw write (6,6010) dtm cx call dblepr('Distance to the stationary point = ', cx + -1, dtm, 1) cx endif if (dtm .le. zero) dtm = zero tsum = tsum + dtm c Move free variables (i.e., the ones w/o breakpoints) and c the variables whose breakpoints haven't been reached. call daxpy(n,tsum,d,1,xcp,1) 999 continue c Update c = c + dtm*p = W'(x^c - x) c which will be used in computing r = Z'(B(x^c - x) + g). if (col .gt. 0) call daxpy(col2,dtm,p,1,c,1) cx if (iprint .gt. 100) then cw write (6,1010) (xcp(i),i = 1,n) cx nprt = n cx if (nprt .gt. 5) nprt = 5 cx call dblepr('Cauchy X[1:5] = ',-1, xcp, nprt) cx endif cx if (iprint .ge. 99) then cw write (6,2010) cx call intpr('--- exit CAUCHY---',-1, 0,0) cx endif cw 1010 format ('Cauchy X = ',/,(4x,1p,6(1x,d11.4))) cx 2010 format (/,'---------------- exit CAUCHY----------------------',/) cw 3010 format (/,'---------------- CAUCHY entered-------------------') cw 4010 format ('Piece ',i3,' --f1, f2 at start point ',1p,2(1x,d11.4)) cw 4011 format (/,'Piece ',i3,' --f1, f2 at start point ', cw + 1p,2(1x,d11.4)) cw 5010 format ('Distance to the next break point = ',1p,d11.4) cw 6010 format ('Distance to the stationary point = ',1p,d11.4) return end c====================== The end of cauchy ============================== subroutine cmprlb(n, m, x, g, ws, wy, sy, wt, z, r, wa, index, + theta, col, head, nfree, cnstnd, info) logical cnstnd integer n, m, col, head, nfree, info, index(n) double precision theta, + x(n), g(n), z(n), r(n), wa(4*m), + ws(n, m), wy(n, m), sy(m, m), wt(m, m) c ************ c c Subroutine cmprlb c c This subroutine computes r=-Z'B(xcp-xk)-Z'g by using c wa(2m+1)=W'(xcp-x) from subroutine cauchy. c c Subprograms called: c c L-BFGS-B Library ... bmv. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer i,j,k,pointr double precision a1,a2 if (.not. cnstnd .and. col .gt. 0) then do 26 i = 1, n r(i) = -g(i) 26 continue else do 30 i = 1, nfree k = index(i) r(i) = -theta*(z(k) - x(k)) - g(k) 30 continue call bmv(m,sy,wt,col,wa(2*m+1),wa(1),info) if (info .ne. 0) then info = -8 return endif pointr = head do 34 j = 1, col a1 = wa(j) a2 = theta*wa(col + j) do 32 i = 1, nfree k = index(i) r(i) = r(i) + wy(k,pointr)*a1 + ws(k,pointr)*a2 32 continue pointr = mod(pointr,m) + 1 34 continue endif return end c======================= The end of cmprlb ============================= subroutine errclb(n, m, factr, l, u, nbd, itask, info, k) c character*255 task integer n, m, itask, info, k, nbd(n) double precision factr, l(n), u(n) c ************ c c Subroutine errclb c c This subroutine checks the validity of the input data. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer i double precision zero parameter (zero=0.0d0) c Check the input arguments for errors. if (n .le. 0) then itask = 13 cx call intpr(" ERROR: N .LE. 0", -1, 0, 0) return endif c if (m .le. 0) task = 'ERROR: M .LE. 0' if (m .le. 0) then cx call intpr(" ERROR: M .LE. 0", -1, 0, 0) return endif c if (factr .lt. zero) task = 'ERROR: FACTR .LT. 0' if (factr .le. zero) then cx call intpr(' ERROR: FACTR .LT. 0', -1, 0, 0) return endif c Check the validity of the arrays nbd(i), u(i), and l(i). do 10 i = 1, n if (nbd(i) .lt. 0 .or. nbd(i) .gt. 3) then c return c task = 'ERROR: INVALID NBD' itask = 12 info = -6 k = i endif if (nbd(i) .eq. 2) then if (l(i) .gt. u(i)) then c return c task = 'ERROR: NO FEASIBLE SOLUTION' itask = 14 info = -7 k = i endif endif 10 continue return end c======================= The end of errclb ============================= subroutine formk(n, nsub, ind, nenter, ileave, indx2, iupdat, + updatd, wn, wn1, m, ws, wy, sy, theta, col, + head, info) integer n, nsub, m, col, head, nenter, ileave, iupdat, + info, ind(n), indx2(n) double precision theta, wn(2*m, 2*m), wn1(2*m, 2*m), + ws(n, m), wy(n, m), sy(m, m) logical updatd c ************ c c Subroutine formk c c This subroutine forms the LEL^T factorization of the indefinite c c matrix K = [-D -Y'ZZ'Y/theta L_a'-R_z' ] c [L_a -R_z theta*S'AA'S ] c where E = [-I 0] c [ 0 I] c The matrix K can be shown to be equal to the matrix M^[-1]N c occurring in section 5.1 of [1], as well as to the matrix c Mbar^[-1] Nbar in section 5.3. c c n is an integer variable. c On entry n is the dimension of the problem. c On exit n is unchanged. c c nsub is an integer variable c On entry nsub is the number of subspace variables in free set. c On exit nsub is not changed. c c ind is an integer array of dimension nsub. c On entry ind specifies the indices of subspace variables. c On exit ind is unchanged. c c nenter is an integer variable. c On entry nenter is the number of variables entering the c free set. c On exit nenter is unchanged. c c ileave is an integer variable. c On entry indx2(ileave),...,indx2(n) are the variables leaving c the free set. c On exit ileave is unchanged. c c indx2 is an integer array of dimension n. c On entry indx2(1),...,indx2(nenter) are the variables entering c the free set, while indx2(ileave),...,indx2(n) are the c variables leaving the free set. c On exit indx2 is unchanged. c c iupdat is an integer variable. c On entry iupdat is the total number of BFGS updates made so far. c On exit iupdat is unchanged. c c updatd is a logical variable. c On entry 'updatd' is true if the L-BFGS matrix is updatd. c On exit 'updatd' is unchanged. c c wn is a double precision array of dimension 2m x 2m. c On entry wn is unspecified. c On exit the upper triangle of wn stores the LEL^T factorization c of the 2*col x 2*col indefinite matrix c [-D -Y'ZZ'Y/theta L_a'-R_z' ] c [L_a -R_z theta*S'AA'S ] c c wn1 is a double precision array of dimension 2m x 2m. c On entry wn1 stores the lower triangular part of c [Y' ZZ'Y L_a'+R_z'] c [L_a+R_z S'AA'S ] c in the previous iteration. c On exit wn1 stores the corresponding updated matrices. c The purpose of wn1 is just to store these inner products c so they can be easily updated and inserted into wn. c c m is an integer variable. c On entry m is the maximum number of variable metric corrections c used to define the limited memory matrix. c On exit m is unchanged. c c ws, wy, sy, and wtyy are double precision arrays; c theta is a double precision variable; c col is an integer variable; c head is an integer variable. c On entry they store the information defining the c limited memory BFGS matrix: c ws(n,m) stores S, a set of s-vectors; c wy(n,m) stores Y, a set of y-vectors; c sy(m,m) stores S'Y; c wtyy(m,m) stores the Cholesky factorization c of (theta*S'S+LD^(-1)L') c theta is the scaling factor specifying B_0 = theta I; c col is the number of variable metric corrections stored; c head is the location of the 1st s- (or y-) vector in S (or Y). c On exit they are unchanged. c c info is an integer variable. c On entry info is unspecified. c On exit info = 0 for normal return; c = -1 when the 1st Cholesky factorization failed; c = -2 when the 2st Cholesky factorization failed. c c Subprograms called: c c Linpack ... dcopy, dpofa, dtrsl. c c c References: c [1] R. H. Byrd, P. Lu, J. Nocedal and C. Zhu, ``A limited c memory algorithm for bound constrained optimization'', c SIAM J. Scientific Computing 16 (1995), no. 5, pp. 1190--1208. c c [2] C. Zhu, R.H. Byrd, P. Lu, J. Nocedal, ``L-BFGS-B: a c limited memory FORTRAN code for solving bound constrained c optimization problems'', Tech. Report, NAM-11, EECS Department, c Northwestern University, 1994. c c (Postscript files of these papers are available via anonymous c ftp to eecs.nwu.edu in the directory pub/lbfgs/lbfgs_bcm.) c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer m2,ipntr,jpntr,iy,is,jy,js,is1,js1,k1,i,k, + col2,pbegin,pend,dbegin,dend,upcl double precision ddot,temp1,temp2,temp3,temp4 double precision zero parameter (zero=0.0d0) c Form the lower triangular part of c WN1 = [Y' ZZ'Y L_a'+R_z'] c [L_a+R_z S'AA'S ] c where L_a is the strictly lower triangular part of S'AA'Y c R_z is the upper triangular part of S'ZZ'Y. if (updatd) then if (iupdat .gt. m) then c shift old part of WN1. do 10 jy = 1, m - 1 js = m + jy call dcopy(m-jy,wn1(jy+1,jy+1),1,wn1(jy,jy),1) call dcopy(m-jy,wn1(js+1,js+1),1,wn1(js,js),1) call dcopy(m-1,wn1(m+2,jy+1),1,wn1(m+1,jy),1) 10 continue endif c put new rows in blocks (1,1), (2,1) and (2,2). pbegin = 1 pend = nsub dbegin = nsub + 1 dend = n iy = col is = m + col ipntr = head + col - 1 if (ipntr .gt. m) ipntr = ipntr - m jpntr = head do 20 jy = 1, col js = m + jy temp1 = zero temp2 = zero temp3 = zero c compute element jy of row 'col' of Y'ZZ'Y do 15 k = pbegin, pend k1 = ind(k) temp1 = temp1 + wy(k1,ipntr)*wy(k1,jpntr) 15 continue c compute elements jy of row 'col' of L_a and S'AA'S do 16 k = dbegin, dend k1 = ind(k) temp2 = temp2 + ws(k1,ipntr)*ws(k1,jpntr) temp3 = temp3 + ws(k1,ipntr)*wy(k1,jpntr) 16 continue wn1(iy,jy) = temp1 wn1(is,js) = temp2 wn1(is,jy) = temp3 jpntr = mod(jpntr,m) + 1 20 continue c put new column in block (2,1). jy = col jpntr = head + col - 1 if (jpntr .gt. m) jpntr = jpntr - m ipntr = head do 30 i = 1, col is = m + i temp3 = zero c compute element i of column 'col' of R_z do 25 k = pbegin, pend k1 = ind(k) temp3 = temp3 + ws(k1,ipntr)*wy(k1,jpntr) 25 continue ipntr = mod(ipntr,m) + 1 wn1(is,jy) = temp3 30 continue upcl = col - 1 else upcl = col endif c modify the old parts in blocks (1,1) and (2,2) due to changes c in the set of free variables. ipntr = head do 45 iy = 1, upcl is = m + iy jpntr = head do 40 jy = 1, iy js = m + jy temp1 = zero temp2 = zero temp3 = zero temp4 = zero do 35 k = 1, nenter k1 = indx2(k) temp1 = temp1 + wy(k1,ipntr)*wy(k1,jpntr) temp2 = temp2 + ws(k1,ipntr)*ws(k1,jpntr) 35 continue do 36 k = ileave, n k1 = indx2(k) temp3 = temp3 + wy(k1,ipntr)*wy(k1,jpntr) temp4 = temp4 + ws(k1,ipntr)*ws(k1,jpntr) 36 continue wn1(iy,jy) = wn1(iy,jy) + temp1 - temp3 wn1(is,js) = wn1(is,js) - temp2 + temp4 jpntr = mod(jpntr,m) + 1 40 continue ipntr = mod(ipntr,m) + 1 45 continue c modify the old parts in block (2,1). ipntr = head do 60 is = m + 1, m + upcl jpntr = head do 55 jy = 1, upcl temp1 = zero temp3 = zero do 50 k = 1, nenter k1 = indx2(k) temp1 = temp1 + ws(k1,ipntr)*wy(k1,jpntr) 50 continue do 51 k = ileave, n k1 = indx2(k) temp3 = temp3 + ws(k1,ipntr)*wy(k1,jpntr) 51 continue if (is .le. jy + m) then wn1(is,jy) = wn1(is,jy) + temp1 - temp3 else wn1(is,jy) = wn1(is,jy) - temp1 + temp3 endif jpntr = mod(jpntr,m) + 1 55 continue ipntr = mod(ipntr,m) + 1 60 continue c Form the upper triangle of WN = [D+Y' ZZ'Y/theta -L_a'+R_z' ] c [-L_a +R_z S'AA'S*theta] m2 = 2*m do 70 iy = 1, col is = col + iy is1 = m + iy do 65 jy = 1, iy js = col + jy js1 = m + jy wn(jy,iy) = wn1(iy,jy)/theta wn(js,is) = wn1(is1,js1)*theta 65 continue do 66 jy = 1, iy - 1 wn(jy,is) = -wn1(is1,jy) 66 continue do 67 jy = iy, col wn(jy,is) = wn1(is1,jy) 67 continue wn(iy,iy) = wn(iy,iy) + sy(iy,iy) 70 continue c Form the upper triangle of WN= [ LL' L^-1(-L_a'+R_z')] c [(-L_a +R_z)L'^-1 S'AA'S*theta ] c first Cholesky factor (1,1) block of wn to get LL' c with L' stored in the upper triangle of wn. call dpofa(wn,m2,col,info) if (info .ne. 0) then info = -1 return endif c then form L^-1(-L_a'+R_z') in the (1,2) block. col2 = 2*col do 71 js = col+1 ,col2 call dtrsl(wn,m2,col,wn(1,js),11,info) 71 continue c Form S'AA'S*theta + (L^-1(-L_a'+R_z'))'L^-1(-L_a'+R_z') in the c upper triangle of (2,2) block of wn. do 72 is = col+1, col2 do 74 js = is, col2 wn(is,js) = wn(is,js) + ddot(col,wn(1,is),1,wn(1,js),1) 74 continue 72 continue c Cholesky factorization of (2,2) block of wn. call dpofa(wn(col+1,col+1),m2,col,info) if (info .ne. 0) then info = -2 return endif return end c======================= The end of formk ============================== subroutine formt(m, wt, sy, ss, col, theta, info) integer m, col, info double precision theta, wt(m, m), sy(m, m), ss(m, m) c ************ c c Subroutine formt c c This subroutine forms the upper half of the pos. def. and symm. c T = theta*SS + L*D^(-1)*L', stores T in the upper triangle c of the array wt, and performs the Cholesky factorization of T c to produce J*J', with J' stored in the upper triangle of wt. c c Subprograms called: c c Linpack ... dpofa. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer i,j,k,k1 double precision ddum double precision zero parameter (zero=0.0d0) c Form the upper half of T = theta*SS + L*D^(-1)*L', c store T in the upper triangle of the array wt. do 52 j = 1, col wt(1,j) = theta*ss(1,j) 52 continue do 55 i = 2, col do 54 j = i, col k1 = min(i,j) - 1 ddum = zero do 53 k = 1, k1 ddum = ddum + sy(i,k)*sy(j,k)/sy(k,k) 53 continue wt(i,j) = ddum + theta*ss(i,j) 54 continue 55 continue c Cholesky factorize T to J*J' with c J' stored in the upper triangle of wt. call dpofa(wt,m,col,info) if (info .ne. 0) then info = -3 endif return end c======================= The end of formt ============================== subroutine freev(n, nfree, index, nenter, ileave, indx2, + iwhere, wrk, updatd, cnstnd, iprint, iter) integer n, nfree, nenter, ileave, iprint, iter, + index(n), indx2(n), iwhere(n) logical wrk, updatd, cnstnd c ************ c c Subroutine freev c c This subroutine counts the entering and leaving variables when c iter > 0, and finds the index set of free and active variables c at the GCP. c c cnstnd is a logical variable indicating whether bounds are present c c index is an integer array of dimension n c for i=1,...,nfree, index(i) are the indices of free variables c for i=nfree+1,...,n, index(i) are the indices of bound variables c On entry after the first iteration, index gives c the free variables at the previous iteration. c On exit it gives the free variables based on the determination c in cauchy using the array iwhere. c c indx2 is an integer array of dimension n c On entry indx2 is unspecified. c On exit with iter>0, indx2 indicates which variables c have changed status since the previous iteration. c For i= 1,...,nenter, indx2(i) have changed from bound to free. c For i= ileave+1,...,n, indx2(i) have changed from free to bound. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer iact,i,k integer itmp nenter = 0 ileave = n + 1 if (iter .gt. 0 .and. cnstnd) then c count the entering and leaving variables. do 20 i = 1, nfree k = index(i) cjn write(6,*) ' k = index(i) ', k cjn write(6,*) ' index = ', i if (iwhere(k) .gt. 0) then ileave = ileave - 1 indx2(ileave) = k if (iprint .ge. 100) then cx call intpr( cx + 'Variable k leaves the set of free variables for k =', cx + -1, k, 1) endif cw if (iprint .ge. 100) write (6,*) cw + 'Variable ',k,' leaves the set of free variables' endif 20 continue do 22 i = 1 + nfree, n k = index(i) if (iwhere(k) .le. 0) then nenter = nenter + 1 indx2(nenter) = k cx if (iprint .ge. 100) then cx call intpr('Var entering free vars is k=',-1,k,1) cw write (6,*) cw + 'Variable ',k,' enters the set of free variables' cx endif endif 22 continue cx if (iprint .ge. 99) then cw write (6,*) cw + n+1-ileave,' variables leave; ',nenter,' variables enter' cx itmp = n+1-ileave cx call intpr(' no. variables leaving =',-1,itmp, 1) cx call intpr(' no. variables entering =',-1,nenter, 1) cx endif endif wrk = (ileave .lt. n+1) .or. (nenter .gt. 0) .or. updatd c Find the index set of free and active variables at the GCP. nfree = 0 iact = n + 1 do 24 i = 1, n if (iwhere(i) .le. 0) then nfree = nfree + 1 index(nfree) = i else iact = iact - 1 index(iact) = i endif 24 continue cx if (iprint .ge. 99) then cw write (6,*) cw + nfree,' variables are free at GCP ',iter + 1 cx call intpr(' no. variables free =',-1, nfree,1) cx itmp = iter + 1 cx call intpr(' at GCP ',-1,itmp,1) cx endif return end c======================= The end of freev ============================== subroutine hpsolb(n, t, iorder, iheap) integer iheap, n, iorder(n) double precision t(n) c ************ c c Subroutine hpsolb c c This subroutine sorts out the least element of t, and puts the c remaining elements of t in a heap. c c n is an integer variable. c On entry n is the dimension of the arrays t and iorder. c On exit n is unchanged. c c t is a double precision array of dimension n. c On entry t stores the elements to be sorted, c On exit t(n) stores the least elements of t, and t(1) to t(n-1) c stores the remaining elements in the form of a heap. c c iorder is an integer array of dimension n. c On entry iorder(i) is the index of t(i). c On exit iorder(i) is still the index of t(i), but iorder may be c permuted in accordance with t. c c iheap is an integer variable specifying the task. c On entry iheap should be set as follows: c iheap .eq. 0 if t(1) to t(n) is not in the form of a heap, c iheap .ne. 0 if otherwise. c On exit iheap is unchanged. c c c References: c Algorithm 232 of CACM (J. W. J. Williams): HEAPSORT. c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c ************ integer i,j,k,indxin,indxou double precision ddum,out if (iheap .eq. 0) then c Rearrange the elements t(1) to t(n) to form a heap. do 20 k = 2, n ddum = t(k) indxin = iorder(k) c Add ddum to the heap. i = k 10 continue if (i.gt.1) then j = i/2 if (ddum .lt. t(j)) then t(i) = t(j) iorder(i) = iorder(j) i = j goto 10 endif endif t(i) = ddum iorder(i) = indxin 20 continue endif c Assign to 'out' the value of t(1), the least member of the heap, c and rearrange the remaining members to form a heap as c elements 1 to n-1 of t. if (n .gt. 1) then i = 1 out = t(1) indxou = iorder(1) ddum = t(n) indxin = iorder(n) c Restore the heap 30 continue j = i+i if (j .le. n-1) then if (t(j+1) .lt. t(j)) j = j+1 if (t(j) .lt. ddum ) then t(i) = t(j) iorder(i) = iorder(j) i = j goto 30 endif endif t(i) = ddum iorder(i) = indxin c Put the least member in t(n). t(n) = out iorder(n) = indxou endif return end c====================== The end of hpsolb ============================== subroutine lnsrlb(n, l, u, nbd, x, f, fold, gd, gdold, g, d, r, t, + z, stp, dnorm, dtd, xstep, stpmx, iter, ifun, + iback, nfgv, info, itask, boxed, cnstnd, icsave, + isave, dsave) logical boxed, cnstnd integer n, iter, ifun, iback, nfgv, info, itask, icsave, + nbd(n), isave(2) double precision f, fold, gd, gdold, stp, dnorm, dtd, xstep, + stpmx, x(n), l(n), u(n), g(n), d(n), r(n), t(n), + z(n), dsave(13) c ********** c c Subroutine lnsrlb c c This subroutine calls subroutine dcsrch from the Minpack2 library c to perform the line search. Subroutine dscrch is safeguarded so c that all trial points lie within the feasible region. c c Subprograms called: c c Minpack2 Library ... dcsrch. c c Linpack ... dtrsl, ddot. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ********** integer i double precision ddot,a1,a2 double precision one,zero,big parameter (one=1.0d0,zero=0.0d0,big=1.0d+10) double precision ftol,gtol,xtol parameter (ftol=1.0d-3,gtol=0.9d0,xtol=0.1d0) c if (task(1:5) .eq. 'FG_LN') goto 556 if (itask .eq. 20) goto 556 dtd = ddot(n,d,1,d,1) dnorm = sqrt(dtd) c Determine the maximum step length. stpmx = big if (cnstnd) then if (iter .eq. 0) then stpmx = one else do 43 i = 1, n a1 = d(i) if (nbd(i) .ne. 0) then if (a1 .lt. zero .and. nbd(i) .le. 2) then a2 = l(i) - x(i) if (a2 .ge. zero) then stpmx = zero else if (a1*stpmx .lt. a2) then stpmx = a2/a1 endif else if (a1 .gt. zero .and. nbd(i) .ge. 2) then a2 = u(i) - x(i) if (a2 .le. zero) then stpmx = zero else if (a1*stpmx .gt. a2) then stpmx = a2/a1 endif endif endif 43 continue endif endif if (iter .eq. 0 .and. .not. boxed) then stp = min(one/dnorm, stpmx) else stp = one endif call dcopy(n,x,1,t,1) call dcopy(n,g,1,r,1) fold = f ifun = 0 iback = 0 c csave = 'START' icsave = 2 556 continue gd = ddot(n,g,1,d,1) if (ifun .eq. 0) then gdold=gd if (gd .ge. zero) then c the directional derivative >=0. c Line search is impossible. cw write(6,*)' ascent direction in projection gd = ', gd cx call dblepr(' ascent direction in projection gd = ', cx + -1, gd,1) info = -4 return endif endif call dcsrch(f,gd,stp,ftol,gtol,xtol,zero,stpmx,icsave,isave,dsave) xstep = stp*dnorm c if (csave(1:4) .ne. 'CONV' .and. csave(1:4) .ne. 'WARN') then c2345678901234567890123456789012345678901234567890123456789012345678901234567890 if ((icsave .lt. 6) .or. ((icsave .gt. 8) .and. + (icsave .lt. 23))) then c task = 'FG_LNSRCH' itask = 20 ifun = ifun + 1 nfgv = nfgv + 1 iback = ifun - 1 if (stp .eq. one) then call dcopy(n,z,1,x,1) else do 41 i = 1, n x(i) = stp*d(i) + t(i) 41 continue endif else c task = 'NEW_X' itask = 1 endif return end c======================= The end of lnsrlb ============================= subroutine matupd(n, m, ws, wy, sy, ss, d, r, itail, + iupdat, col, head, theta, rr, dr, stp, dtd) integer n, m, itail, iupdat, col, head double precision theta, rr, dr, stp, dtd, d(n), r(n), + ws(n, m), wy(n, m), sy(m, m), ss(m, m) c ************ c c Subroutine matupd c c This subroutine updates matrices WS and WY, and forms the c middle matrix in B. c c Subprograms called: c c Linpack ... dcopy, ddot. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer j,pointr double precision ddot double precision one parameter (one=1.0d0) c Set pointers for matrices WS and WY. if (iupdat .le. m) then col = iupdat itail = mod(head+iupdat-2,m) + 1 else itail = mod(itail,m) + 1 head = mod(head,m) + 1 endif c Update matrices WS and WY. call dcopy(n,d,1,ws(1,itail),1) call dcopy(n,r,1,wy(1,itail),1) c Set theta=yy/ys. theta = rr/dr c Form the middle matrix in B. c update the upper triangle of SS, c and the lower triangle of SY: if (iupdat .gt. m) then c move old information do 50 j = 1, col - 1 call dcopy(j,ss(2,j+1),1,ss(1,j),1) call dcopy(col-j,sy(j+1,j+1),1,sy(j,j),1) 50 continue endif c add new information: the last row of SY c and the last column of SS: pointr = head do 51 j = 1, col - 1 sy(col,j) = ddot(n,d,1,wy(1,pointr),1) ss(j,col) = ddot(n,ws(1,pointr),1,d,1) pointr = mod(pointr,m) + 1 51 continue if (stp .eq. one) then ss(col,col) = dtd else ss(col,col) = stp*stp*dtd endif sy(col,col) = dr return end c======================= The end of matupd ============================= subroutine prn1lb(n, m, l, u, x, iprint, epsmch) integer n, m double precision epsmch, x(n), l(n), u(n) c ************ c c Subroutine prn1lb c c This subroutine prints the input data, initial point, upper and c lower bounds of each variable, machine precision, as well as c the headings of the output. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ c$$$ integer i integer nprt c limit output to 1st 5 elements nprt = n if (nprt .gt. 5) nprt = 5 cx if (iprint .ge. 0) then cx if (iprint .ge. 1) then cw write (6,7001) epsmch cx call dblepr('RUNNING THE L-BFGS-B CODE with eps=', cx + -1, epsmch, 1) cw write (6,*) 'N = ',n,' M = ',m cx call intpr(' N =',-1, n, 1) cx call intpr(' M =',-1, m, 1) cw write (itfile,2001) epsmch cw write (itfile,*)'N = ',n,' M = ',m cw write (itfile,9001) cx if (iprint .gt. 100) then cw write (6,1004) 'L =',(l(i),i = 1,n) cw write (6,1004) 'X0 =',(x(i),i = 1,n) cw write (6,1004) 'U =',(u(i),i = 1,n) cx call dblepr('L =',-1, l, nprt) cx call dblepr('X0=',-1, x, nprt) cx call dblepr('U =',-1, u, nprt) cx endif cx endif cx endif cw 1004 format (/,a4, 1p, 6(1x,d11.4),/,(4x,1p,6(1x,d11.4))) cw 2001 format ('RUNNING THE L-BFGS-B CODE',/,/, cw + 'it = iteration number',/, cw + 'nf = number of function evaluations',/, cw + 'nseg = number of segments explored during the Cauchy search',/, cw + 'nact = number of active bounds at the generalized Cauchy point' cw + ,/, cw + 'sub = manner in which the subspace minimization terminated:' cw + ,/,' con = converged, bnd = a bound was reached',/, cw + 'itls = number of iterations performed in the line search',/, cw + 'stepl = step length used',/, cw + 'tstep = norm of the displacement (total step)',/, cw + 'projg = norm of the projected gradient',/, cw + 'f = function value',/,/, cw + ' * * *',/,/, cw + 'Machine precision =',1p,d10.3) cw 7001 format ('RUNNING THE L-BFGS-B CODE',/,/, cw + ' * * *',/,/, cw + 'Machine precision =',1p,d10.3) cw 9001 format (/,3x,'it',3x,'nf',2x,'nseg',2x,'nact',2x,'sub',2x,'itls', cw + 2x,'stepl',4x,'tstep',5x,'projg',8x,'f') return end c======================= The end of prn1lb ============================= subroutine prn2lb(f, iprint, iter, + sbgnrm, iback, xstep) integer iprint, iter, iback double precision f, sbgnrm, xstep c ************ c c Subroutine prn2lb c c This subroutine prints out new information after a successful c line search. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer imod c 'word' records the status of subspace solutions. c$$$ if (iword .eq. 0) then c$$$c the subspace minimization converged. c$$$ word = 'con' c$$$ else if (iword .eq. 1) then c$$$c the subspace minimization stopped at a bound. c$$$ word = 'bnd' c$$$ else if (iword .eq. 5) then c$$$c the truncated Newton step has been used. c$$$ word = 'TNT' c$$$ else c$$$ word = '---' c$$$ endif cx if (iprint .ge. 99) then cw write (6,*) 'LINE SEARCH',iback,' times; norm of step = ',xstep cx call intpr('LINE SEARCH iback=',-1, iback, 1) cx call dblepr('norm of step =',-1, xstep, 1) cw write (6,2001) iter,f,sbgnrm cx call intpr('At iterate ',-1, iter, 1) cx call dblepr('f =',-1, f, 1) cx call dblepr('|proj g| =',-1, sbgnrm, 1) cx if (iprint .gt. 100) then cw write (6,1004) 'X =',(x(i), i = 1, n) cw write (6,1004) 'G =',(g(i), i = 1, n) cx endif cx else if (iprint .gt. 0) then cx imod = mod(iter,iprint) cw if (imod .eq. 0) write (6,2001) iter,f,sbgnrm cx endif cw if (iprint .ge. 1) write (itfile,3001) cw + iter,nfgv,nseg,nact,word,iback,stp,xstep,sbgnrm,f cw 1004 format (/,a4, 1p, 6(1x,d11.4),/,(4x,1p,6(1x,d11.4))) cw 2001 format cw + (/,'At iterate',i5,4x,'f= ',1p,d12.5,4x,'|proj g|= ',1p,d12.5) cw 3001 format(2(1x,i4),2(1x,i5),2x,a3,1x,i4,1p,2(2x,d7.1),1p,2(1x,d10.3)) return end c======================= The end of prn2lb ============================= subroutine prn3lb(n, x, f, itask, iprint, info, k) c character*255 task integer n, iprint, info, k, itask double precision f, x(n) c ************ c c Subroutine prn3lb c c This subroutine prints out information when either a built-in c convergence test is satisfied or when an error message is c generated. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ c$$$ integer i integer nprt c if (task(1:5) .eq. 'ERROR') goto 999 if ((itask .ge. 9) .and. (itask .le. 19)) goto 999 cx if (iprint .ge. 0) then cw write (6,3003) cw 3003 format (/, cw + ' * * *',/,/, cw + 'Tit = total number of iterations',/, cw + 'Tnf = total number of function evaluations',/, cw + 'Tnint = total number of segments explored during', cw + ' Cauchy searches',/, cw + 'Skip = number of BFGS updates skipped',/, cw + 'Nact = number of active bounds at final generalized', cw + ' Cauchy point',/, cw + 'Projg = norm of the final projected gradient',/, cw + 'F = final function value',/,/, cw + ' * * *') cw write (6,3004) cw 3004 format (/,3x,'N',4x,'Tit',5x,'Tnf',2x,'Tnint',2x, cw + 'Skip',2x,'Nact',5x,'Projg',8x,'F') cw write(6,3005) n,iter,nfgv,nintol,nskip,nact,sbgnrm,f cw 3005 format (i5,2(1x,i6),(1x,i6),(2x,i4),(1x,i5),1p,2(2x,d10.3)) cx if (iprint .ge. 100) then cx nprt = n cx if (nprt .gt. 5) nprt = 5 cx call dblepr('X=', -1, x, nprt) cw write (6,1004) 'X =',(x(i),i = 1,n) cw 1004 format (/,a4, 1p, 6(1x,d11.4),/,(4x,1p,6(1x,d11.4))) cx endif cw if (iprint .ge. 1) write (6,*) ' F =',f cx if (iprint .ge. 1) call dblepr(' F =',-1,f, 1) cx endif 999 continue cx if (iprint .ge. 0) then cw write (6,3009) itask cx if (info .ne. 0) then cw if (info .eq. -1) write (6,9011) cx if (info .eq. -1) then cx call intpr( cx +' Matrix in 1st Cholesky factorization in formk is not Pos. Def.', cx + -1, 0, 0) cx endif cw if (info .eq. -2) write (6,9012) cx if (info .eq. -2) then cx call intpr( cx +' Matrix in 2nd Cholesky factorization in formk is not Pos. Def.', cx + -1, 0, 0) cx endif cw if (info .eq. -3) write (6,9013) cx if (info .eq. -3) then cx call intpr( cx + ' Matrix in Cholesky factorization in formt is not Pos. Def.', cx + -1, 0, 0) cx endif cw if (info .eq. -4) write (6,9014) cx if (info .eq. -4) then cx call intpr( cx +' Derivative >= 0, backtracking line search impossible.', cx + -1, 0, 0) cx call intpr( cx +' Previous x, f and g restored.', cx + -1, 0, 0) cx call intpr( cx +' Possible causes: 1 error in function or gradient evaluation;', cx + -1, 0, 0) cx call intpr( cx +' 2 rounding errors dominate computation.', cx + -1, 0, 0) cx endif cw if (info .eq. -5) write (6,9015) cx if (info .eq. -5) then cx call intpr( cx +' Warning: more than 10 function and gradient', cx + -1, 0, 0) cx call intpr( cx +' evaluations in the last line search. Termination', cx + -1, 0, 0) cx call intpr( cx +' may possibly be caused by a bad search direction.', cx + -1, 0, 0) cx endif cw if (info .eq. -6) write (6,*)' Input nbd(',k,') is invalid.' cx if (info .eq. -6) then cx call intpr( cx + ' Input nbd(k) is invalid for k = ', cx + -1, k, 1) cx endif cw if (info .eq. -7) cx if (info .eq. -7) then cx call intpr( cx + ' l(k) > u(k). No feasible solution for k=', -1, k, 1) cx endif cw + write (6,*)' l(',k,') > u(',k,'). No feasible solution.' cw if (info .eq. -8) write (6,9018) cx if (info .eq. -8) then cx call intpr(' The triangular system is singular.', cx + -1, 0, 0) cx endif cw if (info .eq. -9) write (6,9019) cx if (info .eq. -9) then cx call intpr( cx +' Line search cannot locate an adequate point after 20 function', cx + -1, 0, 0) cx call intpr( cx +' and gradient evaluations. Previous x, f and g restored.', cx + -1, 0, 0) cx call intpr( cx +' Possible causes: 1 error in function or gradient evaluation;', cx + -1, 0, 0) cx call intpr( cx +' 2 rounding error dominate computation.', cx + -1, 0, 0) cx endif cx endif cw if (iprint .ge. 1) cw write (6,3007) cachyt,sbtime,lnscht cw suppressing time output cw write (6,3008) time cw Note -- suppress time computations here -- use R stuff cw if (iprint .ge. 1) then cw if (info .eq. -4 .or. info .eq. -9) then cw write (itfile,3002) cw + iter,nfgv,nseg,nact,word,iback,stp,xstep cw endif cw write (itfile,3009) itask cw if (info .ne. 0) then cw if (info .eq. -1) write (itfile,9011) cw if (info .eq. -2) write (itfile,9012) cw if (info .eq. -3) write (itfile,9013) cw if (info .eq. -4) write (itfile,9014) cw if (info .eq. -5) write (itfile,9015) cw if (info .eq. -8) write (itfile,9018) cw if (info .eq. -9) write (itfile,9019) cw endif cw write (itfile,3008) time cw endif cx endif cw 1004 format (/,a4, 1p, 6(1x,d11.4),/,(4x,1p,6(1x,d11.4))) cw 3002 format(2(1x,i4),2(1x,i5),2x,a3,1x,i4,1p,2(2x,d7.1),6x,'-',10x,'-') cw 3003 format (/, cw + ' * * *',/,/, cw + 'Tit = total number of iterations',/, cw + 'Tnf = total number of function evaluations',/, cw + 'Tnint = total number of segments explored during', cw + ' Cauchy searches',/, cw + 'Skip = number of BFGS updates skipped',/, cw + 'Nact = number of active bounds at final generalized', cw + ' Cauchy point',/, cw + 'Projg = norm of the final projected gradient',/, cw + 'F = final function value',/,/, cw + ' * * *') cw 3007 format (/,' Cauchy time',1p,e10.3,' seconds.',/ cw + ' Subspace minimization time',1p,e10.3,' seconds.',/ cw + ' Line search time',1p,e10.3,' seconds.') cw 3008 format (/,' Total User time',1p,e10.3,' seconds.',/) cw 3009 format (/,i4) cw 9011 format (/, cw +' Matrix in 1st Cholesky factorization in formk is not Pos. Def.') cw 9012 format (/, cw +' Matrix in 2st Cholesky factorization in formk is not Pos. Def.') cw 9013 format (/, cw +' Matrix in the Cholesky factorization in formt is not Pos. Def.') cw 9014 format (/, cw +' Derivative >= 0, backtracking line search impossible.',/, cw +' Previous x, f and g restored.',/, cw +' Possible causes: 1 error in function or gradient evaluation;',/, cw +' 2 rounding errors dominate computation.') cw 9015 format (/, cw +' Warning: more than 10 function and gradient',/, cw +' evaluations in the last line search. Termination',/, cw +' may possibly be caused by a bad search direction.') cw 9018 format (/,' The triangular system is singular.') cw 9019 format (/, cw +' Line search cannot locate an adequate point after 20 function',/ cw +,' and gradient evaluations. Previous x, f and g restored.',/, cw +' Possible causes: 1 error in function or gradient evaluation;',/, cw +' 2 rounding error dominate computation.') return end c======================= The end of prn3lb ============================= subroutine projgr(n, l, u, nbd, x, g, sbgnrm) integer n, nbd(n) double precision sbgnrm, x(n), l(n), u(n), g(n) c ************ c c Subroutine projgr c c This subroutine computes the infinity norm of the projected c gradient. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer i double precision gi double precision zero parameter (zero=0.0d0) sbgnrm = zero do 15 i = 1, n gi = g(i) if (nbd(i) .ne. 0) then if (gi .lt. zero) then if (nbd(i) .ge. 2) gi = max((x(i)-u(i)),gi) else if (nbd(i) .le. 2) gi = min((x(i)-l(i)),gi) endif endif sbgnrm = max(sbgnrm,abs(gi)) 15 continue return end c======================= The end of projgr ============================= subroutine subsm ( n, m, nsub, ind, l, u, nbd, x, d, xp, ws, wy, + theta, xx, gg, + col, head, iword, wv, wn, iprint, info ) implicit none integer n, m, nsub, col, head, iword, iprint, info, + ind(nsub), nbd(n) double precision theta, + l(n), u(n), x(n), d(n), xp(n), xx(n), gg(n), + ws(n, m), wy(n, m), + wv(2*m), wn(2*m, 2*m) c ********************************************************************** c c This routine contains the major changes in the updated version. c The changes are described in the accompanying paper c c Jose Luis Morales, Jorge Nocedal c "Remark On Algorithm 788: L-BFGS-B: Fortran Subroutines for Large-Scale c Bound Constrained Optimization". Decemmber 27, 2010. c c J.L. Morales Departamento de Matematicas, c Instituto Tecnologico Autonomo de Mexico c Mexico D.F. c c J, Nocedal Department of Electrical Engineering and c Computer Science. c Northwestern University. Evanston, IL. USA c c January 17, 2011 c c ********************************************************************** c c c Subroutine subsm c c Given xcp, l, u, r, an index set that specifies c the active set at xcp, and an l-BFGS matrix B c (in terms of WY, WS, SY, WT, head, col, and theta), c this subroutine computes an approximate solution c of the subspace problem c c (P) min Q(x) = r'(x-xcp) + 1/2 (x-xcp)' B (x-xcp) c c subject to l<=x<=u c x_i=xcp_i for all i in A(xcp) c c along the subspace unconstrained Newton direction c c d = -(Z'BZ)^(-1) r. c c The formula for the Newton direction, given the L-BFGS matrix c and the Sherman-Morrison formula, is c c d = (1/theta)r + (1/theta*2) Z'WK^(-1)W'Z r. c c where c K = [-D -Y'ZZ'Y/theta L_a'-R_z' ] c [L_a -R_z theta*S'AA'S ] c c Note that this procedure for computing d differs c from that described in [1]. One can show that the matrix K is c equal to the matrix M^[-1]N in that paper. c c n is an integer variable. c On entry n is the dimension of the problem. c On exit n is unchanged. c c m is an integer variable. c On entry m is the maximum number of variable metric corrections c used to define the limited memory matrix. c On exit m is unchanged. c c nsub is an integer variable. c On entry nsub is the number of free variables. c On exit nsub is unchanged. c c ind is an integer array of dimension nsub. c On entry ind specifies the coordinate indices of free variables. c On exit ind is unchanged. c c l is a double precision array of dimension n. c On entry l is the lower bound of x. c On exit l is unchanged. c c u is a double precision array of dimension n. c On entry u is the upper bound of x. c On exit u is unchanged. c c nbd is a integer array of dimension n. c On entry nbd represents the type of bounds imposed on the c variables, and must be specified as follows: c nbd(i)=0 if x(i) is unbounded, c 1 if x(i) has only a lower bound, c 2 if x(i) has both lower and upper bounds, and c 3 if x(i) has only an upper bound. c On exit nbd is unchanged. c c x is a double precision array of dimension n. c On entry x specifies the Cauchy point xcp. c On exit x(i) is the minimizer of Q over the subspace of c free variables. c c d is a double precision array of dimension n. c On entry d is the reduced gradient of Q at xcp. c On exit d is the Newton direction of Q. c c xp is a double precision array of dimension n. c used to safeguard the projected Newton direction c c xx is a double precision array of dimension n c On entry it holds the current iterate c On output it is unchanged c gg is a double precision array of dimension n c On entry it holds the gradient at the current iterate c On output it is unchanged c c ws and wy are double precision arrays; c theta is a double precision variable; c col is an integer variable; c head is an integer variable. c On entry they store the information defining the c limited memory BFGS matrix: c ws(n,m) stores S, a set of s-vectors; c wy(n,m) stores Y, a set of y-vectors; c theta is the scaling factor specifying B_0 = theta I; c col is the number of variable metric corrections stored; c head is the location of the 1st s- (or y-) vector in S (or Y). c On exit they are unchanged. c c iword is an integer variable. c On entry iword is unspecified. c On exit iword specifies the status of the subspace solution. c iword = 0 if the solution is in the box, c 1 if some bound is encountered. c c wv is a double precision working array of dimension 2m. c c wn is a double precision array of dimension 2m x 2m. c On entry the upper triangle of wn stores the LEL^T factorization c of the indefinite matrix c c K = [-D -Y'ZZ'Y/theta L_a'-R_z' ] c [L_a -R_z theta*S'AA'S ] c where E = [-I 0] c [ 0 I] c On exit wn is unchanged. c c iprint is an INTEGER variable that must be set by the user. c It controls the frequency and type of output generated: c iprint<0 no output is generated; c iprint=0 print only one line at the last iteration; c 0100 print details of every iteration including x and g; c When iprint > 0, the file iterate.dat will be created to c summarize the iteration. c c info is an integer variable. c On entry info is unspecified. c On exit info = 0 for normal return, c = nonzero for abnormal return c when the matrix K is ill-conditioned. c c Subprograms called: c c Linpack dtrsl. c c c References: c c [1] R. H. Byrd, P. Lu, J. Nocedal and C. Zhu, ``A limited c memory algorithm for bound constrained optimization'', c SIAM J. Scientific Computing 16 (1995), no. 5, pp. 1190--1208. c c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer pointr,m2,col2,ibd,jy,js,i,j,k double precision alpha, xk, dk, temp1, temp2 double precision one,zero parameter (one=1.0d0,zero=0.0d0) c double precision dd_p if (nsub .le. 0) return cw if (iprint .ge. 99) write (6,1001) cx if (iprint .ge. 99) then cx call intpr(' ----- SUBSM entered -----', -1, 0, 0) cw 1001 format (/,'----------------SUBSM entered-----------------',/) cx endif c Compute wv = W'Zd. pointr = head do 20 i = 1, col temp1 = zero temp2 = zero do 10 j = 1, nsub k = ind(j) temp1 = temp1 + wy(k,pointr)*d(j) temp2 = temp2 + ws(k,pointr)*d(j) 10 continue wv(i) = temp1 wv(col + i) = theta*temp2 pointr = mod(pointr,m) + 1 20 continue c Compute wv:=K^(-1)wv. m2 = 2*m col2 = 2*col call dtrsl(wn,m2,col2,wv,11,info) if (info .ne. 0) return do 25 i = 1, col wv(i) = -wv(i) 25 continue call dtrsl(wn,m2,col2,wv,01,info) if (info .ne. 0) return c Compute d = (1/theta)d + (1/theta**2)Z'W wv. pointr = head do 40 jy = 1, col js = col + jy do 30 i = 1, nsub k = ind(i) d(i) = d(i) + wy(k,pointr)*wv(jy)/theta + + ws(k,pointr)*wv(js) 30 continue pointr = mod(pointr,m) + 1 40 continue call dscal( nsub, one/theta, d, 1 ) c c----------------------------------------------------------------- c Let us try the projection, d is the Newton direction iword = 0 call dcopy ( n, x, 1, xp, 1 ) c do 50 i=1, nsub k = ind(i) dk = d(i) xk = x(k) if ( nbd(k) .ne. 0 ) then c if ( nbd(k).eq.1 ) then ! lower bounds only x(k) = max( l(k), xk + dk ) if ( x(k).eq.l(k) ) iword = 1 else c if ( nbd(k).eq.2 ) then ! upper and lower bounds xk = max( l(k), xk + dk ) x(k) = min( u(k), xk ) if (x(k) .eq. l(k) .or. x(k) .eq. u(k)) then iword = 1 endif else c if ( nbd(k).eq.3 ) then ! upper bounds only x(k) = min( u(k), xk + dk ) if ( x(k).eq.u(k) ) iword = 1 end if end if end if c else ! free variables x(k) = xk + dk end if 50 continue c if ( iword.eq.0 ) then go to 911 end if c c check sign of the directional derivative c dd_p = zero do 55 i=1, n dd_p = dd_p + (x(i) - xx(i))*gg(i) 55 continue if ( dd_p .gt.zero ) then call dcopy( n, xp, 1, x, 1 ) cx call intpr(' Positive dir derivative in projection ', -1,0,0) cw write(6,*) ' Positive dir derivative in projection ' cx call intpr(' Using the backtracking step ', -1,0,0) cw write(6,*) ' Using the backtracking step ' else go to 911 endif c c----------------------------------------------------------------- c alpha = one temp1 = alpha ibd = 0 do 60 i = 1, nsub k = ind(i) dk = d(i) if (nbd(k) .ne. 0) then if (dk .lt. zero .and. nbd(k) .le. 2) then temp2 = l(k) - x(k) if (temp2 .ge. zero) then temp1 = zero else if (dk*alpha .lt. temp2) then temp1 = temp2/dk endif else if (dk .gt. zero .and. nbd(k) .ge. 2) then temp2 = u(k) - x(k) if (temp2 .le. zero) then temp1 = zero else if (dk*alpha .gt. temp2) then temp1 = temp2/dk endif endif if (temp1 .lt. alpha) then alpha = temp1 ibd = i endif endif 60 continue if (alpha .lt. one) then dk = d(ibd) k = ind(ibd) if (dk .gt. zero) then x(k) = u(k) d(ibd) = zero else if (dk .lt. zero) then x(k) = l(k) d(ibd) = zero endif endif do 70 i = 1, nsub k = ind(i) x(k) = x(k) + alpha*d(i) 70 continue cccccc 911 continue cw if (iprint .ge. 99) write (6,1004) cx if (iprint .ge. 99) call intpr(' exit SUBSM ', -1, 0,0) cw 1001 format (/,'----------------SUBSM entered-----------------',/) cw 1004 format (/,'----------------exit SUBSM --------------------',/) return end c====================== The end of subsm =============================== subroutine dcsrch(f,g,stp,ftol,gtol,xtol,stpmin,stpmax, + itask,isave,dsave) c character*(*) task integer itask, isave(2) double precision f,g,stp,ftol,gtol,xtol,stpmin,stpmax double precision dsave(13) c ********** c c Subroutine dcsrch c c This subroutine finds a step that satisfies a sufficient c decrease condition and a curvature condition. c c Each call of the subroutine updates an interval with c endpoints stx and sty. The interval is initially chosen c so that it contains a minimizer of the modified function c c psi(stp) = f(stp) - f(0) - ftol*stp*f'(0). c c If psi(stp) <= 0 and f'(stp) >= 0 for some step, then the c interval is chosen so that it contains a minimizer of f. c c The algorithm is designed to find a step that satisfies c the sufficient decrease condition c c f(stp) <= f(0) + ftol*stp*f'(0), c c and the curvature condition c c abs(f'(stp)) <= gtol*abs(f'(0)). c c If ftol is less than gtol and if, for example, the function c is bounded below, then there is always a step which satisfies c both conditions. c c If no step can be found that satisfies both conditions, then c the algorithm stops with a warning. In this case stp only c satisfies the sufficient decrease condition. c c A typical invocation of dcsrch has the following outline: c c task = 'START' c 10 continue c call dcsrch( ... ) c if (task .eq. 'FG') then c Evaluate the function and the gradient at stp c goto 10 c end if c c NOTE: The user must no alter work arrays between calls. c c The subroutine statement is c c subroutine dcsrch(f,g,stp,ftol,gtol,xtol,stpmin,stpmax, c task,isave,dsave) c where c c f is a double precision variable. c On initial entry f is the value of the function at 0. c On subsequent entries f is the value of the c function at stp. c On exit f is the value of the function at stp. c c g is a double precision variable. c On initial entry g is the derivative of the function at 0. c On subsequent entries g is the derivative of the c function at stp. c On exit g is the derivative of the function at stp. c c stp is a double precision variable. c On entry stp is the current estimate of a satisfactory c step. On initial entry, a positive initial estimate c must be provided. c On exit stp is the current estimate of a satisfactory step c if task = 'FG'. If task = 'CONV' then stp satisfies c the sufficient decrease and curvature condition. c c ftol is a double precision variable. c On entry ftol specifies a nonnegative tolerance for the c sufficient decrease condition. c On exit ftol is unchanged. c c gtol is a double precision variable. c On entry gtol specifies a nonnegative tolerance for the c curvature condition. c On exit gtol is unchanged. c c xtol is a double precision variable. c On entry xtol specifies a nonnegative relative tolerance c for an acceptable step. The subroutine exits with a c warning if the relative difference between sty and stx c is less than xtol. c On exit xtol is unchanged. c c stpmin is a double precision variable. c On entry stpmin is a nonnegative lower bound for the step. c On exit stpmin is unchanged. c c stpmax is a double precision variable. c On entry stpmax is a nonnegative upper bound for the step. c On exit stpmax is unchanged. c c task is a character variable of length at least 60. c On initial entry task must be set to 'START'. c On exit task indicates the required action: c c If task(1:2) = 'FG' then evaluate the function and c derivative at stp and call dcsrch again. c c If task(1:4) = 'CONV' then the search is successful. c c If task(1:4) = 'WARN' then the subroutine is not able c to satisfy the convergence conditions. The exit value of c stp contains the best point found during the search. c c If task(1:5) = 'ERROR' then there is an error in the c input arguments. c c On exit with convergence, a warning or an error, the c variable task contains additional information. c c isave is an integer work array of dimension 2. c c dsave is a double precision work array of dimension 13. c c Subprograms called c c MINPACK-2 ... dcstep c c MINPACK-1 Project. June 1983. c Argonne National Laboratory. c Jorge J. More' and David J. Thuente. c c MINPACK-2 Project. October 1993. c Argonne National Laboratory and University of Minnesota. c Brett M. Averick, Richard G. Carter, and Jorge J. More'. c c ********** double precision zero,p5,p66 parameter(zero=0.0d0,p5=0.5d0,p66=0.66d0) double precision xtrapl,xtrapu parameter(xtrapl=1.1d0,xtrapu=4.0d0) logical brackt integer stage double precision finit,ftest,fm,fx,fxm,fy,fym,ginit,gtest, + gm,gx,gxm,gy,gym,stx,sty,stmin,stmax,width,width1 c Initialization block. c if (task(1:5) .eq. 'START') then if (itask .eq. 2) then c Check the input arguments for errors. c if (stp .lt. stpmin) task = 'ERROR: STP .LT. STPMIN' c if (stp .gt. stpmax) task = 'ERROR: STP .GT. STPMAX' c if (g .ge. zero) task = 'ERROR: INITIAL G .GE. ZERO' c if (ftol .lt. zero) task = 'ERROR: FTOL .LT. ZERO' c if (gtol .lt. zero) task = 'ERROR: GTOL .LT. ZERO' c if (xtol .lt. zero) task = 'ERROR: XTOL .LT. ZERO' c if (stpmin .lt. zero) task = 'ERROR: STPMIN .LT. ZERO' c if (stpmax .lt. stpmin) task = 'ERROR: STPMAX .LT. STPMIN' if (stp .lt. stpmin) itask = 16 if (stp .gt. stpmax) itask = 15 if (g .ge. zero) itask = 11 if (ftol .lt. zero) itask = 9 if (gtol .lt. zero) itask = 10 if (xtol .lt. zero) itask = 19 if (stpmin .lt. zero) itask = 18 if (stpmax .lt. stpmin) itask = 17 c Exit if there are errors on input. c if (task(1:5) .eq. 'ERROR') return if ((itask .ge. 9) .and. (itask .le. 19)) return c Initialize local variables. brackt = .false. stage = 1 finit = f ginit = g gtest = ftol*ginit width = stpmax - stpmin width1 = width/p5 c The variables stx, fx, gx contain the values of the step, c function, and derivative at the best step. c The variables sty, fy, gy contain the value of the step, c function, and derivative at sty. c The variables stp, f, g contain the values of the step, c function, and derivative at stp. stx = zero fx = finit gx = ginit sty = zero fy = finit gy = ginit stmin = zero stmax = stp + xtrapu*stp c task = 'FG' itask = 4 goto 1000 else c Restore local variables. if (isave(1) .eq. 1) then brackt = .true. else brackt = .false. endif stage = isave(2) ginit = dsave(1) gtest = dsave(2) gx = dsave(3) gy = dsave(4) finit = dsave(5) fx = dsave(6) fy = dsave(7) stx = dsave(8) sty = dsave(9) stmin = dsave(10) stmax = dsave(11) width = dsave(12) width1 = dsave(13) endif c If psi(stp) <= 0 and f'(stp) >= 0 for some step, then the c algorithm enters the second stage. ftest = finit + stp*gtest if (stage .eq. 1 .and. f .le. ftest .and. g .ge. zero) + stage = 2 c Test for warnings. if (brackt .and. (stp .le. stmin .or. stp .ge. stmax)) c + task = 'WARNING: ROUNDING ERRORS PREVENT PROGRESS' + itask = 23 if (brackt .and. stmax - stmin .le. xtol*stmax) c + task = 'WARNING: XTOL TEST SATISFIED' + itask = 26 if (stp .eq. stpmax .and. f .le. ftest .and. g .le. gtest) c + task = 'WARNING: STP = STPMAX' + itask = 24 if (stp .eq. stpmin .and. (f .gt. ftest .or. g .ge. gtest)) c + task = 'WARNING: STP = STPMIN' + itask = 25 c Test for convergence. if (f .le. ftest .and. abs(g) .le. gtol*(-ginit)) c + task = 'CONVERGENCE' + itask = 6 c Test for termination. c if (task(1:4) .eq. 'WARN' .or. task(1:4) .eq. 'CONV') goto 1000 if ((itask .ge. 23) .or. ((itask .le. 8) + .and. (itask .ge. 6))) goto 1000 c A modified function is used to predict the step during the c first stage if a lower function value has been obtained but c the decrease is not sufficient. if (stage .eq. 1 .and. f .le. fx .and. f .gt. ftest) then c Define the modified function and derivative values. fm = f - stp*gtest fxm = fx - stx*gtest fym = fy - sty*gtest gm = g - gtest gxm = gx - gtest gym = gy - gtest c Call dcstep to update stx, sty, and to compute the new step. call dcstep(stx,fxm,gxm,sty,fym,gym,stp,fm,gm, + brackt,stmin,stmax) c Reset the function and derivative values for f. fx = fxm + stx*gtest fy = fym + sty*gtest gx = gxm + gtest gy = gym + gtest else c Call dcstep to update stx, sty, and to compute the new step. call dcstep(stx,fx,gx,sty,fy,gy,stp,f,g, + brackt,stmin,stmax) endif c Decide if a bisection step is needed. if (brackt) then if (abs(sty-stx) .ge. p66*width1) stp = stx + p5*(sty - stx) width1 = width width = abs(sty-stx) endif c Set the minimum and maximum steps allowed for stp. if (brackt) then stmin = min(stx,sty) stmax = max(stx,sty) else stmin = stp + xtrapl*(stp - stx) stmax = stp + xtrapu*(stp - stx) endif c Force the step to be within the bounds stpmax and stpmin. stp = max(stp,stpmin) stp = min(stp,stpmax) c If further progress is not possible, let stp be the best c point obtained during the search. if (brackt .and. (stp .le. stmin .or. stp .ge. stmax) + .or. (brackt .and. stmax-stmin .le. xtol*stmax)) stp = stx c Obtain another function and derivative. c task = 'FG' itask = 4 1000 continue c Save local variables. if (brackt) then isave(1) = 1 else isave(1) = 0 endif isave(2) = stage dsave(1) = ginit dsave(2) = gtest dsave(3) = gx dsave(4) = gy dsave(5) = finit dsave(6) = fx dsave(7) = fy dsave(8) = stx dsave(9) = sty dsave(10) = stmin dsave(11) = stmax dsave(12) = width dsave(13) = width1 return end c====================== The end of dcsrch ============================== subroutine dcstep(stx,fx,dx,sty,fy,dy,stp,fp,dp,brackt, + stpmin,stpmax) logical brackt double precision stx,fx,dx,sty,fy,dy,stp,fp,dp,stpmin,stpmax c ********** c c Subroutine dcstep c c This subroutine computes a safeguarded step for a search c procedure and updates an interval that contains a step that c satisfies a sufficient decrease and a curvature condition. c c The parameter stx contains the step with the least function c value. If brackt is set to .true. then a minimizer has c been bracketed in an interval with endpoints stx and sty. c The parameter stp contains the current step. c The subroutine assumes that if brackt is set to .true. then c c min(stx,sty) < stp < max(stx,sty), c c and that the derivative at stx is negative in the direction c of the step. c c The subroutine statement is c c subroutine dcstep(stx,fx,dx,sty,fy,dy,stp,fp,dp,brackt, c stpmin,stpmax) c c where c c stx is a double precision variable. c On entry stx is the best step obtained so far and is an c endpoint of the interval that contains the minimizer. c On exit stx is the updated best step. c c fx is a double precision variable. c On entry fx is the function at stx. c On exit fx is the function at stx. c c dx is a double precision variable. c On entry dx is the derivative of the function at c stx. The derivative must be negative in the direction of c the step, that is, dx and stp - stx must have opposite c signs. c On exit dx is the derivative of the function at stx. c c sty is a double precision variable. c On entry sty is the second endpoint of the interval that c contains the minimizer. c On exit sty is the updated endpoint of the interval that c contains the minimizer. c c fy is a double precision variable. c On entry fy is the function at sty. c On exit fy is the function at sty. c c dy is a double precision variable. c On entry dy is the derivative of the function at sty. c On exit dy is the derivative of the function at the exit sty. c c stp is a double precision variable. c On entry stp is the current step. If brackt is set to .true. c then on input stp must be between stx and sty. c On exit stp is a new trial step. c c fp is a double precision variable. c On entry fp is the function at stp c On exit fp is unchanged. c c dp is a double precision variable. c On entry dp is the the derivative of the function at stp. c On exit dp is unchanged. c c brackt is an logical variable. c On entry brackt specifies if a minimizer has been bracketed. c Initially brackt must be set to .false. c On exit brackt specifies if a minimizer has been bracketed. c When a minimizer is bracketed brackt is set to .true. c c stpmin is a double precision variable. c On entry stpmin is a lower bound for the step. c On exit stpmin is unchanged. c c stpmax is a double precision variable. c On entry stpmax is an upper bound for the step. c On exit stpmax is unchanged. c c MINPACK-1 Project. June 1983 c Argonne National Laboratory. c Jorge J. More' and David J. Thuente. c c MINPACK-2 Project. October 1993. c Argonne National Laboratory and University of Minnesota. c Brett M. Averick and Jorge J. More'. c c ********** double precision zero,p66,two,three parameter(zero=0.0d0,p66=0.66d0,two=2.0d0,three=3.0d0) double precision gamma,p,q,r,s,sgnd,stpc,stpf,stpq,theta sgnd = dp*(dx/abs(dx)) c First case: A higher function value. The minimum is bracketed. c If the cubic step is closer to stx than the quadratic step, the c cubic step is taken, otherwise the average of the cubic and c quadratic steps is taken. if (fp .gt. fx) then theta = three*(fx - fp)/(stp - stx) + dx + dp s = max(abs(theta),abs(dx),abs(dp)) gamma = s*sqrt((theta/s)**2 - (dx/s)*(dp/s)) if (stp .lt. stx) gamma = -gamma p = (gamma - dx) + theta q = ((gamma - dx) + gamma) + dp r = p/q stpc = stx + r*(stp - stx) stpq = stx + ((dx/((fx - fp)/(stp - stx) + dx))/two)* + (stp - stx) if (abs(stpc-stx) .lt. abs(stpq-stx)) then stpf = stpc else stpf = stpc + (stpq - stpc)/two endif brackt = .true. c Second case: A lower function value and derivatives of opposite c sign. The minimum is bracketed. If the cubic step is farther from c stp than the secant step, the cubic step is taken, otherwise the c secant step is taken. else if (sgnd .lt. zero) then theta = three*(fx - fp)/(stp - stx) + dx + dp s = max(abs(theta),abs(dx),abs(dp)) gamma = s*sqrt((theta/s)**2 - (dx/s)*(dp/s)) if (stp .gt. stx) gamma = -gamma p = (gamma - dp) + theta q = ((gamma - dp) + gamma) + dx r = p/q stpc = stp + r*(stx - stp) stpq = stp + (dp/(dp - dx))*(stx - stp) if (abs(stpc-stp) .gt. abs(stpq-stp)) then stpf = stpc else stpf = stpq endif brackt = .true. c Third case: A lower function value, derivatives of the same sign, c and the magnitude of the derivative decreases. else if (abs(dp) .lt. abs(dx)) then c The cubic step is computed only if the cubic tends to infinity c in the direction of the step or if the minimum of the cubic c is beyond stp. Otherwise the cubic step is defined to be the c secant step. theta = three*(fx - fp)/(stp - stx) + dx + dp s = max(abs(theta),abs(dx),abs(dp)) c The case gamma = 0 only arises if the cubic does not tend c to infinity in the direction of the step. gamma = s*sqrt(max(zero,(theta/s)**2-(dx/s)*(dp/s))) if (stp .gt. stx) gamma = -gamma p = (gamma - dp) + theta q = (gamma + (dx - dp)) + gamma r = p/q if (r .lt. zero .and. abs(gamma-zero) > 1D-5) then stpc = stp + r*(stx - stp) else if (stp .gt. stx) then stpc = stpmax else stpc = stpmin endif stpq = stp + (dp/(dp - dx))*(stx - stp) if (brackt) then c A minimizer has been bracketed. If the cubic step is c closer to stp than the secant step, the cubic step is c taken, otherwise the secant step is taken. if (abs(stpc-stp) .lt. abs(stpq-stp)) then stpf = stpc else stpf = stpq endif if (stp .gt. stx) then stpf = min(stp+p66*(sty-stp),stpf) else stpf = max(stp+p66*(sty-stp),stpf) endif else c A minimizer has not been bracketed. If the cubic step is c farther from stp than the secant step, the cubic step is c taken, otherwise the secant step is taken. if (abs(stpc-stp) .gt. abs(stpq-stp)) then stpf = stpc else stpf = stpq endif stpf = min(stpmax,stpf) stpf = max(stpmin,stpf) endif c Fourth case: A lower function value, derivatives of the same sign, c and the magnitude of the derivative does not decrease. If the c minimum is not bracketed, the step is either stpmin or stpmax, c otherwise the cubic step is taken. else if (brackt) then theta = three*(fp - fy)/(sty - stp) + dy + dp s = max(abs(theta),abs(dy),abs(dp)) gamma = s*sqrt((theta/s)**2 - (dy/s)*(dp/s)) if (stp .gt. sty) gamma = -gamma p = (gamma - dp) + theta q = ((gamma - dp) + gamma) + dy r = p/q stpc = stp + r*(sty - stp) stpf = stpc else if (stp .gt. stx) then stpf = stpmax else stpf = stpmin endif endif c Update the interval which contains a minimizer. if (fp .gt. fx) then sty = stp fy = fp dy = dp else if (sgnd .lt. zero) then sty = stx fy = fx dy = dx endif stx = stp fx = fp dx = dp endif c Compute the new step. stp = stpf return end lbfgsb3c/src/RcppExports.cpp0000644000176200001440000000230113625774732015537 0ustar liggesusers// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #include "../inst/include/lbfgsb3c.h" #include #include using namespace Rcpp; // lbfgsb3cpp Rcpp::List lbfgsb3cpp(NumericVector par, Function fn, Function gr, NumericVector lower, NumericVector upper, List ctrl, Environment rho); RcppExport SEXP _lbfgsb3c_lbfgsb3cpp(SEXP parSEXP, SEXP fnSEXP, SEXP grSEXP, SEXP lowerSEXP, SEXP upperSEXP, SEXP ctrlSEXP, SEXP rhoSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; Rcpp::traits::input_parameter< NumericVector >::type par(parSEXP); Rcpp::traits::input_parameter< Function >::type fn(fnSEXP); Rcpp::traits::input_parameter< Function >::type gr(grSEXP); Rcpp::traits::input_parameter< NumericVector >::type lower(lowerSEXP); Rcpp::traits::input_parameter< NumericVector >::type upper(upperSEXP); Rcpp::traits::input_parameter< List >::type ctrl(ctrlSEXP); Rcpp::traits::input_parameter< Environment >::type rho(rhoSEXP); rcpp_result_gen = Rcpp::wrap(lbfgsb3cpp(par, fn, gr, lower, upper, ctrl, rho)); return rcpp_result_gen; END_RCPP } lbfgsb3c/src/timer.f0000644000176200001440000000220513511470416014016 0ustar liggesusersc c L-BFGS-B is released under the “New BSD License” (aka “Modified BSD License” c or “3-clause license”) c Please read attached file License.txt c subroutine timer(ttime) double precision ttime c real temp c c This routine computes cpu time in double precision; it makes use of c the intrinsic f90 cpu_time therefore a conversion type is c needed. c c J.L Morales Departamento de Matematicas, c Instituto Tecnologico Autonomo de Mexico c Mexico D.F. c c J.L Nocedal Department of Electrical Engineering and c Computer Science. c Northwestern University. Evanston, IL. USA c c January 21, 2011 c temp = sngl(ttime) call cpu_time(temp) ttime = dble(temp) return end lbfgsb3c/src/lbfgsb3x.cpp0000644000176200001440000002634013625774623014770 0ustar liggesusers#include #include #include #include #include #include #define max2( a , b ) ( (a) > (b) ? (a) : (b) ) using namespace Rcpp; extern "C" void setulb_(int *n, int *m, double *x, double *l, double *u, int *nbd, double *f, double *g, double *factr, double *pgtol, double *wa, int *iwa, int *itask, int *iprint, int *icsave, int *lsave, int *isave, double *dsave); typedef double optimfn(int n, double *par, void *ex); typedef void optimgr(int n, double *par, double *gr, void *ex); List lbfgsb3Cinfo; extern "C" void lbfgsb3C_(int n, int lmm, double *x, double *lower, double *upper, int *nbd, double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int iprint, double atol, double rtol, double *g){ // Optim compatible interface int itask= 2; // *Fmin=; double *lastx = new double[n]; std::copy(&x[0],&x[0]+n,&lastx[0]); int nwa = 2*lmm*n + 11*lmm*lmm + 5*n + 8*lmm; double *wa= new double[nwa]; int niwa = 3*n; int *iwa= new int[niwa]; int icsave = 0; int lsave[4] = {0}; int isave[44] = {0}; int i=0; double dsave[29]= {0}; // Initial setup int doExit=0; fncount[0]=0; grcount[0]=0; int itask2=0; CharacterVector taskList(28); taskList[0]="NEW_X"; taskList[1]="START"; taskList[2]="STOP"; taskList[3]="FG";//, // 1-4 taskList[4]="ABNORMAL_TERMINATION_IN_LNSRCH"; taskList[5]="CONVERGENCE"; //5-6 taskList[6]="CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL";//7 taskList[7]="CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH";//8 taskList[8]="ERROR: FTOL .LT. ZERO"; //9 taskList[9]="ERROR: GTOL .LT. ZERO";//10 taskList[10]="ERROR: INITIAL G .GE. ZERO"; //11 taskList[11]="ERROR: INVALID NBD"; // 12 taskList[12]="ERROR: N .LE. 0"; // 13 taskList[13]="ERROR: NO FEASIBLE SOLUTION"; // 14 taskList[14]="ERROR: STP .GT. STPMAX"; // 15 taskList[15]="ERROR: STP .LT. STPMIN"; // 16 taskList[16]="ERROR: STPMAX .LT. STPMIN"; // 17 taskList[17]="ERROR: STPMIN .LT. ZERO"; // 18 taskList[18]="ERROR: XTOL .LT. ZERO"; // 19 taskList[19]="FG_LNSRCH"; // 20 taskList[20]="FG_START"; // 21 taskList[21]="RESTART_FROM_LNSRCH"; // 22 taskList[22]="WARNING: ROUNDING ERRORS PREVENT PROGRESS"; // 23 taskList[23]="WARNING: STP .eq. STPMAX"; // 24 taskList[24]="WARNING: STP .eq. STPMIN"; // 25 taskList[25]="WARNING: XTOL TEST SATISFIED"; // taskList[26] = "CONVERGENCE: Parameters differences below xtol"; taskList[27] = "Maximum number of iterations reached"; while (true){ if (trace >= 2){ Rprintf("\n================================================================================\nBefore call f=%f task number %d, or \"%s\"\n", *Fmin, itask, (as(taskList[itask-1])).c_str()); } if (itask==3) doExit=1; setulb_(&n, &lmm, x, lower, upper, nbd, Fmin, g, &factr, &pgtol, wa, iwa, &itask, &iprint, &icsave, lsave, isave, dsave); if (trace > 2) { Rprintf("returned from lbfgsb3 \n"); Rprintf("returned itask is %d or \"%s\"\n",itask,(as(taskList[itask-1])).c_str()); } switch (itask){ case 4: case 20: case 21: if (trace >= 2) { Rprintf("computing f and g at prm=\n"); NumericVector xv(n); std::copy(&x[0],&x[0]+n,&xv[0]); print(xv); } // Calculate f and g Fmin[0] = fn(n, x, ex); fncount[0]++; gr(n, x, g, ex); grcount[0]++; if (trace > 0) { Rprintf("At iteration %d f=%f ", isave[33], *Fmin); if (trace > 1) { double tmp = fabs(g[n-1]); for (unsigned int j=n-1; j--;){ if (tmp > fabs(g[j])){ tmp = fabs(g[j]); } } Rprintf("max(abs(g))=%f",tmp); } Rprintf("\n"); } break; case 1: // New x; if (maxit <= fncount[0]){ itask2=28; doExit=1; itask=3; // Stop -- gives the right results and restores gradients if (trace > 2){ Rprintf("Exit becuase maximum number of function calls %d met.\n", maxit); } } else { bool converge=fabs(lastx[n-1]-x[n-1]) < fabs(x[n-1])*rtol+atol; if (converge){ for (i=n-1;i--;){ converge=fabs(lastx[i]-x[i]) < fabs(x[i])*rtol+atol; if (!converge){ break; } } } if (converge){ itask2=27; itask=3; // Stop -- gives the right results and restores gradients if (trace > 2){ Rprintf("CONVERGENCE: Parameters differences below xtol.\n", maxit); } doExit=1; } } std::copy(&x[0],&x[0]+n,&lastx[0]); break; default: doExit=1; } if (doExit) break; } if (itask2){ itask=itask2; } LogicalVector lsaveR(4); NumericVector dsaveR(29); IntegerVector isaveR(44); std::copy(&lsave[0],&lsave[0]+4, &lsaveR[0]); std::copy(&dsave[0],&dsave[0]+29, dsaveR.begin()); std::copy(&isave[0],&isave[0]+44, isaveR.begin());; CharacterVector taskR(1); taskR[0] = taskList[itask-1]; lbfgsb3Cinfo = List::create(_["task"] = taskR, _["itask"]= IntegerVector::create(itask), _["lsave"]= lsaveR, _["icsave"]= IntegerVector::create(icsave), _["dsave"]= dsaveR, _["isave"] = isaveR); // info <- list(task = task, itask = itask, lsave = lsave, // icsave = icsave, dsave = dsave, isave = isave) fail[0]= itask; delete[] wa; delete[] iwa; delete[] lastx; } Environment grho; CharacterVector gnames; List ev; double gfn(int n, double *x, void *ex){ Rcpp::NumericVector par(n); std::copy(&x[0], &x[0]+n, &par[0]); Function fn = as(ev["fn"]); par.attr("names") = ev["pn"]; double ret = as(fn(par, grho)); return ret; } void ggr(int n, double *x, double *gr, void *ex){ Rcpp::NumericVector par(n), ret(n); std::copy(&x[0], &x[0]+n, &par[0]); Function grad = as(ev["gr"]); par.attr("names") = ev["pn"]; ret = grad(par, grho); std::copy(&ret[0], &ret[0]+n, &gr[0]); } //[[Rcpp::export]] Rcpp::List lbfgsb3cpp(NumericVector par, Function fn, Function gr, NumericVector lower, NumericVector upper, List ctrl, Environment rho){ Rcpp::List ret; ev["fn"] = fn; ev["gr"] = gr; ev["pn"] = par.attr("names"); Rcpp::NumericVector g(par.size()); // CONV in 6, 7, 8; ERROR in 9-19; WARN in 23-26 IntegerVector traceI = as(ctrl["trace"]); if (traceI.size() != 1) stop("trace has to have one element in it."); int trace = traceI[0]; NumericVector factrN = as(ctrl["factr"]); if (factrN.size() != 1) stop("factr has to have one element in it."); double factr = factrN[0]; NumericVector pgtolN = as(ctrl["pgtol"]); if (pgtolN.size() != 1) stop("pgtol has to have one element in it."); double pgtol = pgtolN[0]; NumericVector atolN = as(ctrl["abstol"]); if (atolN.size() != 1) stop("abstol has to have one element in it."); double atol = atolN[0]; NumericVector rtolN = as(ctrl["reltol"]); if (atolN.size() != 1) stop("reltol has to have one element in it."); double rtol = rtolN[0]; LogicalVector infoN = as(ctrl["info"]); if (infoN.size() != 1) stop("info has to have one element in it."); bool addInfo = infoN[0]; IntegerVector lmmN = as(ctrl["lmm"]); if (lmmN.size() != 1) stop("lmm has to have one element in it."); int lmm = lmmN.size(); int n = par.size(); IntegerVector maxitN = as(ctrl["maxit"]); if (maxitN.size() != 1) stop("maxit has to have one element in it."); int maxit = maxitN[0]; IntegerVector iprintN = as(ctrl["iprint"]); if (iprintN.size() != 1) stop("iprint has to have one element in it."); int iprint = iprintN[0]; // double *g = new double[par.size()]; double *low = new double[par.size()]; if (lower.size() == 1){ std::fill_n(&low[0],par.size(),lower[0]); } else if (lower.size() == par.size()){ std::copy(lower.begin(),lower.end(),&low[0]); } else { delete [] low; stop("Lower bound must match the size of par or only have one element."); } double *up = new double[par.size()]; if (upper.size() == 1){ std::fill_n(&up[0],par.size(),upper[0]); } else if (upper.size() == par.size()){ std::copy(upper.begin(),upper.end(),&up[0]); } else { delete [] low; delete [] up; stop("Upper bound must match the size of par or only have one element."); } double *x = new double[par.size()]; std::copy(par.begin(),par.end(),&x[0]); int *nbd = new int[par.size()]; int i; for (i = par.size();i--;){ /* 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, 3 if x(i) has only an upper bound. */ nbd[i] = 0; if (R_FINITE(low[i])) nbd[i] = 1; if (R_FINITE(up[i])) nbd[i] = 3 - nbd[i]; } double fmin=std::numeric_limits::max(); int fail = 0, fncount=0, grcount=0; grho=rho; //void *ex = (void*)rho; //Should work but use global instead. void *ex =NULL; char msg[120]; lbfgsb3C_(n, lmm, x, low, up, nbd, &fmin, gfn, ggr, &fail, ex, factr, pgtol, &fncount, &grcount, maxit, msg, trace, iprint , atol, rtol, &g[0]); NumericVector parf(par.size()); std::copy(&x[0],&x[0]+par.size(),parf.begin()); parf.attr("names")=ev["pn"]; g.attr("names")=ev["pn"]; ret["par"]=parf; ret["grad"]=g; ret["value"] = fmin; IntegerVector cnt = IntegerVector::create(fncount,grcount); ret["counts"] = cnt; switch (fail){ case 6: case 7: case 8: case 27: ret["convergence"]=0; break; case 28: ret["convergence"]=1; break; case 23: case 24: case 25: case 26: ret["convergence"] = 51; break; case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19: ret["convergence"] = 52; break; } CharacterVector taskList(28); taskList[0]="NEW_X"; taskList[1]="START"; taskList[2]="STOP"; taskList[3]="FG";//, // 1-4 taskList[4]="ABNORMAL_TERMINATION_IN_LNSRCH"; taskList[5]="CONVERGENCE"; //5-6 taskList[6]="CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL";//7 taskList[7]="CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH";//8 taskList[8]="ERROR: FTOL .LT. ZERO"; //9 taskList[9]="ERROR: GTOL .LT. ZERO";//10 taskList[10]="ERROR: INITIAL G .GE. ZERO"; //11 taskList[11]="ERROR: INVALID NBD"; // 12 taskList[12]="ERROR: N .LE. 0"; // 13 taskList[13]="ERROR: NO FEASIBLE SOLUTION"; // 14 taskList[14]="ERROR: STP .GT. STPMAX"; // 15 taskList[15]="ERROR: STP .LT. STPMIN"; // 16 taskList[16]="ERROR: STPMAX .LT. STPMIN"; // 17 taskList[17]="ERROR: STPMIN .LT. ZERO"; // 18 taskList[18]="ERROR: XTOL .LT. ZERO"; // 19 taskList[19]="FG_LNSRCH"; // 20 taskList[20]="FG_START"; // 21 taskList[21]="RESTART_FROM_LNSRCH"; // 22 taskList[22]="WARNING: ROUNDING ERRORS PREVENT PROGRESS"; // 23 taskList[23]="WARNING: STP .eq. STPMAX"; // 24 taskList[24]="WARNING: STP .eq. STPMIN"; // 25 taskList[25]="WARNING: XTOL TEST SATISFIED"; // taskList[26] = "CONVERGENCE: Parameters differences below xtol"; taskList[27] = "Maximum number of iterations reached"; ret["message"]= CharacterVector::create(taskList[fail-1]); if (addInfo) ret["info"] = lbfgsb3Cinfo; delete [] x; delete [] low; delete [] up; delete [] nbd; return ret; } lbfgsb3c/vignettes/0000755000176200001440000000000013627233177013762 5ustar liggesuserslbfgsb3c/vignettes/lbfgsb3c.Rmd0000644000176200001440000002716113626305436016117 0ustar liggesusers--- title: "lbfgsb3c: Using the 2011 version of L-BFGS-B." author: "John C Nash Telfer School of Management, University of Ottawa, nashjc@uottawa.ca" date: "October 22, 2019" output: pdf_document bibliography: lbfgsb3c.bib vignette: > %\VignetteIndexEntry{lbfgsb3c-nocompile} %\VignetteEngine{knitr::rmarkdown} \usepackage[utf8]{inputenc} --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ## Added 20190717 to get vignette to build pkgbuild::compile_dll() ``` # Abstract In 2011 the authors of the L-BFGSB program published a correction and update to their 1995 code. The latter is the basis of the L-BFGS-B method of the `optim()` function in base-R. The package `lbfgsb3` wrapped the updated code using a `.Fortran` call after removing a very large number of Fortran output statements. Matthew Fidler used this Fortran code and an `Rcpp` interface to produce package `lbfgsb3c` where the function `lbfgsb3c()` returns an object similar to that of base-R `optim()` and that of `optimx::optimr()`. Subsequently, in a fine example of the collaborations that have made **R** so useful, we have merged the functionality of package `lbfgsb3` into `lbfgsb3c`, as explained in this vignette. Note that this document is intended primarily to document our efforts to check the differences in variants of the code rather than be expository. ## Provenance of the R optim::L-BFGS-B and related solvers The base-R code lbfgsb.c (at writing in R-3.5.2/src/appl/) is commented: ``` /* l-bfgs-b.f -- translated by f2c (version 19991025). From ?optim: The code for method ‘"L-BFGS-B"’ is based on Fortran code by Zhu, Byrd, Lu-Chen and Nocedal obtained from Netlib (file 'opt/lbfgs_bcm.shar') The Fortran files contained no copyright information. Byrd, R. H., Lu, P., Nocedal, J. and Zhu, C. (1995) A limited memory algorithm for bound constrained optimization. \emph{SIAM J. Scientific Computing}, \bold{16}, 1190--1208. */ ``` The paper @Byrd95 builds on @Lu94limitedmemory. There have been a number of other workers who have followed-up on this work, but **R** code and packages seem to have largely stayed with codes derived from these original papers. Though the date of the paper is 1995, the ideas it embodies were around for a decade and a half at least, in particular in Nocedal80 and LiuN89. The definitive Fortran code was published as @Zhu1997LBFGS. This is available as `toms/778.zip` on www.netlib.org. A side-by-side comparison of the main subroutines in the two downloads from Netlib unfortunately shows a lot of differences. I have not tried to determine if these affect performance or are simply cosmetic. More seriously perhaps, there were some deficiencies in the code(s), and in 2011 Nocedal's team published a Fortran code with some corrections (@Morales2011). Since the **R** code predates this, I prepared package `lbfgsb3` (@lbfgsb3JN) to wrap the Fortran code. However, I did not discover any test cases where the `optim::L-BFGS-B` and `lbfgsb3` were different, though I confess to only running some limited tests. There are, in fact, more in this vignette. In 2016, I was at a Fields Institute optimization conference in Toronto for the 70th birthday of Andy Conn. By sheer serendipity, Nocedal did not attend the conference, but sat down next to me at the conference dinner. When I asked him about the key changes, he said that the most important one was to fix the computation of the machine precision, which was not always correct in the 1995 code. Since **R** gets this number as `.Machine$double.eps`, the offending code is irrelevant. Within @Morales2011, there is also reported an improvement in the subspace minimization that is applied in cases of bounds constraints. Since few of the tests I have applied impose such constraints, it is reasonable that I will not have observed performance differences between the base-R `optim` code and my `lbfsgb3` package. More appropriate tests are welcome, and on my agenda. Besides the ACM TOMS code, there are two related codes from the Northwestern team on NETLIB: http://netlib.org/opt/lbfgs_um.shar is for unconstrained minimization, while http://netlib.org/opt/lbfgs_bcm.shar handles bounds constrained problems. To these are attached references @LiuN89 and @Byrd1995 respectively, most likely reflecting the effort required to implement the constraints. The unconstrained code has been converted to **C** under the leadership of Naoaki Okazaki (see http://www.chokkan.org/software/liblbfgs/, or the fork at https://github.com/MIRTK/LBFGS). This has been wrapped for **R** as @Coppola2014 as the `lbfgs` package. This can be called from `optimx::optimr()`. Using Rcpp (see @RCppDERF2011) and the Fortran code in package `lbfgs3`, Matthew Fidler developed package `lbfgsb3c` (@lbfgsb3cMF). As this provides a more standard call and return than `lbfgsb3` Fidler and I are unified the two packages and released them both under the same name `lbfgsb3c`. ## Functions in package `lbfgsb3c` There is really only one optimizer function in the package, but it may be called by four (4) names: - `lbfgsb3c()` uses Rcpp (@RCppDE2013, @RCppDERF2011, @RCppDEJJB2017) to streamline the call to the underlying Fortran. This is the base function used. - `lbfgsb3x()` is an alias of `lbfgsb3c()`. We were using this name for a while, and have kept the alias to avoid having to edit test scripts. - `lbfgsb3`, which imitates a `.Fortran` call of the compiled 2011 Fortran code. The object returned by this routine is NOT equivalent to the object returned by base-R `optim()` or by `optimx::optimr()`. Instead, it includes a structure `info` which contains the detailed diagnostic information of the Fortran code. For most users, this is not of interest, and I only recommend use of this function for those needing to examine how the optimization has been carried out. - `lbfgsb3f()` is an alias of `lbfsgb3()`. We recommend using the `lbfsgb3c()` call for most uses. ### Candlestick function ```{r, candlestick} # candlestick function # J C Nash 2011-2-3 cstick.f<-function(x,alpha=100){ x<-as.vector(x) r2<-crossprod(x) f<-as.double(r2+alpha/r2) return(f) } cstick.g<-function(x,alpha=100){ x<-as.vector(x) r2<-as.numeric(crossprod(x)) g1<-2*x g2 <- (-alpha)*2*x/(r2*r2) g<-as.double(g1+g2) return(g) } library(lbfgsb3c) nn <- 2 x0 <- c(10,10) lo <- c(1, 1) up <- c(10,10) print(x0) ## c2o <- opm(x0, cstick.f, cstick.g, lower=lo, upper=up, method=meths, control=list(trace=0)) ## print(summary(c2o, order=value)) c2l1 <- lbfgsb3c(x0, cstick.f, cstick.g, lower=lo, upper=up) c2l1 ## meths <- c("L-BFGS-B", "lbfgsb3c", "Rvmmin", "Rcgmin", "Rtnmin") ## require(optimx) ## cstick2a <- opm(x0, cstick.f, cstick.g, method=meths, upper=up, lower=lo, control=list(kkt=FALSE)) ## print(summary(cstick2a, par.select=1:2, order=value)) lo <- c(4, 4) ## c2ob <- opm(x0, cstick.f, cstick.g, lower=lo, upper=up, method=meths, control=list(trace=0)) ## print(summary(c2ob, order=value)) c2l2 <- lbfgsb3c(x0, cstick.f, cstick.g, lower=lo, upper=up) c2l2 ## cstick2b <- opm(x0, cstick.f, cstick.g, method=meths, upper=up, lower=lo, control=list(kkt=FALSE)) ## print(summary(cstick2b, par.select=1:2, order=value)) ## nn <- 100 ## x0 <- rep(10, nn) ## up <- rep(10, nn) ## lo <- rep(1e-4, nn) ## cco <- opm(x0, cstick.f, cstick.g, lower=lo, upper=up, method=meths, control=list(trace=0, kkt=FALSE)) ## print(summary(cco, par.select=1:4, order=value)) ``` ### Extended Rosenbrock function (from funconstrain) ```{r,exrosen} # require(funconstrain) ## not in CRAN, so explicit inclusion of this function # exrosen <- ex_rosen() # exrosenf <- exrosen$fn exrosenf <- function (par) { n <- length(par) if (n%%2 != 0) { stop("Extended Rosenbrock: n must be even") } fsum <- 0 for (i in 1:(n/2)) { p2 <- 2 * i p1 <- p2 - 1 f_p1 <- 10 * (par[p2] - par[p1]^2) f_p2 <- 1 - par[p1] fsum <- fsum + f_p1 * f_p1 + f_p2 * f_p2 } fsum } # exroseng <- exrosen$gr exroseng <- function (par) { n <- length(par) if (n%%2 != 0) { stop("Extended Rosenbrock: n must be even") } grad <- rep(0, n) for (i in 1:(n/2)) { p2 <- 2 * i p1 <- p2 - 1 xx <- par[p1] * par[p1] yx <- par[p2] - xx f_p1 <- 10 * yx f_p2 <- 1 - par[p1] grad[p1] <- grad[p1] - 400 * par[p1] * yx - 2 * f_p2 grad[p2] <- grad[p2] + 200 * yx } grad } exrosenx0 <- function (n = 20) { if (n%%2 != 0) { stop("Extended Rosenbrock: n must be even") } rep(c(-1.2, 1), n/2) } require(lbfgsb3c) ## require(optimx) ## require(optimx) for (n in seq(2,12, by=2)) { cat("ex_rosen try for n=",n,"\n") x0 <- exrosenx0(n) lo <- rep(-1.5, n) up <- rep(3, n) print(x0) cat("optim L-BFGS-B\n") eo <- optim(x0, exrosenf, exroseng, lower=lo, upper=up, method="L-BFGS-B", control=list(trace=0)) print(eo) cat("lbfgsb3c\n") el <- lbfgsb3c(x0, exrosenf, exroseng, lower=lo, upper=up, control=list(trace=0)) print(el) ## erfg <- opm(x0, exrosenf, exroseng, method=meths, lower=lo, upper=up) ## print(summary(erfg, par.select=1:2, order=value)) } ``` ## Using compiled function code While you may use the same interface as described in the writing R extensions to interface compiled code with this function, see [L-BFGS-B](https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Optimization), it is sometimes more convenient to use your own compiled code. The following example shows how this is done using the file `jrosen.f`. We have unfortunately found that compilation is not always portable across systems, so this example is presented without execution. ``` subroutine rosen(n, x, fval) double precision x(n), fval, dx integer n, i fval = 0.0D0 do 10 i=1,(n-1) dx = x(i + 1) - x(i) * x(i) fval = fval + 100.0 * dx * dx dx = 1.0 - x(i) fval = fval + dx * dx 10 continue return end ``` Here is the example script. Note that we must have the file `jrosen.f` available. Because the executable files on different systems use different conventions and structures, we have turned evaluation off here so this vignette can be built on multiple platforms. However, we wished to provide examples of how compiled code could be used. ```{r, usingFortran, eval=FALSE } system("R CMD SHLIB jrosen.f") dyn.load("jrosen.so") is.loaded("rosen") x0 <- as.double(c(-1.2,1)) fv <- as.double(-999) n <- as.double(2) testf <- .Fortran("rosen", n=as.integer(n), x=as.double(x0), fval=as.double(fv)) testf rrosen <- function(x) { fval <- 0.0 for (i in 1:(n-1)) { dx <- x[i + 1] - x[i] * x[i] fval <- fval + 100.0 * dx * dx dx <- 1.0 - x[i] fval <- fval + dx * dx } fval } (rrosen(x0)) frosen <- function(x){ nn <- length(x) if (nn > 100) { stop("max number of parameters is 100")} fv <- -999.0 val <- .Fortran("rosen", n=as.integer(nn), x=as.double(x), fval=as.double(fv)) val$fval # NOTE--need ONLY function value returned } # Test the funcion tval <- frosen(x0) str(tval) cat("Run with Nelder-Mead using R function\n") mynm <- optim(x0, rrosen, control=list(trace=0)) print(mynm) cat("\n\n Run with Nelder-Mead using Fortran function") mynmf <- optim(x0, frosen, control=list(trace=0)) print(mynmf) library(lbfgsb3c) library(microbenchmark) cat("try lbfgsb3c, no Gradient \n") cat("R function\n") tlR<-microbenchmark(myopR <- lbfgsb3c(x0, rrosen, gr=NULL, control=list(trace=0))) print(tlR) print(myopR) cat("Fortran function\n") tlF<-microbenchmark(myop <- lbfgsb3c(x0, frosen, gr=NULL, control=list(trace=0))) print(tlF) print(myop) ``` In this example, Fortran execution was actually SLOWER than plain R on the system where it was run. ## References lbfgsb3c/vignettes/lbfgsb3c.bib0000644000176200001440000035710613511470416016130 0ustar liggesusers@Manual{lbfgsb3cMF, title = {{lbfgsb3c}: Limited Memory BFGS Minimizer with Bounds on Parameters with optim() 'C' Interface}, author = {Matthew L Fidler and John C Nash and Ciyou Zhu and Richard Byrd and Jorge Nocedal and Jose Luis Morales}, year = {2018}, note = {R package version 2018-2.13}, url = {https://CRAN.R-project.org/package=lbfgsb3c}, } @Manual{lbfgsb3JN, title = {{lbfgsb3}: Limited Memory BFGS Minimizer with Bounds on Parameters}, author = {John C Nash and Ciyou Zhu and Richard Byrd and Jorge Nocedal and Jose Luis Morales}, year = {2015}, note = {R package version 2015-2.13}, url = {https://CRAN.R-project.org/package=lbfgsb3}, } @Article{RCppDERF2011, title = {{Rcpp}: Seamless {R} and {C++} Integration}, author = {Dirk Eddelbuettel and Romain Fran\c{c}ois}, journal = {Journal of Statistical Software}, year = {2011}, volume = {40}, number = {8}, pages = {1--18}, url = {http://www.jstatsoft.org/v40/i08/}, doi = {10.18637/jss.v040.i08}, } @Book{RCppDE2013, title = {Seamless {R} and {C++} Integration with {Rcpp}}, author = {Dirk Eddelbuettel}, publisher = {Springer}, address = {New York}, year = {2013}, note = {ISBN 978-1-4614-6867-7}, doi = {10.1007/978-1-4614-6868-4}, } @Article{RCppDEJJB2017, title = {{Extending extit{R} with extit{C++}: A Brief Introduction to extit{Rcpp}}}, author = {Dirk Eddelbuettel and James Joseph Balamuta}, journal = {PeerJ Preprints}, year = {2017}, month = {aug}, volume = {5}, pages = {e3188v1}, issn = {2167-9843}, url = {https://doi.org/10.7287/peerj.preprints.3188v1}, doi = {10.7287/peerj.preprints.3188v1}, } @Manual{Varadhan2015, title = {alabama: Constrained Nonlinear Optimization}, author = {Ravi Varadhan}, year = {2015}, note = {R package version 2015.3-1}, url = {https://CRAN.R-project.org/package=alabama}, } @Article{DEJJB2017, title = {{Extending extit{R} with extit{C++}: A Brief Introduction to extit{Rcpp}}}, author = {Dirk Eddelbuettel and James Joseph Balamuta}, journal = {PeerJ Preprints}, year = {2017}, month = {aug}, volume = {5}, pages = {e3188v1}, issn = {2167-9843}, url = {https://doi.org/10.7287/peerj.preprints.3188v1}, doi = {10.7287/peerj.preprints.3188v1}, } @Manual{Fidler2018, title = {{lbfgsb3c}: Limited Memory BFGS Minimizer with Bounds on Parameters with optim() 'C' Interface}, author = {Matthew L Fidler and John C Nash and Ciyou Zhu and Richard Byrd and Jorge Nocedal and Jose Luis Morales}, year = {2018}, note = {R package version 2018-2.13-1}, url = {https://CRAN.R-project.org/package=lbfgsb3c}, } @Manual{Coppola2014, title = {lbfgs: Limited-memory BFGS Optimization}, author = {Antonio Coppola and Brandon Stewart and Naoaki Okazaki}, year = {2014}, note = {R package version 1.2.1}, url = {https://CRAN.R-project.org/package=lbfgs}, } @article{Byrd1995, author = {Byrd, Richard H. and Lu, Peihuang and Nocedal, Jorge and Zhu, Ciyou}, title = {A Limited Memory Algorithm for Bound Constrained Optimization}, journal = {SIAM J. Sci. Comput.}, issue_date = {Sept. 1995}, volume = {16}, number = {5}, month = sep, year = {1995}, issn = {1064-8275}, pages = {1190--1208}, numpages = {19}, url = {http://dx.doi.org/10.1137/0916069}, doi = {10.1137/0916069}, acmid = {210980}, publisher = {Society for Industrial and Applied Mathematics}, address = {Philadelphia, PA, USA} } @article{Nocedal80, title = "Updating Quasi-Newton Matrices with Limited Storage", author = "Jorge Nocedal", year = "1980", month = "7", doi = "10.1090/S0025-5718-1980-0572855-7", language = "English", volume = "35", pages = "773--782", journal = "Mathematics of Computation" } @article{LiuN89, author = {Dong C. Liu and Jorge Nocedal}, title = {On the limited memory {BFGS} method for large scale optimization}, journal = {Math. Program.}, volume = {45}, number = {1-3}, pages = {503--528}, year = {1989}, url = {https://doi.org/10.1007/BF01589116}, doi = {10.1007/BF01589116}, biburl = {https://dblp.org/rec/bib/journals/mp/LiuN89}, bibsource = {dblp computer science bibliography, https://dblp.org} } @article{polak1969, author = {Polak, E. and Ribiere, G.}, journal = {Revue Fran{\c{c}}aise d'Informatique et de Recherche Op{\'{e}}rationnelle}, pages = {35--43}, title = {{Note sur la convergence de m{\'{e}}thodes de directions conjugu{\'{e}}es}}, volume = {16}, year = {1969} } @article{Sorenson1969, author = {Sorenson, Harold}, year = {1969}, month = {12}, pages = {421--441}, title = {Comparison of some conjugate direction procedures for function minimization}, volume = {288}, journal = {Journal of The Franklin Institute - Engineering and Applied Mathematics}, doi = {10.1016/0016-0032(69)90253-1} } @incollection{Beale1972, author = {Beale, E. M. L.}, title = {A Derivation of Conjugate Gradients}, booktitle = {Numerical Methods for Nonlinear Optimization}, editor = {F. A. Lootsma}, publisher = {Academic Press}, address = {London}, pages = {39--43}, year = 1972 } @article{Gorn1960, author = {Gorn, S.}, title = {Algorithms: Bisection Routine}, journal = {Commun. ACM}, issue_date = {March 1960}, volume = {3}, number = {3}, month = mar, year = {1960}, issn = {0001-0782}, pages = {174--}, url = {http://doi.acm.org/10.1145/367149.367173}, doi = {10.1145/367149.367173}, acmid = {367173}, publisher = {ACM}, address = {New York, NY, USA}, } @article{Rader1961, author = {Rader, Patty Jane}, title = {Certification of Algorithm 4: Bisection Routine}, journal = {Commun. ACM}, issue_date = {March 1961}, volume = {4}, number = {3}, month = mar, year = {1961}, issn = {0001-0782}, pages = {153--}, url = {http://doi.acm.org/10.1145/366199.366275}, doi = {10.1145/366199.366275}, acmid = {366275}, publisher = {ACM}, address = {New York, NY, USA}, } @article{Muller56, author = {Muller, David E.}, journal = {Mathematical Tables and Other Aids to Computation}, note = {Later Mathematics of Computation.}, pages = { 208--215}, title = {A Method for Solving Algebraic Equations Using an Automatic Computer}, volume = 10, year = 1956 } @article{Ridders79, author = {Ridders, C.}, journal = {Circuits and Systems, IEEE Transactions on}, month = {11}, number = 11, pages = { 979 - 980}, title = {A new algorithm for computing a single root of a real continuous function}, volume = 26, year = 1979 } @InProceedings{Gonnet2001, author="Gonnet, Gaston H.", editor="Casacuberta, Carles and Mir{\'o}-Roig, Rosa Maria and Verdera, Joan and Xamb{\'o}-Descamps, Sebasti{\`a}", title="A Study of Iteration Formulas for Root Finding, Where Mathematics, Computer Algebra and Software Engineering Meet", booktitle="European Congress of Mathematics", year="2001", publisher="Birkh{\"a}user Basel", address="Basel", pages="143--156" } @Misc{CoreTeam2013, Title = {{Writing \R\ Extensions}}, Author = {{\R\ Core Team}}, Year = {2013}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16}, Url = {http://CRAN.R-project.org/doc/manuals/R-exts.html} } @Misc{R-extns, Title = {{Writing \R\ Extensions}}, Author = {{\R\ Core Team}}, Year = {2013}, Url = {http://CRAN.R-project.org/doc/manuals/R-exts.html} } @Book{acton70, Title = {Numerical Methods that Work}, Author = {Forman S. Acton}, Publisher = {Harper and Row}, Year = {1970}, Address = {New York} } @Article{Grassmann12, Title = {{GrassmannOptim}: An {R} Package for Grassmann Manifold Optimization}, Author = {Kofi P. Adragni and R. Dennis Cook and Seongho Wu}, Journal = {Journal of Statistical Software}, Year = {2012}, Number = {5}, Pages = {1--18}, Volume = {50}, Url = {http://www.jstatsoft.org/v50/i05/} } @Article{DEoptimWilmott11, Title = {{J}ump-Diffusion Calibration using {D}ifferential {E}volution}, Author = {David Ardia and Juan Ospina Arango and Norman Giraldo Gomez}, Journal = {Wilmott Magazine}, Year = {2011}, Pages = {76--79}, Volume = {55}, Url = {http://www.wilmott.com/} } @Article{DEoptimRjournal11, Title = {{D}ifferential {E}volution with {DEoptim}: An Application to Non-Convex Portfolio Optimization}, Author = {David Ardia and Kris Boudt and Peter Carl and Katharine M. Mullen and Brian G. Peterson}, Journal = {The R Journal}, Year = {2011}, Number = {1}, Pages = {27--34}, Volume = {3}, Url = {http://journal.r-project.org/archive/2011-1/2011-1\_index.html} } @Manual{DEoptim13, Title = {{DEoptim}: Differential Evolution in {R}}, Author = {David Ardia and Katharine M. Mullen and Brian G. Peterson and Joshua Ulrich}, Note = {version 2.2-2}, Year = {2013}, Url = {http://CRAN.R-project.org/package=DEoptim} } @Article{Barzilai88, Title = {Two-point step size gradient methods}, Author = {Jonathan Barzilai and Jonathan M. Borwein}, Journal = {IMA Journal of Numerical Analysis}, Year = {1988}, Number = {1}, Pages = {141--148}, Volume = {8} } @Manual{p-minqa, Title = {\pkg{minqa}: Derivative-Free Optimization Algorithms by Quadratic Approximation}, Author = {Douglas Bates and Katharine M. Mullen and John C. Nash and Ravi Varadhan}, Note = {R package version 1.1.13}, Organization = {R Foundation for Statistical Computing}, Year = {2010}, Url = {http://CRAN.R-project.org/package=minqa} } @Book{bateswatts, Title = {Nonlinear Regression Analysis and Its Applications}, Author = {D. M. Bates and D. G. Watts}, Publisher = {Wiley}, Year = {1988} } @Article{BatesWatts81, Title = {A Relative Off set Orthogonality Convergence Criterion for Nonlinear least Squares}, Author = {Bates, Douglas M. and Watts, Donald G.}, Journal = {Technometrics}, Year = {1981}, Number = {2}, Pages = {179-183}, Volume = {23} } @Manual{p-nlstools, Title = {nlstools: tools for nonlinear regression diagnostics}, Author = {Florent Baty and Marie-Laure Delignette-Muller}, Note = {R package version 0.0-15}, Year = {2013} } @Article{Belisle1992, Title = {Convergence Theorems for a Class of Simulated Annealing Algorithms on {\$\R\^{}d\$}}, Author = {C. J. P. Belisle}, Journal = {Annals of Applied Probability}, Year = {1992}, Pages = {885--895}, Volume = {29}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16} } @Article{Belisle92, Title = {Convergence Theorems for a Class of Simulated Annealing Algorithms on {$\R^d$}}, Author = {C. J. P. Belisle}, Journal = {Annals of Applied Probability}, Year = {1992}, Pages = {885--895}, Volume = {29} } @Manual{Rmalschains12, Title = {Continuous Optimization using Memetic Algorithms with Local Search Chains (MA-LS-Chains) in R}, Author = {Christoph Bergmeir and Daniel Molina and Jos\'e M. Ben\'itez}, Note = {R package version 0.1}, Year = {2012} } @Manual{p-lpSolve, Title = {{lpSolve: Interface to Lp\_solve v. 5.5 to solve linear / integer programs}}, Author = {Michel Berkelaar and {others}}, Note = {R package version 5.6.7}, Year = {2013}, Url = {http://CRAN.R-project.org/package=lpSolve} } @Manual{p-quadprog, Title = {quadprog: Functions to solve Quadratic Programming Problems.}, Author = {S original by Berwin A. Turlach R port by Andreas Weingessel}, Note = {R package version 1.5-5}, Year = {2013}, Url = {http://CRAN.R-project.org/package=quadprog} } @PhdThesis{Bhat2011, Title = {Some aspects of mathematical programming in statistics}, Author = {Bhat, K. A.}, School = {Post Graduate Deptartment of Statistics, Univ. of Kashmir}, Year = {2011}, Address = {Srinagar, India}, Note = {Ph. D. Dissertation} } @Article{Birgin2000, Title = {Nonmonotone Spectral Projected Gradient Methods on Convex Sets}, Author = {Ernesto G. Birgin and Jos{\'e} Mario Mart{\'\i}nez and Marcos Raydan}, Journal = {SIAM J Optimization}, Year = {2000}, Month = {June--July}, Number = {4}, Pages = {1196--1211}, Volume = {10}, Url = {http://epubs.siam.org/sam-bin/dbq/article/33096} } @Article{Birgin2000a, Title = {Nonmonotone Spectral Projected Gradient Methods on Convex Sets}, Author = {Ernesto G. Birgin and Jos{\'e} Mario Mart{\'\i}nez and Marcos Raydan}, Journal = {SIAM J Optimization}, Year = {2000}, Month = jun, Number = {4}, Pages = {1196--1211}, Volume = {10}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16}, Url = {http://epubs.siam.org/sam-bin/dbq/article/33096} } @Article{Birgin01spg, Title = {SPG: Software for convex-constrained optimization}, Author = {Ernesto G. Birgin and Mart'inez Marcos Raydan}, Journal = {ACM Transactions on Mathematical Software}, Year = {2001}, Pages = {340--349}, Volume = {27} } @Book{AIMMS06, Title = {{AIMMS optimization modeling}}, Author = {Bisschop, Johannes and Roelofs, Marcel}, Publisher = {Paragon Decision Technology}, Year = {2006}, ISBN = {1847539122} } @Article{Bjork:1967, Title = {Solving Least Squares Problems by {Gram--Schmidt} Orthogonalization}, Author = {A. Bjork}, Journal = {BIT}, Year = {1967}, Pages = {1--21}, Volume = {7} } @Article{Boer02atutorial, Title = {A Tutorial on the Cross-Entropy Method}, Author = {P. T. De Boer and D.P. Kroese and S. Mannor and R.Y. Rubinstein}, Journal = {Annals of Operations Research}, Year = {2002}, Volume = {134} } @Manual{p-R2admb, Title = {R2admb: ADMB to R interface functions}, Author = {Ben Bolker and Hans Skaug and Jeff Laake}, Note = {R package version 0.7.10}, Year = {2013}, Url = {http://CRAN.R-project.org/package=R2admb} } @Manual{p-bbmle, Title = {bbmle: Tools for general maximum likelihood estimation}, Author = {Ben Bolker and R Development Core Team}, Note = {R package version 1.0.13}, Year = {2013}, Url = {http://CRAN.R-project.org/package=bbmle} } @Manual{Borchers-pracma, Title = {pracma: Practical Numerical Math Functions}, Author = {Hans Werner Borchers}, Note = {R package version 2.0.7}, Year = {2017}, Url = {https://CRAN.R-project.org/package=pracma} } @Manual{p-adagio, Title = {adagio: Discrete and Global Optimization Routines}, Author = {Hans Werner Borchers}, Note = {R package version 0.5.9}, Year = {2013}, Url = {http://CRAN.R-project.org/package=adagio} } @Manual{p-nloptwrap, Title = {nloptwrap: Wrapper for Package nloptr}, Author = {Hans W Borchers}, Note = {R package version 0.5-1}, Year = {2013}, Url = {http://CRAN.R-project.org/package=nloptwrap} } @Manual{p-pracma, Title = {pracma: Practical Numerical Math Functions}, Author = {Hans W Borchers}, Note = {R package version 1.5.0}, Year = {2013}, Url = {http://CRAN.R-project.org/package=pracma} } @Manual{p-trustOptim, Title = {trustOptim: Trust region nonlinear optimization, efficient for sparse Hessians}, Author = {Michael Braun}, Note = {R package version 0.8.1}, Year = {2013}, Url = {http://CRAN.R-project.org/package=trustOptim} } @Article{Bremmerman70, Title = {A method for unconstrained global optimization}, Author = {Hans Bremmerman}, Journal = {Math. Biosci.}, Year = {1970}, Pages = {1--15}, Volume = {9} } @Book{Brent1973, Title = {Algorithms for Minimization without Derivatives}, Author = {Brent, R.}, Publisher = {Prentice-Hall}, Year = {1973}, Address = {Englewood Cliffs, NJ}, Owner = {john}, Timestamp = {2018.08.29} } @Article{Broyden70, Title = {The convergence of a class of double-rank minimization algorithms}, Author = {Broyden, C. G.}, Journal = {Journal of the Institute of Mathematics and Its Applications}, Year = {1970}, Pages = {76-–90}, Volume = {6} } @Article{Byrd95, Title = {A Limited Memory Algorithm for Bound Constrained Optimization}, Author = {Richard H. Byrd and Peihuang Lu and Jorge Nocedal and Ci You Zhu}, Journal = {SIAM Journal on Scientific Computing}, Year = {1995}, Month = sep, Number = {5}, Pages = {1190--1208}, Volume = {16}, Acknowledgement = {#ack-nhfb#}, Bibdate = {Fri Dec 4 16:17:35 MST 1998}, Coden = {SJOCE3}, ISSN = {1064-8275 (print), 1095-7197 (electronic)}, Mrclass = {90C30 (65K05)}, Mrnumber = {96e:90039}, Mrreviewer = {Henry Wolkowicz} } @Article{Davidon91, Title = {Variable Metric Method for Minimization}, Author = {C. Davidon, William}, Journal = {SIAM J. Optimization}, Year = {1991}, Month = {02}, Pages = {1 - 17}, Volume = {1}, Doi = {10.1137/0801001} } @Article{Cauchy1848, Title = {Méthode générale pour la resolution des systémes d’équations simultanées}, Author = {Cauchy, A.}, Journal = {C. R. Acad. Sci.}, Year = {1848}, Pages = {536-8}, Volume = {27}, Address = {Paris} } @Article{Cauchy1848a, Title = {M\'{e}thode g\'{e}n\'{e}rale pour la resolution des syst\'{e}mes d'\'{e}quations simultan\'{e}es}, Author = {Cauchy, A.}, Journal = {C. R. Acad. Sci.}, Year = {1848}, Pages = {536--8}, Volume = {27}, __markedentry = {[john:6]}, Address = {Paris}, Owner = {john}, Timestamp = {2018.11.16} } @Article{Chan:1983, Title = {Algorithms for Computing the Sample Variance: Analysis and Recommendations}, Author = {T. F. C. Chan and G. H. Golub and R. J. LeVeque}, Journal = {The American Statistician}, Year = {1983}, Number = {3}, Pages = {242--247}, Volume = {37} } @Manual{Colombi2012, Title = {smco: A simple Monte Carlo optimizer using adaptive coordinate sampling}, Author = {Prof. Juan David Velasquez H. Universidad Nacional de Colombia}, Note = {R package version 0.1}, Year = {2012}, Url = {http://CRAN.R-project.org/package=smco} } @Manual{smco12, Title = {smco: A simple Monte Carlo optimizer using adaptive coordinate sampling}, Author = {Prof. Juan David Velasquez H. Universidad Nacional de Colombia}, Note = {R package version 0.1}, Year = {2012}, Url = {http://CRAN.R-project.org/package=smco} } @Book{Conn09, Title = {Introduction to Derivative-Free Optimization}, Author = {A. R. Conn and K. Scheinberg and L.N.Vicente}, Publisher = {SIAM}, Year = {2009}, Address = {Philadelphia}, __markedentry = {[john:6]}, ISBN = {0898716683, 9780898716689}, Owner = {john}, Timestamp = {2018.11.16} } @Book{Conn2009, Title = {Introduction to Derivative-Free Optimization}, Author = {Conn, Andrew R. and Scheinberg, Katya and Vicente, Luis N.}, Publisher = {Society for Industrial and Applied Mathematics}, Year = {2009}, Address = {Philadelphia, PA, USA}, ISBN = {0898716683, 9780898716689} } @Article{Cruz2006, Title = {Spectral residual method without gradient information for solving large-scale nonlinear systems: Theory and experiments}, Author = {William La Cruz and Jos\'{e} Mario Mart\'{\i}nez and Marcos Raydan}, Journal = {Mathematics of Computation}, Year = {2006}, Pages = {1429--1448}, Volume = {75}, __markedentry = {[john:6]}, Institution = {unknown}, Owner = {john}, Timestamp = {2018.11.16} } @Article{Cruz06spectralresidual, Title = {Spectral residual method without gradient information for solving large-scale nonlinear systems: Theory and experiments}, Author = {William La Cruz and José Mario Martínez and Marcos Raydan}, Journal = {Mathematics of Computation}, Year = {2006}, Pages = {1429--1448}, Volume = {75} } @TechReport{Cruz04spectralresidual, Title = {Spectral residual method without gradient information for solving large-scale nonlinear systems: Theory and experiments}, Author = {William La Cruz and José Mario Martínez and Marcos Raydan}, Institution = {unknown}, Year = {2004} } @Article{Dai01, Title = {An Efficient Hybrid Conjugate Gradient Method for Unconstrained Optimization}, Author = {Y. H. Dai and Y. Yuan}, Journal = {Annals of Operations Research}, Year = {2001}, Number = {1-4}, Pages = {33-47}, Volume = {103}, Bibsource = {DBLP, http://dblp.uni-trier.de}, Ee = {http://dx.doi.org/10.1023/A:1012930416777} } @Article{Dai99, Title = {A Nonlinear Conjugate Gradient Method with a Strong Global Convergence Property}, Author = {Y. H. Dai and Y. Yuan}, Journal = {SIAM Journal on Optimization}, Year = {1999}, Pages = {177--182}, Volume = {10} } @Article{Davidon59, Title = {Variable metric method for minimization}, Author = {Davidon, W.C.}, Year = {1959}, Month = {11}, Doi = {10.2172/4222000}, Place = {United States} } @InProceedings{Dekker69, Title = {Finding a zero by means of successive linear interpolation}, Author = {Dekker, T. J.}, Booktitle = {Constructive Aspects of the Fundamental Theorem of Algebra}, Year = {1969}, Editor = {Dejon, B. and Henrici, P.}, Publisher = {Wiley-Interscience}, Location = {London}, Owner = {john}, Timestamp = {2018.08.29} } @Manual{p-fitdistrplus, Title = {fitdistrplus: help to fit of a parametric distribution to non-censored or censored data }, Author = {Marie Laure Delignette-Muller and Regis Pouillot and Jean-Baptiste Denis and Christophe Dutang}, Note = {R package version 1.0-1}, Year = {2013} } @InProceedings{Deng06, Title = {{Adaptation of the UOBYQA Algorithm for Noisy Functions}}, Author = {Deng, Geng and Ferris, Michael C.}, Booktitle = {{WSC '06: Proceedings of the 38th Winter Simulation Conference}}, Year = {2006}, Address = {Monterey, California}, Pages = {312--319}, Publisher = {Winter Simulation Conference}, ISBN = {1-4244-0501-7} } @Book{DennisSchnabel96, Title = {Numerical Methods for Unconstrained Optimization and Nonlinear Equations}, Author = {Dennis, J. and Schnabel, R.}, Publisher = {Society for Industrial and Applied Mathematics}, Year = {1996}, Address = {Englewood Cliffs, NJ}, Doi = {10.1137/1.9781611971200}, Eprint = {http://epubs.siam.org/doi/pdf/10.1137/1.9781611971200}, Url = {http://epubs.siam.org/doi/abs/10.1137/1.9781611971200} } @Book{DenSchnab83, Title = {Numerical Methods for Unconstrained Optimization and Nonlinear Equations}, Author = {Dennis, J. E. and Schnabel, R. B.}, Publisher = {Prentice-Hall}, Year = {1983}, Address = {Englewood Cliffs, NJ} } @Book{dixon1972nonlinear, Title = {Nonlinear optimisation}, Author = {Dixon, L.C.W.}, Publisher = {The English Universities Press Ltd.}, Year = {1972}, Address = {London} } @Article{Domini02, Title = {On the Use of Generalized Additive Models in Time-Series Studies of Air Pollution and Health.}, Author = {F. Dominici}, Journal = {American Journal of Epidemiology}, Year = {2002}, Number = {3}, Pages = {193--202}, Volume = {156}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16} } @Article{Dominici2002, Title = {On the Use of Generalized Additive Models in Time-Series Studies of Air Pollution and Health.}, Author = {F. Dominici}, Journal = {American Journal of Epidemiology}, Year = {2002}, Number = {3}, Pages = {193-202}, Volume = {156} } @Article{linbench03, Title = {The {LINPACK} Benchmark: Past, Present, and Future}, Author = {J. J. Dongarra and P. Luszczek and A. Petitet}, Journal = {Concurrency and Computation: Practice and Experience}, Year = {2003}, Month = {August}, Number = {9}, Pages = {803--820}, Volume = {15} } @Article{Dugg84, Title = {Regression Analysis of Nonlinear {Arrhenius} Plots: An Empirical Model and a Computer Program.}, Author = {Duggleby, R G}, Journal = {Computers in Biology and Medicine}, Year = {1984}, Number = {4}, Pages = {447--55}, Volume = {14}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16} } @Article{Duggleby1984, Title = {Regression Analysis of Nonlinear {Arrhenius} Plots: An Empirical Model and a Computer Program.}, Author = {Duggleby, R G}, Journal = {Computers in Biology and Medicine}, Year = {1984}, Number = {4}, Pages = {447-55}, Volume = {14} } @Manual{RcppDE12, Title = {RcppDE: Global optimization by differential evolution in C++}, Author = {Dirk Eddelbuettel}, Note = {R package version 0.1.1. Extends DEoptim which itself is based on DE-Engine (by Rainer Storn)}, Year = {2012}, Url = {http://CRAN.R-project.org/package=RcppDE} } @Manual{minpacklm12, Title = {minpack.lm: R interface to the Levenberg-Marquardt nonlinear least-squares algorithm found in MINPACK, plus support for bounds}, Author = {Timur V. Elzhov and Katharine M. Mullen and Andrej-Nikolai Spiess and Ben Bolker}, Note = {R package version 1.1-6}, Organization = {R Project for Statistical Computing}, Year = {2012}, Url = {http://CRAN.R-project.org/package=minpack.lm} } @Article{Eugster2012, Title = {Domain-Based Benchmark Experiments: Exploratory and Inferential Analysis}, Author = {Manuel J. A. Eugster and Torsten Hothorn and Friedrich Leisch}, Journal = {Austrian Journal of Statistics}, Year = {2012}, Number = {1}, Pages = {5--26}, Volume = {41}, Url = {http://www.stat.tugraz.at/AJS/ausg121/121Leisch.pdf} } @Article{Eugster2012a, Title = {Domain-Based Benchmark Experiments: Exploratory and Inferential Analysis}, Author = {Manuel J. A. Eugster and Torsten Hothorn and Friedrich Leisch}, Journal = {Austrian Journal of Statistics}, Year = {2012}, Number = {1}, Pages = {5--26}, Volume = {41}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16}, Url = {http://www.stat.tugraz.at/AJS/ausg121/121Leisch.pdf} } @Article{Eugster2011, Title = {Exploratory Analysis of Benchmark Experiments -- An Interactive Approach}, Author = {Manuel J. A. Eugster and Friedrich Leisch}, Journal = {Computational Statistics}, Year = {2011}, Number = {4}, Pages = {699--710}, Volume = {26}, Doi = {10.1007/s00180-010-0227-z}, Preprinturl = {http://epub.ub.uni-muenchen.de/10604/} } @Article{Eugster2011a, Title = {Exploratory Analysis of Benchmark Experiments -- An Interactive Approach}, Author = {Manuel J. A. Eugster and Friedrich Leisch}, Journal = {Computational Statistics}, Year = {2011}, Number = {4}, Pages = {699--710}, Volume = {26}, __markedentry = {[john:6]}, Doi = {10.1007/s00180-010-0227-z}, Owner = {john}, Preprinturl = {http://epub.ub.uni-muenchen.de/10604/}, Timestamp = {2018.11.16} } @Article{Feldman91, Title = {Availability of f2c - a Fortran to C converter}, Author = {Feldman, S. I. and Gay, D. M. and Maimone, M. W. and Schryer, N. L.}, Journal = {SIGPLAN Fortran Forum}, Year = {1991}, Month = jul, Number = {2}, Pages = {14--15}, Volume = {10}, Address = {New York, NY, USA}, Issue_date = {July 1991}, Numpages = {2}, Publisher = {ACM} } @Article{Fletcher70, Title = {A New Approach to Variable Metric Algorithms}, Author = {R. Fletcher}, Journal = {Computer Journal}, Year = {1970}, Number = {3}, Pages = {317-322}, Volume = {13}, Bibsource = {DBLP, http://dblp.uni-trier.de} } @Article{FletReeves64, Title = {Function minimization by conjugate gradients}, Author = {Fletcher, R. and Reeves, C. M.}, Journal = {The Computer Journal}, Year = {1964}, Number = {2}, Pages = {149-154}, Volume = {7} } @Book{Forsythe77, Title = {Computer Methods for Mathematical Computations}, Author = {Forsythe, George E. and Malcolm, Michael A. and Moler, Cleve B.}, Publisher = {Prentice Hall Professional Technical Reference}, Year = {1977}, ISBN = {0131653326}, Owner = {john}, Timestamp = {2018.08.29} } @Misc{Fox2006, Title = {{TEACHER'S CORNER} Structural Equation Modeling With the sem Package in {R}}, Author = {John Fox}, Year = {2006}, __markedentry = {[john:6]}, Journal = {STRUCTURAL EQUATION MODELING}, Numeber = {3}, Owner = {john}, Pages = {465–-486}, Timestamp = {2018.11.16}, Volume = {13} } @Misc{Fox-sem, Title = {{TEACHER’S CORNER} Structural Equation Modeling With the sem Package in {R}}, Author = {John Fox}, Year = {2006}, Journal = {STRUCTURAL EQUATION MODELING}, Numeber = {3}, Pages = {465–-486}, Volume = {13} } @Manual{p-sem, Title = {sem: Structural Equation Models}, Author = {John Fox and Zhenghua Nie and Jarrett Byrnes}, Note = {R package version 3.1-301}, Year = {2013}, Url = {http://CRAN.R-project.org/package=sem} } @Misc{Fox1997, Title = {The {Port Mathematical Subroutine Library}, Version 3}, Author = {Phyllis Fox}, Year = {1997}, __markedentry = {[john:6]}, Address = {Murray Hill, NJ}, Owner = {john}, Publisher = {AT\&T Bell Laboratories}, Timestamp = {2018.11.16}, Url = {http://www.bell-labs.com/project/PORT/} } @Misc{PORTlib, Title = {The {Port Mathematical Subroutine Library}, Version 3}, Author = {Phyllis Fox}, Year = {1997}, Address = {Murray Hill, NJ}, Publisher = {AT\&T Bell Laboratories}, Url = {http://www.bell-labs.com/project/PORT/} } @Article{Fox1978PORT, Title = {The {PORT} Mathematical Subroutine Library}, Author = {P. A. Fox and A. D. Hall and N. L. Schryer}, Journal = {ACM Transactions on Mathematical Software (TOMS)}, Year = {1978}, Month = jun, Number = {2}, Pages = {104--126}, Volume = {4} } @Book{Gentle:1998, Title = {Numerical Linear Algebra for Applications in Statistics}, Author = {James E. Gentle}, Publisher = {Springer}, Year = {1998} } @Article{Bioc04, Title = {Bioconductor: Open Software Development for Computational Biology and Bioinformatics}, Author = {Robert C Gentleman and Vincent J. Carey and Douglas M. Bates and {others}}, Journal = {Genome Biology}, Year = {2004}, Pages = {R80}, Volume = {5}, Url = {http://genomebiology.com/2004/5/10/R80} } @Article{Geradin71, Title = {The computational efficiency of a new minimization algorithm for eigenvalue analysis}, Author = {Geradin, M.}, Journal = {J. Sound Vib.}, Year = {1971}, Pages = {319--331}, Volume = {19} } @Manual{p-trust, Title = {trust: Trust Region Optimization}, Author = {Charles J. Geyer}, Note = {R package version 0.1-4}, Year = {2013}, Url = {http://CRAN.R-project.org/package=trust} } @InProceedings{Geyer91, Title = {Markov chain Monte Carlo maximum likelihood}, Author = {C. J. Geyer}, Booktitle = {{Computing Science and Statistics, Proceedings of the 23rd Symposium on the Interface}}, Year = {1991}, Pages = {n.a.}, Publisher = {American Statistical Association, New York} } @Manual{Ghalanos2012, Title = {Rsolnp: General Non-linear Optimization Using Augmented Lagrange Multiplier Method}, Author = {Alexios Ghalanos and Stefan Theussl}, Note = {R package version 1.14}, Year = {2012}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16}, Url = {http://CRAN.R-project.org/package=Rsolnp} } @Manual{p-Rsolnp, Title = {Rsolnp: General Non-linear Optimization Using Augmented Lagrange Multiplier Method}, Author = {Alexios Ghalanos and Stefan Theussl}, Note = {R package version 1.14}, Year = {2012}, Url = {http://CRAN.R-project.org/package=Rsolnp} } @Manual{p-numDeriv, Title = {\pkg{numDeriv}: Accurate Numerical Derivatives}, Author = {Paul Gilbert}, Note = {R package version 2009.2-1}, Organization = {R Foundation for Statistical Computing}, Year = {2009}, Url = {http://www.bank-banque-canada.ca/pgilbert} } @Book{gillmurraywright, Title = {Practical Optimization}, Author = {P. E.~Gill and W.~Murray and M. H.~Wright}, Publisher = {Academic Press}, Year = {1981} } @Misc{Gil93, Title = {p2c}, Author = {Dave Gillespie}, Year = {1993}, __markedentry = {[john:6]}, Address = {Boston, MA}, Owner = {john}, Publisher = {Free Software Foundation}, Timestamp = {2018.11.16}, Url = {http://directory.fsf.org/project/p2c/} } @Misc{Gillespie1993, Title = {p2c}, Author = {Dave Gillespie}, Year = {1993}, Address = {Boston, MA}, Publisher = {Free Software Foundation}, Url = {http://directory.fsf.org/project/p2c/} } @Article{Glover89, Title = {Tabu Search - Part 1}, Author = {Fred Glover}, Journal = {ORSA Journal on Computing}, Year = {1989}, Number = {2}, Pages = {190--206}, Volume = {1} } @Article{Goldberg:1991, Title = {What Every Computer Scientist Should Know About Floating-Point Arithmetic}, Author = {David Goldberg}, Journal = {ACM Computing Surveys}, Year = {1991}, Pages = {5--48}, Colume = {23}, Lnumber = {1}, Url = {http://www.validlab.com/goldberg/paper.pdf} } @Article{Goldfarb70, Title = {A Family of Variable Metric Updates Derived by Variational Means}, Author = {Goldfarb, D.}, Journal = {Mathematics of Computation}, Year = {1970}, Number = {109}, Pages = {23--26}, Volume = {24} } @InProceedings{Golub1979, Title = {Extensions and Uses of the Variable Projection Algorithm for Solving Nonlinear Least Squares Problems}, Author = {Gene H. Golub and Randall J. LeVeque}, Booktitle = {Proceedings of the Army Numerical Analysis and Computing Conference}, Year = {1979}, Pages = {1--12}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16} } @InProceedings{GolubLeveque79, Title = {Extensions and Uses of the Variable Projection Algorithm for Solving Nonlinear Least Squares Problems}, Author = {Gene H. Golub and Randall J. LeVeque}, Booktitle = {Proceedings of the Army Numerical Analysis and Computing Conference}, Year = {1979}, Pages = {1--12} } @Article{Golub1973, Title = {The Differentiation of Pseudo-Inverses and Nonlinear Least Squares Problems Whose Variables Separate}, Author = {G. H. Golub and V. Pereyra}, Journal = {SIAM Journal of Numerical Analysis}, Year = {1973}, Month = apr, Number = {2}, Pages = {413--432}, Volume = {10}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16} } @Article{GolubPereyra73, Title = {The Differentiation of Pseudo-Inverses and Nonlinear Least Squares Problems Whose Variables Separate}, Author = {G. H. Golub and V. Pereyra}, Journal = {SIAM Journal of Numerical Analysis}, Year = {1973}, Month = apr, Number = {2}, Pages = {413--432}, Volume = {10} } @Article{Hager2006b, Title = {A Survey of Nonlinear Conjugate Gradient Methods}, Author = {William W. Hager and Hongchao Zhang}, Journal = {Pacific Journal of Optimization}, Year = {2006}, Pages = {35--58}, Volume = {2} } @Article{Hager2005, Title = {A new conjugate gradient method with guaranteed descent and an efficient line search}, Author = {William W. Hager and Hongchao Zhang}, Journal = {SIAM J. Optim.}, Year = {2005}, Number = {1}, Pages = {170--192}, Volume = {16} } @Article{Hager2006a, Title = {{Algorithm 851}: {CG\_DESCENT}, a conjugate gradient method with guaranteed descent}, Author = {William W. Hager and Hongchao Zhang}, Journal = {ACM Transactions on Mathematical Software}, Year = {2006}, Month = mar, Number = {1}, Pages = {113--137}, Volume = {32} } @Book{HansenWalster2004, Title = {Global Optimization Using Interval Analysis}, Author = {E. R. Hansen and G. W. Walster}, Publisher = {MIT Press}, Year = {2004}, Address = {Cambridge, Massachusetts} } @Manual{p-Rsymphony, Title = {Rsymphony: Symphony in R}, Author = {Reinhard Harter and Kurt Hornik and Stefan Theussl}, Note = {R package version 0.1-16}, Year = {2013}, Url = {http://CRAN.R-project.org/package=Rsymphony} } @Article{Hartley61, Title = {The Modified Gauss-Newton Method for the Fitting of Non-linear Regression Functions by Least Squares}, Author = {Hartley, H. O.}, Journal = {Technometrics}, Year = {1961}, Pages = {269-–280}, Volume = {3} } @Manual{p-nleqslv, Title = {nleqslv: Solve systems of non linear equations}, Author = {Berend Hasselman}, Note = {R package version 2.0}, Year = {2013}, Url = {http://CRAN.R-project.org/package=nleqslv} } @Manual{HHpackage:2015, Title = {HH: Statistical Analysis and Data Display: Heiberger and Holland.}, Author = {Richard M. Heiberger}, Note = {R package version 3.1-15}, Year = {2015}, Url = {http://CRAN.R-project.org/package=HH} } @Book{Heiberger:1989, Title = {Computation for the Analysis of Designed Experiments}, Author = {Richard M. Heiberger}, Publisher = {Wiley}, Year = {1989} } @Book{HH2, Title = {Statistical Analysis and Data Display: An Intermediate Course with Examples in R}, Author = {Richard M. Heiberger and Burt Holland}, Publisher = {Springer-Verlag, New York}, Year = {2015}, Edition = {Second}, Url = {http://www.springer.com/978-1-4939-2121-8} } @Book{RthroughExcelbook:2009pub, Title = {R through Excel: A Spreadsheet Interface for Statistics, Data Analysis, and Graphics}, Author = {Richard M. Heiberger and Erich Neuwirth}, Publisher = {Springer}, Year = {2009}, Url = {http://www.springer.com/978-1-4419-0051-7} } @Manual{p-linprog, Title = {{linprog: Linear Programming / Optimization}}, Author = {Arne Henningsen}, Note = {R package version 0.9-2}, Year = {2012}, Url = {http://CRAN.R-project.org/package=linprog} } @Article{p-systemfit, Title = {systemfit: A Package for Estimating Systems of Simultaneous Equations in R}, Author = {Arne Henningsen and Jeff D. Hamann}, Journal = {Journal of Statistical Software}, Year = {2007}, Number = {4}, Pages = {1--40}, Volume = {23}, Url = {http://www.jstatsoft.org/v23/i04/} } @Article{Hestenes1952, Title = {Methods of conjugate gradients for solving linear systems}, Author = {Hestenes, M. R. and Stiefel, E.}, Journal = {Journal of research of the National Bureau of Standards}, Year = {1952}, Pages = {409--436}, Volume = {49} } @Book{holland75, Title = {{Adaptation in Natural and Artificial Systems}}, Author = {Holland, J. H.}, Publisher = {University of Michigan Press}, Year = {1975}, Address = {Ann Arbor, MI, USA} } @Article{Hooke61, Title = {``Direct Search'' Solution of Numerical and Statistical Problems}, Author = {Robert Hooke and T. A. Jeeves}, Journal = {J. ACM}, Year = {1961}, Number = {2}, Pages = {212-229}, Volume = {8}, Bibsource = {DBLP, http://dblp.uni-trier.de}, Ee = {http://doi.acm.org/10.1145/321062.321069} } @Manual{p-ROI, Title = {ROI: R Optimization Infrastructure}, Author = {Kurt Hornik and David Meyer and Stefan Theussl}, Note = {R package version 0.0-7}, Year = {2011}, Url = {http://CRAN.R-project.org/package=ROI} } @Book{Huet1996, Title = {Statistical tools for nonlinear regression: a practical guide with {S-PLUS} examples}, Author = {S. (Sylvie) Huet and others}, Publisher = {Springer-Verlag}, Year = {1996}, Address = {Berlin \& New York}, Series = {Springer series in statistics}, __markedentry = {[john:6]}, Acknowledgement = {\#ack-nhfb\#}, Bibdate = {Tue Sep 22 08:25:09 MDT 1998}, ISBN = {0-387-94727-2}, Isbn-13 = {978-0-387-94727-3}, Keywords = {Regression analysis; Nonlinear theories; Parameter estimation.}, Lccn = {QA278.2.S73 1996}, Owner = {john}, Pages = {ix + 154}, Timestamp = {2018.11.16} } @Book{Huet1996a, Title = {Statistical tools for nonlinear regression: a practical guide with {S-PLUS} examples}, Author = {S. (Sylvie) Huet and others}, Publisher = {Springer-Verlag}, Year = {1996}, Address = {Berlin \& New York}, Series = {Springer series in statistics}, Acknowledgement = {#ack-nhfb#}, Bibdate = {Tue Sep 22 08:25:09 MDT 1998}, ISBN = {0-387-94727-2}, Isbn-13 = {978-0-387-94727-3}, Keywords = {Regression analysis; Nonlinear theories; Parameter estimation.}, Lccn = {QA278.2.S73 1996}, Pages = {ix + 154} } @Manual{soma11, Title = {soma: General-purpose optimisation with the Self-Organising Migrating Algorithm}, Author = {Jon Clayden; based on the work of Ivan Zelinka}, Note = {R package version 1.1.0}, Year = {2011}, Url = {http://CRAN.R-project.org/package=soma} } @Article{Jacobi1846, Title = {{\"U}ber ein leichtes Verfahren die in der Theorie der S{\"a}cul{\"a}rst{\"o}rungen vorkommenden Gleichungen numerisch aufzul{\"o}sen}, Author = {C. G. J. Jacobi}, Journal = {Crelle}, Year = {1846}, Pages = {51--94}, Volume = {30} } @Article{JoeNash, Title = {Numerical Optimization and Surface Estimation with Imprecise Function Evaluations}, Author = {Joe, Harry and Nash, John C.}, Journal = {Statistics and Computing}, Year = {2003}, Number = {3}, Pages = {277--286}, Volume = {13}, Address = {Hingham, MA, USA}, Doi = {http://dx.doi.org/10.1023/A:1024226918553}, ISSN = {0960-3174}, Publisher = {Kluwer Academic Publishers} } @Article{Joh03, Title = {Mineralization of Aged Atrazine, Terbuthylazine, 2,4-D, and Mecoprop in Soil and Aquifer Sediment}, Author = {H. Johannesen and J. Aamand}, Journal = {Environmental Toxicology and Chemistry}, Year = {2003}, Pages = {722--729}, Volume = {22}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16} } @Article{Johannesen2003, Title = {Mineralization of Aged Atrazine, Terbuthylazine, 2,4-D, and Mecoprop in Soil and Aquifer Sediment}, Author = {H. Johannesen and J. Aamand}, Journal = {Environmental Toxicology and Chemistry}, Year = {2003}, Pages = {722--729}, Volume = {22} } @Misc{Johnson2008, Title = {{The NLopt nonlinear-optimization package}}, Author = {Steven G. Johnson}, Year = {2008}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16}, Url = {http://ab-initio.mit.edu/nlopt} } @Misc{NLoptSJ, Title = {{The NLopt nonlinear-optimization package}}, Author = {Steven G. Johnson}, Year = {2008}, Url = {http://ab-initio.mit.edu/nlopt} } @Article{Jones70, Title = {Spiral -- a new algorithm for non-linear parameter estimation using least squares}, Author = {Jones, A}, Journal = {Computer Journal}, Year = {1970}, Number = {3}, Pages = {301--308}, Volume = {13} } @Book{Kahaner89, Title = {Numerical Methods and Software}, Author = {Kahaner, David and Moler, Cleve and Nash, Stephen}, Publisher = {Prentice-Hall, Inc.}, Year = {1989}, Address = {Upper Saddle River, NJ, USA}, ISBN = {0-13-627258-4} } @Article{grofit10, Title = {{grofit}: Fitting Biological Growth Curves with {R}}, Author = {Matthias Kahm and Guido Hasenbrink and Hella Lichtenberg-Frat\'{e} and Jost Ludwig and Maik Kschischo}, Journal = {Journal of Statistical Software}, Year = {2010}, Number = {7}, Pages = {1--21}, Volume = {33}, Url = {http://www.jstatsoft.org/v33/i07/} } @Article{p-kernlab, Title = {kernlab -- An {S4} Package for Kernel Methods in {R}}, Author = {Alexandros Karatzoglou and Alex Smola and Kurt Hornik and Achim Zeileis}, Journal = {Journal of Statistical Software}, Year = {2004}, Number = {9}, Pages = {1--20}, Volume = {11}, Url = {http://www.jstatsoft.org/v11/i09/} } @MastersThesis{Karush39, Title = {Minima of Functions of Several Variables with Inequalities as Side Constraints}, Author = {W. Karush}, School = {Dept. of Mathematics, Univ. of Chicago}, Year = {1939}, Address = {Chicago, Illinois}, Note = {M.Sc. Dissertation} } @Book{kelley1987iterative, Title = {Iterative Methods for Optimization}, Author = {Kelley, C.T.}, Publisher = {Society for Industrial and Applied Mathematics}, Year = {1987}, Series = {Frontiers in Applied Mathematics}, ISBN = {9780898714333}, Lccn = {lc99011141}, Url = {http://books.google.ca/books?id=Bq6VcmzOe1IC} } @Article{Kelley97, Title = {Detection and Remediation of Stagnation in the Nelder-Mead Algorithm Using a Sufficient Decrease Condition}, Author = {C. T. Kelley}, Journal = {SIAM Journal on Optimization}, Year = {1997}, Pages = {43--55}, Volume = {10} } @InProceedings{Kennedy95PSO, Title = {Particle swarm optimization}, Author = {Kennedy, J. and Eberhart, R.}, Booktitle = {Neural Networks, 1995. Proceedings., IEEE International Conference on}, Year = {1995}, Pages = {1942-1948}, Volume = {4} } @Article{Kirkpatrick83, Title = {Optimization by Simulated Annealing}, Author = {S. Kirkpatrick and C. D. Gelatt Jr. and M. P. Vecchi}, Journal = {Science}, Year = {1983}, Month = {May}, Number = {4598}, Pages = {671--680}, Volume = {220} } @Manual{quantreg13, Title = {quantreg: Quantile Regression}, Author = {Roger Koenker}, Note = {R package version 5.05}, Year = {2013}, Url = {http://CRAN.R-project.org/package=quantreg} } @Book{Koenker2005, Title = {Quantile regression}, Author = {Koenker, R.}, Publisher = {Cambridge University Press}, Year = {2005}, Address = {Cambridge}, Doi = {10.1017/CBO9780511754098} } @Book{Koenker2005a, Title = {Quantile regression}, Author = {Koenker, R.}, Publisher = {Cambridge University Press}, Year = {2005}, Address = {Cambridge}, Doi = {10.1017/CBO9780511754098} } @Article{Kovalchik12, Title = {A general binomial regression model to estimate standardized risk differences from binary response data}, Author = {Kovalchik, Stephanie A. and Varadhan, Ravi and Fetterman, Barbara and Poitras, Nancy E. and Wacholder, Sholom and Katki, Hormuzd A.}, Journal = {Statistics in Medicine}, Year = {2013}, Number = {5}, Pages = {808--821}, Volume = {32}, Publisher = {John Wiley \& Sons, Ltd} } @InProceedings{KuhnTucker51, Title = {Nonlinear programming}, Author = {Kuhn, H. W. and Tucker, A. W.}, Booktitle = {{Proceedings of 2nd Berkeley Symposium}}, Year = {1951}, Address = {{Berkeley, USA}}, Pages = {481 -– 492}, Institution = {{University of California Press}} } @Article{Kulkarni2011PCA, Title = {A probability collectives approach with a feasibility-based rule for constrained optimization}, Author = {Kulkarni, Anand J. and Tai, K.}, Journal = {Appl. Comp. Intell. Soft Comput.}, Year = {2011}, Month = jan, Pages = {12:12--12:12}, Volume = {2011}, Acmid = {2208425}, Address = {New York, NY, United States}, Articleno = {12}, Doi = {10.1155/2011/980216}, ISSN = {1687-9724}, Issue_date = {January 2011}, Numpages = {1}, Publisher = {Hindawi Publishing Corp.}, Url = {http://dx.doi.org/10.1155/2011/980216} } @Manual{rbenchmark12, Title = {rbenchmark: Benchmarking routine for R}, Author = {Wacek Kusnierczyk}, Note = {R package version 1.0.0}, Year = {2012}, Url = {http://CRAN.R-project.org/package=rbenchmark} } @Book{Lanczos1956, Title = {Applied Analysis}, Author = {Cornelius Lanczos}, Publisher = {Prentice-Hall}, Year = {1956}, Address = {Englewood Cliffs, NJ}, Note = {Reprinted by Dover, New York, 1988.}, Pages = {xx + 539} } @Book{Lange:1999, Title = {Numerical Analysis for Statisticians}, Author = {Kenneth Lange}, Publisher = {Springer}, Year = {1999} } @Article{Levenberg44, Title = {A Method for the Solution of Certain Non-Linear Problems in Least Squares}, Author = {Kenneth Levenberg}, Journal = {Quarterly of Applied Mathematics}, Year = {1944}, Pages = {164-–168}, Volume = {2} } @Article{Lu94limitedmemory, Title = {A Limited-Memory Algorithm for Bound Constrained Optimization}, Author = {Peihuang Lu and Jorge Nocedal and Ciyou Zhu and Richard H. Byrd}, Journal = {SIAM Journal on Scientific Computing}, Year = {1994}, Pages = {1190--1208}, Volume = {16} } @Article{BUGS09, Title = {The BUGS project: Evolution, critique and future directions}, Author = {Lunn, David and Spiegelhalter, David and Thomas, Andrew and Best, Nicky}, Journal = {Statistics in Medicine}, Year = {2009}, Number = {25}, Pages = {3049--3067}, Volume = {28}, Publisher = {John Wiley \& Sons, Ltd.} } @Article{Lyness1971, Title = {Algorithm 413: ENTCAF and ENTCRE: evaluation of normalized Taylor coefficients of an analytic function}, Author = {Lyness, J. N. and Sande, G.}, Journal = {Communications of the ACM}, Year = {1971}, Month = oct, Number = {10}, Pages = {669--675}, Volume = {14}, Issue_date = {Oct. 1971} } @Article{MSB91, Title = {{The Parallel Genetic Algorithm as Function Optimizer}}, Author = {H. M\"{u}hlenbein and D. Schomisch and J. Born}, Journal = {{Parallel Computing}}, Year = {1991}, Number = {6-7}, Pages = {619-632}, Volume = {17} } @Manual{p-Rmpfr, Title = {Rmpfr: R MPFR - Multiple Precision Floating-Point Reliable}, Author = {Martin Maechler}, Note = {R package version 0.5-3}, Year = {2013}, Url = {http://CRAN.R-project.org/package=Rmpfr} } @Article{Marq63, Title = {{An Algorithm for Least-Squares Estimation of Nonlinear Parameters}}, Author = {Marquardt, Donald W.}, Journal = {SIAM Journal on Applied Mathematics}, Year = {1963}, Number = {2}, Pages = {431--441}, Volume = {11}, Publisher = {SIAM} } @Article{martins03, Title = {The complex-step derivative approximation}, Author = {Martins, Joaquim R. R. A. and Sturdza, Peter and Alonso, Juan J.}, Journal = {ACM Transactions on Mathematical Software}, Year = {2003}, Number = {3}, Pages = {245--262}, Volume = {29}, Timestamp = {2010-11-14T22:23:38.000+0100}, Url = {http://dx.doi.org/10.1145/838250.838251} } @InProceedings{McCarthy1988, Title = {The use of mathematical programming for designing dual frame surveys}, Author = {William F. McCarthy and David V. Bateman}, Booktitle = {Proceedings of the Survey Research Methods Section, 1988}, Year = {1988}, Pages = {652--653}, Publisher = {American Statistical Association, Alexandria, VA}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16} } @InProceedings{McCarthy88, Title = {The use of mathematical programming for designing dual frame surveys}, Author = {William F. McCarthy and David V. Bateman}, Booktitle = {Proceedings of the Survey Research Methods Section, 1988}, Year = {1988}, Pages = {652--653}, Publisher = {American Statistical Association, Alexandria, VA} } @Book{mccullagh1989generalized, Title = {Generalized Linear Models, Second Edition}, Author = {McCullagh, P. and Nelder, J.A.}, Publisher = {Chapman and Hall}, Year = {1989}, Series = {Monographs on statistics and applied probability}, ISBN = {9780412317606}, Lccn = {99013896}, Url = {http://books.google.ca/books?id=h9kFH2\_FfBkC} } @InCollection{bdm04, Title = {Some Details of Nonlinear Estimation}, Author = {McCullough, B. D.}, Booktitle = {Numerical Issues in Statistical Computing for the Social Scientist}, Publisher = {John Wiley \& Sons, Inc.}, Year = {2004}, Chapter = {8}, Editor = {Altman, Micah and Gill, Jeff and McDonald, Michael P.}, Pages = {199--218} } @Article{mccren00, Title = {Some Numerical Aspects of Nonlinear Estimation}, Author = {B. D. McCullough and Charles G. Renfro}, Journal = {Journal of Economic and Social Measurement}, Year = {2000}, Number = {1}, Pages = {63--77}, Volume = {26} } @Article{rgenoud11, Title = {Genetic Optimization Using Derivatives: The {rgenoud} Package for {R}}, Author = {Walter R. {Mebane, Jr.} and Jasjeet S. Sekhon}, Journal = {Journal of Statistical Software}, Year = {2011}, Number = {11}, Pages = {1--26}, Volume = {42}, Url = {http://www.jstatsoft.org/v42/i11/} } @Manual{Melville17, Title = {mize: Unconstrained Numerical Optimization Algorithms}, Author = {James Melville}, Note = {R package version 0.1.1}, Year = {2017}, Url = {https://CRAN.R-project.org/package=mize} } @Manual{microbench13, Title = {microbenchmark: Sub microsecond accurate timing functions.}, Author = {Olaf Mersmann}, Note = {R package version 1.3-0}, Year = {2013}, Url = {http://CRAN.R-project.org/package=microbenchmark} } @Misc{Mittelm2008, Title = {Decision Tree for Optimization Software}, Author = {H. Mittelman}, Year = {2008}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16}, Url = {http://plato.asu.edu/guide.html} } @Misc{plato, Title = {Decision Tree for Optimization Software}, Author = {H. Mittelman}, Year = {2008}, Url = {http://plato.asu.edu/guide.html} } @Article{moler2003ndw, Title = {Nineteen Dubious Ways to Compute the Exponential of a Matrix, Twenty-Five Years Later}, Author = {Moler, Cleve and Loan, Charles Van}, Journal = {SIAM Review}, Year = {2003}, Number = {1}, Pages = {3-49}, Volume = {45}, Publisher = {SIAM} } @Manual{Molga2005, Title = {Test functions for optimization needs}, Author = {Molga, M. and Smutnicki, C.}, Year = {2005}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16}, Url = {http://www.zsd.ict.pwr.wroc.pl/files/docs/functions.pdf} } @Manual{Molga2005a, Title = { Test functions for optimization needs}, Author = { Molga, M. and Smutnicki, C. }, Year = {2005}, Url = {http://www.zsd.ict.pwr.wroc.pl/files/docs/functions.pdf} } @Book{Maple10, Title = {Maple~10 Programming Guide}, Author = {Michael B.~Monagan and Keith O.~Geddes and K.~Michael Heal and George Labahn and Stefan M.~Vorkoetter and James McCarron and Paul DeMarco}, Publisher = {Maplesoft}, Year = {2005}, Address = {Waterloo ON, Canada} } @TechReport{more80, Title = {{ANL-80-74}, {User Guide for MINPACK-1}}, Author = {Mor\'{e}, J. J. and Garbow, B. S. and Hillstrom, K. E.}, Institution = {Argonne National Laboratory}, Year = {1980}, Keywords = {algorithm, fittiookeng, optimization}, Url = {http://www.mcs.anl.gov/\~{}more/ANL8074a.pdf} } @Article{Morales2011, Title = {Remark on {Algorithm 778: L-BFGS-B: Fortran subroutines for large-scale bound constrained optimization}}, Author = {Morales, Jos{\'e} Luis and Nocedal, Jorge}, Journal = {ACM Trans. Math. Softw.}, Year = {2011}, Month = {Dec}, Number = {1}, Pages = {7:1--7:4}, Volume = {38}, Address = {New York, NY, USA}, Articleno = {7}, Issue_date = {November 2011}, Numpages = {4}, Publisher = {ACM}, Url = {http://doi.acm.org/10.1145/2049662.2049669} } @Article{More92linesearch, Title = {Line Search Algorithms With Guaranteed Sufficient Decrease}, Author = {Jorge J. More and David J. Thuente and Preprint Mcs-p}, Journal = {ACM Trans. Math. Software}, Year = {1992}, Pages = {286--307}, Volume = {20} } @Article{DEoptimJSS11, Title = {{DEoptim}: An {R} Package for Global Optimization by Differential Evolution}, Author = {Katharine Mullen and David Ardia and David Gil and Donald Windover and James Cline}, Journal = {Journal of Statistical Software}, Year = {2011}, Number = {6}, Pages = {1--26}, Volume = {40}, Url = {http://www.jstatsoft.org/v40/i06/} } @Manual{minpack.lm, Title = {minpack.lm: R interface to the Levenberg-Marquardt nonlinear least-squares algorithm found in MINPACK, plus support for bounds}, Author = {Katharine M. Mullen and Timur V. Elzhov and Ben Bolker}, Note = {R package version 1.1-6}, Year = {2012} } @Manual{p-nnls, Title = {{nnls:} The Lawson-Hanson algorithm for non-negative least squares {(NNLS)}}, Author = {Katharine M. Mullen and Ivo H. M. van Stokkum}, Note = {R package version 1.4}, Year = {2012}, Url = {http://CRAN.R-project.org/package=nnls} } @Article{Mullen2007, Title = {Algorithms for separable nonlinear least squares with application to modelling time-resolved spectra}, Author = {Mullen, Katharine M. and Vengris, Mikas and Stokkum, Ivo H.}, Journal = {J. of Global Optimization}, Year = {2007}, Month = jun, Number = {2}, Pages = {201--213}, Volume = {38}, ISSN = {0925-5001}, Issue_date = {June 2007}, Numpages = {13} } @Manual{LMurphy12, Title = {likelihood: Methods for maximum likelihood estimation}, Author = {Lora Murphy}, Note = {R package version 1.5}, Year = {2012}, Url = {http://CRAN.R-project.org/package=likelihood} } @Manual{p-likelihood, Title = {likelihood: Methods for maximum likelihood estimation}, Author = {Lora Murphy}, Note = {R package version 1.5}, Year = {2012}, Url = {http://CRAN.R-project.org/package=likelihood} } @InProceedings{jn1987termin, Title = {Termination strategies for nonlinear parameter determination}, Author = {John C. Nash}, Booktitle = {Proceedings of the Australian Society for Operations Research Annual Conference}, Year = {1987}, Address = {Melbourne, Australia}, Editor = {Santosh Kumar}, Month = {October}, Pages = {322 -- 334} } @InProceedings{jnCTAC87, Title = {Function minimization on small or special computers}, Author = {John C. Nash}, Booktitle = {Computational Techniques and Applications: CTAC-87}, Year = {1988}, Address = {Amsterdam}, Editor = {Noye, J. and Fletcher, C.}, Pages = {509--516}, Publisher = {Elsevier Science Publishers} } @Book{jncnm79, Title = { Compact numerical methods for computers : linear algebra and function minimisation}, Author = {Nash, J. C.}, Publisher = { Hilger, Bristol : }, Year = {1979 }, Catalogue-url = { http://nla.gov.au/nla.cat-vn1060620 }, ISBN = { 0852743300 }, Language = { English }, Life-dates = { 1979 - }, Pages = { ix, 227 p. : }, Subjects = { Numerical analysis - Data processing. }, Type = { Book } } @Manual{rootoned18, Title = {rootoned: Roots of one-dimensional functions in R-only code}, Author = {John C Nash}, Note = {R package version 2018-7.30}, Year = {2018}, Owner = {john}, Timestamp = {2018.08.29}, Url = {https://r-forge.r-project.org/R/?group_id=395} } @Manual{Nash-snewton, Title = {snewton: Safeguarded Newton and General Gradient Approach for Function Minimization}, Author = {John C. Nash}, Note = {R package version 2017-4.20/r1516}, Year = {2017}, Url = {https://R-Forge.R-project.org/projects/optimizer/} } @Manual{optimr16, Title = {{optimr}: A Replacement and Extension of the 'optim' Function}, Author = {John C Nash}, Year = {2016}, Url = {http://CRAN.R-project.org/package=optimr} } @Article{NashBest14, Title = {On Best Practice Optimization Methods in {R}}, Author = {John C. Nash}, Journal = {Journal of Statistical Software}, Year = {2014}, Number = {2}, Pages = {1--14}, Volume = {60}, Url = {http://www.jstatsoft.org/v60/i02/} } @Book{nlpor14, Title = {{Nonlinear Parameter Optimization Using R Tools}}, Author = {Nash, John C.}, Publisher = {John Wiley \& Sons: Chichester}, Year = {2014}, Month = may, Note = {Companion website (see http://www.wiley.com//legacy/wileychi/nash/). JNfile: 14nlpor.pdf}, ISBN = {978-1-118-56928-3}, Language = {English}, Pages = {304 p.}, Type = {Book}, Url = {http://www.wiley.com//legacy/wileychi/nash/} } @Article{jnsign12, Title = {{Letter: Weigh less in tonnes?}}, Author = {Nash, John C.}, Journal = {Significance}, Year = {2012}, Month = {December}, Number = {6}, Pages = {45}, Volume = {9}, Institution = {{Royal Statistical Society}} } @Manual{p-Rcgmin, Title = {{\pkg{Rcgmin}}: Conjugate Gradient Minimization of Nonlinear Functions with Box Constraints}, Author = {John C. Nash}, Note = {R package version 2011-2.10}, Organization = {Nash Information Services Inc.}, Year = {2011} } @Manual{p-Rvmmin, Title = {{\pkg{Rvmmin}}: Variable Metric Nonlinear Function Minimization with Bounds Constraints}, Author = {John C. Nash}, Note = {R package version 2011-2.25}, Organization = {Nash Information Services Inc.}, Year = {2011} } @Article{nash2000toptenDantzig, Title = {The {Dantzig} Simplex Method for Linear Programming}, Author = {Nash, John C.}, Journal = {Computing in Science and Engineering}, Year = {2000}, Month = {January}, Number = {1}, Pages = {29-31}, Volume = {2}, Address = {Piscataway, NJ, USA}, Publisher = {IEEE Educational Activities Department} } @Article{nashderive95, Title = {Computer algebra systems: DERIVE}, Author = {Nash, John C.}, Journal = {The American Statistician}, Year = {1995}, Month = {February}, Note = {JNFile: ??}, Number = {1}, Pages = {93-99}, Volume = {49} } @Book{cnm79, Title = {Compact Numerical Methods for Computers: Linear Algebra and Function Minimisation}, Author = {John C. Nash}, Publisher = {Adam Hilger}, Year = {1979}, Address = {Bristol}, Note = {Second Edition, 1990, Bristol: Institute of Physics Publications.} } @Book{Nash1979b, Title = {Compact numerical methods for computers : linear algebra and function minimisation}, Author = {Nash, J. C.}, Publisher = {Hilger, Bristol :}, Year = {1979}, Address = {Bristol}, Note = {Second Edition, 1990, Bristol: Institute of Physics Publications.}, __markedentry = {[john:6]}, Catalogue-url = {http://nla.gov.au/nla.cat-vn1060620}, ISBN = {852743300}, Language = {English}, Life-dates = {1979 -}, Owner = {john}, Pages = {ix, 227 p. :}, Subjects = {Numerical analysis - Data processing.}, Timestamp = {2018.11.16}, Type = {Book} } @InProceedings{jnkp79tsl, Title = {Fitting two straight lines}, Author = {Nash, John C. and Kevin Price}, Booktitle = {Proceedings of Computer Science and Statistics: 12th annual Symposium on the Interface : May 10 \& 11, 1979, University of Waterloo, Waterloo, Ontario, Canada, Jane Gentleman (ed.)}, Year = {1979}, Month = {May}, Note = {JNFile: 78Fitting2StraightLines.pdf. Page numbers may be in error. Also Engineering and Statistical Research Institute, Agriculture Canada, Contribution No. I-99, 1978}, Pages = { 363--367 }, Publisher = {University of Waterloo, Ontario, Canada} } @Article{JNRV11, Title = {Unifying Optimization Algorithms to Aid Software System Users: {optimx} for {R}}, Author = {John C. Nash and Ravi Varadhan}, Journal = {Journal of Statistical Software}, Year = {2011}, Month = {8}, Number = {9}, Pages = {1--14}, Volume = {43}, Accepted = {2011-08-05}, Bibdate = {2011-08-05}, Coden = {JSSOBK}, Day = {24}, ISSN = {1548-7660}, Submitted = {2010-08-12}, Url = {http://www.jstatsoft.org/v43/i09/} } @Article{jnrv2011JSSOBKv43i09, Title = {Unifying Optimization Algorithms to Aid Software System Users: optimx for {R}}, Author = {John C. Nash and Ravi Varadhan}, Journal = {Journal of Statistical Software}, Year = {2011}, Month = {8}, Number = {9}, Pages = {1--14}, Volume = {43}, Accepted = {2011-08-05}, Bibdate = {2011-08-05}, Coden = {JSSOBK}, Day = {24}, ISSN = {1548-7660}, Submitted = {2010-08-12}, Url = {http://www.jstatsoft.org/v43/i09} } @Manual{p-optimx, Title = {\pkg{optimx}: A Replacement and Extension of the {optim()} function}, Author = {John C Nash and Ravi Varadhan}, Note = {R package version 2011-3.5}, Organization = {Nash Information Services Inc. and Johns Hopkins University}, Year = {2011} } @Book{jnmws87, Title = {{Nonlinear Parameter Estimation: An Integrated System in BASIC}}, Author = {John C. Nash and Mary Walker-Smith}, Publisher = {Marcel Dekker}, Year = {1987}, Address = {New York}, Note = {See \url{http://www.nashinfo.com/nlpe.htm} for an expanded downloadable version.} } @InBook{SGN83, Author = {Stephen G. Nash}, Chapter = {Truncated-Newton Methods for Large-Scale Minimization}, Editor = {H. E. Rauch}, Pages = {91--100}, Booktitle = {Applications of Nonlinear Programming to Optimization and Control} } @Article{NashTN2000, Title = {A survey of truncated-{Newton} methods}, Author = {Stephen G. Nash}, Journal = {Journal of Computational and Applied Mathematics}, Year = {2000}, Pages = {45--59}, Volume = {124} } @Article{NelderMead65, Title = {A Simplex Method for Function Minimization}, Author = {J. A. Nelder and R. Mead}, Journal = {Computer Journal}, Year = {1965}, Month = {January}, Number = {4}, Pages = {308--313}, Volume = {7} } @Misc{RExcel:2014, Title = {{RExcel}}, Author = {Erich Neuwirth}, Year = {2014}, Url = {http://rcom.univie.ac.at} } @TechReport{Nielsen2000, Title = {{UCMINF} - an Algorithm for Unconstrained, Nonlinear Optimization}, Author = {H. B. Nielsen}, Institution = {{ Department of Mathematical Modelling, Technical University of Denmark.}}, Year = {2000}, Month = {dec}, Note = {Report IMM-REP-2000-18}, Pages = {24}, Url = {http://www2.imm.dtu.dk/~hbn/publ/TR0019.ps} } @Manual{p-ucminf, Title = {ucminf: General-purpose unconstrained non-linear optimization}, Author = {Hans Bruun Nielsen and Stig Bousgaard Mortensen}, Note = {R package version 1.1-3}, Year = {2012}, Url = {http://CRAN.R-project.org/package=ucminf} } @Article{OlearyRust13, Title = {Variable projection for nonlinear least squares problems}, Author = {O'Leary, Dianne P. and Rust, Bert W.}, Journal = {Computational Optimization and Applications}, Year = {2013}, Number = {3}, Pages = {579-593}, Volume = {54}, ISSN = {0926-6003}, Publisher = {Springer US} } @Article{Pachon2009, Title = {{Barycentric-Remez algorithms for best polynomial approximation in the chebfun system}}, Author = {Pach\'{o}n, R. and Trefethen, L. N.}, Journal = {BIT Numerical Mathematics}, Year = {2009}, Number = {4}, Pages = {721--741}, Volume = {49}, Doi = {10.1007/s10543-009-0240-1}, Url = {http://www.springerlink.com/index/10.1007/s10543-009-0240-1} } @Misc{genstat, Title = {GenStat for Windows (12th Edition) Introduction}, Author = {R.W. Payne and D.A. Murray and S.A. Harding and D.B. Baird and D.M. Soutar}, Year = {2009}, __markedentry = {[john:6]}, Address = {Hemel Hempstead}, Owner = {john}, Publisher = {VSN International}, Timestamp = {2018.11.16} } @Misc{Payne2009, Title = {GenStat for Windows (12th Edition) Introduction}, Author = {R.W. Payne and D.A. Murray and S.A. Harding and D.B. Baird and D.M. Soutar}, Year = {2009}, Address = {Hemel Hempstead}, Publisher = {VSN International} } @Book{Pereyra10, Title = {Exponential Data Fitting and its Applications}, Author = {Pereyra, Victor and Scherer, Godela}, Publisher = {Bentham Science Publishers}, Year = {2010}, Address = {Sharjah} } @Manual{p-nlme, Title = {nlme: Linear and Nonlinear Mixed Effects Models}, Author = {Jose Pinheiro and Douglas Bates and Saikat DebRoy and Deepayan Sarkar and {R Core Team}}, Note = {R package version 3.1-111}, Year = {2013} } @Misc{Powell, Title = {Direct search algorithms for optimization calculations}, Author = {Powell,M. J. D.}, __markedentry = {[john:6]}, Doi = {10.1017/S0962492900002841}, Eprint = {http://journals.cambridge.org/article\_S0962492900002841}, ISSN = {1474-0508}, Journal = {Acta Numerica}, Numpages = {50}, Owner = {john}, Pages = {287--336}, Timestamp = {2018.11.16}, Url = {http://dx.doi.org/10.1017/S0962492900002841}, Volume = {7} } @Misc{Powell98, Title = {Direct search algorithms for optimization calculations}, Author = {Powell,M. J. D.}, Doi = {10.1017/S0962492900002841}, Eprint = {http://journals.cambridge.org/article\_S0962492900002841}, ISSN = {1474-0508}, Journal = {Acta Numerica}, Numpages = {50}, Pages = {287--336}, Url = {http://dx.doi.org/10.1017/S0962492900002841}, Volume = {7} } @Misc{Powell09, Title = {{The BOBYQA algorithm for bound constrained optimization without derivatives}}, Author = {Powell, M. J. D.}, Month = aug, Year = {2009}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16}, Url = {http://www.damtp.cam.ac.uk/user/na/NA\_papers/NA2009\_06.pdf} } @Misc{Powell2009, Title = {{The BOBYQA algorithm for bound constrained optimization without derivatives}}, Author = {Powell, M. J. D.}, Month = aug, Year = {2009}, Url = {http://www.damtp.cam.ac.uk/user/na/NA\_papers/NA2009\_06.pdf} } @Article{Powell07, Title = {{Developments of NEWUOA for Minimization Without Derivatives}}, Author = {Powell, M. J. D.}, Journal = {IMA Journal of Numerical Analysis}, Year = {2008}, Number = {4}, Pages = {649-664}, Volume = {28} } @Article{Powell06, Title = {The {NEWUOA} software for unconstrained optimization without derivatives}, Author = {M. J. D. Powell}, Journal = {Large Scale Nonlinear Optimization}, Year = {2006}, Pages = {255--297}, Date-added = {2008-11-26 00:45:42 +0100}, Date-modified = {2008-11-26 00:52:47 +0100} } @Article{Powell02, Title = {UOBYQA: unconstrained optimization by quadratic approximation}, Author = {M. J. D. Powell}, Journal = {Mathematical Programming}, Year = {2002}, Month = {May}, Number = {3}, Pages = {555--582}, Volume = {92}, ISSN = {0025-5610}, Keywords = {approximation}, Posted-at = {2010-08-31 04:22:15}, Priority = {2}, Publisher = {Springer Berlin / Heidelberg}, Url = {http://dx.doi.org/10.1007/s101070100290} } @Book{DEbook6, Title = {{D}ifferential {E}volution - A Practical Approach to Global Optimization}, Author = {Kenneth V. Price and Rainer M. Storn and Jouni A. Lampinen}, Publisher = {Springer-Verlag}, Year = {2006}, Address = {New York}, Month = jan, Note = {ISBN 540209506}, Series = {Natural Computing}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16} } @Book{Price2006, Title = {{D}ifferential {E}volution - A Practical Approach to Global Optimization}, Author = {Kenneth V. Price and Rainer M. Storn and Jouni A. Lampinen}, Publisher = {Springer-Verlag}, Year = {2006}, Month = {January}, Note = {ISBN 540209506}, Series = {Natural Computing} } @Book{Price05, Title = {Differential Evolution - A Practical Approach to Global Optimization}, Author = {K. V. Price and R. M. Storn and J. A. Lampinen}, Publisher = {Springer}, Year = {2005}, Address = {New York} } @Article{Price77, Title = {A Controlled Random Search Procedure for Global Optimisation}, Author = {Wyn L. Price}, Journal = {Computer Journal}, Year = {1977}, Number = {4}, Pages = {367-370}, Volume = {20}, Bibsource = {DBLP, http://dblp.uni-trier.de} } @Misc{FAQ731, Author = {{R Core Team}}, Year = {2017}, Address = {Vienna, Austria}, Organization = {R Foundation for Statistical Computing}, Url = {https://cran.r-project.org/doc/FAQ/R-FAQ.html\#Why-doesn\_0027t-R-think-these-numbers-are-equal\_003f} } @Manual{citeR, Title = {R: A Language and Environment for Statistical Computing}, Address = {Vienna, Austria}, Author = {{R Core Team}}, Organization = {R Foundation for Statistical Computing}, Year = {2013}, Url = {http://www.R-project.org/} } @Manual{Rcite, Title = {{R}: A Language and Environment for Statistical Computing}, Address = {Vienna, Austria}, Author = {{R Development Core Team}}, Note = {{ISBN} 3-900051-07-0}, Organization = {R Foundation for Statistical Computing}, Year = {2008}, Url = {http://www.R-project.org} } @Article{FletPow63, Title = {A rapidly convergent descent method for minimization}, Author = { R. Fletcher, R. and Powell, M. J. D.}, Journal = {Computer Journal}, Year = {1963}, Pages = {163--168}, Volume = {6}, Doi = {10.2172/4222000}, Place = {United States} } @InProceedings{Rajnarayan2006, Title = {Optimization Under Uncertainty Using Probability Collectives}, Author = {Rajnarayan, D. and Wolpert, D.H. and Kroo, I.}, Booktitle = {{Proceedings of 11th AIAA/ISSMO Multidisciplinary Analysis and Optimization Conference, Portsmouth, VA}}, Year = {2006}, Note = {{AIAA-2006-7033}} } @Book{Ratkowsky83, Title = {Nonlinear Regression Modeling: A Unified Practical Approach}, Author = {David A. Ratkowsky}, Publisher = {Marcel Dekker Inc.}, Year = {1983}, Address = {New York and Basel} } @Article{Swendsen86, Title = {Replica Monte Carlo simulation of spin glasses}, Author = {Swendsen RH and Wang JS}, Journal = { Physical Review Letters}, Year = {1986}, Pages = {2607--2609}, Volume = {57} } @Book{RitzStreibig2008, Title = {Nonlinear Regression with R}, Author = {C. Ritz and J. C. Streibig}, Publisher = {Springer}, Year = {2008}, Address = {New York} } @Article{Rosenbrock60, Title = {An automatic method for finding the greatest or least value of a function}, Author = {Rosenbrock, H. H.}, Journal = {The Computer Journal}, Year = {1960}, Pages = {175–184}, Volume = {3} } @Book{Ross90, Title = {Nonlinear estimation.}, Author = {Ross, Gavin J.S.}, Publisher = {New York etc.: Springer-Verlag}, Year = {1990}, ISBN = {3-540-97278-1}, Pages = {viii, 189 p.} } @Article{Schnabel1985, Title = {A modular system of algorithms for unconstrained minimization}, Author = {Schnabel, Robert B. and Koonatz, John E. and Weiss, Barry E.}, Journal = {ACM Trans. Math. Softw.}, Year = {1985}, Month = dec, Note = {Original report CU-CS-480-82 from 1982, revised. The UNCMIN Manual.}, Number = {4}, Pages = {419--440}, Volume = {11}, __markedentry = {[john:6]}, Acmid = {6192}, Address = {New York, NY, USA}, Doi = {10.1145/6187.6192}, ISSN = {0098-3500}, Issue_date = {Dec. 1985}, Numpages = {22}, Owner = {john}, Publisher = {ACM}, Timestamp = {2018.11.16}, Url = {http://doi.acm.org/10.1145/6187.6192} } @Article{Schnabel85, Title = {A Modular System of Algorithms for Unconstrained Minimization}, Author = {Robert B. Schnabel and John E. Koontz and Barry E. Weiss}, Journal = {ACM Transactions on Mathematical Software}, Year = {1985}, Month = dec, Number = {4}, Pages = {419--440}, Volume = {11} } @Manual{p-PBSadmb, Title = {PBSadmb: ADMB for R Using Scripts or GUI}, Author = {Jon T. Schnute and Rowan Haigh and Alex Couture-Beil}, Note = {R package version 0.66.87}, Year = {2013}, Url = {http://CRAN.R-project.org/package=PBSadmb} } @Article{p-GA, Title = {{GA}: A Package for Genetic Algorithms in {R}}, Author = {Luca Scrucca}, Journal = {Journal of Statistical Software}, Year = {2013}, Number = {4}, Pages = {1--37}, Volume = {53}, Url = {http://www.jstatsoft.org/v53/i04/} } @Book{Seber89Wild, Title = {{Nonlinear regression}}, Author = {Seber, G. A. F. and Wild, C. J.}, Publisher = {Wiley}, Year = {1989}, Address = {New York} } @Article{rgenoudpolitical, Title = {Genetic Optimization Using Derivatives: Theory and Application to Nonlinear Models}, Author = {Jasjeet S. Sekhon and Walter R. {Mebane, Jr.}}, Journal = {Political Analysis}, Year = {1998}, Pages = {189--213}, Volume = {7} } @Article{Shanno70A, Title = {Conditioning of quasi-Newton methods for function minimization}, Author = {Shanno, David F.}, Journal = {Mathematics of Computation}, Year = {1970}, Number = {111}, Pages = {647--656}, Volume = {24} } @Article{Shanno70B, Title = {Optimal conditioning of quasi-Newton methods}, Author = {Shanno, David F. and Kettler, Paul C.}, Journal = {Mathematics of Computation}, Year = {1970}, Month = jul, Number = {111}, Pages = {657--664}, Volume = {24} } @Article{Shrager85RRR, Title = {A Rapid Robust Rootfinder}, Author = {Richard I. Shrager}, Journal = {Mathematics of Computation}, Year = {1985}, Month = jan, Number = {169}, Pages = {151--165}, Volume = {44} } @Manual{Soetaert-rootSolve, Title = {rootSolve: Nonlinear root finding, equilibrium and steady-state analysis of ordinary differential equations }, Author = {Karline Soetaert}, Note = {R package 1.6}, Year = {2009}, Owner = {john}, Timestamp = {2018.08.29} } @Book{Soetaert2009, Title = {A Practical Guide to Ecological Modelling. Using R as a Simulation Platform}, Author = {Karline Soetaert and Peter M.J. Herman}, Publisher = {Springer}, Year = {2009}, Note = {ISBN 978-1-4020-8623-6}, Owner = {john}, Pages = {372}, Timestamp = {2018.08.29} } @Article{Squire98, Title = {Using Complex Variables to Estimate Derivatives of Real Functions}, Author = {Squire, William and Trapp, George}, Journal = {SIAM Review}, Year = {1998}, Month = mar, Number = {1}, Pages = {110--112}, Volume = {40}, Issue_date = {March 1998} } @Misc{stata, Title = {Stata Statistical Software: Release 11}, Author = {StataCorp}, Year = {2009}, __markedentry = {[john:6]}, Address = {College Station, TX}, Owner = {john}, Publisher = {StataCorp LP}, Timestamp = {2018.11.16} } @Misc{StataCorp2009, Title = {Stata Statistical Software: Release 11}, Author = {StataCorp}, Year = {2009}, Address = {College Station, TX}, Publisher = {StataCorp LP} } @Article{TZ89, Title = {{Global Optimization}}, Author = {A. T\"{o}rn and A. Zilinskas}, Journal = {{Lecture Notes in Computer Science}}, Year = {1989}, Volume = {350}, Address = {New York, NY, USA}, Publisher = {{Springer-Verlag}} } @Manual{p-gaoptim, Title = {gaoptim: Genetic Algorithm optimization for real-based and permutation-based problems}, Author = {Fernando Tenorio}, Note = {R package version 1.1}, Year = {2013}, Url = {http://CRAN.R-project.org/package=gaoptim} } @Article{Thacher1960, Title = {Remark on Algorithm 2: Rootfinder}, Author = {Thacher,Jr., Henry D.}, Journal = {Commun. ACM}, Year = {1960}, Month = aug, Number = {8}, Pages = {475--}, Volume = {3}, Acmid = {367385}, Address = {New York, NY, USA}, Doi = {10.1145/367368.367385}, ISSN = {0001-0782}, Issue_date = {Aug. 1960}, Owner = {john}, Publisher = {ACM}, Timestamp = {2018.08.29}, Url = {http://doi.acm.org/10.1145/367368.367385} } @Manual{p-Rglpk, Title = {Rglpk: R/GNU Linear Programming Kit Interface}, Author = {Stefan Theussl and Kurt Hornik}, Note = {R package version 0.5-1}, Year = {2013}, Url = {http://CRAN.R-project.org/package=Rglpk} } @Article{TienEarn10, Title = {Multiple transmission pathways and disease dynamics in a waterborne pathogen model}, Author = {J H Tien and D J D Earn}, Journal = {Bulletin of Mathematical Biology}, Year = {2010}, Number = {6}, Pages = {1506--1533}, Volume = {72} } @Article{Toomet2008, Title = {Sample Selection Models in R: Package sampleSelection}, Author = {Ott Toomet and Arne Henningsen}, Journal = {Journal of Statistical Software}, Year = {2008}, Month = {7}, Number = {7}, Pages = {1--23}, Volume = {27}, Day = {29} } @Article{Torczon95patternsearch, Title = {Pattern Search Methods for Nonlinear Optimization}, Author = {Virginia Torczon}, Journal = {SIAG/OPT Views and News}, Year = {1995}, Pages = {7--11}, Volume = {6} } @Manual{p-gnm, Title = {Generalized nonlinear models in R: An overview of the gnm package}, Author = {Heather Turner and David Firth}, Note = {R package version 1.0-6}, Year = {2012}, Url = {http://CRAN.R-project.org/package=gnm} } @Manual{p-alabama, Title = {alabama: Constrained nonlinear optimization}, Author = {Ravi Varadhan}, Note = {R package version 2011.9-1}, Year = {2012}, Url = {http://CRAN.R-project.org/package=alabama} } @Manual{p-dfoptim, Title = {dfoptim: Derivative-free Optimization}, Author = {Ravi Varadhan and Hans W. Borchers}, Note = {R package version 2011.12-9}, Organization = {Johns Hopkins University and ABB Corporate Research.}, Year = {2011}, Url = {http://CRAN.R-project.org/package=dfoptim} } @Article{p-BB, Title = {{\pkg{BB}}: An {\R} Package for Solving a Large System of Nonlinear Equations and for Optimizing a High-Dimensional Nonlinear Objective Function}, Author = {Ravi Varadhan and Paul Gilbert}, Journal = {Journal of Statistical Software}, Year = {2009}, Number = {4}, Pages = {1--26}, Volume = {32}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16}, Url = {http://www.jstatsoft.org/v32/i04/} } @Article{Vara09, Title = {{BB}: An {\R} Package for Solving a Large System of Nonlinear Equations and for Optimizing a High-Dimensional Nonlinear Objective Function}, Author = {Ravi Varadhan and Paul Gilbert}, Journal = {Journal of Statistical Software}, Year = {2009}, Number = {4}, Pages = {1--26}, Volume = {32}, Url = {http://www.jstatsoft.org/v32/i04/} } @Article{Varadhan2009, Title = {{\pkg{BB}}: An {\R} Package for Solving a Large System of Nonlinear Equations and for Optimizing a High-Dimensional Nonlinear Objective Function}, Author = {Ravi Varadhan and Paul Gilbert}, Journal = {Journal of Statistical Software}, Year = {2009}, Number = {4}, Pages = {1--26}, Volume = {32}, Url = {http://www.jstatsoft.org/v32/i04/} } @Book{SAS, Title = {SAS}, Author = {various}, Publisher = {SAS Institute Inc.}, Address = {Cary, NC} } @Book{various, Title = {SAS}, Author = {various}, Publisher = {SAS Institute Inc.}, Address = {Cary, NC} } @Book{VenRip1994, Title = {Modern Applied Statistics with {S-PLUS}}, Author = {William N. Venables and Brian D. Ripley}, Publisher = {Springer-Verlag}, Year = {1994}, Address = {Berlin, Germany~/ London, UK}, Pages = {xii + 462} } @Article{WatsonHompack97, Title = {Algorithm 777: HOMPACK90: a suite of Fortran 90 codes for globally convergent homotopy algorithms}, Author = {Watson, Layne T. and Sosonkina, Maria and Melville, Robert C. and Morgan, Alexander P. and Walker, Homer F.}, Journal = {ACM Trans. Math. Softw.}, Year = {1997}, Month = dec, Number = {4}, Pages = {514--549}, Volume = {23}, Address = {New York, NY, USA}, ISSN = {0098-3500}, Issue_date = {Dec. 1997}, Numpages = {36}, Publisher = {ACM} } @Article{Wegstein1960, Title = {Certification: Rootfinder}, Author = {Wegstein, J. and Thacher,Jr., Henry C.}, Journal = {Commun. ACM}, Year = {1960}, Month = jun, Number = {6}, Pages = {354--}, Volume = {3}, Acmid = {367337}, Address = {New York, NY, USA}, Doi = {10.1145/367297.367337}, ISSN = {0001-0782}, Issue_date = {June 1960}, Owner = {john}, Publisher = {ACM}, Timestamp = {2018.08.29}, Url = {http://doi.acm.org/10.1145/367297.367337} } @Article{Wenzel99, Title = {Stochastic Tunneling Approach for Global Minimization of Complex Potential Energy Landscapes}, Author = {Wenzel, W. and Hamacher, K.}, Journal = {Phys. Rev. Lett.}, Year = {1999}, Month = {Apr}, Pages = {3003--3007}, Volume = {82}, Doi = {10.1103/PhysRevLett.82.3003}, Issue = {15}, Publisher = {American Physical Society}, Url = {http://link.aps.org/doi/10.1103/PhysRevLett.82.3003} } @Article{Wilkinson1961, Title = {Remarks on Algorithms 2 and 3}, Author = {Wilkinson, J. H.}, Journal = {Commun. ACM}, Year = {1961}, Month = mar, Number = {3}, Pages = {153--}, Volume = {4}, Acmid = {366273}, Address = {New York, NY, USA}, Doi = {10.1145/366199.366273}, ISSN = {0001-0782}, Issue_date = {March 1961}, Owner = {john}, Publisher = {ACM}, Timestamp = {2018.08.29} } @Book{WilkinsonReinsch1971, Title = {Handbook for Automatic Computation: Linear Algebra (Grundlehren Der Mathematischen Wissenschaften, Vol 186)}, Author = {Wilkinson, J. H. and Reinsch, C. and Bauer, F. L.}, Publisher = {SpringerVerlag}, Year = {1986}, ISBN = {387054146} } @Book{Mathematica4, Title = {The Mathematica Book}, Author = {Stephen Wolfram}, Publisher = {Wolfram Research Inc.}, Year = {2000} } @Article{GenSA13, Title = { Generalized Simulated Annealing for Global Optimization: the GenSA Package for R }, Author = { Yang Xiang and Sylvain Gubian and Brian Suomela and Julia Hoeng }, Journal = { The R Journal }, Year = { 2013 }, Month = jun, Number = { 1 }, Pages = { 13--29 }, Volume = { 5 }, Url = { http://journal.r-project.org/archive/2013-1/xiang-gubian-suomela-etal.pdf } } @Article{Xiang2013, Title = {Generalized Simulated Annealing for Global Optimization: the GenSA Package for R}, Author = {Yang Xiang and Sylvain Gubian and Brian Suomela and Julia Hoeng}, Journal = {The R Journal}, Year = {2013}, Month = jun, Number = {1}, Pages = {13--29}, Volume = {5}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16}, Url = {http://journal.r-project.org/archive/2013-1/xiang-gubian-suomela-etal.pdf} } @InCollection{Xie-reproducible, Title = {knitr: A Comprehensive Tool for Reproducible Research in {R}}, Author = {Yihui Xie}, Booktitle = {Implementing Reproducible Computational Research}, Publisher = {Chapman and Hall/CRC}, Year = {2014}, Editor = {Victoria Stodden and Friedrich Leisch and Roger D. Peng}, Note = {ISBN 978-1466561595}, Url = {http://www.crcpress.com/product/isbn/9781466561595} } @Manual{Xie-knitr, Title = {knitr: A General-Purpose Package for Dynamic Report Generation in R}, Author = {Yihui Xie}, Note = {R package version 1.20}, Year = {2018}, Url = {https://yihui.name/knitr/} } @Book{Xie-Dynamic, Title = {Dynamic Documents with {R} and knitr}, Author = {Yihui Xie}, Publisher = {Chapman and Hall/CRC}, Year = {2015}, Address = {Boca Raton, Florida}, Edition = {2nd}, Note = {ISBN 978-1498716963}, Url = {https://yihui.name/knitr/} } @PhdThesis{Ye1987, Title = {Interior Algorithms for Linear, Quadratic, and Linearly Constrained Non-Linear Programming}, Author = {Yinyu Ye}, School = {Department of EES, Stanford University}, Year = {1987}, Address = {Palo Alto, California}, Note = {Ph. D. Dissertation}, __markedentry = {[john:6]}, Owner = {john}, Timestamp = {2018.11.16} } @PhdThesis{Ye1987a, Title = {Interior Algorithms for Linear, Quadratic, and Linearly Constrained Non-Linear Programming}, Author = {Yinyu Ye}, School = {Department of EES, Stanford University}, Year = {1987}, Address = {Palo Alto, California}, Note = {Ph. D. Dissertation} } @Manual{p-nloptr, Title = {nloptr: \R\ interface to {NLopt}}, Author = {Jelmer Ypma}, Note = {R package version 0.9.3}, Year = {2013}, Url = {http://CRAN.R-project.org/package=nloptr} } @Article{Zhu1997LBFGS, Title = {Algorithm 778: {L-BFGS-B}: Fortran subroutines for large-scale bound-constrained optimization}, Author = {Zhu, Ciyou and Byrd, Richard H. and Lu, Peihuang and Nocedal, Jorge}, Journal = {ACM Trans. Math. Softw.}, Year = {1997}, Month = dec, Number = {4}, Pages = {550--560}, Volume = {23}, Acmid = {279236}, Address = {New York, NY, USA}, Doi = {10.1145/279232.279236}, ISSN = {0098-3500}, Issue_date = {Dec. 1997}, Keywords = {large-scale optimization, limited-memory method, nonlinear optimization, variable metric method}, Numpages = {11}, Publisher = {ACM}, Url = {http://doi.acm.org/10.1145/279232.279236} } @Book{Rauch83, Title = {Applications of Nonlinear Programming to Optimization and Control}, Editor = {H. E. Rauch}, Publisher = {Pergamon Press}, Year = {1983}, Address = {Oxford}, Booktitle = {Applications of Nonlinear Programming to Optimization and Control} } lbfgsb3c/vignettes/jrosen.f0000644000176200001440000000047313513624255015430 0ustar liggesusers subroutine rosen(n, x, fval) double precision x(n), fval, dx integer n, i fval = 0.0D0 do 10 i=1,(n-1) dx = x(i + 1) - x(i) * x(i) fval = fval + 100.0 * dx * dx dx = 1.0 - x(i) fval = fval + dx * dx 10 continue return end lbfgsb3c/NEWS0000644000176200001440000000074713511470416012450 0ustar liggesusersTo do Add test using a plain C function for optimization. lbfgsb3c is supposed to handle this. -------------------------------------------------------------- 2019-03-19 o Packages lbfgsb3 and lbfgsb3c merged into latter. Vignette added. o Suppressed printout when trace>2 and starting (f not defined) 2015-01-20 o Fixup line longer than 72 chars in lbfgsb.f. Undeclared integer itask in errclb subroutine. Thanks to Berend Hasselman. New package lbfgsb3 2014.7.31 lbfgsb3c/R/0000755000176200001440000000000013625774732012160 5ustar liggesuserslbfgsb3c/R/lbfgsb3.R0000644000176200001440000002132113625545750013620 0ustar liggesusers##' @importFrom Rcpp evalCpp ##' @importFrom methods is ##' @useDynLib lbfgsb3c, .registration=TRUE "lbfgsb3c" ##' Interfacing wrapper for the Nocedal - Morales LBFGSB3 (Fortran) limited memory BFGS solver. ##' ##' @param par A parameter vector which gives the initial guesses to ##' the parameters that will minimize \code{fn}. This can be ##' named, for example, we could use par=c(b1=1, b2=2.345, ##' b3=0.123) ##' @param fn A function that evaluates the objective function to be ##' minimized. This can be a R function or a Rcpp function ##' pointer. ##' @param gr If present, a function that evaluates the gradient ##' vector for the objective function at the given parameters ##' computing the elements of the sum of squares function at the ##' set of parameters \code{start}. This can be a R function or a ##' Rcpp function pointer. ##' @param lower Lower bounds on the parameters. If a single number, ##' this will be applied to all parameters. Default -Inf. ##' @param upper Upper bounds on the parameters. If a single number, ##' this will be applied to all parameters. Default Inf. ##' @param control An optional list of control settings. See below in ##' details. ##' @param ... Any data needed for computation of the objective ##' function and gradient. ##' @param rho An Environment to use for function evaluation. If ##' present the arguments in ... are ignored. Otherwise the ##' ... are converted to an environment for evaluation. ##' @details ##' ##' See the notes below for a general appreciation of this package. ##' ##' The control list can contain: ##' \itemize{ ##' \item{trace} If positive, tracing information on the progress of the optimization is produced. Higher values may produce more tracing information: for method "L-BFGS-B" there are six levels of tracing. (To understand exactly what these do see the source code: higher levels give more detail.) ##' \item{factr} controls the convergence of the "L-BFGS-B" method. Convergence occurs when the reduction in the objective is within this factor of the machine tolerance. Default is 1e7, that is a tolerance of about 1e-8. ##' \item{pgtol} helps control the convergence of the "L-BFGS-B" method. It is a tolerance on the projected gradient in the current search direction. This defaults to zero, when the check is suppressed. ##' \item{abstol} helps control the convergence of the "L-BFGS-B" method. It is an absolute tolerance difference in x values. This defaults to zero, when the check is suppressed. ##' \item{reltol} helps control the convergence of the "L-BFGS-B" method. It is an relative tolerance difference in x values. This defaults to zero, when the check is suppressed. ##' \item{lmm} is an integer giving the number of BFGS updates retained in the "L-BFGS-B" method, It defaults to 5. ##' \item{maxit} maximum number of iterations. ##' \item{iprint} Provided only for compatibility with older codes. This control is no longer active.) ##' \item{info} a boolean to indicate if more optimization information is captured and output in a $info list ##' } ##' ##' @return ##' A list of the following items ##' \itemize{ ##' \item{par} The best set of parameters found. ##' \item{value} The value of fn corresponding to par. ##' \item{counts} A two-element integer vector giving the number of calls to fn and gr respectively. This excludes any calls to fn to compute a finite-difference approximation to the gradient. ##' \item{convergence} An integer code. 0 indicates successful completion ##' } ##' @seealso Packages \code{\link{optim}} and \code{optimx}. ##' @keywords nonlinear parameter optimization ##' @author Matthew Fidler (move to C and add more options for adjustments), ##' John C Nash (of the wrapper and edits to Fortran code to allow R output) ##' Ciyou Zhu, Richard Byrd, Jorge Nocedal, Jose Luis Morales (original Fortran packages) ##' ##' @references ##' Morales, J. L.; Nocedal, J. (2011). "Remark on 'algorithm 778: L-BFGS-B: ##' Fortran subroutines for large-scale bound constrained optimization' ". ##' ACM Transactions on Mathematical Software 38: 1. ##' ##' Byrd, R. H.; Lu, P.; Nocedal, J.; Zhu, C. (1995). "A Limited Memory Algorithm ##' for Bound Constrained Optimization". SIAM J. Sci. Comput. 16 (5): 1190-1208. ##' ##' Zhu, C.; Byrd, Richard H.; Lu, Peihuang; Nocedal, Jorge (1997). "L-BFGS-B: ##' Algorithm 778: L-BFGS-B, FORTRAN routines for large scale bound constrained ##' optimization". ACM Transactions on Mathematical Software 23 (4): 550-560. ##' ##' @note ##' This package is a wrapper to the Fortran code released by Nocedal and Morales. ##' This poses several difficulties for an R package. While the \code{.Fortran()} ##' tool exists for the interfacing, we must be very careful to align the arguments ##' with those of the Fortran subroutine, especially in type and storage. ##' ##' A more annoying task for interfacing the Fortran code is that Fortran WRITE or ##' PRINT statements must all be replaced with calls to special R-friendly output ##' routines. Unfortunately, the Fortran is full of output statements. Worse, we may ##' wish to be able to suppress such output, and there are thus many modifications ##' to be made. This means that an update of the original code cannot be simply ##' plugged into the R package \code{src} directory. ##' ##' Finally, and likely because L-BFGS-B has a long history, the Fortran code is far ##' from well-structured. For example, the number of function and gradient evaluations ##' used is returned as the 34'th element of an integer vector. There does not appear ##' to be an easy way to stop the program after some maximum number of such evaluations ##' have been performed. ##' ##' On the other hand, the version of L-BFGS-B in \code{optim()} is a \code{C} translation ##' of a now-lost Fortran code. It does not implement the improvements Nocedal and ##' Morales published in 2011. Hence, despite its deficiencies, this wrapper has been ##' prepared. ##' ##' In addition to the above reasons for the original lbfgsb3 package, ##' this additional package allows C calling of L-BFGS-B 3.0 by a ##' program as well as adjustments to the tolerances that were not ##' present in the original CRAN package. Also adjustments were made ##' to have outputs conform with R's optim routine. ##' @examples ##' # Rosenbrock's banana function ##' n=3; p=100 ##' ##' fr = function(x) ##' { ##' f=1.0 ##' for(i in 2:n) { ##' f=f+p*(x[i]-x[i-1]**2)**2+(1.0-x[i])**2 ##' } ##' f ##' } ##' ##' grr = function(x) ##' { ##' g = double(n) ##' g[1]=-4.0*p*(x[2]-x[1]**2)*x[1] ##' if(n>2) { ##' for(i in 2:(n-1)) { ##' g[i]=2.0*p*(x[i]-x[i-1]**2)-4.0*p*(x[i+1]-x[i]**2)*x[i]-2.0*(1.0-x[i]) ##' } ##' } ##' g[n]=2.0*p*(x[n]-x[n-1]**2)-2.0*(1.0-x[n]) ##' g ##' } ##' x = c(a=1.02, b=1.02, c=1.02) ##' (opc <- lbfgsb3c(x,fr, grr)) ##' (op <- lbfgsb3(x,fr, grr, control=list(trace=1))) ##' (opx <- lbfgsb3x(x,fr, grr)) ##' (opf <- lbfgsb3f(x,fr, grr)) ##' @export lbfgsb3c <- function(par, fn, gr=NULL, lower = -Inf, upper = Inf, control=list(), ..., rho=NULL){ # control defaults -- idea from spg ctrl <- list(trace= 0L, maxit=100L, iprint= -1L, lmm=5, factr=1e7, pgtol=0, reltol=0, abstol=0, info=FALSE); callstak <- sys.calls() # get the call stack lcs <- length(callstak) fstr <- as.character(callstak[lcs]) fstr <- strsplit(fstr, "(", fixed=TRUE)[[1]][1] if (ctrl$trace > 0) { cat("Using function ",fstr,"\n") } if ( (fstr == "lbfgsb3") || (fstr == "lbfgsb3f") ) { ctrl$info <- TRUE } # This emits more information from lbfgsb3 Fortran code. namc <- names(control) if (!all(namc %in% names(ctrl))) stop("unknown names in control: ", namc[!(namc %in% names(ctrl))]) ctrl[namc] <- control if (missing(rho)){ rho <- as.environment(list(...)); } if (is.null(gr)){ gr <- function(x, ...){ numDeriv::grad(fn, x, ...); } } if (is(fn, "function") & is (gr, "function")){ ## cat("USING fnR, grR\n") fnR <- function(x, rho){ do.call(fn, c(list(x), as.list(rho))); } grR <- function(x, rho){ do.call(gr, c(list(x), as.list(rho))); } return(lbfgsb3cpp(par, fnR, grR, lower, upper, ctrl, rho)); } else { return(lbfgsb3cpp(par, fn, gr, lower, upper, ctrl, rho)); } } # end of lbfgsb3() ##'@rdname lbfgsb3c ##'@export lbfgsb3 <- lbfgsb3c ##'@rdname lbfgsb3c ##'@export lbfgsb3f <- lbfgsb3c ##'@rdname lbfgsb3c ##'@export lbfgsb3x <- lbfgsb3c lbfgsb3c/R/RcppExports.R0000644000176200001440000000041113625774732014570 0ustar liggesusers# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 lbfgsb3cpp <- function(par, fn, gr, lower, upper, ctrl, rho) { .Call(`_lbfgsb3c_lbfgsb3cpp`, par, fn, gr, lower, upper, ctrl, rho) } lbfgsb3c/MD50000644000176200001440000000303213627435412012254 0ustar liggesuserse5387fddc4ecde8a6dee0ae6fd0e6c02 *DESCRIPTION f8f501c3f84d5b90345eb1b3ad757c5a *LICENSE.note b20fdc1819c0d30c2316bf678f98235d *NAMESPACE e8bb773781afe8bc4b51a4ba7062b553 *NEWS 253afb08ed03e672e1d6e3cb732433c1 *R/RcppExports.R 86010858590e6b44e55872d93080bc12 *R/lbfgsb3.R d2df4867e38ed95dcb5b0868bfaae0c2 *README.md 4fda00923c6537479c0f5d2825bda932 *build/vignette.rds 5d94ea6a65871b83d8e2c31f18ba3c46 *inst/License-lbfgsb-orig.txt 99087982354202068e89de9c73db36e9 *inst/doc/lbfgsb3c.R a9dcb37fb52c3f80a7db133b516acff5 *inst/doc/lbfgsb3c.Rmd 3d71c84f934641dd25c3f8e0dc2f5552 *inst/doc/lbfgsb3c.pdf 47bd40af787b00f36feb0ca97d64b366 *inst/drlbfgsb3.R 8d037fe66106ffb23c656f0d043a2afc *inst/include/lbfgsb3c.h 8caf0f8e25b4d7b8ea17c494371fa9f7 *inst/include/lbfgsb3x.h d72333ecc568497a25caf0d520c6fd22 *inst/lbfgsb140731.f a61fd32ec1282b1c7a87fb17379ab150 *man/lbfgsb3c.Rd bbd02ee9ac813e011babc30f84fa5043 *src/RcppExports.cpp c1cbc852cb905e68febf95c151fb994d *src/blas.f 6d12f656af0ffce27c28f1ca821c055a *src/init.c ea65d7d51ba4440bad3255b50bc9f4dc *src/lbfgsb.f a9c87c33274f0d048088ca9756135acb *src/lbfgsb3x.cpp 3fc355272a3ea35f446ddf790c594653 *src/timer.f 56f89a83382cc6d2428cb982ff9d7197 *tests/testthat.R 93f45c2e0c83744f55ead6178582f07c *tests/testthat/test-bounds.R f48091ab47417e5fcb4ac5a1a382205e *tests/testthat/test-cyq.R 481b8e505a6fd33c3d65eb32ebc07a63 *tests/testthat/test-genrose.R 5f3f8b03bc1b03477072a9dedbc7fea0 *vignettes/jrosen.f a9dcb37fb52c3f80a7db133b516acff5 *vignettes/lbfgsb3c.Rmd d938b619628e03c2c368c47a1a6fb60e *vignettes/lbfgsb3c.bib lbfgsb3c/inst/0000755000176200001440000000000013627233177012727 5ustar liggesuserslbfgsb3c/inst/License-lbfgsb-orig.txt0000644000176200001440000001071513511470416017240 0ustar liggesusers3-clause license ("New BSD License" or "Modified BSD License") New BSD License Author Regents of the University of California Publisher Public Domain Published July 22, 1999[8] DFSG compatible Yes[7] FSF approved Yes[1] OSI approved Yes[3] GPL compatible Yes[1] Copyleft No[1] Copyfree Yes Linking from code with a different license Yes The advertising clause was removed from the license text in the official BSD on July 22, 1999 by William Hoskins, Director of the Office of Technology Licensing for UC Berkeley.[8] Other BSD distributions removed the clause, but many similar clauses remain in BSD-derived code from other sources, and unrelated code using a derived license. While the original license is sometimes referred to as "BSD-old", the resulting 3-clause version is sometimes referred to by "BSD-new." Other names include "New BSD", "revised BSD", "BSD-3", or "3-clause BSD". This version has been vetted as an Open source license by the OSI as the "The BSD License".[3] The Free Software Foundation, which refers to the license as the "Modified BSD License", states that it is compatible with the GNU GPL. The FSF encourages users to be specific when referring to the license by name (i.e. not simply referring to it as "a BSD license" or "BSD-style") to avoid confusion with the original BSD license.[1] This version allows unlimited redistribution for any purpose as long as its copyright notices and the license's disclaimers of warranty are maintained. The license also contains a clause restricting use of the names of contributors for endorsement of a derived work without specific permission. Copyright (c) , All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. References 1. ^ a b c d e "Various Licenses and Comments about Them - GNU Project - Free Software Foundation (FSF): Modified BSD license". Free Software Foundation. Retrieved 02 October 2010. 2. ^ a b c d e "Various Licenses and Comments about Them - GNU Project - Free Software Foundation (FSF): FreeBSD license". Free Software Foundation. Retrieved 02 October 2010. 3. ^ a b c d e f "Open Source Initiative OSI - The BSD License:Licensing". Open Source Initiative. Retrieved 06 December 2009. 4. ^ a b c d "Various Licenses and Comments about Them - GNU Project - Free Software Foundation (FSF): Original BSD license". Free Software Foundation. Retrieved 02 October 2010. 5. ^ The year given is the year 4.3BSD-Tahoe was released. Whether this is the first use of the license is not known. 6. ^ The year given is the year 4.3BSD-Reno was released. Whether this is the first use of the license is not known. 7. ^ a b "Debian -- License information". Debian. Retrieved 18 February 2010. 8. ^ a b c "To All Licensees, Distributors of Any Version of BSD". University of California, Berkeley. 1999-07-22. Retrieved 2006-11-15. 9. ^ Richard Stallman. "The BSD License Problem". Free Software Foundation. Retrieved 2006-11-15. 10. ^ "The FreeBSD Copyright". The FreeBSD Project. Retrieved 6 December 2009. 11. ^ "NetBSD Licensing and Redistribution". The NetBSD Foundation. Retrieved 06 December 2009. lbfgsb3c/inst/doc/0000755000176200001440000000000013627233177013474 5ustar liggesuserslbfgsb3c/inst/doc/lbfgsb3c.Rmd0000644000176200001440000002716113626305436015631 0ustar liggesusers--- title: "lbfgsb3c: Using the 2011 version of L-BFGS-B." author: "John C Nash Telfer School of Management, University of Ottawa, nashjc@uottawa.ca" date: "October 22, 2019" output: pdf_document bibliography: lbfgsb3c.bib vignette: > %\VignetteIndexEntry{lbfgsb3c-nocompile} %\VignetteEngine{knitr::rmarkdown} \usepackage[utf8]{inputenc} --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ## Added 20190717 to get vignette to build pkgbuild::compile_dll() ``` # Abstract In 2011 the authors of the L-BFGSB program published a correction and update to their 1995 code. The latter is the basis of the L-BFGS-B method of the `optim()` function in base-R. The package `lbfgsb3` wrapped the updated code using a `.Fortran` call after removing a very large number of Fortran output statements. Matthew Fidler used this Fortran code and an `Rcpp` interface to produce package `lbfgsb3c` where the function `lbfgsb3c()` returns an object similar to that of base-R `optim()` and that of `optimx::optimr()`. Subsequently, in a fine example of the collaborations that have made **R** so useful, we have merged the functionality of package `lbfgsb3` into `lbfgsb3c`, as explained in this vignette. Note that this document is intended primarily to document our efforts to check the differences in variants of the code rather than be expository. ## Provenance of the R optim::L-BFGS-B and related solvers The base-R code lbfgsb.c (at writing in R-3.5.2/src/appl/) is commented: ``` /* l-bfgs-b.f -- translated by f2c (version 19991025). From ?optim: The code for method ‘"L-BFGS-B"’ is based on Fortran code by Zhu, Byrd, Lu-Chen and Nocedal obtained from Netlib (file 'opt/lbfgs_bcm.shar') The Fortran files contained no copyright information. Byrd, R. H., Lu, P., Nocedal, J. and Zhu, C. (1995) A limited memory algorithm for bound constrained optimization. \emph{SIAM J. Scientific Computing}, \bold{16}, 1190--1208. */ ``` The paper @Byrd95 builds on @Lu94limitedmemory. There have been a number of other workers who have followed-up on this work, but **R** code and packages seem to have largely stayed with codes derived from these original papers. Though the date of the paper is 1995, the ideas it embodies were around for a decade and a half at least, in particular in Nocedal80 and LiuN89. The definitive Fortran code was published as @Zhu1997LBFGS. This is available as `toms/778.zip` on www.netlib.org. A side-by-side comparison of the main subroutines in the two downloads from Netlib unfortunately shows a lot of differences. I have not tried to determine if these affect performance or are simply cosmetic. More seriously perhaps, there were some deficiencies in the code(s), and in 2011 Nocedal's team published a Fortran code with some corrections (@Morales2011). Since the **R** code predates this, I prepared package `lbfgsb3` (@lbfgsb3JN) to wrap the Fortran code. However, I did not discover any test cases where the `optim::L-BFGS-B` and `lbfgsb3` were different, though I confess to only running some limited tests. There are, in fact, more in this vignette. In 2016, I was at a Fields Institute optimization conference in Toronto for the 70th birthday of Andy Conn. By sheer serendipity, Nocedal did not attend the conference, but sat down next to me at the conference dinner. When I asked him about the key changes, he said that the most important one was to fix the computation of the machine precision, which was not always correct in the 1995 code. Since **R** gets this number as `.Machine$double.eps`, the offending code is irrelevant. Within @Morales2011, there is also reported an improvement in the subspace minimization that is applied in cases of bounds constraints. Since few of the tests I have applied impose such constraints, it is reasonable that I will not have observed performance differences between the base-R `optim` code and my `lbfsgb3` package. More appropriate tests are welcome, and on my agenda. Besides the ACM TOMS code, there are two related codes from the Northwestern team on NETLIB: http://netlib.org/opt/lbfgs_um.shar is for unconstrained minimization, while http://netlib.org/opt/lbfgs_bcm.shar handles bounds constrained problems. To these are attached references @LiuN89 and @Byrd1995 respectively, most likely reflecting the effort required to implement the constraints. The unconstrained code has been converted to **C** under the leadership of Naoaki Okazaki (see http://www.chokkan.org/software/liblbfgs/, or the fork at https://github.com/MIRTK/LBFGS). This has been wrapped for **R** as @Coppola2014 as the `lbfgs` package. This can be called from `optimx::optimr()`. Using Rcpp (see @RCppDERF2011) and the Fortran code in package `lbfgs3`, Matthew Fidler developed package `lbfgsb3c` (@lbfgsb3cMF). As this provides a more standard call and return than `lbfgsb3` Fidler and I are unified the two packages and released them both under the same name `lbfgsb3c`. ## Functions in package `lbfgsb3c` There is really only one optimizer function in the package, but it may be called by four (4) names: - `lbfgsb3c()` uses Rcpp (@RCppDE2013, @RCppDERF2011, @RCppDEJJB2017) to streamline the call to the underlying Fortran. This is the base function used. - `lbfgsb3x()` is an alias of `lbfgsb3c()`. We were using this name for a while, and have kept the alias to avoid having to edit test scripts. - `lbfgsb3`, which imitates a `.Fortran` call of the compiled 2011 Fortran code. The object returned by this routine is NOT equivalent to the object returned by base-R `optim()` or by `optimx::optimr()`. Instead, it includes a structure `info` which contains the detailed diagnostic information of the Fortran code. For most users, this is not of interest, and I only recommend use of this function for those needing to examine how the optimization has been carried out. - `lbfgsb3f()` is an alias of `lbfsgb3()`. We recommend using the `lbfsgb3c()` call for most uses. ### Candlestick function ```{r, candlestick} # candlestick function # J C Nash 2011-2-3 cstick.f<-function(x,alpha=100){ x<-as.vector(x) r2<-crossprod(x) f<-as.double(r2+alpha/r2) return(f) } cstick.g<-function(x,alpha=100){ x<-as.vector(x) r2<-as.numeric(crossprod(x)) g1<-2*x g2 <- (-alpha)*2*x/(r2*r2) g<-as.double(g1+g2) return(g) } library(lbfgsb3c) nn <- 2 x0 <- c(10,10) lo <- c(1, 1) up <- c(10,10) print(x0) ## c2o <- opm(x0, cstick.f, cstick.g, lower=lo, upper=up, method=meths, control=list(trace=0)) ## print(summary(c2o, order=value)) c2l1 <- lbfgsb3c(x0, cstick.f, cstick.g, lower=lo, upper=up) c2l1 ## meths <- c("L-BFGS-B", "lbfgsb3c", "Rvmmin", "Rcgmin", "Rtnmin") ## require(optimx) ## cstick2a <- opm(x0, cstick.f, cstick.g, method=meths, upper=up, lower=lo, control=list(kkt=FALSE)) ## print(summary(cstick2a, par.select=1:2, order=value)) lo <- c(4, 4) ## c2ob <- opm(x0, cstick.f, cstick.g, lower=lo, upper=up, method=meths, control=list(trace=0)) ## print(summary(c2ob, order=value)) c2l2 <- lbfgsb3c(x0, cstick.f, cstick.g, lower=lo, upper=up) c2l2 ## cstick2b <- opm(x0, cstick.f, cstick.g, method=meths, upper=up, lower=lo, control=list(kkt=FALSE)) ## print(summary(cstick2b, par.select=1:2, order=value)) ## nn <- 100 ## x0 <- rep(10, nn) ## up <- rep(10, nn) ## lo <- rep(1e-4, nn) ## cco <- opm(x0, cstick.f, cstick.g, lower=lo, upper=up, method=meths, control=list(trace=0, kkt=FALSE)) ## print(summary(cco, par.select=1:4, order=value)) ``` ### Extended Rosenbrock function (from funconstrain) ```{r,exrosen} # require(funconstrain) ## not in CRAN, so explicit inclusion of this function # exrosen <- ex_rosen() # exrosenf <- exrosen$fn exrosenf <- function (par) { n <- length(par) if (n%%2 != 0) { stop("Extended Rosenbrock: n must be even") } fsum <- 0 for (i in 1:(n/2)) { p2 <- 2 * i p1 <- p2 - 1 f_p1 <- 10 * (par[p2] - par[p1]^2) f_p2 <- 1 - par[p1] fsum <- fsum + f_p1 * f_p1 + f_p2 * f_p2 } fsum } # exroseng <- exrosen$gr exroseng <- function (par) { n <- length(par) if (n%%2 != 0) { stop("Extended Rosenbrock: n must be even") } grad <- rep(0, n) for (i in 1:(n/2)) { p2 <- 2 * i p1 <- p2 - 1 xx <- par[p1] * par[p1] yx <- par[p2] - xx f_p1 <- 10 * yx f_p2 <- 1 - par[p1] grad[p1] <- grad[p1] - 400 * par[p1] * yx - 2 * f_p2 grad[p2] <- grad[p2] + 200 * yx } grad } exrosenx0 <- function (n = 20) { if (n%%2 != 0) { stop("Extended Rosenbrock: n must be even") } rep(c(-1.2, 1), n/2) } require(lbfgsb3c) ## require(optimx) ## require(optimx) for (n in seq(2,12, by=2)) { cat("ex_rosen try for n=",n,"\n") x0 <- exrosenx0(n) lo <- rep(-1.5, n) up <- rep(3, n) print(x0) cat("optim L-BFGS-B\n") eo <- optim(x0, exrosenf, exroseng, lower=lo, upper=up, method="L-BFGS-B", control=list(trace=0)) print(eo) cat("lbfgsb3c\n") el <- lbfgsb3c(x0, exrosenf, exroseng, lower=lo, upper=up, control=list(trace=0)) print(el) ## erfg <- opm(x0, exrosenf, exroseng, method=meths, lower=lo, upper=up) ## print(summary(erfg, par.select=1:2, order=value)) } ``` ## Using compiled function code While you may use the same interface as described in the writing R extensions to interface compiled code with this function, see [L-BFGS-B](https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Optimization), it is sometimes more convenient to use your own compiled code. The following example shows how this is done using the file `jrosen.f`. We have unfortunately found that compilation is not always portable across systems, so this example is presented without execution. ``` subroutine rosen(n, x, fval) double precision x(n), fval, dx integer n, i fval = 0.0D0 do 10 i=1,(n-1) dx = x(i + 1) - x(i) * x(i) fval = fval + 100.0 * dx * dx dx = 1.0 - x(i) fval = fval + dx * dx 10 continue return end ``` Here is the example script. Note that we must have the file `jrosen.f` available. Because the executable files on different systems use different conventions and structures, we have turned evaluation off here so this vignette can be built on multiple platforms. However, we wished to provide examples of how compiled code could be used. ```{r, usingFortran, eval=FALSE } system("R CMD SHLIB jrosen.f") dyn.load("jrosen.so") is.loaded("rosen") x0 <- as.double(c(-1.2,1)) fv <- as.double(-999) n <- as.double(2) testf <- .Fortran("rosen", n=as.integer(n), x=as.double(x0), fval=as.double(fv)) testf rrosen <- function(x) { fval <- 0.0 for (i in 1:(n-1)) { dx <- x[i + 1] - x[i] * x[i] fval <- fval + 100.0 * dx * dx dx <- 1.0 - x[i] fval <- fval + dx * dx } fval } (rrosen(x0)) frosen <- function(x){ nn <- length(x) if (nn > 100) { stop("max number of parameters is 100")} fv <- -999.0 val <- .Fortran("rosen", n=as.integer(nn), x=as.double(x), fval=as.double(fv)) val$fval # NOTE--need ONLY function value returned } # Test the funcion tval <- frosen(x0) str(tval) cat("Run with Nelder-Mead using R function\n") mynm <- optim(x0, rrosen, control=list(trace=0)) print(mynm) cat("\n\n Run with Nelder-Mead using Fortran function") mynmf <- optim(x0, frosen, control=list(trace=0)) print(mynmf) library(lbfgsb3c) library(microbenchmark) cat("try lbfgsb3c, no Gradient \n") cat("R function\n") tlR<-microbenchmark(myopR <- lbfgsb3c(x0, rrosen, gr=NULL, control=list(trace=0))) print(tlR) print(myopR) cat("Fortran function\n") tlF<-microbenchmark(myop <- lbfgsb3c(x0, frosen, gr=NULL, control=list(trace=0))) print(tlF) print(myop) ``` In this example, Fortran execution was actually SLOWER than plain R on the system where it was run. ## References lbfgsb3c/inst/doc/lbfgsb3c.R0000644000176200001440000001161013627233177015303 0ustar liggesusers## ----setup, include=FALSE----------------------------------------------------- knitr::opts_chunk$set(echo = TRUE) ## Added 20190717 to get vignette to build pkgbuild::compile_dll() ## ---- candlestick------------------------------------------------------------- # candlestick function # J C Nash 2011-2-3 cstick.f<-function(x,alpha=100){ x<-as.vector(x) r2<-crossprod(x) f<-as.double(r2+alpha/r2) return(f) } cstick.g<-function(x,alpha=100){ x<-as.vector(x) r2<-as.numeric(crossprod(x)) g1<-2*x g2 <- (-alpha)*2*x/(r2*r2) g<-as.double(g1+g2) return(g) } library(lbfgsb3c) nn <- 2 x0 <- c(10,10) lo <- c(1, 1) up <- c(10,10) print(x0) ## c2o <- opm(x0, cstick.f, cstick.g, lower=lo, upper=up, method=meths, control=list(trace=0)) ## print(summary(c2o, order=value)) c2l1 <- lbfgsb3c(x0, cstick.f, cstick.g, lower=lo, upper=up) c2l1 ## meths <- c("L-BFGS-B", "lbfgsb3c", "Rvmmin", "Rcgmin", "Rtnmin") ## require(optimx) ## cstick2a <- opm(x0, cstick.f, cstick.g, method=meths, upper=up, lower=lo, control=list(kkt=FALSE)) ## print(summary(cstick2a, par.select=1:2, order=value)) lo <- c(4, 4) ## c2ob <- opm(x0, cstick.f, cstick.g, lower=lo, upper=up, method=meths, control=list(trace=0)) ## print(summary(c2ob, order=value)) c2l2 <- lbfgsb3c(x0, cstick.f, cstick.g, lower=lo, upper=up) c2l2 ## cstick2b <- opm(x0, cstick.f, cstick.g, method=meths, upper=up, lower=lo, control=list(kkt=FALSE)) ## print(summary(cstick2b, par.select=1:2, order=value)) ## nn <- 100 ## x0 <- rep(10, nn) ## up <- rep(10, nn) ## lo <- rep(1e-4, nn) ## cco <- opm(x0, cstick.f, cstick.g, lower=lo, upper=up, method=meths, control=list(trace=0, kkt=FALSE)) ## print(summary(cco, par.select=1:4, order=value)) ## ----exrosen------------------------------------------------------------------ # require(funconstrain) ## not in CRAN, so explicit inclusion of this function # exrosen <- ex_rosen() # exrosenf <- exrosen$fn exrosenf <- function (par) { n <- length(par) if (n%%2 != 0) { stop("Extended Rosenbrock: n must be even") } fsum <- 0 for (i in 1:(n/2)) { p2 <- 2 * i p1 <- p2 - 1 f_p1 <- 10 * (par[p2] - par[p1]^2) f_p2 <- 1 - par[p1] fsum <- fsum + f_p1 * f_p1 + f_p2 * f_p2 } fsum } # exroseng <- exrosen$gr exroseng <- function (par) { n <- length(par) if (n%%2 != 0) { stop("Extended Rosenbrock: n must be even") } grad <- rep(0, n) for (i in 1:(n/2)) { p2 <- 2 * i p1 <- p2 - 1 xx <- par[p1] * par[p1] yx <- par[p2] - xx f_p1 <- 10 * yx f_p2 <- 1 - par[p1] grad[p1] <- grad[p1] - 400 * par[p1] * yx - 2 * f_p2 grad[p2] <- grad[p2] + 200 * yx } grad } exrosenx0 <- function (n = 20) { if (n%%2 != 0) { stop("Extended Rosenbrock: n must be even") } rep(c(-1.2, 1), n/2) } require(lbfgsb3c) ## require(optimx) ## require(optimx) for (n in seq(2,12, by=2)) { cat("ex_rosen try for n=",n,"\n") x0 <- exrosenx0(n) lo <- rep(-1.5, n) up <- rep(3, n) print(x0) cat("optim L-BFGS-B\n") eo <- optim(x0, exrosenf, exroseng, lower=lo, upper=up, method="L-BFGS-B", control=list(trace=0)) print(eo) cat("lbfgsb3c\n") el <- lbfgsb3c(x0, exrosenf, exroseng, lower=lo, upper=up, control=list(trace=0)) print(el) ## erfg <- opm(x0, exrosenf, exroseng, method=meths, lower=lo, upper=up) ## print(summary(erfg, par.select=1:2, order=value)) } ## ---- usingFortran, eval=FALSE------------------------------------------------ # system("R CMD SHLIB jrosen.f") # dyn.load("jrosen.so") # is.loaded("rosen") # x0 <- as.double(c(-1.2,1)) # fv <- as.double(-999) # n <- as.double(2) # testf <- .Fortran("rosen", n=as.integer(n), x=as.double(x0), fval=as.double(fv)) # testf # # rrosen <- function(x) { # fval <- 0.0 # for (i in 1:(n-1)) { # dx <- x[i + 1] - x[i] * x[i] # fval <- fval + 100.0 * dx * dx # dx <- 1.0 - x[i] # fval <- fval + dx * dx # } # fval # } # # (rrosen(x0)) # # frosen <- function(x){ # nn <- length(x) # if (nn > 100) { stop("max number of parameters is 100")} # fv <- -999.0 # val <- .Fortran("rosen", n=as.integer(nn), x=as.double(x), fval=as.double(fv)) # val$fval # NOTE--need ONLY function value returned # } # # Test the funcion # tval <- frosen(x0) # str(tval) # # cat("Run with Nelder-Mead using R function\n") # mynm <- optim(x0, rrosen, control=list(trace=0)) # print(mynm) # cat("\n\n Run with Nelder-Mead using Fortran function") # mynmf <- optim(x0, frosen, control=list(trace=0)) # print(mynmf) # # # library(lbfgsb3c) # library(microbenchmark) # cat("try lbfgsb3c, no Gradient \n") # cat("R function\n") # tlR<-microbenchmark(myopR <- lbfgsb3c(x0, rrosen, gr=NULL, control=list(trace=0))) # print(tlR) # print(myopR) # cat("Fortran function\n") # tlF<-microbenchmark(myop <- lbfgsb3c(x0, frosen, gr=NULL, control=list(trace=0))) # print(tlF) # print(myop) lbfgsb3c/inst/doc/lbfgsb3c.pdf0000644000176200001440000077264413627233177015700 0ustar liggesusers%PDF-1.5 % 34 0 obj << /Length 3087 /Filter /FlateDecode >> stream xڍYYsF~ϯ`%`Ja\~ٵ];)Yyfk"\R!Z `Ξ>>W/7w_\|%SdlVw4Z$YJLfw?ltj( ~~HRGERRaCյ4CFuVR<ƉȵYڈ,=baOwLٞf>k!4]Mо+65 VyoJDZX,xĹ[ SOy^> $NWʅzǏmeDn(r1 MBy$L䊅z3}QC&\JD@UVtu3/'SLgSZ R{C3?M] {壨)r$%LDŽm1cw+<'j+@tYH**WҺGduΦt1G/͝~HcGMyZס BrR`T KX5FqI$wS\ukϲ᭠;CQ{~@I4(/G;^|J8 @'1H3QIؤY)*82pdku`$"q`46sOi%ʖ{ˢYw#nf45 'OU=pgjpӆ/-ьt'vxcs;@;7H I">٨85^Ӏk 9%q`~\ =_\,I-A%.宊d* m3NOO=޹]䱈ӳ=mIc`ZJ; 0 ʋP} 1x<ԷNL;͖#M US҇eX5 v #6|텇HgT| 6GyO>i# Kcl!W\59ISaRVf`u&+TR l~i-EsLA%vʮ \O_L$D4[os҂8#6ْOIH8:3ttn"i r{z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+*FgV\mP1T R3*Г!jeIIZ8NVAw(Oٳ'7,Kqlgdn1r:i9S^mz!`Բ3u\[Auw5lbLv"MۓȿD2#_%E sj!{$߻t8+0l:Vwa=doO^w9nU:fܘrC.7/*8k@))DTg*_3Ͽ`d Dw!:\ND)d}9 .6Dƺw)nGnPL0$,֣t(N|i#$535)f,~ _ K7 +".7 G(nCI6DXEͣV/i; ]}uKy2\CNQbFmv8%× ; Q0[Aơ\C$~2G`svųhح~.&Wɛ|i6\&6x}.x>{5`̈́X#OwE3g$BM endstream endobj 64 0 obj << /Length 1334 /Filter /FlateDecode >> stream xYmo6_-t3XA!K`Et/Yf82%U C{IRLYQmv,IysG pB0X`066FQ իG>1tL3m<|}?-XՌ+|Pbb>1J,$֦XO0K-=w31gq\~:[:61)(^)xUޠ9``9a "ĸaS>0mb10iVesM@(ԍϽ#7vz DYp?N%+.Z!P=΂,~̋.鞝|"Ay\/QͬPQc6cnD јc)YTCxu` .9W*HXM%̂r m<-H7h„B ,(I I4rY7SV s ^A%jJ4L>yRqԆV=$Qva?DMϯx/w/өžI'.c/o{k2:F ;ʆ ,Ni#}U:D~Q2‹lџrB^ $TY8\(*cC8\/ d$&^GKZ>2L٤MFvQ))BRhڈ,B_H Fh[_-F't>b4X$9c42bȋIY)؍M0ux* ؄C1Hp D(ծjG(^z7o lGvmLÙj96p¨qHR`u%NH-h_;/mibˆ;p?%ĵ$}wQ2jGq !I5** ٽv 3|M .#Z#OKjN=iydm6mbn6kMngoMK6!IiUpLo1bfy s&\H֫:=yp^z8=?{cJxaijAnTkhj{7f$ endstream endobj 68 0 obj << /Length 1338 /Filter /FlateDecode >> stream xZQs6~W icE-پ)/L/M܀)؎1)L%eeKLvە 44`e8Ճ2 OPU4lf!răe99czrs4 / d5T)2R qr(r8~'99`n/R# `"1qdv((mr2,y?b ՟H6¸AM=VEh ;+R.uzI /" ~6x'iyrYX(?!2FL< *1hFhF"]2%oůYXؾCM-j.;FjyDds{JDL#((*~ "҅a2tq;~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њÎ~2\~?>=?bbu+{`{IҭzBg ^rŬX=}ZjOW.,+#t8Ibnd -:fE!+yA_S 8:u`p~:nVY^#q|2Ͳธ3cW5SIV*÷o /Ve//˼*~^u>9]*O=*VZeM2iW^-&yY2__~ӿ;|{(>w1Dދ׾hrV[}lmѬ!mn"o '>Szur|-dW|/KRRJb|$kydr:I}@} I}:<<2?3'D 8zOb,) yJSֳ/$qMv#aw]GzR=;z=/YxWĆ{H#b^vݖXCB g5NrC >XKL.Y6wyW,V[6H.y%Fæ(WO*GGoVF>m¸^wE1&ݔ8w>Z9)ahvU)pnXo|MOyUOHSA}+QE^]PV'ӣ|ݹͣi/ ^c]p^oջ}sηfG9 %pu7\9mkd7ŸA|d,͈۫Mi(:M8{0D_m\4>$6 .2G>#'4}lohj-;h<!@@bPȶ@}MEs@z+"[5nCZڒ5p?k4do[/KW >>%ѽ/gJbݸC[_~-{[oK/ח^3TC)lA]n ȣ$x_sM! Uo]EPn7haf{Z^^_LRn\L6d+r+w6` ] /Length 426 /Filter /FlateDecode >> stream x%ҹVSQBdP2IqEGKGGs-J)XtZXh淾GD_ t(sMl // for NULL #include #include typedef double optimfn(int n, double *par, void *ex); typedef void optimgr(int n, double *par, double *gr, void *ex); typedef void (*lbfgsb3_fn)(int n, int lmm, double *x, double *lower, double *upper, int *nbd, double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int nREPORT, double atol, double rtol, double *g); void lbfgsb3C(int n, int lmm, double *x, double *lower, double *upper, int *nbd, double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int nREPORT, double atol, double rtol, double *g){ static lbfgsb3_fn fun=NULL; if (fun == NULL) fun = (lbfgsb3_fn) R_GetCCallable("lbfgsb3c","lbfgsb3C_"); fun(n, lmm, x, lower, upper, nbd, Fmin, fn, gr, fail, ex, factr, pgtol, fncount, grcount, maxit, msg, trace, nREPORT, atol, rtol, g); } #endif lbfgsb3c/inst/include/lbfgsb3x.h0000644000176200001440000000216613577744616016253 0ustar liggesusers#ifndef __LBFGSB3_H__ #define __LBFGSB3_H__ #include // for NULL #include #include typedef double optimfn(int n, double *par, void *ex); typedef void optimgr(int n, double *par, double *gr, void *ex); typedef void (*lbfgsb3_fn)(int n, int lmm, double *x, double *lower, double *upper, int *nbd, double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int nREPORT, double atol, double rtol, double *g); void lbfgsb3C(int n, int lmm, double *x, double *lower, double *upper, int *nbd, double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int nREPORT, double atol, double rtol, double *g){ static lbfgsb3_fn fun=NULL; if (fun == NULL) fun = (lbfgsb3_fn) R_GetCCallable("lbfgsb3x","lbfgsb3C_"); fun(n, lmm, x, lower, upper, nbd, Fmin, fn, gr, fail, ex, factr, pgtol, fncount, grcount, maxit, msg, trace, nREPORT, atol, rtol, g); } #endif lbfgsb3c/inst/drlbfgsb3.R0000644000176200001440000000057713511470416014722 0ustar liggesusers## drlbfgsb3.R source("lbfgsb3.R") source("grose.R") n <- 25L x<-rep(3,n) u <- rep(10, n) l <- rep(-10, n) it <- seq(1,n,by=2) l[it] <- 1 ## odd variables have 1 as lower bound ans <- lbfgsb3(x, grose.f, gr=grose.g, lower = l, upper = u, gs=100) print(ans) tmp<-readline("try with numderiv") ansn <- lbfgsb3(x, grose.f, lower = l, upper = u, gs=100) print(ansn) lbfgsb3c/inst/lbfgsb140731.f0000644000176200001440000040234513511470416015014 0ustar liggesusersc c L-BFGS-B is released under the “New BSD License” (aka “Modified BSD License” c or “3-clause license”) c Please read attached file License.txt c c=========== L-BFGS-B (version 3.0. April 25, 2011 =================== c c This is a modified version of L-BFGS-B. Minor changes in the updated c code appear preceded by a line comment as follows c c c-jlm-jn c c Major changes are described in the accompanying paper: c c Jorge Nocedal and Jose Luis Morales, Remark on "Algorithm 778: c L-BFGS-B: Fortran Subroutines for Large-Scale Bound Constrained c Optimization" (2011). To appear in ACM Transactions on c Mathematical Software, c c The paper describes an improvement and a correction to Algorithm 778. c It is shown that the performance of the algorithm can be improved c significantly by making a relatively simple modication to the subspace c minimization phase. The correction concerns an error caused by the use c of routine dpmeps to estimate machine precision. c c The total work space **wa** required by the new version is c c 2*m*n + 11m*m + 5*n + 8*m c c the old version required c c 2*m*n + 12m*m + 4*n + 12*m c c c J. Nocedal Department of Electrical Engineering and c Computer Science. c Northwestern University. Evanston, IL. USA c c c J.L Morales Departamento de Matematicas, c Instituto Tecnologico Autonomo de Mexico c Mexico D.F. Mexico. c c March 2011 c c============================================================================= subroutine setulb(n, m, x, l, u, nbd, f, g, factr, pgtol, wa, iwa, + itask, iprint, icsave, lsave, isave, dsave) logical lsave(4) integer n, m, iprint, itask, icsave, + nbd(n), iwa(3*n), isave(44) double precision f, factr, pgtol, x(n), l(n), u(n), g(n), c c-jlm-jn + wa(2*m*n + 5*n + 11*m*m + 8*m), dsave(29) c ************ c c Subroutine setulb c c This subroutine partitions the working arrays wa and iwa, and c then uses the limited memory BFGS method to solve the bound c constrained optimization problem by calling mainlb. c (The direct method will be used in the subspace minimization.) c c n is an integer variable. c On entry n is the dimension of the problem. c On exit n is unchanged. c c m is an integer variable. c On entry m is the maximum number of variable metric corrections c used to define the limited memory matrix. c On exit m is unchanged. c c x is a double precision array of dimension n. c On entry x is an approximation to the solution. c On exit x is the current approximation. c c l is a double precision array of dimension n. c On entry l is the lower bound on x. c On exit l is unchanged. c c u is a double precision array of dimension n. c On entry u is the upper bound on x. c On exit u is unchanged. c c nbd is an integer array of dimension n. c On entry nbd represents the type of bounds imposed on the c variables, and must be specified as follows: c nbd(i)=0 if x(i) is unbounded, c 1 if x(i) has only a lower bound, c 2 if x(i) has both lower and upper bounds, and c 3 if x(i) has only an upper bound. c On exit nbd is unchanged. c c f is a double precision variable. c On first entry f is unspecified. c On final exit f is the value of the function at x. c c g is a double precision array of dimension n. c On first entry g is unspecified. c On final exit g is the value of the gradient at x. c c factr is a double precision variable. c On entry factr >= 0 is specified by the user. The iteration c will stop when c c (f^k - f^{k+1})/max{|f^k|,|f^{k+1}|,1} <= factr*epsmch c c where epsmch is the machine precision, which is automatically c generated by the code. Typical values for factr: 1.d+12 for c low accuracy; 1.d+7 for moderate accuracy; 1.d+1 for extremely c high accuracy. c On exit factr is unchanged. c c pgtol is a double precision variable. c On entry pgtol >= 0 is specified by the user. The iteration c will stop when c c max{|proj g_i | i = 1, ..., n} <= pgtol c c where pg_i is the ith component of the projected gradient. c On exit pgtol is unchanged. c c wa is a double precision working array of length c (2mmax + 5)nmax + 12mmax^2 + 12mmax. c c iwa is an integer working array of length 3nmax. c c itask is an integer indicating c the current job when entering and quitting this subroutine. c c iprint is an integer variable that must be set by the user. c It controls the frequency and type of output generated: c iprint<0 no output is generated; c iprint=0 print only one line at the last iteration; c 0100 print details of every iteration including x and g; c When iprint > 0, the file iterate.dat will be created to c summarize the iteration. c c icsave is a working integer c c lsave is a logical working array of dimension 4. c On exit with 'task' = NEW_X, the following information is c available: c If lsave(1) = .true. then the initial X has been replaced by c its projection in the feasible set; c If lsave(2) = .true. then the problem is constrained; c If lsave(3) = .true. then each variable has upper and lower c bounds; c c isave is an integer working array of dimension 44. c On exit with 'task' = NEW_X, the following information is c available: c isave(22) = the total number of intervals explored in the c search of Cauchy points; c isave(26) = the total number of skipped BFGS updates before c the current iteration; c isave(30) = the number of current iteration; c isave(31) = the total number of BFGS updates prior the current c iteration; c isave(33) = the number of intervals explored in the search of c Cauchy point in the current iteration; c isave(34) = the total number of function and gradient c evaluations; c isave(36) = the number of function value or gradient c evaluations in the current iteration; c if isave(37) = 0 then the subspace argmin is within the box; c if isave(37) = 1 then the subspace argmin is beyond the box; c isave(38) = the number of free variables in the current c iteration; c isave(39) = the number of active constraints in the current c iteration; c n + 1 - isave(40) = the number of variables leaving the set of c active constraints in the current iteration; c isave(41) = the number of variables entering the set of active c constraints in the current iteration. c c dsave is a double precision working array of dimension 29. c On exit with 'task' = NEW_X, the following information is c available: c dsave(1) = current 'theta' in the BFGS matrix; c dsave(2) = f(x) in the previous iteration; c dsave(3) = factr*epsmch; c dsave(4) = 2-norm of the line search direction vector; c dsave(5) = the machine precision epsmch generated by the code; c dsave(7) = the accumulated time spent on searching for c Cauchy points; c dsave(8) = the accumulated time spent on c subspace minimization; c dsave(9) = the accumulated time spent on line search; c dsave(11) = the slope of the line search function at c the current point of line search; c dsave(12) = the maximum relative step length imposed in c line search; c dsave(13) = the infinity norm of the projected gradient; c dsave(14) = the relative step length in the line search; c dsave(15) = the slope of the line search function at c the starting point of the line search; c dsave(16) = the square of the 2-norm of the line search c direction vector. c c Subprograms called: c c L-BFGS-B Library ... mainlb. c c c References: c c [1] R. H. Byrd, P. Lu, J. Nocedal and C. Zhu, ``A limited c memory algorithm for bound constrained optimization'', c SIAM J. Scientific Computing 16 (1995), no. 5, pp. 1190--1208. c c [2] C. Zhu, R.H. Byrd, P. Lu, J. Nocedal, ``L-BFGS-B: a c limited memory FORTRAN code for solving bound constrained c optimization problems'', Tech. Report, NAM-11, EECS Department, c Northwestern University, 1994. c c (Postscript files of these papers are available via anonymous c ftp to eecs.nwu.edu in the directory pub/lbfgs/lbfgs_bcm.) c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ c-jlm-jn integer lws,lr,lz,lt,ld,lxp,lwa, + lwy,lsy,lss,lwt,lwn,lsnd write(6,*) ' The incoming task no. is ', itask if ((itask .lt. 1) .or. (itask .gt. 26)) stop(999) c if (task .eq. 'START') then if (itask .eq. 2) then isave(1) = m*n isave(2) = m**2 isave(3) = 4*m**2 isave(4) = 1 ! ws m*n isave(5) = isave(4) + isave(1) ! wy m*n isave(6) = isave(5) + isave(1) ! wsy m**2 isave(7) = isave(6) + isave(2) ! wss m**2 isave(8) = isave(7) + isave(2) ! wt m**2 isave(9) = isave(8) + isave(2) ! wn 4*m**2 isave(10) = isave(9) + isave(3) ! wsnd 4*m**2 isave(11) = isave(10) + isave(3) ! wz n isave(12) = isave(11) + n ! wr n isave(13) = isave(12) + n ! wd n isave(14) = isave(13) + n ! wt n isave(15) = isave(14) + n ! wxp n isave(16) = isave(15) + n ! wa 8*m endif lws = isave(4) lwy = isave(5) lsy = isave(6) lss = isave(7) lwt = isave(8) lwn = isave(9) lsnd = isave(10) lz = isave(11) lr = isave(12) ld = isave(13) lt = isave(14) lxp = isave(15) lwa = isave(16) call mainlb(n,m,x,l,u,nbd,f,g,factr,pgtol, + wa(lws),wa(lwy),wa(lsy),wa(lss), wa(lwt), + wa(lwn),wa(lsnd),wa(lz),wa(lr),wa(ld),wa(lt),wa(lxp), + wa(lwa), + iwa(1),iwa(n+1),iwa(2*n+1),itask,iprint, + icsave,lsave,isave(22),dsave) write(6,*) " itask on return is ",itask return end c======================= The end of setulb ============================= c mainlb here 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, itask, + iprint, icsave, lsave, isave, dsave) implicit none logical lsave(4) integer n, m, iprint, itask, icsave, nbd(n), index(n), + iwhere(n), indx2(n), isave(23) double precision f, factr, pgtol, + x(n), l(n), u(n), g(n), z(n), r(n), d(n), t(n), c-jlm-jn + xp(n), + wa(8*m), + ws(n, m), wy(n, m), sy(m, m), ss(m, m), + wt(m, m), wn(2*m, 2*m), snd(2*m, 2*m), dsave(29) c ************ c c Subroutine mainlb c c This subroutine solves bound constrained optimization problems by c using the compact formula of the limited memory BFGS updates. c c n is an integer variable. c On entry n is the number of variables. c On exit n is unchanged. c c m is an integer variable. c On entry m is the maximum number of variable metric c corrections allowed in the limited memory matrix. c On exit m is unchanged. c c x is a double precision array of dimension n. c On entry x is an approximation to the solution. c On exit x is the current approximation. c c l is a double precision array of dimension n. c On entry l is the lower bound of x. c On exit l is unchanged. c c u is a double precision array of dimension n. c On entry u is the upper bound of x. c On exit u is unchanged. c c nbd is an integer array of dimension n. c On entry nbd represents the type of bounds imposed on the c variables, and must be specified as follows: c nbd(i)=0 if x(i) is unbounded, c 1 if x(i) has only a lower bound, c 2 if x(i) has both lower and upper bounds, c 3 if x(i) has only an upper bound. c On exit nbd is unchanged. c c f is a double precision variable. c On first entry f is unspecified. c On final exit f is the value of the function at x. c c g is a double precision array of dimension n. c On first entry g is unspecified. c On final exit g is the value of the gradient at x. c c factr is a double precision variable. c On entry factr >= 0 is specified by the user. The iteration c will stop when c c (f^k - f^{k+1})/max{|f^k|,|f^{k+1}|,1} <= factr*epsmch c c where epsmch is the machine precision, which is automatically c generated by the code. c On exit factr is unchanged. c c pgtol is a double precision variable. c On entry pgtol >= 0 is specified by the user. The iteration c will stop when c c max{|proj g_i | i = 1, ..., n} <= pgtol c c where pg_i is the ith component of the projected gradient. c On exit pgtol is unchanged. c c ws, wy, sy, and wt are double precision working arrays used to c store the following information defining the limited memory c BFGS matrix: c ws, of dimension n x m, stores S, the matrix of s-vectors; c wy, of dimension n x m, stores Y, the matrix of y-vectors; c sy, of dimension m x m, stores S'Y; c ss, of dimension m x m, stores S'S; c yy, of dimension m x m, stores Y'Y; c wt, of dimension m x m, stores the Cholesky factorization c of (theta*S'S+LD^(-1)L'); see eq. c (2.26) in [3]. c c wn is a double precision working array of dimension 2m x 2m c used to store the LEL^T factorization of the indefinite matrix c K = [-D -Y'ZZ'Y/theta L_a'-R_z' ] c [L_a -R_z theta*S'AA'S ] c c where E = [-I 0] c [ 0 I] c c snd is a double precision working array of dimension 2m x 2m c used to store the lower triangular part of c N = [Y' ZZ'Y L_a'+R_z'] c [L_a +R_z S'AA'S ] c c z(n),r(n),d(n),t(n), xp(n),wa(8*m) are double precision working arrays. c z is used at different times to store the Cauchy point and c the Newton point. c xp is used to safeguard the projected Newton direction c c sg(m),sgo(m),yg(m),ygo(m) are double precision working arrays. c c index is an integer working array of dimension n. c In subroutine freev, index is used to store the free and fixed c variables at the Generalized Cauchy Point (GCP). c c iwhere is an integer working array of dimension n used to record c the status of the vector x for GCP computation. c iwhere(i)=0 or -3 if x(i) is free and has bounds, c 1 if x(i) is fixed at l(i), and l(i) .ne. u(i) c 2 if x(i) is fixed at u(i), and u(i) .ne. l(i) c 3 if x(i) is always fixed, i.e., u(i)=x(i)=l(i) c -1 if x(i) is always free, i.e., no bounds on it. c c indx2 is an integer working array of dimension n. c Within subroutine cauchy, indx2 corresponds to the array iorder. c In subroutine freev, a list of variables entering and leaving c the free set is stored in indx2, and it is passed on to c subroutine formk with this information. c c task is a working string of characters of length 60 indicating c the current job when entering and leaving this subroutine. c c iprint is an INTEGER variable that must be set by the user. c It controls the frequency and type of output generated: c iprint<0 no output is generated; c iprint=0 print only one line at the last iteration; c 0100 print details of every iteration including x and g; c When iprint > 0, the file iterate.dat will be created to c summarize the iteration. c c icsave is a working integer c c lsave is a logical working array of dimension 4. c c isave is an integer working array of dimension 23. c c dsave is a double precision working array of dimension 29. c c c Subprograms called c c L-BFGS-B Library ... cauchy, subsm, lnsrlb, formk, c c errclb, prn1lb, prn2lb, prn3lb, active, projgr, c c freev, cmprlb, matupd, formt. c c Minpack2 Library ... timer c c Linpack Library ... dcopy, ddot. c c c References: c c [1] R. H. Byrd, P. Lu, J. Nocedal and C. Zhu, ``A limited c memory algorithm for bound constrained optimization'', c SIAM J. Scientific Computing 16 (1995), no. 5, pp. 1190--1208. c c [2] C. Zhu, R.H. Byrd, P. Lu, J. Nocedal, ``L-BFGS-B: FORTRAN c Subroutines for Large Scale Bound Constrained Optimization'' c Tech. Report, NAM-11, EECS Department, Northwestern University, c 1994. c c [3] R. Byrd, J. Nocedal and R. Schnabel "Representations of c Quasi-Newton Matrices and their use in Limited Memory Methods'', c Mathematical Programming 63 (1994), no. 4, pp. 129-156. c c (Postscript files of these papers are available via anonymous c ftp to eecs.nwu.edu in the directory pub/lbfgs/lbfgs_bcm.) c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ logical prjctd,cnstnd,boxed,updatd,wrk character*3 word integer i,k,nintol,itfile,iback,nskip, + head,col,iter,itail,iupdat, + nseg,nfgv,info,ifun, + iword,nfree,nact,ileave,nenter double precision theta,fold,ddot,dr,rr,tol, + xstep,sbgnrm,ddum,dnorm,dtd,epsmch, + cpu1,cpu2,cachyt,sbtime,lnscht,time1,time2, + gd,gdold,stp,stpmx,time double precision one,zero parameter (one=1.0d0,zero=0.0d0) if (itask .eq. 2) then epsmch = epsilon(one) call timer(time1) c Initialize counters and scalars when task='START'. c for the limited memory BFGS matrices: col = 0 head = 1 theta = one iupdat = 0 updatd = .false. iback = 0 itail = 0 iword = 0 nact = 0 ileave = 0 nenter = 0 fold = zero dnorm = zero cpu1 = zero gd = zero stpmx = zero sbgnrm = zero stp = zero gdold = zero dtd = zero c for operation counts: iter = 0 nfgv = 0 nseg = 0 nintol = 0 nskip = 0 nfree = n ifun = 0 c for stopping tolerance: tol = factr*epsmch c for measuring running time: cachyt = 0 sbtime = 0 lnscht = 0 c 'word' records the status of subspace solutions. word = '---' c 'info' records the termination information. info = 0 itfile = 8 if (iprint .ge. 1) then c open a summary file 'iterate.dat' open (8, file = 'iterate.dat', status = 'unknown') endif c Check the input arguments for errors. call errclb(n,m,factr,l,u,nbd,itask,info,k) c ERROR return if ((itask .ge. 9) .and. (itask .le. 19)) then call prn3lb(n,x,f,itask,iprint,info,itfile, + iter,nfgv,nintol,nskip,nact,sbgnrm, + zero,nseg,word,iback,stp,xstep,k, + cachyt,sbtime,lnscht) return endif call prn1lb(n,m,l,u,x,iprint,itfile,epsmch) c Initialize iwhere & project x onto the feasible set. call active(n,l,u,nbd,x,iwhere,iprint,prjctd,cnstnd,boxed) c The end of the initialization. else c restore local variables. prjctd = lsave(1) cnstnd = lsave(2) boxed = lsave(3) updatd = lsave(4) nintol = isave(1) itfile = isave(3) iback = isave(4) nskip = isave(5) head = isave(6) col = isave(7) itail = isave(8) iter = isave(9) iupdat = isave(10) nseg = isave(12) nfgv = isave(13) info = isave(14) ifun = isave(15) iword = isave(16) nfree = isave(17) nact = isave(18) ileave = isave(19) nenter = isave(20) theta = dsave(1) fold = dsave(2) tol = dsave(3) dnorm = dsave(4) epsmch = dsave(5) cpu1 = dsave(6) cachyt = dsave(7) sbtime = dsave(8) lnscht = dsave(9) time1 = dsave(10) gd = dsave(11) stpmx = dsave(12) sbgnrm = dsave(13) stp = dsave(14) gdold = dsave(15) dtd = dsave(16) c After returning from the driver go to the point where execution c is to resume. c if (task(1:5) .eq. 'FG_LN') goto 666 if (itask .eq. 20) goto 666 c if (task(1:5) .eq. 'NEW_X') goto 777 if (itask .eq. 1) goto 777 c if (task(1:5) .eq. 'FG_ST') goto 111 if (itask .eq. 21) goto 111 c if (task(1:4) .eq. 'STOP') then c if (itask .eq. 3) then c if (task(7:9) .eq. 'CPU') then c NOTE: Cannot happen in R driver. c restore the previous iterate. c call dcopy(n,t,1,x,1) c call dcopy(n,r,1,g,1) c f = fold c endif c goto 999 c endif endif c Compute f0 and g0. c task = 'FG_START' itask = 21 c return to the driver to calculate f and g; reenter at 111. goto 1000 111 continue nfgv = 1 c Compute the infinity norm of the (-) projected gradient. call projgr(n,l,u,nbd,x,g,sbgnrm) if (iprint .ge. 1) then write (6,1002) iter,f,sbgnrm write (itfile,1003) iter,nfgv,sbgnrm,f endif if (sbgnrm .le. pgtol) then c terminate the algorithm. c task = 'CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL' itask = 7 goto 999 endif c ----------------- the beginning of the loop -------------------------- 222 continue if (iprint .ge. 99) write (6,1001) iter + 1 iword = -1 c if (.not. cnstnd .and. col .gt. 0) then c skip the search for GCP. call dcopy(n,x,1,z,1) wrk = updatd nseg = 0 goto 333 endif cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c Compute the Generalized Cauchy Point (GCP). c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc call timer(cpu1) call cauchy(n,x,l,u,nbd,g,indx2,iwhere,t,d,z, + m,wy,ws,sy,wt,theta,col,head, + wa(1),wa(2*m+1),wa(4*m+1),wa(6*m+1),nseg, + iprint, sbgnrm, info, epsmch) if (info .ne. 0) then c singular triangular system detected; refresh the lbfgs memory. if(iprint .ge. 1) write (6, 1005) info = 0 col = 0 head = 1 theta = one iupdat = 0 updatd = .false. call timer(cpu2) cachyt = cachyt + cpu2 - cpu1 goto 222 endif call timer(cpu2) cachyt = cachyt + cpu2 - cpu1 nintol = nintol + nseg c Count the entering and leaving variables for iter > 0; c find the index set of free and active variables at the GCP. call freev(n,nfree,index,nenter,ileave,indx2, + iwhere,wrk,updatd,cnstnd,iprint,iter) nact = n - nfree 333 continue c If there are no free variables or B=theta*I, then c skip the subspace minimization. if (nfree .eq. 0 .or. col .eq. 0) goto 555 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c Subspace minimization. c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc call timer(cpu1) c Form the LEL^T factorization of the indefinite c matrix K = [-D -Y'ZZ'Y/theta L_a'-R_z' ] c [L_a -R_z theta*S'AA'S ] c where E = [-I 0] c [ 0 I] if (wrk) call formk(n,nfree,index,nenter,ileave,indx2,iupdat, + updatd,wn,snd,m,ws,wy,sy,theta,col,head,info) if (info .ne. 0) then c nonpositive definiteness in Cholesky factorization; c refresh the lbfgs memory and restart the iteration. if(iprint .ge. 1) write (6, 1006) info = 0 col = 0 head = 1 theta = one iupdat = 0 updatd = .false. call timer(cpu2) sbtime = sbtime + cpu2 - cpu1 goto 222 endif c compute r=-Z'B(xcp-xk)-Z'g (using wa(2m+1)=W'(xcp-x) c from 'cauchy'). call cmprlb(n,m,x,g,ws,wy,sy,wt,z,r,wa,index, + theta,col,head,nfree,cnstnd,info) if (info .ne. 0) goto 444 c-jlm-jn call the direct method. call subsm( n, m, nfree, index, l, u, nbd, z, r, xp, ws, wy, + theta, x, g, col, head, iword, wa, wn, iprint, info) 444 continue if (info .ne. 0) then c singular triangular system detected; c refresh the lbfgs memory and restart the iteration. if(iprint .ge. 1) write (6, 1005) info = 0 col = 0 head = 1 theta = one iupdat = 0 updatd = .false. call timer(cpu2) sbtime = sbtime + cpu2 - cpu1 goto 222 endif call timer(cpu2) sbtime = sbtime + cpu2 - cpu1 555 continue cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c Line search and optimality tests. c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c Generate the search direction d:=z-x. do 40 i = 1, n d(i) = z(i) - x(i) 40 continue call timer(cpu1) 666 continue call lnsrlb(n,l,u,nbd,x,f,fold,gd,gdold,g,d,r,t,z,stp,dnorm, + dtd,xstep,stpmx,iter,ifun,iback,nfgv,info,itask, + boxed,cnstnd,icsave,isave(22),dsave(17)) if (info .ne. 0 .or. iback .ge. 20) then c restore the previous iterate. call dcopy(n,t,1,x,1) call dcopy(n,r,1,g,1) f = fold if (col .eq. 0) then c abnormal termination. if (info .eq. 0) then info = -9 c restore the actual number of f and g evaluations etc. nfgv = nfgv - 1 ifun = ifun - 1 iback = iback - 1 endif c task = 'ABNORMAL_TERMINATION_IN_LNSRCH' itask = 5 iter = iter + 1 goto 999 else c refresh the lbfgs memory and restart the iteration. if(iprint .ge. 1) write (6, 1008) if (info .eq. 0) nfgv = nfgv - 1 info = 0 col = 0 head = 1 theta = one iupdat = 0 updatd = .false. c task = 'RESTART_FROM_LNSRCH' itask = 22 call timer(cpu2) lnscht = lnscht + cpu2 - cpu1 goto 222 endif c else if (task(1:5) .eq. 'FG_LN') then else if (itask .eq. 20) then c return to the driver for calculating f and g; reenter at 666. goto 1000 else c calculate and print out the quantities related to the new X. call timer(cpu2) lnscht = lnscht + cpu2 - cpu1 iter = iter + 1 c Compute the infinity norm of the projected (-)gradient. call projgr(n,l,u,nbd,x,g,sbgnrm) c Print iteration information. call prn2lb(n,x,f,g,iprint,itfile,iter,nfgv,nact, + sbgnrm,nseg,word,iword,iback,stp,xstep) goto 1000 endif 777 continue c Test for termination. if (sbgnrm .le. pgtol) then c terminate the algorithm. c task = 'CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL' itask = 7 goto 999 endif ddum = max(abs(fold), abs(f), one) if ((fold - f) .le. tol*ddum) then c terminate the algorithm. c task = 'CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH' itask = 8 if (iback .ge. 10) info = -5 c i.e., to issue a warning if iback>10 in the line search. goto 999 endif c Compute d=newx-oldx, r=newg-oldg, rr=y'y and dr=y's. do 42 i = 1, n r(i) = g(i) - r(i) 42 continue rr = ddot(n,r,1,r,1) if (stp .eq. one) then dr = gd - gdold ddum = -gdold else dr = (gd - gdold)*stp call dscal(n,stp,d,1) ddum = -gdold*stp endif if (dr .le. epsmch*ddum) then c skip the L-BFGS update. nskip = nskip + 1 updatd = .false. if (iprint .ge. 1) write (6,1004) dr, ddum goto 888 endif cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c Update the L-BFGS matrix. c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc updatd = .true. iupdat = iupdat + 1 c Update matrices WS and WY and form the middle matrix in B. call matupd(n,m,ws,wy,sy,ss,d,r,itail, + iupdat,col,head,theta,rr,dr,stp,dtd) c Form the upper half of the pds T = theta*SS + L*D^(-1)*L'; c Store T in the upper triangular of the array wt; c Cholesky factorize T to J*J' with c J' stored in the upper triangular of wt. call formt(m,wt,sy,ss,col,theta,info) if (info .ne. 0) then c nonpositive definiteness in Cholesky factorization; c refresh the lbfgs memory and restart the iteration. if(iprint .ge. 1) write (6, 1007) info = 0 col = 0 head = 1 theta = one iupdat = 0 updatd = .false. goto 222 endif c Now the inverse of the middle matrix in B is c [ D^(1/2) O ] [ -D^(1/2) D^(-1/2)*L' ] c [ -L*D^(-1/2) J ] [ 0 J' ] 888 continue c -------------------- the end of the loop ----------------------------- goto 222 999 continue call timer(time2) time = time2 - time1 call prn3lb(n,x,f,itask,iprint,info,itfile, + iter,nfgv,nintol,nskip,nact,sbgnrm, + time,nseg,word,iback,stp,xstep,k, + cachyt,sbtime,lnscht) 1000 continue c Save local variables. lsave(1) = prjctd lsave(2) = cnstnd lsave(3) = boxed lsave(4) = updatd isave(1) = nintol isave(3) = itfile isave(4) = iback isave(5) = nskip isave(6) = head isave(7) = col isave(8) = itail isave(9) = iter isave(10) = iupdat isave(12) = nseg isave(13) = nfgv isave(14) = info isave(15) = ifun isave(16) = iword isave(17) = nfree isave(18) = nact isave(19) = ileave isave(20) = nenter dsave(1) = theta dsave(2) = fold dsave(3) = tol dsave(4) = dnorm dsave(5) = epsmch dsave(6) = cpu1 dsave(7) = cachyt dsave(8) = sbtime dsave(9) = lnscht dsave(10) = time1 dsave(11) = gd dsave(12) = stpmx dsave(13) = sbgnrm dsave(14) = stp dsave(15) = gdold dsave(16) = dtd 1001 format (//,'ITERATION ',i5) 1002 format + (/,'At iterate',i5,4x,'f= ',1p,d12.5,4x,'|proj g|= ',1p,d12.5) 1003 format (2(1x,i4),5x,'-',5x,'-',3x,'-',5x,'-',5x,'-',8x,'-',3x, + 1p,2(1x,d10.3)) 1004 format (' ys=',1p,e10.3,' -gs=',1p,e10.3,' BFGS update SKIPPED') 1005 format (/, +' Singular triangular system detected;',/, +' refresh the lbfgs memory and restart the iteration.') 1006 format (/, +' Nonpositive definiteness in Cholesky factorization in formk;',/, +' refresh the lbfgs memory and restart the iteration.') 1007 format (/, +' Nonpositive definiteness in Cholesky factorization in formt;',/, +' refresh the lbfgs memory and restart the iteration.') 1008 format (/, +' Bad direction in the line search;',/, +' refresh the lbfgs memory and restart the iteration.') return end c======================= The end of mainlb ============================= subroutine active(n, l, u, nbd, x, iwhere, iprint, + prjctd, cnstnd, boxed) logical prjctd, cnstnd, boxed integer n, iprint, nbd(n), iwhere(n) double precision x(n), l(n), u(n) c ************ c c Subroutine active c c This subroutine initializes iwhere and projects the initial x to c the feasible set if necessary. c c iwhere is an integer array of dimension n. c On entry iwhere is unspecified. c On exit iwhere(i)=-1 if x(i) has no bounds c 3 if l(i)=u(i) c 0 otherwise. c In cauchy, iwhere is given finer gradations. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer nbdd,i double precision zero parameter (zero=0.0d0) c Initialize nbdd, prjctd, cnstnd and boxed. nbdd = 0 prjctd = .false. cnstnd = .false. boxed = .true. c Project the initial x to the easible set if necessary. do 10 i = 1, n if (nbd(i) .gt. 0) then if (nbd(i) .le. 2 .and. x(i) .le. l(i)) then if (x(i) .lt. l(i)) then prjctd = .true. x(i) = l(i) endif nbdd = nbdd + 1 else if (nbd(i) .ge. 2 .and. x(i) .ge. u(i)) then if (x(i) .gt. u(i)) then prjctd = .true. x(i) = u(i) endif nbdd = nbdd + 1 endif endif 10 continue c Initialize iwhere and assign values to cnstnd and boxed. do 20 i = 1, n if (nbd(i) .ne. 2) boxed = .false. if (nbd(i) .eq. 0) then c this variable is always free iwhere(i) = -1 c otherwise set x(i)=mid(x(i), u(i), l(i)). else cnstnd = .true. if (nbd(i) .eq. 2 .and. u(i) - l(i) .le. zero) then c this variable is always fixed iwhere(i) = 3 else iwhere(i) = 0 endif endif 20 continue if (iprint .ge. 0) then if (prjctd) write (6,*) + 'The initial X is infeasible. Restart with its projection.' if (.not. cnstnd) + write (6,*) 'This problem is unconstrained.' endif if (iprint .gt. 0) write (6,1001) nbdd 1001 format (/,'At X0 ',i9,' variables are exactly at the bounds') return end c======================= The end of active ============================= subroutine bmv(m, sy, wt, col, v, p, info) integer m, col, info double precision sy(m, m), wt(m, m), v(2*col), p(2*col) c ************ c c Subroutine bmv c c This subroutine computes the product of the 2m x 2m middle matrix c in the compact L-BFGS formula of B and a 2m vector v; c it returns the product in p. c c m is an integer variable. c On entry m is the maximum number of variable metric corrections c used to define the limited memory matrix. c On exit m is unchanged. c c sy is a double precision array of dimension m x m. c On entry sy specifies the matrix S'Y. c On exit sy is unchanged. c c wt is a double precision array of dimension m x m. c On entry wt specifies the upper triangular matrix J' which is c the Cholesky factor of (thetaS'S+LD^(-1)L'). c On exit wt is unchanged. c c col is an integer variable. c On entry col specifies the number of s-vectors (or y-vectors) c stored in the compact L-BFGS formula. c On exit col is unchanged. c c v is a double precision array of dimension 2col. c On entry v specifies vector v. c On exit v is unchanged. c c p is a double precision array of dimension 2col. c On entry p is unspecified. c On exit p is the product Mv. c c info is an integer variable. c On entry info is unspecified. c On exit info = 0 for normal return, c = nonzero for abnormal return when the system c to be solved by dtrsl is singular. c c Subprograms called: c c Linpack ... dtrsl. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer i,k,i2 double precision sum if (col .eq. 0) return c PART I: solve [ D^(1/2) O ] [ p1 ] = [ v1 ] c [ -L*D^(-1/2) J ] [ p2 ] [ v2 ]. c solve Jp2=v2+LD^(-1)v1. p(col + 1) = v(col + 1) do 20 i = 2, col i2 = col + i sum = 0.0d0 do 10 k = 1, i - 1 sum = sum + sy(i,k)*v(k)/sy(k,k) 10 continue p(i2) = v(i2) + sum 20 continue c Solve the triangular system call dtrsl(wt,m,col,p(col+1),11,info) if (info .ne. 0) return c solve D^(1/2)p1=v1. do 30 i = 1, col p(i) = v(i)/sqrt(sy(i,i)) 30 continue c PART II: solve [ -D^(1/2) D^(-1/2)*L' ] [ p1 ] = [ p1 ] c [ 0 J' ] [ p2 ] [ p2 ]. c solve J^Tp2=p2. call dtrsl(wt,m,col,p(col+1),01,info) if (info .ne. 0) return c compute p1=-D^(-1/2)(p1-D^(-1/2)L'p2) c =-D^(-1/2)p1+D^(-1)L'p2. do 40 i = 1, col p(i) = -p(i)/sqrt(sy(i,i)) 40 continue do 60 i = 1, col sum = 0.d0 do 50 k = i + 1, col sum = sum + sy(k,i)*p(col+k)/sy(i,i) 50 continue p(i) = p(i) + sum 60 continue return end c======================== The end of bmv =============================== 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) implicit none integer n, m, head, col, nseg, iprint, info, + nbd(n), iorder(n), iwhere(n) double precision theta, epsmch, + x(n), l(n), u(n), g(n), t(n), d(n), xcp(n), + wy(n, col), ws(n, col), sy(m, m), + wt(m, m), p(2*m), c(2*m), wbp(2*m), v(2*m) c ************ c c Subroutine cauchy c c For given x, l, u, g (with sbgnrm > 0), and a limited memory c BFGS matrix B defined in terms of matrices WY, WS, WT, and c scalars head, col, and theta, this subroutine computes the c generalized Cauchy point (GCP), defined as the first local c minimizer of the quadratic c c Q(x + s) = g's + 1/2 s'Bs c c along the projected gradient direction P(x-tg,l,u). c The routine returns the GCP in xcp. c c n is an integer variable. c On entry n is the dimension of the problem. c On exit n is unchanged. c c x is a double precision array of dimension n. c On entry x is the starting point for the GCP computation. c On exit x is unchanged. c c l is a double precision array of dimension n. c On entry l is the lower bound of x. c On exit l is unchanged. c c u is a double precision array of dimension n. c On entry u is the upper bound of x. c On exit u is unchanged. c c nbd is an integer array of dimension n. c On entry nbd represents the type of bounds imposed on the c variables, and must be specified as follows: c nbd(i)=0 if x(i) is unbounded, c 1 if x(i) has only a lower bound, c 2 if x(i) has both lower and upper bounds, and c 3 if x(i) has only an upper bound. c On exit nbd is unchanged. c c g is a double precision array of dimension n. c On entry g is the gradient of f(x). g must be a nonzero vector. c On exit g is unchanged. c c iorder is an integer working array of dimension n. c iorder will be used to store the breakpoints in the piecewise c linear path and free variables encountered. On exit, c iorder(1),...,iorder(nleft) are indices of breakpoints c which have not been encountered; c iorder(nleft+1),...,iorder(nbreak) are indices of c encountered breakpoints; and c iorder(nfree),...,iorder(n) are indices of variables which c have no bound constraits along the search direction. c c iwhere is an integer array of dimension n. c On entry iwhere indicates only the permanently fixed (iwhere=3) c or free (iwhere= -1) components of x. c On exit iwhere records the status of the current x variables. c iwhere(i)=-3 if x(i) is free and has bounds, but is not moved c 0 if x(i) is free and has bounds, and is moved c 1 if x(i) is fixed at l(i), and l(i) .ne. u(i) c 2 if x(i) is fixed at u(i), and u(i) .ne. l(i) c 3 if x(i) is always fixed, i.e., u(i)=x(i)=l(i) c -1 if x(i) is always free, i.e., it has no bounds. c c t is a double precision working array of dimension n. c t will be used to store the break points. c c d is a double precision array of dimension n used to store c the Cauchy direction P(x-tg)-x. c c xcp is a double precision array of dimension n used to return the c GCP on exit. c c m is an integer variable. c On entry m is the maximum number of variable metric corrections c used to define the limited memory matrix. c On exit m is unchanged. c c ws, wy, sy, and wt are double precision arrays. c On entry they store information that defines the c limited memory BFGS matrix: c ws(n,m) stores S, a set of s-vectors; c wy(n,m) stores Y, a set of y-vectors; c sy(m,m) stores S'Y; c wt(m,m) stores the c Cholesky factorization of (theta*S'S+LD^(-1)L'). c On exit these arrays are unchanged. c c theta is a double precision variable. c On entry theta is the scaling factor specifying B_0 = theta I. c On exit theta is unchanged. c c col is an integer variable. c On entry col is the actual number of variable metric c corrections stored so far. c On exit col is unchanged. c c head is an integer variable. c On entry head is the location of the first s-vector (or y-vector) c in S (or Y). c On exit col is unchanged. c c p is a double precision working array of dimension 2m. c p will be used to store the vector p = W^(T)d. c c c is a double precision working array of dimension 2m. c c will be used to store the vector c = W^(T)(xcp-x). c c wbp is a double precision working array of dimension 2m. c wbp will be used to store the row of W corresponding c to a breakpoint. c c v is a double precision working array of dimension 2m. c c nseg is an integer variable. c On exit nseg records the number of quadratic segments explored c in searching for the GCP. c c sg and yg are double precision arrays of dimension m. c On entry sg and yg store S'g and Y'g correspondingly. c On exit they are unchanged. c c iprint is an INTEGER variable that must be set by the user. c It controls the frequency and type of output generated: c iprint<0 no output is generated; c iprint=0 print only one line at the last iteration; c 0100 print details of every iteration including x and g; c When iprint > 0, the file iterate.dat will be created to c summarize the iteration. c c sbgnrm is a double precision variable. c On entry sbgnrm is the norm of the projected gradient at x. c On exit sbgnrm is unchanged. c c info is an integer variable. c On entry info is 0. c On exit info = 0 for normal return, c = nonzero for abnormal return when the the system c used in routine bmv is singular. c c Subprograms called: c c L-BFGS-B Library ... hpsolb, bmv. c c Linpack ... dscal dcopy, daxpy. c c c References: c c [1] R. H. Byrd, P. Lu, J. Nocedal and C. Zhu, ``A limited c memory algorithm for bound constrained optimization'', c SIAM J. Scientific Computing 16 (1995), no. 5, pp. 1190--1208. c c [2] C. Zhu, R.H. Byrd, P. Lu, J. Nocedal, ``L-BFGS-B: FORTRAN c Subroutines for Large Scale Bound Constrained Optimization'' c Tech. Report, NAM-11, EECS Department, Northwestern University, c 1994. c c (Postscript files of these papers are available via anonymous c ftp to eecs.nwu.edu in the directory pub/lbfgs/lbfgs_bcm.) c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ logical xlower,xupper,bnded integer i,j,col2,nfree,nbreak,pointr, + ibp,nleft,ibkmin,iter double precision f1,f2,dt,dtm,tsum,dibp,zibp,dibp2,bkmin, + tu,tl,wmc,wmp,wmw,ddot,tj,tj0,neggi,sbgnrm, + f2_org double precision one,zero parameter (one=1.0d0,zero=0.0d0) c Check the status of the variables, reset iwhere(i) if necessary; c compute the Cauchy direction d and the breakpoints t; initialize c the derivative f1 and the vector p = W'd (for theta = 1). if (sbgnrm .le. zero) then if (iprint .ge. 0) write (6,*) 'Subgnorm = 0. GCP = X.' call dcopy(n,x,1,xcp,1) return endif bnded = .true. nfree = n + 1 nbreak = 0 ibkmin = 0 bkmin = zero col2 = 2*col f1 = zero if (iprint .ge. 99) write (6,3010) c We set p to zero and build it up as we determine d. do 20 i = 1, col2 p(i) = zero 20 continue c In the following loop we determine for each variable its bound c status and its breakpoint, and update p accordingly. c Smallest breakpoint is identified. do 50 i = 1, n neggi = -g(i) if (iwhere(i) .ne. 3 .and. iwhere(i) .ne. -1) then c if x(i) is not a constant and has bounds, c compute the difference between x(i) and its bounds. if (nbd(i) .le. 2) tl = x(i) - l(i) if (nbd(i) .ge. 2) tu = u(i) - x(i) c If a variable is close enough to a bound c we treat it as at bound. xlower = nbd(i) .le. 2 .and. tl .le. zero xupper = nbd(i) .ge. 2 .and. tu .le. zero c reset iwhere(i). iwhere(i) = 0 if (xlower) then if (neggi .le. zero) iwhere(i) = 1 else if (xupper) then if (neggi .ge. zero) iwhere(i) = 2 else if (abs(neggi) .le. zero) iwhere(i) = -3 endif endif pointr = head if (iwhere(i) .ne. 0 .and. iwhere(i) .ne. -1) then d(i) = zero else d(i) = neggi f1 = f1 - neggi*neggi c calculate p := p - W'e_i* (g_i). do 40 j = 1, col p(j) = p(j) + wy(i,pointr)* neggi p(col + j) = p(col + j) + ws(i,pointr)*neggi pointr = mod(pointr,m) + 1 40 continue if (nbd(i) .le. 2 .and. nbd(i) .ne. 0 + .and. neggi .lt. zero) then c x(i) + d(i) is bounded; compute t(i). nbreak = nbreak + 1 iorder(nbreak) = i t(nbreak) = tl/(-neggi) if (nbreak .eq. 1 .or. t(nbreak) .lt. bkmin) then bkmin = t(nbreak) ibkmin = nbreak endif else if (nbd(i) .ge. 2 .and. neggi .gt. zero) then c x(i) + d(i) is bounded; compute t(i). nbreak = nbreak + 1 iorder(nbreak) = i t(nbreak) = tu/neggi if (nbreak .eq. 1 .or. t(nbreak) .lt. bkmin) then bkmin = t(nbreak) ibkmin = nbreak endif else c x(i) + d(i) is not bounded. nfree = nfree - 1 iorder(nfree) = i if (abs(neggi) .gt. zero) bnded = .false. endif endif 50 continue c The indices of the nonzero components of d are now stored c in iorder(1),...,iorder(nbreak) and iorder(nfree),...,iorder(n). c The smallest of the nbreak breakpoints is in t(ibkmin)=bkmin. if (theta .ne. one) then c complete the initialization of p for theta not= one. call dscal(col,theta,p(col+1),1) endif c Initialize GCP xcp = x. call dcopy(n,x,1,xcp,1) if (nbreak .eq. 0 .and. nfree .eq. n + 1) then c is a zero vector, return with the initial xcp as GCP. if (iprint .gt. 100) write (6,1010) (xcp(i), i = 1, n) return endif c Initialize c = W'(xcp - x) = 0. do 60 j = 1, col2 c(j) = zero 60 continue c Initialize derivative f2. f2 = -theta*f1 f2_org = f2 if (col .gt. 0) then call bmv(m,sy,wt,col,p,v,info) if (info .ne. 0) return f2 = f2 - ddot(col2,v,1,p,1) endif dtm = -f1/f2 tsum = zero nseg = 1 if (iprint .ge. 99) + write (6,*) 'There are ',nbreak,' breakpoints ' c If there are no breakpoints, locate the GCP and return. if (nbreak .eq. 0) goto 888 nleft = nbreak iter = 1 tj = zero c------------------- the beginning of the loop ------------------------- 777 continue c Find the next smallest breakpoint; c compute dt = t(nleft) - t(nleft + 1). tj0 = tj if (iter .eq. 1) then c Since we already have the smallest breakpoint we need not do c heapsort yet. Often only one breakpoint is used and the c cost of heapsort is avoided. tj = bkmin ibp = iorder(ibkmin) else if (iter .eq. 2) then c Replace the already used smallest breakpoint with the c breakpoint numbered nbreak > nlast, before heapsort call. if (ibkmin .ne. nbreak) then t(ibkmin) = t(nbreak) iorder(ibkmin) = iorder(nbreak) endif c Update heap structure of breakpoints c (if iter=2, initialize heap). endif call hpsolb(nleft,t,iorder,iter-2) tj = t(nleft) ibp = iorder(nleft) endif dt = tj - tj0 if (dt .ne. zero .and. iprint .ge. 100) then write (6,4011) nseg,f1,f2 write (6,5010) dt write (6,6010) dtm endif c If a minimizer is within this interval, locate the GCP and return. if (dtm .lt. dt) goto 888 c Otherwise fix one variable and c reset the corresponding component of d to zero. tsum = tsum + dt nleft = nleft - 1 iter = iter + 1 dibp = d(ibp) d(ibp) = zero if (dibp .gt. zero) then zibp = u(ibp) - x(ibp) xcp(ibp) = u(ibp) iwhere(ibp) = 2 else zibp = l(ibp) - x(ibp) xcp(ibp) = l(ibp) iwhere(ibp) = 1 endif if (iprint .ge. 100) write (6,*) 'Variable ',ibp,' is fixed.' if (nleft .eq. 0 .and. nbreak .eq. n) then c all n variables are fixed, c return with xcp as GCP. dtm = dt goto 999 endif c Update the derivative information. nseg = nseg + 1 dibp2 = dibp**2 c Update f1 and f2. c temporarily set f1 and f2 for col=0. f1 = f1 + dt*f2 + dibp2 - theta*dibp*zibp f2 = f2 - theta*dibp2 if (col .gt. 0) then c update c = c + dt*p. call daxpy(col2,dt,p,1,c,1) c choose wbp, c the row of W corresponding to the breakpoint encountered. pointr = head do 70 j = 1,col wbp(j) = wy(ibp,pointr) wbp(col + j) = theta*ws(ibp,pointr) pointr = mod(pointr,m) + 1 70 continue c compute (wbp)Mc, (wbp)Mp, and (wbp)M(wbp)'. call bmv(m,sy,wt,col,wbp,v,info) if (info .ne. 0) return wmc = ddot(col2,c,1,v,1) wmp = ddot(col2,p,1,v,1) wmw = ddot(col2,wbp,1,v,1) c update p = p - dibp*wbp. call daxpy(col2,-dibp,wbp,1,p,1) c complete updating f1 and f2 while col > 0. f1 = f1 + dibp*wmc f2 = f2 + 2.0d0*dibp*wmp - dibp2*wmw endif f2 = max(epsmch*f2_org,f2) if (nleft .gt. 0) then dtm = -f1/f2 goto 777 c to repeat the loop for unsearched intervals. else if(bnded) then f1 = zero f2 = zero dtm = zero else dtm = -f1/f2 endif c------------------- the end of the loop ------------------------------- 888 continue if (iprint .ge. 99) then write (6,*) write (6,*) 'GCP found in this segment' write (6,4010) nseg,f1,f2 write (6,6010) dtm endif if (dtm .le. zero) dtm = zero tsum = tsum + dtm c Move free variables (i.e., the ones w/o breakpoints) and c the variables whose breakpoints haven't been reached. call daxpy(n,tsum,d,1,xcp,1) 999 continue c Update c = c + dtm*p = W'(x^c - x) c which will be used in computing r = Z'(B(x^c - x) + g). if (col .gt. 0) call daxpy(col2,dtm,p,1,c,1) if (iprint .gt. 100) write (6,1010) (xcp(i),i = 1,n) if (iprint .ge. 99) write (6,2010) 1010 format ('Cauchy X = ',/,(4x,1p,6(1x,d11.4))) 2010 format (/,'---------------- exit CAUCHY----------------------',/) 3010 format (/,'---------------- CAUCHY entered-------------------') 4010 format ('Piece ',i3,' --f1, f2 at start point ',1p,2(1x,d11.4)) 4011 format (/,'Piece ',i3,' --f1, f2 at start point ', + 1p,2(1x,d11.4)) 5010 format ('Distance to the next break point = ',1p,d11.4) 6010 format ('Distance to the stationary point = ',1p,d11.4) return end c====================== The end of cauchy ============================== subroutine cmprlb(n, m, x, g, ws, wy, sy, wt, z, r, wa, index, + theta, col, head, nfree, cnstnd, info) logical cnstnd integer n, m, col, head, nfree, info, index(n) double precision theta, + x(n), g(n), z(n), r(n), wa(4*m), + ws(n, m), wy(n, m), sy(m, m), wt(m, m) c ************ c c Subroutine cmprlb c c This subroutine computes r=-Z'B(xcp-xk)-Z'g by using c wa(2m+1)=W'(xcp-x) from subroutine cauchy. c c Subprograms called: c c L-BFGS-B Library ... bmv. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer i,j,k,pointr double precision a1,a2 if (.not. cnstnd .and. col .gt. 0) then do 26 i = 1, n r(i) = -g(i) 26 continue else do 30 i = 1, nfree k = index(i) r(i) = -theta*(z(k) - x(k)) - g(k) 30 continue call bmv(m,sy,wt,col,wa(2*m+1),wa(1),info) if (info .ne. 0) then info = -8 return endif pointr = head do 34 j = 1, col a1 = wa(j) a2 = theta*wa(col + j) do 32 i = 1, nfree k = index(i) r(i) = r(i) + wy(k,pointr)*a1 + ws(k,pointr)*a2 32 continue pointr = mod(pointr,m) + 1 34 continue endif return end c======================= The end of cmprlb ============================= subroutine errclb(n, m, factr, l, u, nbd, itask, info, k) c character*255 task integer n, m, info, k, nbd(n) double precision factr, l(n), u(n) c ************ c c Subroutine errclb c c This subroutine checks the validity of the input data. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer i double precision one,zero parameter (one=1.0d0,zero=0.0d0) c Check the input arguments for errors. c if (n .le. 0) task = 'ERROR: N .LE. 0' if (n .le. 0) then write (6, *) ' ERROR: N .LE. 0' stop endif c if (m .le. 0) task = 'ERROR: M .LE. 0' if (m .le. 0) then write (6, *) ' ERROR: M .LE. 0' stop endif c if (factr .lt. zero) task = 'ERROR: FACTR .LT. 0' if (factr .le. zero) then write (6, *) ' ERROR: FACTR .LT. 0' stop endif c Check the validity of the arrays nbd(i), u(i), and l(i). do 10 i = 1, n if (nbd(i) .lt. 0 .or. nbd(i) .gt. 3) then c return c task = 'ERROR: INVALID NBD' itask = 12 info = -6 k = i endif if (nbd(i) .eq. 2) then if (l(i) .gt. u(i)) then c return c task = 'ERROR: NO FEASIBLE SOLUTION' itask = 14 info = -7 k = i endif endif 10 continue return end c======================= The end of errclb ============================= subroutine formk(n, nsub, ind, nenter, ileave, indx2, iupdat, + updatd, wn, wn1, m, ws, wy, sy, theta, col, + head, info) integer n, nsub, m, col, head, nenter, ileave, iupdat, + info, ind(n), indx2(n) double precision theta, wn(2*m, 2*m), wn1(2*m, 2*m), + ws(n, m), wy(n, m), sy(m, m) logical updatd c ************ c c Subroutine formk c c This subroutine forms the LEL^T factorization of the indefinite c c matrix K = [-D -Y'ZZ'Y/theta L_a'-R_z' ] c [L_a -R_z theta*S'AA'S ] c where E = [-I 0] c [ 0 I] c The matrix K can be shown to be equal to the matrix M^[-1]N c occurring in section 5.1 of [1], as well as to the matrix c Mbar^[-1] Nbar in section 5.3. c c n is an integer variable. c On entry n is the dimension of the problem. c On exit n is unchanged. c c nsub is an integer variable c On entry nsub is the number of subspace variables in free set. c On exit nsub is not changed. c c ind is an integer array of dimension nsub. c On entry ind specifies the indices of subspace variables. c On exit ind is unchanged. c c nenter is an integer variable. c On entry nenter is the number of variables entering the c free set. c On exit nenter is unchanged. c c ileave is an integer variable. c On entry indx2(ileave),...,indx2(n) are the variables leaving c the free set. c On exit ileave is unchanged. c c indx2 is an integer array of dimension n. c On entry indx2(1),...,indx2(nenter) are the variables entering c the free set, while indx2(ileave),...,indx2(n) are the c variables leaving the free set. c On exit indx2 is unchanged. c c iupdat is an integer variable. c On entry iupdat is the total number of BFGS updates made so far. c On exit iupdat is unchanged. c c updatd is a logical variable. c On entry 'updatd' is true if the L-BFGS matrix is updatd. c On exit 'updatd' is unchanged. c c wn is a double precision array of dimension 2m x 2m. c On entry wn is unspecified. c On exit the upper triangle of wn stores the LEL^T factorization c of the 2*col x 2*col indefinite matrix c [-D -Y'ZZ'Y/theta L_a'-R_z' ] c [L_a -R_z theta*S'AA'S ] c c wn1 is a double precision array of dimension 2m x 2m. c On entry wn1 stores the lower triangular part of c [Y' ZZ'Y L_a'+R_z'] c [L_a+R_z S'AA'S ] c in the previous iteration. c On exit wn1 stores the corresponding updated matrices. c The purpose of wn1 is just to store these inner products c so they can be easily updated and inserted into wn. c c m is an integer variable. c On entry m is the maximum number of variable metric corrections c used to define the limited memory matrix. c On exit m is unchanged. c c ws, wy, sy, and wtyy are double precision arrays; c theta is a double precision variable; c col is an integer variable; c head is an integer variable. c On entry they store the information defining the c limited memory BFGS matrix: c ws(n,m) stores S, a set of s-vectors; c wy(n,m) stores Y, a set of y-vectors; c sy(m,m) stores S'Y; c wtyy(m,m) stores the Cholesky factorization c of (theta*S'S+LD^(-1)L') c theta is the scaling factor specifying B_0 = theta I; c col is the number of variable metric corrections stored; c head is the location of the 1st s- (or y-) vector in S (or Y). c On exit they are unchanged. c c info is an integer variable. c On entry info is unspecified. c On exit info = 0 for normal return; c = -1 when the 1st Cholesky factorization failed; c = -2 when the 2st Cholesky factorization failed. c c Subprograms called: c c Linpack ... dcopy, dpofa, dtrsl. c c c References: c [1] R. H. Byrd, P. Lu, J. Nocedal and C. Zhu, ``A limited c memory algorithm for bound constrained optimization'', c SIAM J. Scientific Computing 16 (1995), no. 5, pp. 1190--1208. c c [2] C. Zhu, R.H. Byrd, P. Lu, J. Nocedal, ``L-BFGS-B: a c limited memory FORTRAN code for solving bound constrained c optimization problems'', Tech. Report, NAM-11, EECS Department, c Northwestern University, 1994. c c (Postscript files of these papers are available via anonymous c ftp to eecs.nwu.edu in the directory pub/lbfgs/lbfgs_bcm.) c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer m2,ipntr,jpntr,iy,is,jy,js,is1,js1,k1,i,k, + col2,pbegin,pend,dbegin,dend,upcl double precision ddot,temp1,temp2,temp3,temp4 double precision one,zero parameter (one=1.0d0,zero=0.0d0) c Form the lower triangular part of c WN1 = [Y' ZZ'Y L_a'+R_z'] c [L_a+R_z S'AA'S ] c where L_a is the strictly lower triangular part of S'AA'Y c R_z is the upper triangular part of S'ZZ'Y. if (updatd) then if (iupdat .gt. m) then c shift old part of WN1. do 10 jy = 1, m - 1 js = m + jy call dcopy(m-jy,wn1(jy+1,jy+1),1,wn1(jy,jy),1) call dcopy(m-jy,wn1(js+1,js+1),1,wn1(js,js),1) call dcopy(m-1,wn1(m+2,jy+1),1,wn1(m+1,jy),1) 10 continue endif c put new rows in blocks (1,1), (2,1) and (2,2). pbegin = 1 pend = nsub dbegin = nsub + 1 dend = n iy = col is = m + col ipntr = head + col - 1 if (ipntr .gt. m) ipntr = ipntr - m jpntr = head do 20 jy = 1, col js = m + jy temp1 = zero temp2 = zero temp3 = zero c compute element jy of row 'col' of Y'ZZ'Y do 15 k = pbegin, pend k1 = ind(k) temp1 = temp1 + wy(k1,ipntr)*wy(k1,jpntr) 15 continue c compute elements jy of row 'col' of L_a and S'AA'S do 16 k = dbegin, dend k1 = ind(k) temp2 = temp2 + ws(k1,ipntr)*ws(k1,jpntr) temp3 = temp3 + ws(k1,ipntr)*wy(k1,jpntr) 16 continue wn1(iy,jy) = temp1 wn1(is,js) = temp2 wn1(is,jy) = temp3 jpntr = mod(jpntr,m) + 1 20 continue c put new column in block (2,1). jy = col jpntr = head + col - 1 if (jpntr .gt. m) jpntr = jpntr - m ipntr = head do 30 i = 1, col is = m + i temp3 = zero c compute element i of column 'col' of R_z do 25 k = pbegin, pend k1 = ind(k) temp3 = temp3 + ws(k1,ipntr)*wy(k1,jpntr) 25 continue ipntr = mod(ipntr,m) + 1 wn1(is,jy) = temp3 30 continue upcl = col - 1 else upcl = col endif c modify the old parts in blocks (1,1) and (2,2) due to changes c in the set of free variables. ipntr = head do 45 iy = 1, upcl is = m + iy jpntr = head do 40 jy = 1, iy js = m + jy temp1 = zero temp2 = zero temp3 = zero temp4 = zero do 35 k = 1, nenter k1 = indx2(k) temp1 = temp1 + wy(k1,ipntr)*wy(k1,jpntr) temp2 = temp2 + ws(k1,ipntr)*ws(k1,jpntr) 35 continue do 36 k = ileave, n k1 = indx2(k) temp3 = temp3 + wy(k1,ipntr)*wy(k1,jpntr) temp4 = temp4 + ws(k1,ipntr)*ws(k1,jpntr) 36 continue wn1(iy,jy) = wn1(iy,jy) + temp1 - temp3 wn1(is,js) = wn1(is,js) - temp2 + temp4 jpntr = mod(jpntr,m) + 1 40 continue ipntr = mod(ipntr,m) + 1 45 continue c modify the old parts in block (2,1). ipntr = head do 60 is = m + 1, m + upcl jpntr = head do 55 jy = 1, upcl temp1 = zero temp3 = zero do 50 k = 1, nenter k1 = indx2(k) temp1 = temp1 + ws(k1,ipntr)*wy(k1,jpntr) 50 continue do 51 k = ileave, n k1 = indx2(k) temp3 = temp3 + ws(k1,ipntr)*wy(k1,jpntr) 51 continue if (is .le. jy + m) then wn1(is,jy) = wn1(is,jy) + temp1 - temp3 else wn1(is,jy) = wn1(is,jy) - temp1 + temp3 endif jpntr = mod(jpntr,m) + 1 55 continue ipntr = mod(ipntr,m) + 1 60 continue c Form the upper triangle of WN = [D+Y' ZZ'Y/theta -L_a'+R_z' ] c [-L_a +R_z S'AA'S*theta] m2 = 2*m do 70 iy = 1, col is = col + iy is1 = m + iy do 65 jy = 1, iy js = col + jy js1 = m + jy wn(jy,iy) = wn1(iy,jy)/theta wn(js,is) = wn1(is1,js1)*theta 65 continue do 66 jy = 1, iy - 1 wn(jy,is) = -wn1(is1,jy) 66 continue do 67 jy = iy, col wn(jy,is) = wn1(is1,jy) 67 continue wn(iy,iy) = wn(iy,iy) + sy(iy,iy) 70 continue c Form the upper triangle of WN= [ LL' L^-1(-L_a'+R_z')] c [(-L_a +R_z)L'^-1 S'AA'S*theta ] c first Cholesky factor (1,1) block of wn to get LL' c with L' stored in the upper triangle of wn. call dpofa(wn,m2,col,info) if (info .ne. 0) then info = -1 return endif c then form L^-1(-L_a'+R_z') in the (1,2) block. col2 = 2*col do 71 js = col+1 ,col2 call dtrsl(wn,m2,col,wn(1,js),11,info) 71 continue c Form S'AA'S*theta + (L^-1(-L_a'+R_z'))'L^-1(-L_a'+R_z') in the c upper triangle of (2,2) block of wn. do 72 is = col+1, col2 do 74 js = is, col2 wn(is,js) = wn(is,js) + ddot(col,wn(1,is),1,wn(1,js),1) 74 continue 72 continue c Cholesky factorization of (2,2) block of wn. call dpofa(wn(col+1,col+1),m2,col,info) if (info .ne. 0) then info = -2 return endif return end c======================= The end of formk ============================== subroutine formt(m, wt, sy, ss, col, theta, info) integer m, col, info double precision theta, wt(m, m), sy(m, m), ss(m, m) c ************ c c Subroutine formt c c This subroutine forms the upper half of the pos. def. and symm. c T = theta*SS + L*D^(-1)*L', stores T in the upper triangle c of the array wt, and performs the Cholesky factorization of T c to produce J*J', with J' stored in the upper triangle of wt. c c Subprograms called: c c Linpack ... dpofa. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer i,j,k,k1 double precision ddum double precision zero parameter (zero=0.0d0) c Form the upper half of T = theta*SS + L*D^(-1)*L', c store T in the upper triangle of the array wt. do 52 j = 1, col wt(1,j) = theta*ss(1,j) 52 continue do 55 i = 2, col do 54 j = i, col k1 = min(i,j) - 1 ddum = zero do 53 k = 1, k1 ddum = ddum + sy(i,k)*sy(j,k)/sy(k,k) 53 continue wt(i,j) = ddum + theta*ss(i,j) 54 continue 55 continue c Cholesky factorize T to J*J' with c J' stored in the upper triangle of wt. call dpofa(wt,m,col,info) if (info .ne. 0) then info = -3 endif return end c======================= The end of formt ============================== subroutine freev(n, nfree, index, nenter, ileave, indx2, + iwhere, wrk, updatd, cnstnd, iprint, iter) integer n, nfree, nenter, ileave, iprint, iter, + index(n), indx2(n), iwhere(n) logical wrk, updatd, cnstnd c ************ c c Subroutine freev c c This subroutine counts the entering and leaving variables when c iter > 0, and finds the index set of free and active variables c at the GCP. c c cnstnd is a logical variable indicating whether bounds are present c c index is an integer array of dimension n c for i=1,...,nfree, index(i) are the indices of free variables c for i=nfree+1,...,n, index(i) are the indices of bound variables c On entry after the first iteration, index gives c the free variables at the previous iteration. c On exit it gives the free variables based on the determination c in cauchy using the array iwhere. c c indx2 is an integer array of dimension n c On entry indx2 is unspecified. c On exit with iter>0, indx2 indicates which variables c have changed status since the previous iteration. c For i= 1,...,nenter, indx2(i) have changed from bound to free. c For i= ileave+1,...,n, indx2(i) have changed from free to bound. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer iact,i,k nenter = 0 ileave = n + 1 if (iter .gt. 0 .and. cnstnd) then c count the entering and leaving variables. do 20 i = 1, nfree k = index(i) c write(6,*) ' k = index(i) ', k c write(6,*) ' index = ', i if (iwhere(k) .gt. 0) then ileave = ileave - 1 indx2(ileave) = k if (iprint .ge. 100) write (6,*) + 'Variable ',k,' leaves the set of free variables' endif 20 continue do 22 i = 1 + nfree, n k = index(i) if (iwhere(k) .le. 0) then nenter = nenter + 1 indx2(nenter) = k if (iprint .ge. 100) write (6,*) + 'Variable ',k,' enters the set of free variables' endif 22 continue if (iprint .ge. 99) write (6,*) + n+1-ileave,' variables leave; ',nenter,' variables enter' endif wrk = (ileave .lt. n+1) .or. (nenter .gt. 0) .or. updatd c Find the index set of free and active variables at the GCP. nfree = 0 iact = n + 1 do 24 i = 1, n if (iwhere(i) .le. 0) then nfree = nfree + 1 index(nfree) = i else iact = iact - 1 index(iact) = i endif 24 continue if (iprint .ge. 99) write (6,*) + nfree,' variables are free at GCP ',iter + 1 return end c======================= The end of freev ============================== subroutine hpsolb(n, t, iorder, iheap) integer iheap, n, iorder(n) double precision t(n) c ************ c c Subroutine hpsolb c c This subroutine sorts out the least element of t, and puts the c remaining elements of t in a heap. c c n is an integer variable. c On entry n is the dimension of the arrays t and iorder. c On exit n is unchanged. c c t is a double precision array of dimension n. c On entry t stores the elements to be sorted, c On exit t(n) stores the least elements of t, and t(1) to t(n-1) c stores the remaining elements in the form of a heap. c c iorder is an integer array of dimension n. c On entry iorder(i) is the index of t(i). c On exit iorder(i) is still the index of t(i), but iorder may be c permuted in accordance with t. c c iheap is an integer variable specifying the task. c On entry iheap should be set as follows: c iheap .eq. 0 if t(1) to t(n) is not in the form of a heap, c iheap .ne. 0 if otherwise. c On exit iheap is unchanged. c c c References: c Algorithm 232 of CACM (J. W. J. Williams): HEAPSORT. c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c ************ integer i,j,k,indxin,indxou double precision ddum,out if (iheap .eq. 0) then c Rearrange the elements t(1) to t(n) to form a heap. do 20 k = 2, n ddum = t(k) indxin = iorder(k) c Add ddum to the heap. i = k 10 continue if (i.gt.1) then j = i/2 if (ddum .lt. t(j)) then t(i) = t(j) iorder(i) = iorder(j) i = j goto 10 endif endif t(i) = ddum iorder(i) = indxin 20 continue endif c Assign to 'out' the value of t(1), the least member of the heap, c and rearrange the remaining members to form a heap as c elements 1 to n-1 of t. if (n .gt. 1) then i = 1 out = t(1) indxou = iorder(1) ddum = t(n) indxin = iorder(n) c Restore the heap 30 continue j = i+i if (j .le. n-1) then if (t(j+1) .lt. t(j)) j = j+1 if (t(j) .lt. ddum ) then t(i) = t(j) iorder(i) = iorder(j) i = j goto 30 endif endif t(i) = ddum iorder(i) = indxin c Put the least member in t(n). t(n) = out iorder(n) = indxou endif return end c====================== The end of hpsolb ============================== subroutine lnsrlb(n, l, u, nbd, x, f, fold, gd, gdold, g, d, r, t, + z, stp, dnorm, dtd, xstep, stpmx, iter, ifun, + iback, nfgv, info, itask, boxed, cnstnd, icsave, + isave, dsave) logical boxed, cnstnd integer n, iter, ifun, iback, nfgv, info, itask, icsave, + nbd(n), isave(2) double precision f, fold, gd, gdold, stp, dnorm, dtd, xstep, + stpmx, x(n), l(n), u(n), g(n), d(n), r(n), t(n), + z(n), dsave(13) c ********** c c Subroutine lnsrlb c c This subroutine calls subroutine dcsrch from the Minpack2 library c to perform the line search. Subroutine dscrch is safeguarded so c that all trial points lie within the feasible region. c c Subprograms called: c c Minpack2 Library ... dcsrch. c c Linpack ... dtrsl, ddot. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ********** integer i double precision ddot,a1,a2 double precision one,zero,big parameter (one=1.0d0,zero=0.0d0,big=1.0d+10) double precision ftol,gtol,xtol parameter (ftol=1.0d-3,gtol=0.9d0,xtol=0.1d0) c if (task(1:5) .eq. 'FG_LN') goto 556 if (itask .eq. 20) goto 556 dtd = ddot(n,d,1,d,1) dnorm = sqrt(dtd) c Determine the maximum step length. stpmx = big if (cnstnd) then if (iter .eq. 0) then stpmx = one else do 43 i = 1, n a1 = d(i) if (nbd(i) .ne. 0) then if (a1 .lt. zero .and. nbd(i) .le. 2) then a2 = l(i) - x(i) if (a2 .ge. zero) then stpmx = zero else if (a1*stpmx .lt. a2) then stpmx = a2/a1 endif else if (a1 .gt. zero .and. nbd(i) .ge. 2) then a2 = u(i) - x(i) if (a2 .le. zero) then stpmx = zero else if (a1*stpmx .gt. a2) then stpmx = a2/a1 endif endif endif 43 continue endif endif if (iter .eq. 0 .and. .not. boxed) then stp = min(one/dnorm, stpmx) else stp = one endif call dcopy(n,x,1,t,1) call dcopy(n,g,1,r,1) fold = f ifun = 0 iback = 0 c csave = 'START' icsave = 2 556 continue gd = ddot(n,g,1,d,1) if (ifun .eq. 0) then gdold=gd if (gd .ge. zero) then c the directional derivative >=0. c Line search is impossible. write(6,*)' ascent direction in projection gd = ', gd info = -4 return endif endif call dcsrch(f,gd,stp,ftol,gtol,xtol,zero,stpmx,icsave,isave,dsave) xstep = stp*dnorm c if (csave(1:4) .ne. 'CONV' .and. csave(1:4) .ne. 'WARN') then c2345678901234567890123456789012345678901234567890123456789012345678901234567890 if ((icsave .lt. 6) .or. ((icsave .gt. 8) .and. + (icsave .lt. 23))) then c task = 'FG_LNSRCH' itask = 20 ifun = ifun + 1 nfgv = nfgv + 1 iback = ifun - 1 if (stp .eq. one) then call dcopy(n,z,1,x,1) else do 41 i = 1, n x(i) = stp*d(i) + t(i) 41 continue endif else c task = 'NEW_X' itask = 1 endif return end c======================= The end of lnsrlb ============================= subroutine matupd(n, m, ws, wy, sy, ss, d, r, itail, + iupdat, col, head, theta, rr, dr, stp, dtd) integer n, m, itail, iupdat, col, head double precision theta, rr, dr, stp, dtd, d(n), r(n), + ws(n, m), wy(n, m), sy(m, m), ss(m, m) c ************ c c Subroutine matupd c c This subroutine updates matrices WS and WY, and forms the c middle matrix in B. c c Subprograms called: c c Linpack ... dcopy, ddot. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer j,pointr double precision ddot double precision one parameter (one=1.0d0) c Set pointers for matrices WS and WY. if (iupdat .le. m) then col = iupdat itail = mod(head+iupdat-2,m) + 1 else itail = mod(itail,m) + 1 head = mod(head,m) + 1 endif c Update matrices WS and WY. call dcopy(n,d,1,ws(1,itail),1) call dcopy(n,r,1,wy(1,itail),1) c Set theta=yy/ys. theta = rr/dr c Form the middle matrix in B. c update the upper triangle of SS, c and the lower triangle of SY: if (iupdat .gt. m) then c move old information do 50 j = 1, col - 1 call dcopy(j,ss(2,j+1),1,ss(1,j),1) call dcopy(col-j,sy(j+1,j+1),1,sy(j,j),1) 50 continue endif c add new information: the last row of SY c and the last column of SS: pointr = head do 51 j = 1, col - 1 sy(col,j) = ddot(n,d,1,wy(1,pointr),1) ss(j,col) = ddot(n,ws(1,pointr),1,d,1) pointr = mod(pointr,m) + 1 51 continue if (stp .eq. one) then ss(col,col) = dtd else ss(col,col) = stp*stp*dtd endif sy(col,col) = dr return end c======================= The end of matupd ============================= subroutine prn1lb(n, m, l, u, x, iprint, itfile, epsmch) integer n, m, iprint, itfile double precision epsmch, x(n), l(n), u(n) c ************ c c Subroutine prn1lb c c This subroutine prints the input data, initial point, upper and c lower bounds of each variable, machine precision, as well as c the headings of the output. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer i if (iprint .ge. 0) then write (6,7001) epsmch write (6,*) 'N = ',n,' M = ',m if (iprint .ge. 1) then write (itfile,2001) epsmch write (itfile,*)'N = ',n,' M = ',m write (itfile,9001) if (iprint .gt. 100) then write (6,1004) 'L =',(l(i),i = 1,n) write (6,1004) 'X0 =',(x(i),i = 1,n) write (6,1004) 'U =',(u(i),i = 1,n) endif endif endif 1004 format (/,a4, 1p, 6(1x,d11.4),/,(4x,1p,6(1x,d11.4))) 2001 format ('RUNNING THE L-BFGS-B CODE',/,/, + 'it = iteration number',/, + 'nf = number of function evaluations',/, + 'nseg = number of segments explored during the Cauchy search',/, + 'nact = number of active bounds at the generalized Cauchy point' + ,/, + 'sub = manner in which the subspace minimization terminated:' + ,/,' con = converged, bnd = a bound was reached',/, + 'itls = number of iterations performed in the line search',/, + 'stepl = step length used',/, + 'tstep = norm of the displacement (total step)',/, + 'projg = norm of the projected gradient',/, + 'f = function value',/,/, + ' * * *',/,/, + 'Machine precision =',1p,d10.3) 7001 format ('RUNNING THE L-BFGS-B CODE',/,/, + ' * * *',/,/, + 'Machine precision =',1p,d10.3) 9001 format (/,3x,'it',3x,'nf',2x,'nseg',2x,'nact',2x,'sub',2x,'itls', + 2x,'stepl',4x,'tstep',5x,'projg',8x,'f') return end c======================= The end of prn1lb ============================= subroutine prn2lb(n, x, f, g, iprint, itfile, iter, nfgv, nact, + sbgnrm, nseg, word, iword, iback, stp, xstep) character*3 word integer n, iprint, itfile, iter, nfgv, nact, nseg, + iword, iback double precision f, sbgnrm, stp, xstep, x(n), g(n) c ************ c c Subroutine prn2lb c c This subroutine prints out new information after a successful c line search. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer i,imod c 'word' records the status of subspace solutions. if (iword .eq. 0) then c the subspace minimization converged. word = 'con' else if (iword .eq. 1) then c the subspace minimization stopped at a bound. word = 'bnd' else if (iword .eq. 5) then c the truncated Newton step has been used. word = 'TNT' else word = '---' endif if (iprint .ge. 99) then write (6,*) 'LINE SEARCH',iback,' times; norm of step = ',xstep write (6,2001) iter,f,sbgnrm if (iprint .gt. 100) then write (6,1004) 'X =',(x(i), i = 1, n) write (6,1004) 'G =',(g(i), i = 1, n) endif else if (iprint .gt. 0) then imod = mod(iter,iprint) if (imod .eq. 0) write (6,2001) iter,f,sbgnrm endif if (iprint .ge. 1) write (itfile,3001) + iter,nfgv,nseg,nact,word,iback,stp,xstep,sbgnrm,f 1004 format (/,a4, 1p, 6(1x,d11.4),/,(4x,1p,6(1x,d11.4))) 2001 format + (/,'At iterate',i5,4x,'f= ',1p,d12.5,4x,'|proj g|= ',1p,d12.5) 3001 format(2(1x,i4),2(1x,i5),2x,a3,1x,i4,1p,2(2x,d7.1),1p,2(1x,d10.3)) return end c======================= The end of prn2lb ============================= subroutine prn3lb(n, x, f, itask, iprint, info, itfile, + iter, nfgv, nintol, nskip, nact, sbgnrm, + time, nseg, word, iback, stp, xstep, k, + cachyt, sbtime, lnscht) c character*255 task character*3 word integer n, iprint, info, itfile, iter, nfgv, nintol, + nskip, nact, nseg, iback, k, itask double precision f, sbgnrm, time, stp, xstep, cachyt, sbtime, + lnscht, x(n) c ************ c c Subroutine prn3lb c c This subroutine prints out information when either a built-in c convergence test is satisfied or when an error message is c generated. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer i c if (task(1:5) .eq. 'ERROR') goto 999 if ((itask .ge. 9) .and. (itask .le. 19)) goto 999 if (iprint .ge. 0) then write (6,3003) write (6,3004) write(6,3005) n,iter,nfgv,nintol,nskip,nact,sbgnrm,f if (iprint .ge. 100) then write (6,1004) 'X =',(x(i),i = 1,n) endif if (iprint .ge. 1) write (6,*) ' F =',f endif 999 continue if (iprint .ge. 0) then write (6,3009) itask if (info .ne. 0) then if (info .eq. -1) write (6,9011) if (info .eq. -2) write (6,9012) if (info .eq. -3) write (6,9013) if (info .eq. -4) write (6,9014) if (info .eq. -5) write (6,9015) if (info .eq. -6) write (6,*)' Input nbd(',k,') is invalid.' if (info .eq. -7) + write (6,*)' l(',k,') > u(',k,'). No feasible solution.' if (info .eq. -8) write (6,9018) if (info .eq. -9) write (6,9019) endif if (iprint .ge. 1) write (6,3007) cachyt,sbtime,lnscht write (6,3008) time if (iprint .ge. 1) then if (info .eq. -4 .or. info .eq. -9) then write (itfile,3002) + iter,nfgv,nseg,nact,word,iback,stp,xstep endif write (itfile,3009) itask if (info .ne. 0) then if (info .eq. -1) write (itfile,9011) if (info .eq. -2) write (itfile,9012) if (info .eq. -3) write (itfile,9013) if (info .eq. -4) write (itfile,9014) if (info .eq. -5) write (itfile,9015) if (info .eq. -8) write (itfile,9018) if (info .eq. -9) write (itfile,9019) endif write (itfile,3008) time endif endif 1004 format (/,a4, 1p, 6(1x,d11.4),/,(4x,1p,6(1x,d11.4))) 3002 format(2(1x,i4),2(1x,i5),2x,a3,1x,i4,1p,2(2x,d7.1),6x,'-',10x,'-') 3003 format (/, + ' * * *',/,/, + 'Tit = total number of iterations',/, + 'Tnf = total number of function evaluations',/, + 'Tnint = total number of segments explored during', + ' Cauchy searches',/, + 'Skip = number of BFGS updates skipped',/, + 'Nact = number of active bounds at final generalized', + ' Cauchy point',/, + 'Projg = norm of the final projected gradient',/, + 'F = final function value',/,/, + ' * * *') 3004 format (/,3x,'N',4x,'Tit',5x,'Tnf',2x,'Tnint',2x, + 'Skip',2x,'Nact',5x,'Projg',8x,'F') 3005 format (i5,2(1x,i6),(1x,i6),(2x,i4),(1x,i5),1p,2(2x,d10.3)) 3007 format (/,' Cauchy time',1p,e10.3,' seconds.',/ + ' Subspace minimization time',1p,e10.3,' seconds.',/ + ' Line search time',1p,e10.3,' seconds.') 3008 format (/,' Total User time',1p,e10.3,' seconds.',/) 3009 format (/,i4) 9011 format (/, +' Matrix in 1st Cholesky factorization in formk is not Pos. Def.') 9012 format (/, +' Matrix in 2st Cholesky factorization in formk is not Pos. Def.') 9013 format (/, +' Matrix in the Cholesky factorization in formt is not Pos. Def.') 9014 format (/, +' Derivative >= 0, backtracking line search impossible.',/, +' Previous x, f and g restored.',/, +' Possible causes: 1 error in function or gradient evaluation;',/, +' 2 rounding errors dominate computation.') 9015 format (/, +' Warning: more than 10 function and gradient',/, +' evaluations in the last line search. Termination',/, +' may possibly be caused by a bad search direction.') 9018 format (/,' The triangular system is singular.') 9019 format (/, +' Line search cannot locate an adequate point after 20 function',/ +,' and gradient evaluations. Previous x, f and g restored.',/, +' Possible causes: 1 error in function or gradient evaluation;',/, +' 2 rounding error dominate computation.') return end c======================= The end of prn3lb ============================= subroutine projgr(n, l, u, nbd, x, g, sbgnrm) integer n, nbd(n) double precision sbgnrm, x(n), l(n), u(n), g(n) c ************ c c Subroutine projgr c c This subroutine computes the infinity norm of the projected c gradient. c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer i double precision gi double precision one,zero parameter (one=1.0d0,zero=0.0d0) sbgnrm = zero do 15 i = 1, n gi = g(i) if (nbd(i) .ne. 0) then if (gi .lt. zero) then if (nbd(i) .ge. 2) gi = max((x(i)-u(i)),gi) else if (nbd(i) .le. 2) gi = min((x(i)-l(i)),gi) endif endif sbgnrm = max(sbgnrm,abs(gi)) 15 continue return end c======================= The end of projgr ============================= subroutine subsm ( n, m, nsub, ind, l, u, nbd, x, d, xp, ws, wy, + theta, xx, gg, + col, head, iword, wv, wn, iprint, info ) implicit none integer n, m, nsub, col, head, iword, iprint, info, + ind(nsub), nbd(n) double precision theta, + l(n), u(n), x(n), d(n), xp(n), xx(n), gg(n), + ws(n, m), wy(n, m), + wv(2*m), wn(2*m, 2*m) c ********************************************************************** c c This routine contains the major changes in the updated version. c The changes are described in the accompanying paper c c Jose Luis Morales, Jorge Nocedal c "Remark On Algorithm 788: L-BFGS-B: Fortran Subroutines for Large-Scale c Bound Constrained Optimization". Decemmber 27, 2010. c c J.L. Morales Departamento de Matematicas, c Instituto Tecnologico Autonomo de Mexico c Mexico D.F. c c J, Nocedal Department of Electrical Engineering and c Computer Science. c Northwestern University. Evanston, IL. USA c c January 17, 2011 c c ********************************************************************** c c c Subroutine subsm c c Given xcp, l, u, r, an index set that specifies c the active set at xcp, and an l-BFGS matrix B c (in terms of WY, WS, SY, WT, head, col, and theta), c this subroutine computes an approximate solution c of the subspace problem c c (P) min Q(x) = r'(x-xcp) + 1/2 (x-xcp)' B (x-xcp) c c subject to l<=x<=u c x_i=xcp_i for all i in A(xcp) c c along the subspace unconstrained Newton direction c c d = -(Z'BZ)^(-1) r. c c The formula for the Newton direction, given the L-BFGS matrix c and the Sherman-Morrison formula, is c c d = (1/theta)r + (1/theta*2) Z'WK^(-1)W'Z r. c c where c K = [-D -Y'ZZ'Y/theta L_a'-R_z' ] c [L_a -R_z theta*S'AA'S ] c c Note that this procedure for computing d differs c from that described in [1]. One can show that the matrix K is c equal to the matrix M^[-1]N in that paper. c c n is an integer variable. c On entry n is the dimension of the problem. c On exit n is unchanged. c c m is an integer variable. c On entry m is the maximum number of variable metric corrections c used to define the limited memory matrix. c On exit m is unchanged. c c nsub is an integer variable. c On entry nsub is the number of free variables. c On exit nsub is unchanged. c c ind is an integer array of dimension nsub. c On entry ind specifies the coordinate indices of free variables. c On exit ind is unchanged. c c l is a double precision array of dimension n. c On entry l is the lower bound of x. c On exit l is unchanged. c c u is a double precision array of dimension n. c On entry u is the upper bound of x. c On exit u is unchanged. c c nbd is a integer array of dimension n. c On entry nbd represents the type of bounds imposed on the c variables, and must be specified as follows: c nbd(i)=0 if x(i) is unbounded, c 1 if x(i) has only a lower bound, c 2 if x(i) has both lower and upper bounds, and c 3 if x(i) has only an upper bound. c On exit nbd is unchanged. c c x is a double precision array of dimension n. c On entry x specifies the Cauchy point xcp. c On exit x(i) is the minimizer of Q over the subspace of c free variables. c c d is a double precision array of dimension n. c On entry d is the reduced gradient of Q at xcp. c On exit d is the Newton direction of Q. c c xp is a double precision array of dimension n. c used to safeguard the projected Newton direction c c xx is a double precision array of dimension n c On entry it holds the current iterate c On output it is unchanged c gg is a double precision array of dimension n c On entry it holds the gradient at the current iterate c On output it is unchanged c c ws and wy are double precision arrays; c theta is a double precision variable; c col is an integer variable; c head is an integer variable. c On entry they store the information defining the c limited memory BFGS matrix: c ws(n,m) stores S, a set of s-vectors; c wy(n,m) stores Y, a set of y-vectors; c theta is the scaling factor specifying B_0 = theta I; c col is the number of variable metric corrections stored; c head is the location of the 1st s- (or y-) vector in S (or Y). c On exit they are unchanged. c c iword is an integer variable. c On entry iword is unspecified. c On exit iword specifies the status of the subspace solution. c iword = 0 if the solution is in the box, c 1 if some bound is encountered. c c wv is a double precision working array of dimension 2m. c c wn is a double precision array of dimension 2m x 2m. c On entry the upper triangle of wn stores the LEL^T factorization c of the indefinite matrix c c K = [-D -Y'ZZ'Y/theta L_a'-R_z' ] c [L_a -R_z theta*S'AA'S ] c where E = [-I 0] c [ 0 I] c On exit wn is unchanged. c c iprint is an INTEGER variable that must be set by the user. c It controls the frequency and type of output generated: c iprint<0 no output is generated; c iprint=0 print only one line at the last iteration; c 0100 print details of every iteration including x and g; c When iprint > 0, the file iterate.dat will be created to c summarize the iteration. c c info is an integer variable. c On entry info is unspecified. c On exit info = 0 for normal return, c = nonzero for abnormal return c when the matrix K is ill-conditioned. c c Subprograms called: c c Linpack dtrsl. c c c References: c c [1] R. H. Byrd, P. Lu, J. Nocedal and C. Zhu, ``A limited c memory algorithm for bound constrained optimization'', c SIAM J. Scientific Computing 16 (1995), no. 5, pp. 1190--1208. c c c c * * * c c NEOS, November 1994. (Latest revision June 1996.) c Optimization Technology Center. c Argonne National Laboratory and Northwestern University. c Written by c Ciyou Zhu c in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal. c c c ************ integer pointr,m2,col2,ibd,jy,js,i,j,k double precision alpha, xk, dk, temp1, temp2 double precision one,zero parameter (one=1.0d0,zero=0.0d0) c double precision dd_p if (nsub .le. 0) return if (iprint .ge. 99) write (6,1001) c Compute wv = W'Zd. pointr = head do 20 i = 1, col temp1 = zero temp2 = zero do 10 j = 1, nsub k = ind(j) temp1 = temp1 + wy(k,pointr)*d(j) temp2 = temp2 + ws(k,pointr)*d(j) 10 continue wv(i) = temp1 wv(col + i) = theta*temp2 pointr = mod(pointr,m) + 1 20 continue c Compute wv:=K^(-1)wv. m2 = 2*m col2 = 2*col call dtrsl(wn,m2,col2,wv,11,info) if (info .ne. 0) return do 25 i = 1, col wv(i) = -wv(i) 25 continue call dtrsl(wn,m2,col2,wv,01,info) if (info .ne. 0) return c Compute d = (1/theta)d + (1/theta**2)Z'W wv. pointr = head do 40 jy = 1, col js = col + jy do 30 i = 1, nsub k = ind(i) d(i) = d(i) + wy(k,pointr)*wv(jy)/theta + + ws(k,pointr)*wv(js) 30 continue pointr = mod(pointr,m) + 1 40 continue call dscal( nsub, one/theta, d, 1 ) c c----------------------------------------------------------------- c Let us try the projection, d is the Newton direction iword = 0 call dcopy ( n, x, 1, xp, 1 ) c do 50 i=1, nsub k = ind(i) dk = d(i) xk = x(k) if ( nbd(k) .ne. 0 ) then c if ( nbd(k).eq.1 ) then ! lower bounds only x(k) = max( l(k), xk + dk ) if ( x(k).eq.l(k) ) iword = 1 else c if ( nbd(k).eq.2 ) then ! upper and lower bounds xk = max( l(k), xk + dk ) x(k) = min( u(k), xk ) if ( x(k).eq.l(k) .or. x(k).eq.u(k) ) iword = 1 else c if ( nbd(k).eq.3 ) then ! upper bounds only x(k) = min( u(k), xk + dk ) if ( x(k).eq.u(k) ) iword = 1 end if end if end if c else ! free variables x(k) = xk + dk end if 50 continue c if ( iword.eq.0 ) then go to 911 end if c c check sign of the directional derivative c dd_p = zero do 55 i=1, n dd_p = dd_p + (x(i) - xx(i))*gg(i) 55 continue if ( dd_p .gt.zero ) then call dcopy( n, xp, 1, x, 1 ) write(6,*) ' Positive dir derivative in projection ' write(6,*) ' Using the backtracking step ' else go to 911 endif c c----------------------------------------------------------------- c alpha = one temp1 = alpha ibd = 0 do 60 i = 1, nsub k = ind(i) dk = d(i) if (nbd(k) .ne. 0) then if (dk .lt. zero .and. nbd(k) .le. 2) then temp2 = l(k) - x(k) if (temp2 .ge. zero) then temp1 = zero else if (dk*alpha .lt. temp2) then temp1 = temp2/dk endif else if (dk .gt. zero .and. nbd(k) .ge. 2) then temp2 = u(k) - x(k) if (temp2 .le. zero) then temp1 = zero else if (dk*alpha .gt. temp2) then temp1 = temp2/dk endif endif if (temp1 .lt. alpha) then alpha = temp1 ibd = i endif endif 60 continue if (alpha .lt. one) then dk = d(ibd) k = ind(ibd) if (dk .gt. zero) then x(k) = u(k) d(ibd) = zero else if (dk .lt. zero) then x(k) = l(k) d(ibd) = zero endif endif do 70 i = 1, nsub k = ind(i) x(k) = x(k) + alpha*d(i) 70 continue cccccc 911 continue if (iprint .ge. 99) write (6,1004) 1001 format (/,'----------------SUBSM entered-----------------',/) 1004 format (/,'----------------exit SUBSM --------------------',/) return end c====================== The end of subsm =============================== subroutine dcsrch(f,g,stp,ftol,gtol,xtol,stpmin,stpmax, + itask,isave,dsave) c character*(*) task integer itask, isave(2) double precision f,g,stp,ftol,gtol,xtol,stpmin,stpmax double precision dsave(13) c ********** c c Subroutine dcsrch c c This subroutine finds a step that satisfies a sufficient c decrease condition and a curvature condition. c c Each call of the subroutine updates an interval with c endpoints stx and sty. The interval is initially chosen c so that it contains a minimizer of the modified function c c psi(stp) = f(stp) - f(0) - ftol*stp*f'(0). c c If psi(stp) <= 0 and f'(stp) >= 0 for some step, then the c interval is chosen so that it contains a minimizer of f. c c The algorithm is designed to find a step that satisfies c the sufficient decrease condition c c f(stp) <= f(0) + ftol*stp*f'(0), c c and the curvature condition c c abs(f'(stp)) <= gtol*abs(f'(0)). c c If ftol is less than gtol and if, for example, the function c is bounded below, then there is always a step which satisfies c both conditions. c c If no step can be found that satisfies both conditions, then c the algorithm stops with a warning. In this case stp only c satisfies the sufficient decrease condition. c c A typical invocation of dcsrch has the following outline: c c task = 'START' c 10 continue c call dcsrch( ... ) c if (task .eq. 'FG') then c Evaluate the function and the gradient at stp c goto 10 c end if c c NOTE: The user must no alter work arrays between calls. c c The subroutine statement is c c subroutine dcsrch(f,g,stp,ftol,gtol,xtol,stpmin,stpmax, c task,isave,dsave) c where c c f is a double precision variable. c On initial entry f is the value of the function at 0. c On subsequent entries f is the value of the c function at stp. c On exit f is the value of the function at stp. c c g is a double precision variable. c On initial entry g is the derivative of the function at 0. c On subsequent entries g is the derivative of the c function at stp. c On exit g is the derivative of the function at stp. c c stp is a double precision variable. c On entry stp is the current estimate of a satisfactory c step. On initial entry, a positive initial estimate c must be provided. c On exit stp is the current estimate of a satisfactory step c if task = 'FG'. If task = 'CONV' then stp satisfies c the sufficient decrease and curvature condition. c c ftol is a double precision variable. c On entry ftol specifies a nonnegative tolerance for the c sufficient decrease condition. c On exit ftol is unchanged. c c gtol is a double precision variable. c On entry gtol specifies a nonnegative tolerance for the c curvature condition. c On exit gtol is unchanged. c c xtol is a double precision variable. c On entry xtol specifies a nonnegative relative tolerance c for an acceptable step. The subroutine exits with a c warning if the relative difference between sty and stx c is less than xtol. c On exit xtol is unchanged. c c stpmin is a double precision variable. c On entry stpmin is a nonnegative lower bound for the step. c On exit stpmin is unchanged. c c stpmax is a double precision variable. c On entry stpmax is a nonnegative upper bound for the step. c On exit stpmax is unchanged. c c task is a character variable of length at least 60. c On initial entry task must be set to 'START'. c On exit task indicates the required action: c c If task(1:2) = 'FG' then evaluate the function and c derivative at stp and call dcsrch again. c c If task(1:4) = 'CONV' then the search is successful. c c If task(1:4) = 'WARN' then the subroutine is not able c to satisfy the convergence conditions. The exit value of c stp contains the best point found during the search. c c If task(1:5) = 'ERROR' then there is an error in the c input arguments. c c On exit with convergence, a warning or an error, the c variable task contains additional information. c c isave is an integer work array of dimension 2. c c dsave is a double precision work array of dimension 13. c c Subprograms called c c MINPACK-2 ... dcstep c c MINPACK-1 Project. June 1983. c Argonne National Laboratory. c Jorge J. More' and David J. Thuente. c c MINPACK-2 Project. October 1993. c Argonne National Laboratory and University of Minnesota. c Brett M. Averick, Richard G. Carter, and Jorge J. More'. c c ********** double precision zero,p5,p66 parameter(zero=0.0d0,p5=0.5d0,p66=0.66d0) double precision xtrapl,xtrapu parameter(xtrapl=1.1d0,xtrapu=4.0d0) logical brackt integer stage double precision finit,ftest,fm,fx,fxm,fy,fym,ginit,gtest, + gm,gx,gxm,gy,gym,stx,sty,stmin,stmax,width,width1 c Initialization block. c if (task(1:5) .eq. 'START') then if (itask .eq. 2) then c Check the input arguments for errors. c if (stp .lt. stpmin) task = 'ERROR: STP .LT. STPMIN' c if (stp .gt. stpmax) task = 'ERROR: STP .GT. STPMAX' c if (g .ge. zero) task = 'ERROR: INITIAL G .GE. ZERO' c if (ftol .lt. zero) task = 'ERROR: FTOL .LT. ZERO' c if (gtol .lt. zero) task = 'ERROR: GTOL .LT. ZERO' c if (xtol .lt. zero) task = 'ERROR: XTOL .LT. ZERO' c if (stpmin .lt. zero) task = 'ERROR: STPMIN .LT. ZERO' c if (stpmax .lt. stpmin) task = 'ERROR: STPMAX .LT. STPMIN' if (stp .lt. stpmin) itask = 16 if (stp .gt. stpmax) itask = 15 if (g .ge. zero) itask = 11 if (ftol .lt. zero) itask = 9 if (gtol .lt. zero) itask = 10 if (xtol .lt. zero) itask = 19 if (stpmin .lt. zero) itask = 18 if (stpmax .lt. stpmin) itask = 17 c Exit if there are errors on input. c if (task(1:5) .eq. 'ERROR') return if ((itask .ge. 9) .and. (itask .le. 19)) return c Initialize local variables. brackt = .false. stage = 1 finit = f ginit = g gtest = ftol*ginit width = stpmax - stpmin width1 = width/p5 c The variables stx, fx, gx contain the values of the step, c function, and derivative at the best step. c The variables sty, fy, gy contain the value of the step, c function, and derivative at sty. c The variables stp, f, g contain the values of the step, c function, and derivative at stp. stx = zero fx = finit gx = ginit sty = zero fy = finit gy = ginit stmin = zero stmax = stp + xtrapu*stp c task = 'FG' itask = 4 goto 1000 else c Restore local variables. if (isave(1) .eq. 1) then brackt = .true. else brackt = .false. endif stage = isave(2) ginit = dsave(1) gtest = dsave(2) gx = dsave(3) gy = dsave(4) finit = dsave(5) fx = dsave(6) fy = dsave(7) stx = dsave(8) sty = dsave(9) stmin = dsave(10) stmax = dsave(11) width = dsave(12) width1 = dsave(13) endif c If psi(stp) <= 0 and f'(stp) >= 0 for some step, then the c algorithm enters the second stage. ftest = finit + stp*gtest if (stage .eq. 1 .and. f .le. ftest .and. g .ge. zero) + stage = 2 c Test for warnings. if (brackt .and. (stp .le. stmin .or. stp .ge. stmax)) c + task = 'WARNING: ROUNDING ERRORS PREVENT PROGRESS' + itask = 23 if (brackt .and. stmax - stmin .le. xtol*stmax) c + task = 'WARNING: XTOL TEST SATISFIED' + itask = 26 if (stp .eq. stpmax .and. f .le. ftest .and. g .le. gtest) c + task = 'WARNING: STP = STPMAX' + itask = 24 if (stp .eq. stpmin .and. (f .gt. ftest .or. g .ge. gtest)) c + task = 'WARNING: STP = STPMIN' + itask = 25 c Test for convergence. if (f .le. ftest .and. abs(g) .le. gtol*(-ginit)) c + task = 'CONVERGENCE' + itask = 6 c Test for termination. c if (task(1:4) .eq. 'WARN' .or. task(1:4) .eq. 'CONV') goto 1000 if ((itask .ge. 23) .or. ((itask .le. 8) + .and. (itask .ge. 6))) goto 1000 c A modified function is used to predict the step during the c first stage if a lower function value has been obtained but c the decrease is not sufficient. if (stage .eq. 1 .and. f .le. fx .and. f .gt. ftest) then c Define the modified function and derivative values. fm = f - stp*gtest fxm = fx - stx*gtest fym = fy - sty*gtest gm = g - gtest gxm = gx - gtest gym = gy - gtest c Call dcstep to update stx, sty, and to compute the new step. call dcstep(stx,fxm,gxm,sty,fym,gym,stp,fm,gm, + brackt,stmin,stmax) c Reset the function and derivative values for f. fx = fxm + stx*gtest fy = fym + sty*gtest gx = gxm + gtest gy = gym + gtest else c Call dcstep to update stx, sty, and to compute the new step. call dcstep(stx,fx,gx,sty,fy,gy,stp,f,g, + brackt,stmin,stmax) endif c Decide if a bisection step is needed. if (brackt) then if (abs(sty-stx) .ge. p66*width1) stp = stx + p5*(sty - stx) width1 = width width = abs(sty-stx) endif c Set the minimum and maximum steps allowed for stp. if (brackt) then stmin = min(stx,sty) stmax = max(stx,sty) else stmin = stp + xtrapl*(stp - stx) stmax = stp + xtrapu*(stp - stx) endif c Force the step to be within the bounds stpmax and stpmin. stp = max(stp,stpmin) stp = min(stp,stpmax) c If further progress is not possible, let stp be the best c point obtained during the search. if (brackt .and. (stp .le. stmin .or. stp .ge. stmax) + .or. (brackt .and. stmax-stmin .le. xtol*stmax)) stp = stx c Obtain another function and derivative. c task = 'FG' itask = 4 1000 continue c Save local variables. if (brackt) then isave(1) = 1 else isave(1) = 0 endif isave(2) = stage dsave(1) = ginit dsave(2) = gtest dsave(3) = gx dsave(4) = gy dsave(5) = finit dsave(6) = fx dsave(7) = fy dsave(8) = stx dsave(9) = sty dsave(10) = stmin dsave(11) = stmax dsave(12) = width dsave(13) = width1 return end c====================== The end of dcsrch ============================== subroutine dcstep(stx,fx,dx,sty,fy,dy,stp,fp,dp,brackt, + stpmin,stpmax) logical brackt double precision stx,fx,dx,sty,fy,dy,stp,fp,dp,stpmin,stpmax c ********** c c Subroutine dcstep c c This subroutine computes a safeguarded step for a search c procedure and updates an interval that contains a step that c satisfies a sufficient decrease and a curvature condition. c c The parameter stx contains the step with the least function c value. If brackt is set to .true. then a minimizer has c been bracketed in an interval with endpoints stx and sty. c The parameter stp contains the current step. c The subroutine assumes that if brackt is set to .true. then c c min(stx,sty) < stp < max(stx,sty), c c and that the derivative at stx is negative in the direction c of the step. c c The subroutine statement is c c subroutine dcstep(stx,fx,dx,sty,fy,dy,stp,fp,dp,brackt, c stpmin,stpmax) c c where c c stx is a double precision variable. c On entry stx is the best step obtained so far and is an c endpoint of the interval that contains the minimizer. c On exit stx is the updated best step. c c fx is a double precision variable. c On entry fx is the function at stx. c On exit fx is the function at stx. c c dx is a double precision variable. c On entry dx is the derivative of the function at c stx. The derivative must be negative in the direction of c the step, that is, dx and stp - stx must have opposite c signs. c On exit dx is the derivative of the function at stx. c c sty is a double precision variable. c On entry sty is the second endpoint of the interval that c contains the minimizer. c On exit sty is the updated endpoint of the interval that c contains the minimizer. c c fy is a double precision variable. c On entry fy is the function at sty. c On exit fy is the function at sty. c c dy is a double precision variable. c On entry dy is the derivative of the function at sty. c On exit dy is the derivative of the function at the exit sty. c c stp is a double precision variable. c On entry stp is the current step. If brackt is set to .true. c then on input stp must be between stx and sty. c On exit stp is a new trial step. c c fp is a double precision variable. c On entry fp is the function at stp c On exit fp is unchanged. c c dp is a double precision variable. c On entry dp is the the derivative of the function at stp. c On exit dp is unchanged. c c brackt is an logical variable. c On entry brackt specifies if a minimizer has been bracketed. c Initially brackt must be set to .false. c On exit brackt specifies if a minimizer has been bracketed. c When a minimizer is bracketed brackt is set to .true. c c stpmin is a double precision variable. c On entry stpmin is a lower bound for the step. c On exit stpmin is unchanged. c c stpmax is a double precision variable. c On entry stpmax is an upper bound for the step. c On exit stpmax is unchanged. c c MINPACK-1 Project. June 1983 c Argonne National Laboratory. c Jorge J. More' and David J. Thuente. c c MINPACK-2 Project. October 1993. c Argonne National Laboratory and University of Minnesota. c Brett M. Averick and Jorge J. More'. c c ********** double precision zero,p66,two,three parameter(zero=0.0d0,p66=0.66d0,two=2.0d0,three=3.0d0) double precision gamma,p,q,r,s,sgnd,stpc,stpf,stpq,theta sgnd = dp*(dx/abs(dx)) c First case: A higher function value. The minimum is bracketed. c If the cubic step is closer to stx than the quadratic step, the c cubic step is taken, otherwise the average of the cubic and c quadratic steps is taken. if (fp .gt. fx) then theta = three*(fx - fp)/(stp - stx) + dx + dp s = max(abs(theta),abs(dx),abs(dp)) gamma = s*sqrt((theta/s)**2 - (dx/s)*(dp/s)) if (stp .lt. stx) gamma = -gamma p = (gamma - dx) + theta q = ((gamma - dx) + gamma) + dp r = p/q stpc = stx + r*(stp - stx) stpq = stx + ((dx/((fx - fp)/(stp - stx) + dx))/two)* + (stp - stx) if (abs(stpc-stx) .lt. abs(stpq-stx)) then stpf = stpc else stpf = stpc + (stpq - stpc)/two endif brackt = .true. c Second case: A lower function value and derivatives of opposite c sign. The minimum is bracketed. If the cubic step is farther from c stp than the secant step, the cubic step is taken, otherwise the c secant step is taken. else if (sgnd .lt. zero) then theta = three*(fx - fp)/(stp - stx) + dx + dp s = max(abs(theta),abs(dx),abs(dp)) gamma = s*sqrt((theta/s)**2 - (dx/s)*(dp/s)) if (stp .gt. stx) gamma = -gamma p = (gamma - dp) + theta q = ((gamma - dp) + gamma) + dx r = p/q stpc = stp + r*(stx - stp) stpq = stp + (dp/(dp - dx))*(stx - stp) if (abs(stpc-stp) .gt. abs(stpq-stp)) then stpf = stpc else stpf = stpq endif brackt = .true. c Third case: A lower function value, derivatives of the same sign, c and the magnitude of the derivative decreases. else if (abs(dp) .lt. abs(dx)) then c The cubic step is computed only if the cubic tends to infinity c in the direction of the step or if the minimum of the cubic c is beyond stp. Otherwise the cubic step is defined to be the c secant step. theta = three*(fx - fp)/(stp - stx) + dx + dp s = max(abs(theta),abs(dx),abs(dp)) c The case gamma = 0 only arises if the cubic does not tend c to infinity in the direction of the step. gamma = s*sqrt(max(zero,(theta/s)**2-(dx/s)*(dp/s))) if (stp .gt. stx) gamma = -gamma p = (gamma - dp) + theta q = (gamma + (dx - dp)) + gamma r = p/q if (r .lt. zero .and. gamma .ne. zero) then stpc = stp + r*(stx - stp) else if (stp .gt. stx) then stpc = stpmax else stpc = stpmin endif stpq = stp + (dp/(dp - dx))*(stx - stp) if (brackt) then c A minimizer has been bracketed. If the cubic step is c closer to stp than the secant step, the cubic step is c taken, otherwise the secant step is taken. if (abs(stpc-stp) .lt. abs(stpq-stp)) then stpf = stpc else stpf = stpq endif if (stp .gt. stx) then stpf = min(stp+p66*(sty-stp),stpf) else stpf = max(stp+p66*(sty-stp),stpf) endif else c A minimizer has not been bracketed. If the cubic step is c farther from stp than the secant step, the cubic step is c taken, otherwise the secant step is taken. if (abs(stpc-stp) .gt. abs(stpq-stp)) then stpf = stpc else stpf = stpq endif stpf = min(stpmax,stpf) stpf = max(stpmin,stpf) endif c Fourth case: A lower function value, derivatives of the same sign, c and the magnitude of the derivative does not decrease. If the c minimum is not bracketed, the step is either stpmin or stpmax, c otherwise the cubic step is taken. else if (brackt) then theta = three*(fp - fy)/(sty - stp) + dy + dp s = max(abs(theta),abs(dy),abs(dp)) gamma = s*sqrt((theta/s)**2 - (dy/s)*(dp/s)) if (stp .gt. sty) gamma = -gamma p = (gamma - dp) + theta q = ((gamma - dp) + gamma) + dy r = p/q stpc = stp + r*(sty - stp) stpf = stpc else if (stp .gt. stx) then stpf = stpmax else stpf = stpmin endif endif c Update the interval which contains a minimizer. if (fp .gt. fx) then sty = stp fy = fp dy = dp else if (sgnd .lt. zero) then sty = stx fy = fx dy = dx endif stx = stp fx = fp dx = dp endif c Compute the new step. stp = stpf return end