TOMLAB OPTIMIZATION ENVIRONMENT: Tnnls

   

Tnnls

Purpose

MEX interface for Tnnls, TOMLAB NNLS solver

For solving linearly constrained least squares problems with both equality and inequality constraints.

Syntax

  [x, rNorm, mode, w] = Tnnls ( A, b, E, f, L, ColScale, D, epsRank, epsBlow);

Description

Tnnls solves a linearly constrained least squares problem with both equality and inequality constraints.

May return a covariance matrix of the solution parameters.

Given dense matrices E, A and G of respective dimensions mE by N, mA by N and mG by N, and vectors f, b and h of respective lengths ME, MA and MG. This subroutine solves the linearly constrained least squares problem formulated as:

             min   || A x  - b || subject to

                      E x  = f    Equations to be exactly satisfied
                        x >= 0    Nonnegativitiy constraints

In case the equality constraints cannot be satisfied, a generalized inverse solution residual vector length is obtained for f-Ex. This is the minimal length possible for f-Ex.

Any number of rows in A and E are permitted.

Input Parameters

At least 2 input parameters needed.

   A         mA x n dense matrix
   b         mA x 1 dense vector
   E         mE x n dense matrix
   f         mE x 1 dense vector
   L         Variable 1:L are unconstrained. Variable L+1:N non-negative
   ColScale  If > 0 column scaling of full matrix [A,b;E,f]. Default 0
   D         If nonempty, n x 1 dense vector with diagonal scaling of columns
   epsRank   Rank tolerance in least squares part
   epsBlow   Blow-up parameter, default value SQRT(eps), must be > eps 
             The reciprocal of this parameter is used in rejecting solution 
             components as too large when a variable is first brought into the
             active set. Too large means that the proposed component times the
             reciprocal of the parameter is not less than the ratio of the 
             norms of the right-side vector and the data matrix.

Output Parameters

   x         Solution x
   rNorm     || [Ax-b;Ex-f] ||
   mode      Exit status:      
             0  Success
             1  Max. number of iterations (equal to 3*(N-L)) exceeded. 
                Nearly all problems should complete in fewer than this
                number of iterations. An approximate solution and its 
                corresponding residual vector length are in x and rNorm.
             2  Usage error occurred. Should not be possible.
   w         Dual solution vector, Lagrange multipliers

  Tlsqr   ucSolve