|
TOMLAB OPTIMIZATION ENVIRONMENT: L1Solve |
![]() |
L1Solve
Purpose
For finding a constrained L1 solution of a function of several variables with
the use of any suitable NLP TOMLAB solver
Syntax
Result = L1Solve(Prob, PriLev);
Description
Finds a constrained L1 solution of a function of several variables with
the use of any suitable NLP TOMLAB solver
Problem
min sum_i |r_i(x)|, where r(x) is in R^m
x
s/t x_L <= x <= x_U, x is in R^n
b_L <= A x <= b_U
c_L <= c(x) <= c_U
The L1 problem is solved in L1Solve by rewriting the problem as a general constrained optimization problem.
A set of m additional variables y, stored as x(n+1:m), and
a set of m additional variables z, stored as x(n+m+1:n+2*m), is added
min sum_i(y_i+z_i), where r(x) is in R^m (L1Type == 1)
x
s/t x_L <= x <= x_U
0 <= y <= Inf
0 <= z <= Inf
b_L <= A x <= b_U
c_L <= c(x) <= c_U
0 <= r(x) + y - z <= 0
Example
See L1Demo.m in tomlab\examples
Input Parameters
Prob Structure Prob. Prob must be defined!!!
Best is to use Prob = clsAssign(.....), if using the TQ format.
The problem should be created in the Tomlab constrained
nonlinear least squares format (cls)
This format is aimed for a vector valued function, with a
Jacobian matrix as the derivative.
PriLev The second input argument. Default == 2.
If PriLev == 0, L1Solve is silent, except for error messages.
If > 0, L1Solve prints summary output about problem
transformation
L1Solve calls PrintResult(Result,PriLev), i.e. printing in
PrintResult is made if PriLev > 0.
PriLev == 2 displays standard output in PrintResult.
Extra fields used in Prob:
SolverL1 Name of the Tomlab solver. Valid names are:
conSolve, nlpSolve, sTrustr, clsSolve
If Tomlab /SOL is installed: minos, snopt, npopt
L1Type =1 standard constrained formulation
The rest of the fields in Prob should be defined as wanted by the
selected solver. See the help for the solver.
In particular:
x_0: Starting point x_L: Lower bounds for x x_U: Upper bounds for x b_L: Lower bounds for linear constraints b_U: Upper bounds for linear constraints A: Linear constraint matrix c_L: Lower bounds for nonlinear constraints c_U: Upper bounds for nonlinear constraints ConsPattern The pattern of the constraint Jacobian JacPattern The pattern of the residual Jacobian
Note that Prob.LS.y must have the correct residual length, if
JacPattern is empty (but not ConsPattern).
L1Solve will create the new Prob.ConsPattern to be used by the solver
using the information in ConsPattern and JacPattern.
Output Parameters
Result Structure with results from optimization. See help for the used solver
The output in Result, i.e. fields Result.x_k, Result.r_k, Result.J_k,
Result.c_k, Result.cJac, Result.x_0, Result.xState, Result.cState,
Result.v_k, is transformed back to the original problem.
Result.g_k is Result.J_k'*Result.r_k.
The output in Result.Prob is the result after L1Solve
transformed the problem, i.e. the altered Prob structure
![]() |
L1LinSolve | lpSolve | ![]() |