InfSolve: Difference between revisions

From TomWiki
Jump to navigationJump to search
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 9: Line 9:
<math>
<math>
\begin{array}{cccccc}
\begin{array}{cccccc}
\min\limits_x & \multicolumn{5}{l}{\max r(x)} \\\mbox{subject to} & x_L & \leq &    x  & \leq &  x_U \\& b_L & \leq &  Ax  & \leq &  b_U \\& c_L & \leq &  c(x) & \leq &  c_U \\
\min\limits_x & \max r(x) \\\mbox{subject to} & x_L & \leq &    x  & \leq &  x_U \\& b_L & \leq &  Ax  & \leq &  b_U \\& c_L & \leq &  c(x) & \leq &  c_U \\
\end{array}
\end{array}
</math>
</math>


where <math>x,x_L,x_U \in \MATHSET{R}^{n}</math> , <math>r(x) \in \MATHSET{R}^{N}</math> , <math>c(x),c_L,c_U \in \MATHSET{R}^{m_1}</math> , <math>b_L,b_U \in \MATHSET{R}^{m_2}</math> and <math>A \in \MATHSET{R}^{m_2 \times n}</math>.
where <math>x,x_L,x_U \in \mathbb{R}^{n}</math> , <math>r(x) \in \mathbb{R}^{N}</math> , <math>c(x),c_L,c_U \in \mathbb{R}^{m_1}</math> , <math>b_L,b_U \in \mathbb{R}^{m_2}</math> and <math>A \in \mathbb{R}^{m_2 \times n}</math>.


==Calling Syntax==
==Calling Syntax==


<syntaxhighlight lang="matlab">
<source lang="matlab">
Result=infSolve(Prob,PriLev)
Result=infSolve(Prob,PriLev)
</syntaxhighlight>
</source>


==Inputs==
==Inputs==
Line 25: Line 25:
{| class="wikitable"
{| class="wikitable"
|-valign="top"
|-valign="top"
!''Prob''||colspan="2"|Problem description structure. Should be created in the '''cls''' format. infSolve uses two special fields in ''Prob'':
!''Prob''||colspan="2"|Problem description structure. Should be created in the cls format. infSolve uses two special fields in ''Prob'':
|-valign="top"
|-valign="top"
|||''SolverInf''||Name of solver used to solve the transformed problem.
|||''SolverInf''||Name of solver used to solve the transformed problem.
Line 58: Line 58:
The fields ''x_k'', ''r_k'', ''J_k'', ''c_k'', ''cJac'', ''x_0'', ''xState'', ''cState'', ''v_k ''are transformed back to match the original problem.
The fields ''x_k'', ''r_k'', ''J_k'', ''c_k'', ''cJac'', ''x_0'', ''xState'', ''cState'', ''v_k ''are transformed back to match the original problem.


''g_k ''is calculated as <math>\VAR{J\_k</math><math>$^T$</math><math>}</math> <math>$\cdot$</math> <math>\VAR{r\_k}</math>.
''g_k ''is calculated as J_k<sup>T</sup> · r_k.


The output  in Result.Prob is the result after infSolve  transformed the problem, i.e. the altered Prob structure
The output  in Result.Prob is the result after infSolve  transformed the problem, i.e. the altered Prob structure
Line 65: Line 65:
==Description==
==Description==


The minimax problem is solved in infSolve by rewriting the problem as a general constrained optimization problem. One additional variable <math>$z\in \MATHSET{R}$</math>, stored as <math>$x_{n+1}$</math> is added and the problem is rewritten as:
The minimax problem is solved in infSolve by rewriting the problem as a general constrained optimization problem. One additional variable <math>z\in \mathbb{R}</math>, stored as <math>x_{n+1}</math> is added and the problem is rewritten as:


<math>
<math>
\begin{array}{cccccc}
\begin{array}{cccccc}
\multicolumn{6}{l}{\min\limits_x  z}\\\\\mbox{subject to} & x_L & \leq & (x_1,x_2,\ldots,x_n)^T & \leq & x_U \\&  -\infty & \leq &  z                    & \leq & \infty \\&  b_L    & \leq & A x                    & \leq & b_U \\&  c_L    & \leq & c(x)                  & \leq & c_U \\&  -\infty & \leq & r(x) - z e            & \leq & 0 \\\end{array}
\min\limits_x  z\\\\\mbox{subject to} & x_L & \leq & (x_1,x_2,\ldots,x_n)^T & \leq & x_U \\&  -\infty & \leq &  z                    & \leq & \infty \\&  b_L    & \leq & A x                    & \leq & b_U \\&  c_L    & \leq & c(x)                  & \leq & c_U \\&  -\infty & \leq & r(x) - z e            & \leq & 0 \\\end{array}
</math>
</math>




where <math>e \in \MATHSET{R}^{N},\; e(i)=1 \ \forall i</math>.
where <math>e \in \mathbb{R}^{N},\; e(i)=1 \ \forall i</math>.


To handle cases where an element <math>$r_i(x)$</math> in <math>$r(x)$</math> appears in absolute value:  <math>$\min \max |r_i(x)|$</math>, expand the problem with extra residuals with the opposite sign: <math>$ [ r_i(x); -r_i(x) ] $</math>
To handle cases where an element <math>r_i(x)</math> in <math>r(x)</math> appears in absolute value:  <math>\min \max |r_i(x)|</math>, expand the problem with extra residuals with the opposite sign: <math> [ r_i(x); -r_i(x) ] </math>


==Examples==
==Examples==

Latest revision as of 08:12, 16 January 2012

Purpose

Find a constrained minimax solution with the use of any suitable TOMLAB solver.

infSolve solves problems of the type:


where , , , and .

Calling Syntax

Result=infSolve(Prob,PriLev)

Inputs

Prob Problem description structure. Should be created in the cls format. infSolve uses two special fields in Prob:
SolverInf Name of solver used to solve the transformed problem.

Valid choices are conSolve, nlpSolve, sTrustr and clsSolve.

If TOMLAB /SOL is installed: minos, snopt, npopt.

InfType 1 - constrained formulation (default).

2 - LS penalty approach (experimental).

The remaining fields of Prob should be defined as required by the selected subsolver.
PriLev Print level in infSolve.

=0 Silent except for error messages.

>0 Print summary information about problem transformation.

Calls PrintResult with specified PriLev.

=2 Standard output from PrintResult (default).

Outputs

Result Structure with results from optimization. Output depends on the solver used.

The fields x_k, r_k, J_k, c_k, cJac, x_0, xState, cState, v_k are transformed back to match the original problem.

g_k is calculated as J_kT · r_k.

The output in Result.Prob is the result after infSolve transformed the problem, i.e. the altered Prob structure

Description

The minimax problem is solved in infSolve by rewriting the problem as a general constrained optimization problem. One additional variable , stored as is added and the problem is rewritten as:


where .

To handle cases where an element in appears in absolute value: , expand the problem with extra residuals with the opposite sign:

Examples

minimaxDemo.m.

See Also

clsAssign.