Quickguide L1LIN Problem

From TomWiki
Revision as of 09:40, 10 August 2011 by Elias (talk | contribs) (Created page with "{{Part Of Manual|title=the Quickguide Manual|link=Quickguide}} The linearly '''constrained L1LIN''' ('''L1LIN''') problem is defined as <math> \begin{array}{cccc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Notice.png

This page is part of the Quickguide Manual. See Quickguide.

The linearly constrained L1LIN (L1LIN) problem is defined as


Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{array}{cccccc} \min\limits_x & \multicolumn{5}{l}{|Cx - y)| + alpha*|Lx|} \\ \mbox{subject to} & x_L & \leq & x & \leq & x_U \\ {} & b_L & \leq & Ax & \leq & b_U \\\end{array} }

where Failed to parse (unknown function "\Rdim"): {\displaystyle x,x_L,x_U \in \Rdim{n}} , Failed to parse (unknown function "\Rdim"): {\displaystyle b_L,b_U \in \Rdim{m_2}} , Failed to parse (unknown function "\Rdim"): {\displaystyle A\in \Rdim{m_1 \times n}} , Failed to parse (unknown function "\Rdim"): {\displaystyle C \in \Rdim{m_2 \times n}} , Failed to parse (unknown function "\Rdim"): {\displaystyle y \in \Rdim{m_2}} , Failed to parse (unknown function "\Rdim"): {\displaystyle L \in \Rdim{n \times b}} and Failed to parse (unknown function "\Rdim"): {\displaystyle alpha \in \Rdim{1}} .

The L1Lin solution can be obtained by the use of any suitable linear TOMLAB solver.

The following file illustrates how to solve an L1Lin problem in TOMLAB.

File: tomlab/quickguide/L1LinQG.m

Open the file for viewing, and execute L1LinQG in Matlab.

 % L1LinQG is a small example problem for defining and solving
 % a linearly constrained linear L1 problem using the TOMLAB format.
 
 Name='L1LinSolve test example';      % Problem name, not required.
 n = 6;                              
 x_L = -10*ones(n,1);                 % Lower bounds on x
 x_U =  10*ones(n,1);                 % Upper bounds on x
 x_0 = (x_L + x_U) / 2;               % Starting point
 
 C = spdiags([1 2 3 4 5 6]', 0, n, n); % C matrix
 y = 1.5*ones(n,1);                    % Data vector
 
 % Matrix defining linear constraints
 A = [1 1 0 0 0 0];
 b_L = 1;                  % Lower bounds on the linear inequalities
 b_U = 1;                  % Upper bounds on the linear inequalities
 
 % Defining damping matrix
 Prob.LS.damp = 1;
 Prob.LS.L = spdiags(ones(6,1)*0.01, 0, 6, 6);
 
 % See 'help llsAssign' for more information.
 Prob = llsAssign(C, y, x_L, x_U, Name, x_0, ...
                             [], [], [], ...
                             A, b_L, b_U);
                         
 Prob.SolverL1 = 'lpSimplex';
 Result = tomRun('L1LinSolve', Prob, 1);
 % Prob.SolverL1 = 'MINOS';
 % Result = tomRun('L1LinSolve', Prob, 1);
 % Prob.SolverL1 = 'CPLEX';
 % Result = tomRun('L1LinSolve', Prob, 1);