TOMLAB OPTIMIZATION ENVIRONMENT: clsAssign

   

clsAssign

Purpose

For setting up unconstrained and constrained nonlinear least squares problems.

Syntax

   Prob = clsAssign(r, J, JacPattern, x_L, x_U, Name, x_0, ...
                    y, t, weightType, weightY, SepAlg, fLowBnd, ...
                    A, b_L, b_U, c, dc, ConsPattern, c_L, c_U, ... 
                    x_min, x_max, f_opt, x_opt);

Description

clsAssign implements the TOMLAB Quick (TQ) format for the unconstrained and constrained nonlinear least squares problem. It is also suitable to define vector valued function problems with a corresponding Jacobian matrix as derivative. For example minimax problems are solved with infSolve after using clsAssign to define the problem. L1 fitting problems are solved with L1Solve after using clsAssign to define the problem.

clsAssign is setting the variables normally needed for an optimization in the TOMLAB structure Prob.

Input Parameters

Call with at least eight parameters

 r           Name of function that computes the residual 
 J           Name of function that computes the Jacobian m x n - matrix 
 JacPattern  m x n zero-one sparse or dense matrix, where 0 values indicate 
             zeros in the Jacobian and ones indicate values that might 
             be non-zero. If empty indicates estimation of all elements 
             JacPattern is used when estimating the Jacobian numerically.
 x_L         Lower bounds on parameters x. If [] set as a nx1 -Inf vector.
 x_U         Upper bounds on parameters x. If [] set as  a nx1 Inf vector.
 Name        The name of the problem (string)
 x_0         Starting values, default nx1 zero vector 

 Note:       The number n of the unknown variables x are taken as
             max(length(x_L),length(x_U),length(x_0))
             You must specifiy at least one of these with correct length,
             then the others are given default values

             The following parameters are optional, and problem type dependent
             Set empty to get default value

 y           m x 1 vector with observations y(t) to be fitted
 t           m x 1 vector with time values
 weightType  Type of weighting
 weightY     Vector of weights
 SepAlg      Flag if to use separable nonlinear least squares

 fLowBnd     A lower bound on the function value at optimum. Default 0
             A good estimate is not critical. Use [] if not known at all.

Linear Constraints

 A           Matrix A in linear constraints b_L<=A*x<=b_U. Dense or sparse.
 b_L         Lower bound vector in linear constraints, b_L<=A*x<=b_U. 
 b_U         Upper bound vector in linear constraints, b_L<=A*x<=b_U. 

Nonlinear Constraints

 c           Name of function that computes the mN nonlinear constraints 
 dc          Name of function that computes the constraint Jacobian mN x n 
 c_L         Lower bound vector in nonlinear constraints, c_L<=c(x)<=c_U. 
 c_U         Upper bound vector in nonlinear constraints, c_L<=c(x)<=c_U. 
 ConsPattern mN x n zero-one sparse or dense matrix, where 0 values indicate 
             zeros in the constraint Jacobian and ones indicate values that 
             might be non-zero. Used when estimating the Jacobian numerically.

Additional Parameters

 x_min   Lower bounds on each x-variable, used for plotting
 x_max   Upper bounds on each x-variable, used for plotting
 f_opt   Optimal function value(s), if known (Stationary points)
 x_opt   The x-values corresponding to the given f_opt, if known.
         If only one f_opt, give x_opt as a 1 by n vector
         If several f_opt values, give x_opt as a length(f_opt) by n matrix
         If adding one extra column n+1 in x_opt, 0 is min, 1 saddle, 2 is max.
         x_opt and f_opt is used in printouts and plots.

Set the variable as empty if this variable is not needed for the particular kind of problem you are solving.


  bmiAssign   conAssign