bvls


bvls, a Fortran90 code which solves a least squares problem with bounds on the variables, by Charles Lawson and Richard Hanson.

Given an M by N matrix, A, and an M-vector, B, BVLS computes an N-vector X that solves the least-squares problem:

A * X = B
subject to BND(1,J) <= X(J) <= BND(2,J) for 1 <= J <= N.

The program allows the user to bound some or all of the variables. The user is also free to constrain some variables with only a one-sided bounded. The values BND(1,J) = -huge(ONE) and BND(2,J) = huge(ONE) are suggested choices to designate that there is no constraint in that direction. The parameter ONE is 1.0 in the working precision.

This algorithm is a generalization of the routine NNLS, which solves the least-squares problem:

A * X = B
subject to 0 <= X(J) for all J.

The subroutine NNLS appeared in 'Solving Least Squares Problems' by Lawson and Hanson, Prentice-Hall, 1974. Work on BVLS was started by Charles Lawson and Richard Hanson at Jet Propulsion Laboratory, 1973 June 12. Many modifications were subsequently made.

This Fortran90 version was completed in April 1995 by Richard Hanson. Assumed shape arrays, automatic arrays, array operations, internal subroutines and Fortran90 elemental functions are used. Comments are prefixed with an exclamation mark. More than 72 characters appear on some lines. The BVLS package is an additional item for the reprinting of the book by SIAM Publications and the distribution of the code package using netlib and Internet or network facilities.

The original source code is available through NETLIB at
https://www.netlib.org/lawson-hanson/index.html.

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

bvls is available in a Fortran90 version.

Related Data and Programs:

bvls_test

brent, a Fortran90 code which contains Richard Brent's routines for finding the zero, local minimizer, or global minimizer of a scalar function of a scalar argument, without the use of derivative information.

dqed, a Fortran90 code which solves constrained least squares problems.

lawson, a Fortran90 code which solves least squares problems, and computes singular value decompositions.

nl2sol, a Fortran90 code which implements an adaptive nonlinear least-squares algorithm.

praxis, a Fortran90 code which minimizes a scalar function of several variables.

qr_solve, a Fortran90 code which computes the least squares solution of a linear system A*x=b.

test_lls, a Fortran90 code which implements linear least squares (LLS) test problems which are given A and b, and seek a vector x which minimizes the L2 norm of the error ||Ax-b||.

toms611, a Fortran90 code which seeks the minimizer of a scalar functional of multiple variables.

Author:

Charles Lawson, Richard Hanson.

Reference:

  1. Charles Lawson, Richard Hanson,
    Solving Least Squares Problems,
    Revised edition,
    SIAM, 1995,
    ISBN: 0898713560,
    LC: QA275.L38.

Source Code:


Last revised on 03 September 2021.