Quickguide MINIMAXLIN Problem: Difference between revisions

From TomWiki
Jump to navigationJump to search
(Created page with "{{Part Of Manual|title=the Quickguide Manual|link=Quickguide}} The '''linear minimax''' ('''mimalin''') problem is defined as <br clear="all" /> <math> \begin{a...")
 
No edit summary
Line 7: Line 7:
</math>
</math>


where <math>x,x_L,x_U \in \Rdim{n}</math>, <math>b_L,b_U \in \Rdim{m_1}</math>, <math>A \in
where <math>x,x_L,x_U \in R^{n}</math>, <math>b_L,b_U \in R^{m_1}</math>, <math>A \in
\Rdim{m_1 \times n}</math> and <math>D \in \Rdim{m_2 \times n}</math>.
R^{m_1 \times n}</math> and <math>D \in R^{m_2 \times n}</math>.


The following file illustrates how to solve a linear minimax problem in TOMLAB.
The following file illustrates how to solve a linear minimax problem in TOMLAB.

Revision as of 09:31, 10 August 2011

Notice.png

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

The linear minimax (mimalin) 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}{\max Dx} \\ \mbox{subject to} & x_L & \leq & x & \leq & x_U \\ & b_L & \leq & Ax & \leq & b_U \\\end{array} }

where , , and .

The following file illustrates how to solve a linear minimax problem in TOMLAB.

File: tomlab/quickguide/minimaxlinQG.m

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

 % minimaxlinQG is a small example problem for defining and solving
 % linear minimax programming problems using the TOMLAB format.
 
 Name = 'Linear Minimax Test 1';
 x_0  = [1;1;1;1];          % Initial value
 x_L  = [-10;-10;-10;-10];  % Lower bounds on x
 x_U  = [10;10;10;10];      % Upper bounds on x
 
 % Solve the problem min max Dx while eliminating abs for the final two
 % residuals by adding them with reverse signs.
 % i.e. min max [D_1; D_2; D_3; -D_2; -D_3];
 D = [9 8 7 6; -4 5 -6 -2; 3 4 5 -6; 4 -5 6 2; -3 -4 -5 6]; % D Matrix
 
 % Add the linear constraint -x(1) + x(2) + 2 &gt;= 0
 % Write the constraint as x(1) - x(2) &lt;= 2
 
 % The A matrix could be specified dense or sparse
 % A   = sparse([1 -1 0 0]);
 
 A   = [1 -1 0 0];
 b_L = -inf;
 b_U = 2;
 
 c = zeros(4,1); % Dummy objective
 
 % Generate an LP problem using the Tomlab Quick format
 % Use mipAssign if solving a mixed-integer problem
 Prob = lpAssign(c, A, b_L, b_U, x_L, x_U, x_0, Name);
 Prob.QP.D = D;
 
 Prob.f_Low = 0;
 Prob.SolverInf = 'minos';
 
 % One may set other solvers:
 % Prob.SolverInf = 'cplex';
 % Prob.SolverInf = 'xa';
 % Prob.SolverInf = 'snopt';
 % Prob.SolverInf = 'milpSolve';
 
 % Set print level 1 to get output from PrintResult at the end
 PriLev = 1;
 Prob.PriLevOpt = 0;
 
 Result  = tomRun('infLinSolve', Prob, PriLev);