<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mintoc.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=PaulineBoizet</id>
	<title>mintOC - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://mintoc.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=PaulineBoizet"/>
	<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Special:Contributions/PaulineBoizet"/>
	<updated>2026-06-09T09:07:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://mintoc.de/index.php?title=Supermarket_refrigeration_system&amp;diff=513</id>
		<title>Supermarket refrigeration system</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Supermarket_refrigeration_system&amp;diff=513"/>
		<updated>2009-08-11T14:35:21Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Optimica */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 9&lt;br /&gt;
|nw        = 4&lt;br /&gt;
|nre       = 9&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;supermarket refrigeration system problem&#039;&#039;&#039; is based on a model describing a refrigeration system with 2 parallel connected compressors (called a compressor rack) which only can be controlled stepwise (each single compressor can be turned on or off) and 2 open refrigerated display cases containing goods needed to be refrigerated. Each display case is connected to the refrigeration circuit through an expansion valve which also can only be closed or opened. This valve controls the flow of refrigerant into the evaporator, where it absorbs heat from the surrounding air. The refrigerated air then creates the well-known air-curtain at the front of the display case.&lt;br /&gt;
&lt;br /&gt;
The air temperatures surrounding the goods in each display case are modeled by one differential state each. These states have to be bounded, so that the goods are properly refrigerated.&lt;br /&gt;
&lt;br /&gt;
The model was published by Larsen et. al. in 2007 &amp;lt;bibref&amp;gt;Larsen2007&amp;lt;/bibref&amp;gt;. The main goal is to control the refirgeration system energy-optimal. The problem was set up as a benchmark problem for MIOCPs. &lt;br /&gt;
&lt;br /&gt;
The mathematical equations form an [[:Category:ODE model|ODE model]]. The initial values of the differential states are not fixed but periodicity of the whole process is required.&lt;br /&gt;
&lt;br /&gt;
The optimal integer control function shows [[:Category:Chattering|chattering]] behavior, making the supermarket refrigeration system problem a candidate for benchmarking of algorithms.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\min_{x,u} \frac {1}{t_f - t_0}\int_{t_0}^{t_f} \left( (u_2)\cdot 0.5 \cdot \eta_{vol} \cdot V_{sl} \cdot f \right) dt &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle &lt;br /&gt;
 \mbox{s.t.} &amp;amp; &lt;br /&gt;
\dot{x_0}(t) &amp;amp;=&amp;amp;  \dfrac{1}{V_{suc} \cdot \frac{d\rho_{suc}}{dP_{suc}}(x_0)} \cdot \bigg[ &lt;br /&gt;
                    \left(\dfrac{UA_{wall-ref, max}}{M_{ref, max} \cdot&lt;br /&gt;
                    \Delta h_{lg}(x_0)}\right) \Big( x_4 \big( x_2 - T_e(x_0) \big)\\ &lt;br /&gt;
&amp;amp;           &amp;amp;&amp;amp;  + \, x_8 \big( x_6 - T_e(x_0) \big) \Big) + \, M_{ref,const}   - \eta_{vol} \cdot V_{sl} \cdot 0.5 \, \left(u_2\right) \rho_{suc}(x_0) &lt;br /&gt;
                \bigg] \\&lt;br /&gt;
 &amp;amp;\dot{x_1}(t) &amp;amp;=&amp;amp;  - \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_1 - x_3 \right)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{goods} \cdot C_{p,goods} &lt;br /&gt;
} \\ &lt;br /&gt;
 &amp;amp;\dot{x_2}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{air-wall} \left( x_3-x_2 \right)&lt;br /&gt;
                    - \dfrac{UA_{wall-ref,max}}{M_{ref,max}}&lt;br /&gt;
                    \, x_4 \big( x_2 - T_e(x_0) \big)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{wall} \cdot C_{p,wall}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_3}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_1-x_3 \right) + \dot{Q}_{airload}&lt;br /&gt;
                     - UA_{air-wall} \, (x_3-x_2)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{air} \cdot C_{p,air}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_4}(t) &amp;amp;=&amp;amp;   \left(\dfrac{M_{ref,max} - x_4}{\tau_{fill}} \right) u_0&lt;br /&gt;
                    - \left( \dfrac{UA_{wall-ref,max}}{M_{ref,max} \cdot \Delta h_{lg}(x_0)} \,&lt;br /&gt;
                    x_4 \big( x_2 - T_e(x_0) \big) \right) (1-u_0)&lt;br /&gt;
                 \\ \\&lt;br /&gt;
&amp;amp;\dot{x_5}(t) &amp;amp;=&amp;amp;  - \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_5 - x_7 \right)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{goods} \cdot C_{p,goods} &lt;br /&gt;
} \\ &lt;br /&gt;
 &amp;amp;\dot{x_6}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{air-wall} \left( x_7-x_6 \right)&lt;br /&gt;
                    - \dfrac{UA_{wall-ref,max}}{M_{ref,max}}&lt;br /&gt;
                    \, x_8 \big( x_6 - T_e(x_0) \big)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{wall} \cdot C_{p,wall}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_7}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_5-x_7 \right) + \dot{Q}_{airload}&lt;br /&gt;
                     - UA_{air-wall} \, (x_7-x_6)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{air} \cdot C_{p,air}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_8}(t) &amp;amp;=&amp;amp;   \left(\dfrac{M_{ref,max} - x_8}{\tau_{fill}} \right) u_1&lt;br /&gt;
                    - \left( \dfrac{UA_{wall-ref,max}}{M_{ref,max} \cdot \Delta h_{lg}(x_0)} \,&lt;br /&gt;
                    x_8 \big( x_6 - T_e(x_0) \big) \right) (1-u_1)&lt;br /&gt;
                 \\ [4ex]&lt;br /&gt;
&lt;br /&gt;
 &amp;amp; x_3(t) &amp;amp;\geq&amp;amp; 2.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_3(t) &amp;amp;\leq&amp;amp; 5.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_7(t) &amp;amp;\geq&amp;amp; 2.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_7(t) &amp;amp;\leq&amp;amp; 5.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_0(t) &amp;amp;\leq&amp;amp; 1.7 \quad \forall t \in [t_0, t_f], \\&lt;br /&gt;
 &amp;amp; x_i(t_0) &amp;amp;=&amp;amp; free \quad \forall i \in \{0,\dots, 8\}, \\&lt;br /&gt;
 &amp;amp; x_i(t_f) &amp;amp;=&amp;amp; x_i(t_0) \quad \forall i \in \{0,\dots, 8\}, \\&lt;br /&gt;
 &amp;amp; u_i(t)   &amp;amp;\in&amp;amp;  \{0, 1\} \quad \forall i \in \{0,\dots, 2\}, \\&lt;br /&gt;
 &amp;amp; t_f    &amp;amp;\in&amp;amp; [ 650, 750 ]. &lt;br /&gt;
&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here the differential state &amp;lt;math&amp;gt;x_0&amp;lt;/math&amp;gt; describes the suction pressure in the suction manifold (in bar). The next three states model temperatures in the first display case (in °C). &amp;lt;math&amp;gt;x_1&amp;lt;/math&amp;gt; is the goods&#039; temperature, &amp;lt;math&amp;gt;x_2&amp;lt;/math&amp;gt; the one of the evaporator wall and &amp;lt;math&amp;gt;x_3&amp;lt;/math&amp;gt; the air temperature surrounding the goods. &amp;lt;math&amp;gt;x_4&amp;lt;/math&amp;gt; then models the mass of the liquefied refrigerant in the evaporator (in kg).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;(x_5, x_6, x_7, x_8)&amp;lt;/math&amp;gt; describe the corresponding states in the second display case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_0&amp;lt;/math&amp;gt; describes the inlet valve of the first display case, &amp;lt;math&amp;gt;u_1&amp;lt;/math&amp;gt; respectively the valve of the second display case.&lt;br /&gt;
&amp;lt;math&amp;gt;u_2, u_3&amp;lt;/math&amp;gt; denote the activity of a single compressor.&lt;br /&gt;
&lt;br /&gt;
The following polynomial functions are used in the model description originating from interpolations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rcl}&lt;br /&gt;
&lt;br /&gt;
T_e(x_0)                             &amp;amp;=&amp;amp; -4.3544 x_0^2 + 29.224 x_0 - 51.2005,\\&lt;br /&gt;
\Delta h_{lg}(x_0)                   &amp;amp;=&amp;amp; (0.0217 x_0^2 - 0.1704 x_0 + 2.2988)\cdot 10^5, \\&lt;br /&gt;
\rho_{suc}(x_0)                      &amp;amp;=&amp;amp; 4.6073 x_0 + 0.3798, \\&lt;br /&gt;
\frac{d\rho_{suc}}{dP_{suc}}(x_0)    &amp;amp;=&amp;amp; -0.0329 {x_0}^3 + 0.2161 {x_0}^2 - 0.4742 x_0 + 5.4817,\\&lt;br /&gt;
f(x_0)                               &amp;amp;=&amp;amp; (0.0265 x_0^3 - 0.4346 x_0^2 + 2.4923 x_0 + 1.2189) \cdot 10^5.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
These fixed values are used within the model for the day scenario. A night scenario is also available, see [[#Variants|Variants]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|- bgcolor=#c7c7c7&lt;br /&gt;
! Symbol !! Value !! Unit !! Description&lt;br /&gt;
|- &lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\dot{Q}_{airload}&amp;lt;/math&amp;gt; || align=right | 3000.00 || &amp;lt;math&amp;gt;\frac{J}{s}&amp;lt;/math&amp;gt; || Disturbance, heat transfer from outside the display case&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\dot{m}_{ref,const}&amp;lt;/math&amp;gt; || align=right | 0.20 || &amp;lt;math&amp;gt;\frac{kg}{s}&amp;lt;/math&amp;gt; || Disturbance, constant mass flow of refrigerant&lt;br /&gt;
from unmodeled entities &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{goods}&amp;lt;/math&amp;gt; || align=right | 200.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Mass of goods &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;C_{p,goods}&amp;lt;/math&amp;gt; || align=right | 1000.00 || &amp;lt;math&amp;gt;\frac{J}{kg \cdot K}&amp;lt;/math&amp;gt; || Heat capacity of goods&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;&lt;br /&gt;
UA_{goods-air} &amp;lt;/math&amp;gt; || align=right | 300.00 || &amp;lt;math&amp;gt;\frac{J}{s \cdot K}&amp;lt;/math&amp;gt; || Heat transfer coefficient between goods&lt;br /&gt;
and air &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{wall} &amp;lt;/math&amp;gt; || align=right | 260.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Mass of evaporator wall &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;C_{p,wall} &amp;lt;/math&amp;gt; || align=right | 385.00 || &amp;lt;math&amp;gt;\frac{J}{kg \cdot K}&amp;lt;/math&amp;gt; || Heat capacity of evaporator wall&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;UA_{air-wall}&amp;lt;/math&amp;gt; || align=right | 500.00 || &amp;lt;math&amp;gt;\frac{J}{s \cdot K}&amp;lt;/math&amp;gt; || Heat transfer coefficient between air and&lt;br /&gt;
wall&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{air}&amp;lt;/math&amp;gt; || align=right | 50.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Mass of air in display case &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;C_{p,air}&amp;lt;/math&amp;gt; || align=right | 1000.00 || &amp;lt;math&amp;gt;\frac{J}{kg \cdot K}&amp;lt;/math&amp;gt; || Heat capacity of air&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;UA_{wall-ref,max}&amp;lt;/math&amp;gt; || align=right | 4000.00 || &amp;lt;math&amp;gt;\frac{J}{s \cdot K}&amp;lt;/math&amp;gt; || Maximum heat transfer coefficient between&lt;br /&gt;
refrigerant and evaporator wall&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\tau_{fill}&amp;lt;/math&amp;gt; || align=right | 40.00 || &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; || Parameter describing the filling time of the&lt;br /&gt;
evaporator under opened valve &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;T_{SH}&amp;lt;/math&amp;gt; || align=right | 10.00 || &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; || Superheat in the suction manifold&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{ref,max}&amp;lt;/math&amp;gt; || align=right | 1.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Maximum mass of refrigerant in evaporator&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;V_{suc}&amp;lt;/math&amp;gt; || align=right | 5.00 || &amp;lt;math&amp;gt;m^3&amp;lt;/math&amp;gt; || Total volume of suction manifold&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;V_{sl}&amp;lt;/math&amp;gt; || align=right | 0.08 || &amp;lt;math&amp;gt;\frac{m^3}{s}&amp;lt;/math&amp;gt; || Total displacement volume&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\eta_{vol}&amp;lt;/math&amp;gt; || align=right | 0.81 || &amp;lt;math&amp;gt;-&amp;lt;/math&amp;gt; || Volumetric efficiency&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
For the relaxed problem (we only demand &amp;lt;math&amp;gt;u_i(t) \in  [0,1]&amp;lt;/math&amp;gt; instead of &amp;lt;math&amp;gt;u_i(t) \in  \{0,1\}&amp;lt;/math&amp;gt; the optimal solution is 12072.45.&lt;br /&gt;
If we restrict ourselves to a solution with only integer controls we obtain the optimum objective value 12252.81.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;350px&amp;quot; heights=&amp;quot;300px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:FridgeControlsRelaxed.png| Optimal relaxed control.&lt;br /&gt;
 Image:FridgeControls.png| Optimal integer control.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// number of compressors&lt;br /&gt;
#define NVALVES 2&lt;br /&gt;
&lt;br /&gt;
// constants&lt;br /&gt;
#define M_GOODS 200.0&lt;br /&gt;
#define C_P_GOODS 1000.0&lt;br /&gt;
#define UA_GOODS_AIR 300.0&lt;br /&gt;
#define M_WALL 260.0&lt;br /&gt;
#define C_P_WALL 385.0&lt;br /&gt;
#define UA_AIR_WALL 500.0&lt;br /&gt;
#define M_AIR 50.0&lt;br /&gt;
#define C_P_AIR 1000.0&lt;br /&gt;
#define UA_WALL_REF_MAX 4000.0&lt;br /&gt;
#define M_REF_MAX 1.0&lt;br /&gt;
#define TAU_FILL 40.0&lt;br /&gt;
#define T_SH 10.0&lt;br /&gt;
#define V_SUC 5.0&lt;br /&gt;
#define V_SL 0.08 // 2 display cases - 2 compressors&lt;br /&gt;
// #define V_SL 0.095 // 3 display cases - 3 compressors&lt;br /&gt;
#define ETA_VOL 0.81&lt;br /&gt;
&lt;br /&gt;
// disturbances - day scenario&lt;br /&gt;
#define Q_AIRLOAD 3000.0&lt;br /&gt;
#define M_REF_CONST 0.2&lt;br /&gt;
&lt;br /&gt;
// disturbances - night scenario&lt;br /&gt;
// #define Q_AIRLOAD 1800.0&lt;br /&gt;
// #define M_REF_CONST 0.0&lt;br /&gt;
&lt;br /&gt;
double delta_h = (0.0217*xd[0]*xd[0] - 0.1704*xd[0] + 2.2988)*1e5;&lt;br /&gt;
double T_e = -4.3544*xd[0]*xd[0] + 29.224*xd[0] - 51.2005;&lt;br /&gt;
double rho_suc = 4.6073*xd[0] + 0.3798;&lt;br /&gt;
double rho_suc__P_suc = -0.0329*xd[0]*xd[0]*xd[0] + 0.2161*xd[0]*xd[0] - 0.4742*xd[0] + 5.4817;&lt;br /&gt;
double f = (0.0265*xd[0]*xd[0]*xd[0] -0.4346*xd[0]*xd[0] + 2.4923*xd[0] + 1.2189)*1e5;&lt;br /&gt;
&lt;br /&gt;
double Q_goods_air[NVALVES];&lt;br /&gt;
double Q_air_wall[NVALVES];&lt;br /&gt;
double UA_wall_ref[NVALVES];&lt;br /&gt;
double Q_e[NVALVES];&lt;br /&gt;
double m[NVALVES];&lt;br /&gt;
&lt;br /&gt;
double m_in_suc = 0.0;&lt;br /&gt;
&lt;br /&gt;
int i;&lt;br /&gt;
&lt;br /&gt;
for (i=0; i&amp;lt;NVALVES; i++){&lt;br /&gt;
    Q_goods_air[i] = UA_GOODS_AIR*(xd[1 + i*4] - xd[3 + i*4]);&lt;br /&gt;
    Q_air_wall[i] = UA_AIR_WALL*(xd[3 + i*4] - xd[2 + i*4]);&lt;br /&gt;
    UA_wall_ref[i] = UA_WALL_REF_MAX * xd[4 + 4*i]/M_REF_MAX;&lt;br /&gt;
    Q_e[i] = UA_wall_ref[i]*(xd[2 + 4*i] - T_e);&lt;br /&gt;
&lt;br /&gt;
    m[i] = Q_e[i]/delta_h;&lt;br /&gt;
    m_in_suc += m[i];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
double V_comp = 0.0;&lt;br /&gt;
double comp_scale = (double) 1.0/NCOMPS;&lt;br /&gt;
V_comp = comp_scale*u[NVALVES]*ETA_VOL*V_SL;&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
// suction pressure&lt;br /&gt;
rhs[0] = (m_in_suc + M_REF_CONST - V_comp*rho_suc) / (V_SUC*rho_suc__P_suc);&lt;br /&gt;
&lt;br /&gt;
// for each display/valve&lt;br /&gt;
for (i=0; i&amp;lt;NVALVES; i++){&lt;br /&gt;
&lt;br /&gt;
    // temperatures:&lt;br /&gt;
&lt;br /&gt;
    // goods&lt;br /&gt;
    rhs[1 + i*4] = - Q_goods_air[i]/(M_GOODS*C_P_GOODS);&lt;br /&gt;
&lt;br /&gt;
    // wall&lt;br /&gt;
    rhs[2 + i*4] = (Q_air_wall[i] - Q_e[i])/(M_WALL*C_P_WALL);&lt;br /&gt;
&lt;br /&gt;
    // air&lt;br /&gt;
    rhs[3 + i*4] = ((Q_goods_air[i] + Q_AIRLOAD - Q_air_wall[i]) /(M_AIR*C_P_AIR));&lt;br /&gt;
&lt;br /&gt;
    // mass of liquefied refrigerant:&lt;br /&gt;
    rhs[4 + i*4] = ((M_REF_MAX - xd[4 + 4*i])/TAU_FILL * u[i] - m[i] * (1 - u[i]));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Optimica ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;optimica&amp;quot;&amp;gt;&lt;br /&gt;
package Supermarket_pack&lt;br /&gt;
&lt;br /&gt;
  optimization Supermarket_Opt (objective = cost(tf),&lt;br /&gt;
                         startTime = 0,&lt;br /&gt;
                         finalTime=1)&lt;br /&gt;
&lt;br /&gt;
    // Parameters&lt;br /&gt;
    parameter Real Q_airload = 3000.00;             &lt;br /&gt;
    parameter Real m_ref = 0.20;             &lt;br /&gt;
    parameter Real M_goods=200.00;&lt;br /&gt;
    parameter Real Cp_goods=1000.00;&lt;br /&gt;
    parameter Real UA_goods=300.00;&lt;br /&gt;
    parameter Real M_wall=260.00;&lt;br /&gt;
    parameter Real Cp_wall=385.00;&lt;br /&gt;
    parameter Real UA_air=500.00;&lt;br /&gt;
    parameter Real M_air=50.00;&lt;br /&gt;
    parameter Real Cp_air=1000.00;&lt;br /&gt;
    parameter Real UA_wall=4000.00;&lt;br /&gt;
    parameter Real t_fill=40.00;&lt;br /&gt;
    parameter Real T_sh=10.00;&lt;br /&gt;
    parameter Real M_ref=1.00;&lt;br /&gt;
    parameter Real V_suc=5.00;&lt;br /&gt;
    parameter Real V_sl=0.08;             &lt;br /&gt;
    parameter Real eta_vol=0.81;&lt;br /&gt;
    parameter Real tf(free=true,min=650,max=750)=650;&lt;br /&gt;
 &lt;br /&gt;
   // The states&lt;br /&gt;
    Real x0;&lt;br /&gt;
    Real x1;&lt;br /&gt;
    Real x2;&lt;br /&gt;
    Real x3;&lt;br /&gt;
    Real x4;&lt;br /&gt;
    Real x5;&lt;br /&gt;
    Real x6;&lt;br /&gt;
    Real x7;&lt;br /&gt;
    Real x8;&lt;br /&gt;
    Real cost(start=0);&lt;br /&gt;
&lt;br /&gt;
    // The control signal&lt;br /&gt;
    input Real u0(free=true,min=0,max=1);&lt;br /&gt;
    input Real u1(free=true,min=0,max=1);&lt;br /&gt;
    input Real u2(free=true,min=0,max=1);&lt;br /&gt;
&lt;br /&gt;
//Te=(-4.3544*x0*x0+29.224*x0-51.2005)&lt;br /&gt;
//delta_h=((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)&lt;br /&gt;
//rho_suc=(4.6073*x0+0.3798)&lt;br /&gt;
//drho=(-0.0329*x0*x0*x0+0.2161*x0*x0-0.4742*x0+5.4817)&lt;br /&gt;
//f=((0.0265*x0*x0*x0-0.4346*x0*x0+2.4923*x0+1.2189)*10^5)&lt;br /&gt;
&lt;br /&gt;
  equation&lt;br /&gt;
    der(x0) = ((1.0/(V_suc*(-0.0329*x0*x0*x0+0.2161*x0*x0-0.4742*x0+5.4817)))*((UA_wall/(M_ref*((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)))*(x4*(x2-(-4.3544*x0*x0+29.224*x0-51.2005))+x8*(x6-(-4.3544*x0*x0+29.224*x0-51.2005)))+M_ref-eta_vol*V_sl*0.5*(u2)*(4.6073*x0+0.3798)))*tf;&lt;br /&gt;
    der(x1) =(-UA_goods*(x1-x3)/M_goods*Cp_goods)*tf;&lt;br /&gt;
    der(x2)=((UA_air*(x3-x2)-(UA_wall/M_ref)*x4*(x2-(-4.3544*x0*x0+29.224*x0-51.2005)))/(M_wall*Cp_wall))*tf;&lt;br /&gt;
    der(x3)=((UA_goods*(x1-x3)+Q_airload-UA_air*(x3-x2))/(M_air*Cp_air))*tf;&lt;br /&gt;
    der(x4)=(((M_ref-x4)/t_fill)*u0-((UA_wall/(M_ref*((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)))*x4*(x2-(-4.3544*x0*x0+29.224*x0-51.2005)))*(1-u0))*tf;&lt;br /&gt;
    der(x5)=(-UA_goods*(x5-x7)/(M_goods*Cp_goods))*tf;&lt;br /&gt;
    der(x6)=((UA_air*(x7-x6)-(UA_wall/M_ref)*x8*(x6-(-4.3544*x0*x0+29.224*x0-51.2005)))/(M_wall*Cp_wall))*tf;&lt;br /&gt;
    der(x7)=((UA_goods*(x5-x7)+Q_airload-UA_air*(x7-x6))/(M_air*Cp_air))*tf;&lt;br /&gt;
    der(x8)=(((M_ref-x8)/t_fill)*u1-((UA_wall/(M_ref*((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)))*x8*(x6-(-4.3544*x0*x0+29.224*x0-51.2005)))*(1-u1))*tf;&lt;br /&gt;
    der(cost) = ((-1.0/((1/*time*/)))*cost+(1.0/((1/*time*/)))*((u2)*0.5*eta_vol*V_sl*((0.0265*x0*x0*x0-0.4346*x0*x0+2.4923*x0+1.2189)*10^5)))*tf;&lt;br /&gt;
   // der(cost) = 1.0 / 650 * (((u2)*0.5*eta_vol*V_sl*((0.0265*x0*x0*x0-0.4346*x0*x0+2.4923*x0+1.2189)*10^5)))*tf;&lt;br /&gt;
&lt;br /&gt;
  constraint&lt;br /&gt;
    x3&amp;gt;=2.0;&lt;br /&gt;
    x3&amp;lt;=5.0;&lt;br /&gt;
    x7&amp;gt;=2.0;&lt;br /&gt;
    x7&amp;lt;=5.0;&lt;br /&gt;
    x0&amp;lt;=1.7;&lt;br /&gt;
    x0(tf)=x0(startTime);&lt;br /&gt;
    x1(tf)=x1(startTime);&lt;br /&gt;
    x2(tf)=x2(startTime);&lt;br /&gt;
    x3(tf)=x3(startTime);&lt;br /&gt;
    x4(tf)=x4(startTime);&lt;br /&gt;
    x5(tf)=x5(startTime);&lt;br /&gt;
    x6(tf)=x6(startTime);&lt;br /&gt;
    x7(tf)=x7(startTime);&lt;br /&gt;
    x8(tf)=x8(startTime);&lt;br /&gt;
&lt;br /&gt;
  end Supermarket_Opt;&lt;br /&gt;
&lt;br /&gt;
end Supermarket_pack;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
&lt;br /&gt;
Since the compressors are parallel connected one can introduce a single control &amp;lt;math&amp;gt; u_2 \in \{0,1,2\}&amp;lt;/math&amp;gt; instead of two equivalent controls. The same holds for scenarions with &amp;lt;math&amp;gt; n &amp;lt;/math&amp;gt; parallel connected compressors.&lt;br /&gt;
&lt;br /&gt;
In the paper &amp;lt;bibref&amp;gt;Larsen2007&amp;lt;/bibref&amp;gt; mentioned above, the problem was stated slightly different:&lt;br /&gt;
&lt;br /&gt;
* The temperature constraints weren&#039;t hard bounds but there was a penalization term added to the objective function to minimize the violation of these constraints.&lt;br /&gt;
* The differential equation for the mass of the refrigerant had another switch, if the valve (e.g. &amp;lt;math&amp;gt;u_0&amp;lt;/math&amp;gt;) is closed. It was formulated this way:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\dot{x_4} =  \begin{cases}&lt;br /&gt;
&lt;br /&gt;
\dfrac{M_{ref,max} - x_4}{\tau_{fill}} &amp;amp; \qquad \text{if} \quad u_0 = 1 \\ \\&lt;br /&gt;
- \dfrac{UA_{wall-ref,max}}{M_{ref,max} \cdot \Delta h_{lg}(x_0)} x_4 \big( x_2 - T_e(x_0) \big) &amp;amp; \qquad \text{if} \quad u_0 = 0 \quad \text{and}\quad  x_4 &amp;gt; 0 \\ \\ &lt;br /&gt;
0 &amp;amp; \qquad \text{if} \quad u_0 = 0 \quad \text{and} \quad x_4 = 0&lt;br /&gt;
&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This additional switch is redundant because the mass itself is a factor on the right hand side and so the complete right hand side is 0 if &amp;lt;math&amp;gt;x_4 = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
* A night scenario with two different parameters was given. At night the following parameters change their value:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{lcrr}&lt;br /&gt;
\dot{Q}_{airload}   &amp;amp;=&amp;amp; 1800.00 &amp;amp; \frac{J}{s}, \\&lt;br /&gt;
\dot{m}_{ref,const} &amp;amp;=&amp;amp;    0.00 &amp;amp; \frac{kg}{s},  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the constraint on the suction pressure &amp;lt;math&amp;gt;x_0(t)&amp;lt;/math&amp;gt; is softened to &amp;lt;math&amp;gt;x_0(t) \leq 1.9&amp;lt;/math&amp;gt;.&lt;br /&gt;
* No periodicity was required but the solution on a fixed time horizon 4 hours - 2 in day scenario and 2 in night scenario - with &amp;lt;math&amp;gt;t_f = 14400&amp;lt;/math&amp;gt; was asked.&lt;br /&gt;
* The number of compressors and display cases is not fixed. Larsen also proposed the problem with 3 compressors and 3 display cases. This leads to a change in the compressor rack&#039;s preformance to &amp;lt;math&amp;gt;V_{sl} = 0.095 \frac{m^3}{s}&amp;lt;/math&amp;gt;. Unfortunately this constant is only given for these two cases although Larsen proposed scenarios with more compressors and display cases.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Periodic]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Supermarket_refrigeration_system&amp;diff=512</id>
		<title>Supermarket refrigeration system</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Supermarket_refrigeration_system&amp;diff=512"/>
		<updated>2009-08-11T14:28:53Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 9&lt;br /&gt;
|nw        = 4&lt;br /&gt;
|nre       = 9&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;supermarket refrigeration system problem&#039;&#039;&#039; is based on a model describing a refrigeration system with 2 parallel connected compressors (called a compressor rack) which only can be controlled stepwise (each single compressor can be turned on or off) and 2 open refrigerated display cases containing goods needed to be refrigerated. Each display case is connected to the refrigeration circuit through an expansion valve which also can only be closed or opened. This valve controls the flow of refrigerant into the evaporator, where it absorbs heat from the surrounding air. The refrigerated air then creates the well-known air-curtain at the front of the display case.&lt;br /&gt;
&lt;br /&gt;
The air temperatures surrounding the goods in each display case are modeled by one differential state each. These states have to be bounded, so that the goods are properly refrigerated.&lt;br /&gt;
&lt;br /&gt;
The model was published by Larsen et. al. in 2007 &amp;lt;bibref&amp;gt;Larsen2007&amp;lt;/bibref&amp;gt;. The main goal is to control the refirgeration system energy-optimal. The problem was set up as a benchmark problem for MIOCPs. &lt;br /&gt;
&lt;br /&gt;
The mathematical equations form an [[:Category:ODE model|ODE model]]. The initial values of the differential states are not fixed but periodicity of the whole process is required.&lt;br /&gt;
&lt;br /&gt;
The optimal integer control function shows [[:Category:Chattering|chattering]] behavior, making the supermarket refrigeration system problem a candidate for benchmarking of algorithms.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\min_{x,u} \frac {1}{t_f - t_0}\int_{t_0}^{t_f} \left( (u_2)\cdot 0.5 \cdot \eta_{vol} \cdot V_{sl} \cdot f \right) dt &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle &lt;br /&gt;
 \mbox{s.t.} &amp;amp; &lt;br /&gt;
\dot{x_0}(t) &amp;amp;=&amp;amp;  \dfrac{1}{V_{suc} \cdot \frac{d\rho_{suc}}{dP_{suc}}(x_0)} \cdot \bigg[ &lt;br /&gt;
                    \left(\dfrac{UA_{wall-ref, max}}{M_{ref, max} \cdot&lt;br /&gt;
                    \Delta h_{lg}(x_0)}\right) \Big( x_4 \big( x_2 - T_e(x_0) \big)\\ &lt;br /&gt;
&amp;amp;           &amp;amp;&amp;amp;  + \, x_8 \big( x_6 - T_e(x_0) \big) \Big) + \, M_{ref,const}   - \eta_{vol} \cdot V_{sl} \cdot 0.5 \, \left(u_2\right) \rho_{suc}(x_0) &lt;br /&gt;
                \bigg] \\&lt;br /&gt;
 &amp;amp;\dot{x_1}(t) &amp;amp;=&amp;amp;  - \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_1 - x_3 \right)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{goods} \cdot C_{p,goods} &lt;br /&gt;
} \\ &lt;br /&gt;
 &amp;amp;\dot{x_2}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{air-wall} \left( x_3-x_2 \right)&lt;br /&gt;
                    - \dfrac{UA_{wall-ref,max}}{M_{ref,max}}&lt;br /&gt;
                    \, x_4 \big( x_2 - T_e(x_0) \big)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{wall} \cdot C_{p,wall}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_3}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_1-x_3 \right) + \dot{Q}_{airload}&lt;br /&gt;
                     - UA_{air-wall} \, (x_3-x_2)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{air} \cdot C_{p,air}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_4}(t) &amp;amp;=&amp;amp;   \left(\dfrac{M_{ref,max} - x_4}{\tau_{fill}} \right) u_0&lt;br /&gt;
                    - \left( \dfrac{UA_{wall-ref,max}}{M_{ref,max} \cdot \Delta h_{lg}(x_0)} \,&lt;br /&gt;
                    x_4 \big( x_2 - T_e(x_0) \big) \right) (1-u_0)&lt;br /&gt;
                 \\ \\&lt;br /&gt;
&amp;amp;\dot{x_5}(t) &amp;amp;=&amp;amp;  - \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_5 - x_7 \right)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{goods} \cdot C_{p,goods} &lt;br /&gt;
} \\ &lt;br /&gt;
 &amp;amp;\dot{x_6}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{air-wall} \left( x_7-x_6 \right)&lt;br /&gt;
                    - \dfrac{UA_{wall-ref,max}}{M_{ref,max}}&lt;br /&gt;
                    \, x_8 \big( x_6 - T_e(x_0) \big)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{wall} \cdot C_{p,wall}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_7}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_5-x_7 \right) + \dot{Q}_{airload}&lt;br /&gt;
                     - UA_{air-wall} \, (x_7-x_6)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{air} \cdot C_{p,air}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_8}(t) &amp;amp;=&amp;amp;   \left(\dfrac{M_{ref,max} - x_8}{\tau_{fill}} \right) u_1&lt;br /&gt;
                    - \left( \dfrac{UA_{wall-ref,max}}{M_{ref,max} \cdot \Delta h_{lg}(x_0)} \,&lt;br /&gt;
                    x_8 \big( x_6 - T_e(x_0) \big) \right) (1-u_1)&lt;br /&gt;
                 \\ [4ex]&lt;br /&gt;
&lt;br /&gt;
 &amp;amp; x_3(t) &amp;amp;\geq&amp;amp; 2.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_3(t) &amp;amp;\leq&amp;amp; 5.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_7(t) &amp;amp;\geq&amp;amp; 2.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_7(t) &amp;amp;\leq&amp;amp; 5.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_0(t) &amp;amp;\leq&amp;amp; 1.7 \quad \forall t \in [t_0, t_f], \\&lt;br /&gt;
 &amp;amp; x_i(t_0) &amp;amp;=&amp;amp; free \quad \forall i \in \{0,\dots, 8\}, \\&lt;br /&gt;
 &amp;amp; x_i(t_f) &amp;amp;=&amp;amp; x_i(t_0) \quad \forall i \in \{0,\dots, 8\}, \\&lt;br /&gt;
 &amp;amp; u_i(t)   &amp;amp;\in&amp;amp;  \{0, 1\} \quad \forall i \in \{0,\dots, 2\}, \\&lt;br /&gt;
 &amp;amp; t_f    &amp;amp;\in&amp;amp; [ 650, 750 ]. &lt;br /&gt;
&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here the differential state &amp;lt;math&amp;gt;x_0&amp;lt;/math&amp;gt; describes the suction pressure in the suction manifold (in bar). The next three states model temperatures in the first display case (in °C). &amp;lt;math&amp;gt;x_1&amp;lt;/math&amp;gt; is the goods&#039; temperature, &amp;lt;math&amp;gt;x_2&amp;lt;/math&amp;gt; the one of the evaporator wall and &amp;lt;math&amp;gt;x_3&amp;lt;/math&amp;gt; the air temperature surrounding the goods. &amp;lt;math&amp;gt;x_4&amp;lt;/math&amp;gt; then models the mass of the liquefied refrigerant in the evaporator (in kg).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;(x_5, x_6, x_7, x_8)&amp;lt;/math&amp;gt; describe the corresponding states in the second display case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_0&amp;lt;/math&amp;gt; describes the inlet valve of the first display case, &amp;lt;math&amp;gt;u_1&amp;lt;/math&amp;gt; respectively the valve of the second display case.&lt;br /&gt;
&amp;lt;math&amp;gt;u_2, u_3&amp;lt;/math&amp;gt; denote the activity of a single compressor.&lt;br /&gt;
&lt;br /&gt;
The following polynomial functions are used in the model description originating from interpolations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rcl}&lt;br /&gt;
&lt;br /&gt;
T_e(x_0)                             &amp;amp;=&amp;amp; -4.3544 x_0^2 + 29.224 x_0 - 51.2005,\\&lt;br /&gt;
\Delta h_{lg}(x_0)                   &amp;amp;=&amp;amp; (0.0217 x_0^2 - 0.1704 x_0 + 2.2988)\cdot 10^5, \\&lt;br /&gt;
\rho_{suc}(x_0)                      &amp;amp;=&amp;amp; 4.6073 x_0 + 0.3798, \\&lt;br /&gt;
\frac{d\rho_{suc}}{dP_{suc}}(x_0)    &amp;amp;=&amp;amp; -0.0329 {x_0}^3 + 0.2161 {x_0}^2 - 0.4742 x_0 + 5.4817,\\&lt;br /&gt;
f(x_0)                               &amp;amp;=&amp;amp; (0.0265 x_0^3 - 0.4346 x_0^2 + 2.4923 x_0 + 1.2189) \cdot 10^5.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
These fixed values are used within the model for the day scenario. A night scenario is also available, see [[#Variants|Variants]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|- bgcolor=#c7c7c7&lt;br /&gt;
! Symbol !! Value !! Unit !! Description&lt;br /&gt;
|- &lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\dot{Q}_{airload}&amp;lt;/math&amp;gt; || align=right | 3000.00 || &amp;lt;math&amp;gt;\frac{J}{s}&amp;lt;/math&amp;gt; || Disturbance, heat transfer from outside the display case&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\dot{m}_{ref,const}&amp;lt;/math&amp;gt; || align=right | 0.20 || &amp;lt;math&amp;gt;\frac{kg}{s}&amp;lt;/math&amp;gt; || Disturbance, constant mass flow of refrigerant&lt;br /&gt;
from unmodeled entities &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{goods}&amp;lt;/math&amp;gt; || align=right | 200.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Mass of goods &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;C_{p,goods}&amp;lt;/math&amp;gt; || align=right | 1000.00 || &amp;lt;math&amp;gt;\frac{J}{kg \cdot K}&amp;lt;/math&amp;gt; || Heat capacity of goods&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;&lt;br /&gt;
UA_{goods-air} &amp;lt;/math&amp;gt; || align=right | 300.00 || &amp;lt;math&amp;gt;\frac{J}{s \cdot K}&amp;lt;/math&amp;gt; || Heat transfer coefficient between goods&lt;br /&gt;
and air &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{wall} &amp;lt;/math&amp;gt; || align=right | 260.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Mass of evaporator wall &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;C_{p,wall} &amp;lt;/math&amp;gt; || align=right | 385.00 || &amp;lt;math&amp;gt;\frac{J}{kg \cdot K}&amp;lt;/math&amp;gt; || Heat capacity of evaporator wall&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;UA_{air-wall}&amp;lt;/math&amp;gt; || align=right | 500.00 || &amp;lt;math&amp;gt;\frac{J}{s \cdot K}&amp;lt;/math&amp;gt; || Heat transfer coefficient between air and&lt;br /&gt;
wall&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{air}&amp;lt;/math&amp;gt; || align=right | 50.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Mass of air in display case &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;C_{p,air}&amp;lt;/math&amp;gt; || align=right | 1000.00 || &amp;lt;math&amp;gt;\frac{J}{kg \cdot K}&amp;lt;/math&amp;gt; || Heat capacity of air&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;UA_{wall-ref,max}&amp;lt;/math&amp;gt; || align=right | 4000.00 || &amp;lt;math&amp;gt;\frac{J}{s \cdot K}&amp;lt;/math&amp;gt; || Maximum heat transfer coefficient between&lt;br /&gt;
refrigerant and evaporator wall&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\tau_{fill}&amp;lt;/math&amp;gt; || align=right | 40.00 || &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; || Parameter describing the filling time of the&lt;br /&gt;
evaporator under opened valve &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;T_{SH}&amp;lt;/math&amp;gt; || align=right | 10.00 || &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; || Superheat in the suction manifold&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{ref,max}&amp;lt;/math&amp;gt; || align=right | 1.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Maximum mass of refrigerant in evaporator&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;V_{suc}&amp;lt;/math&amp;gt; || align=right | 5.00 || &amp;lt;math&amp;gt;m^3&amp;lt;/math&amp;gt; || Total volume of suction manifold&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;V_{sl}&amp;lt;/math&amp;gt; || align=right | 0.08 || &amp;lt;math&amp;gt;\frac{m^3}{s}&amp;lt;/math&amp;gt; || Total displacement volume&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\eta_{vol}&amp;lt;/math&amp;gt; || align=right | 0.81 || &amp;lt;math&amp;gt;-&amp;lt;/math&amp;gt; || Volumetric efficiency&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
For the relaxed problem (we only demand &amp;lt;math&amp;gt;u_i(t) \in  [0,1]&amp;lt;/math&amp;gt; instead of &amp;lt;math&amp;gt;u_i(t) \in  \{0,1\}&amp;lt;/math&amp;gt; the optimal solution is 12072.45.&lt;br /&gt;
If we restrict ourselves to a solution with only integer controls we obtain the optimum objective value 12252.81.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;350px&amp;quot; heights=&amp;quot;300px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:FridgeControlsRelaxed.png| Optimal relaxed control.&lt;br /&gt;
 Image:FridgeControls.png| Optimal integer control.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// number of compressors&lt;br /&gt;
#define NVALVES 2&lt;br /&gt;
&lt;br /&gt;
// constants&lt;br /&gt;
#define M_GOODS 200.0&lt;br /&gt;
#define C_P_GOODS 1000.0&lt;br /&gt;
#define UA_GOODS_AIR 300.0&lt;br /&gt;
#define M_WALL 260.0&lt;br /&gt;
#define C_P_WALL 385.0&lt;br /&gt;
#define UA_AIR_WALL 500.0&lt;br /&gt;
#define M_AIR 50.0&lt;br /&gt;
#define C_P_AIR 1000.0&lt;br /&gt;
#define UA_WALL_REF_MAX 4000.0&lt;br /&gt;
#define M_REF_MAX 1.0&lt;br /&gt;
#define TAU_FILL 40.0&lt;br /&gt;
#define T_SH 10.0&lt;br /&gt;
#define V_SUC 5.0&lt;br /&gt;
#define V_SL 0.08 // 2 display cases - 2 compressors&lt;br /&gt;
// #define V_SL 0.095 // 3 display cases - 3 compressors&lt;br /&gt;
#define ETA_VOL 0.81&lt;br /&gt;
&lt;br /&gt;
// disturbances - day scenario&lt;br /&gt;
#define Q_AIRLOAD 3000.0&lt;br /&gt;
#define M_REF_CONST 0.2&lt;br /&gt;
&lt;br /&gt;
// disturbances - night scenario&lt;br /&gt;
// #define Q_AIRLOAD 1800.0&lt;br /&gt;
// #define M_REF_CONST 0.0&lt;br /&gt;
&lt;br /&gt;
double delta_h = (0.0217*xd[0]*xd[0] - 0.1704*xd[0] + 2.2988)*1e5;&lt;br /&gt;
double T_e = -4.3544*xd[0]*xd[0] + 29.224*xd[0] - 51.2005;&lt;br /&gt;
double rho_suc = 4.6073*xd[0] + 0.3798;&lt;br /&gt;
double rho_suc__P_suc = -0.0329*xd[0]*xd[0]*xd[0] + 0.2161*xd[0]*xd[0] - 0.4742*xd[0] + 5.4817;&lt;br /&gt;
double f = (0.0265*xd[0]*xd[0]*xd[0] -0.4346*xd[0]*xd[0] + 2.4923*xd[0] + 1.2189)*1e5;&lt;br /&gt;
&lt;br /&gt;
double Q_goods_air[NVALVES];&lt;br /&gt;
double Q_air_wall[NVALVES];&lt;br /&gt;
double UA_wall_ref[NVALVES];&lt;br /&gt;
double Q_e[NVALVES];&lt;br /&gt;
double m[NVALVES];&lt;br /&gt;
&lt;br /&gt;
double m_in_suc = 0.0;&lt;br /&gt;
&lt;br /&gt;
int i;&lt;br /&gt;
&lt;br /&gt;
for (i=0; i&amp;lt;NVALVES; i++){&lt;br /&gt;
    Q_goods_air[i] = UA_GOODS_AIR*(xd[1 + i*4] - xd[3 + i*4]);&lt;br /&gt;
    Q_air_wall[i] = UA_AIR_WALL*(xd[3 + i*4] - xd[2 + i*4]);&lt;br /&gt;
    UA_wall_ref[i] = UA_WALL_REF_MAX * xd[4 + 4*i]/M_REF_MAX;&lt;br /&gt;
    Q_e[i] = UA_wall_ref[i]*(xd[2 + 4*i] - T_e);&lt;br /&gt;
&lt;br /&gt;
    m[i] = Q_e[i]/delta_h;&lt;br /&gt;
    m_in_suc += m[i];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
double V_comp = 0.0;&lt;br /&gt;
double comp_scale = (double) 1.0/NCOMPS;&lt;br /&gt;
V_comp = comp_scale*u[NVALVES]*ETA_VOL*V_SL;&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
// suction pressure&lt;br /&gt;
rhs[0] = (m_in_suc + M_REF_CONST - V_comp*rho_suc) / (V_SUC*rho_suc__P_suc);&lt;br /&gt;
&lt;br /&gt;
// for each display/valve&lt;br /&gt;
for (i=0; i&amp;lt;NVALVES; i++){&lt;br /&gt;
&lt;br /&gt;
    // temperatures:&lt;br /&gt;
&lt;br /&gt;
    // goods&lt;br /&gt;
    rhs[1 + i*4] = - Q_goods_air[i]/(M_GOODS*C_P_GOODS);&lt;br /&gt;
&lt;br /&gt;
    // wall&lt;br /&gt;
    rhs[2 + i*4] = (Q_air_wall[i] - Q_e[i])/(M_WALL*C_P_WALL);&lt;br /&gt;
&lt;br /&gt;
    // air&lt;br /&gt;
    rhs[3 + i*4] = ((Q_goods_air[i] + Q_AIRLOAD - Q_air_wall[i]) /(M_AIR*C_P_AIR));&lt;br /&gt;
&lt;br /&gt;
    // mass of liquefied refrigerant:&lt;br /&gt;
    rhs[4 + i*4] = ((M_REF_MAX - xd[4 + 4*i])/TAU_FILL * u[i] - m[i] * (1 - u[i]));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Optimica ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;optimica&amp;quot;&amp;gt;&lt;br /&gt;
package Supermarket_pack&lt;br /&gt;
&lt;br /&gt;
  optimization Supermarket_Opt (objective = cost(tf),&lt;br /&gt;
                         startTime = 0,&lt;br /&gt;
                         finalTime=1)&lt;br /&gt;
&lt;br /&gt;
    // Parameters&lt;br /&gt;
    parameter Real Q_airload = 3000.00;             &lt;br /&gt;
    parameter Real m_ref = 0.20;             &lt;br /&gt;
    parameter Real M_goods=200.00;&lt;br /&gt;
    parameter Real Cp_goods=1000.00;&lt;br /&gt;
    parameter Real UA_goods=300.00;&lt;br /&gt;
    parameter Real M_wall=260.00;&lt;br /&gt;
    parameter Real Cp_wall=385.00;&lt;br /&gt;
    parameter Real UA_air=500.00;&lt;br /&gt;
    parameter Real M_air=50.00;&lt;br /&gt;
    parameter Real Cp_air=1000.00;&lt;br /&gt;
    parameter Real UA_wall=4000.00;&lt;br /&gt;
    parameter Real t_fill=40.00;&lt;br /&gt;
    parameter Real T_sh=10.00;&lt;br /&gt;
    parameter Real M_ref=1.00;&lt;br /&gt;
    parameter Real V_suc=5.00;&lt;br /&gt;
    parameter Real V_sl=0.08;             &lt;br /&gt;
    parameter Real eta_vol=0.81;&lt;br /&gt;
    parameter Real tf(free=true,min=650,max=750)=650;&lt;br /&gt;
 &lt;br /&gt;
   // The states&lt;br /&gt;
    Real x0;&lt;br /&gt;
    Real x1;&lt;br /&gt;
    Real x2;&lt;br /&gt;
    Real x3;&lt;br /&gt;
    Real x4;&lt;br /&gt;
    Real x5;&lt;br /&gt;
    Real x6;&lt;br /&gt;
    Real x7;&lt;br /&gt;
    Real x8;&lt;br /&gt;
    Real cost(start=0);&lt;br /&gt;
&lt;br /&gt;
    // The control signal&lt;br /&gt;
    input Real u0(free=true,min=0,max=1);&lt;br /&gt;
    input Real u1(free=true,min=0,max=1);&lt;br /&gt;
    input Real u2(free=true,min=0,max=1);&lt;br /&gt;
&lt;br /&gt;
//Te=(-4.3544*x0*x0+29.224*x0-51.2005)&lt;br /&gt;
//delta_h=((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)&lt;br /&gt;
//rho_suc=(4.6073*x0+0.3798)&lt;br /&gt;
//drho=(-0.0329*x0*x0*x0+0.2161*x0*x0-0.4742*x0+5.4817)&lt;br /&gt;
//f=((0.0265*x0*x0*x0-0.4346*x0*x0+2.4923*x0+1.2189)*10^5)&lt;br /&gt;
&lt;br /&gt;
  equation&lt;br /&gt;
    der(x0) = ((1.0/(V_suc*(-0.0329*x0*x0*x0+0.2161*x0*x0-0.4742*x0+5.4817)))*((UA_wall/(M_ref*((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)))*(x4*(x2-(-4.3544*x0*x0+29.224*x0-51.2005))+x8*(x6-(-4.3544*x0*x0+29.224*x0-51.2005)))+M_ref-eta_vol*V_sl*0.5*(u2)*(4.6073*x0+0.3798)))*tf;&lt;br /&gt;
    der(x1) =(-UA_goods*(x1-x3)/M_goods*Cp_goods)*tf;&lt;br /&gt;
    der(x2)=((UA_air*(x3-x2)-(UA_wall/M_ref)*x4*(x2-(-4.3544*x0*x0+29.224*x0-51.2005)))/(M_wall*Cp_wall))*tf;&lt;br /&gt;
    der(x3)=((UA_goods*(x1-x3)+Q_airload-UA_air*(x3-x2))/(M_air*Cp_air))*tf;&lt;br /&gt;
    der(x4)=(((M_ref-x4)/t_fill)*u0-((UA_wall/(M_ref*((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)))*x4*(x2-(-4.3544*x0*x0+29.224*x0-51.2005)))*(1-u0))*tf;&lt;br /&gt;
    der(x5)=(-UA_goods*(x5-x7)/(M_goods*Cp_goods))*tf;&lt;br /&gt;
    der(x6)=((UA_air*(x7-x6)-(UA_wall/M_ref)*x8*(x6-(-4.3544*x0*x0+29.224*x0-51.2005)))/(M_wall*Cp_wall))*tf;&lt;br /&gt;
    der(x7)=((UA_goods*(x5-x7)+Q_airload-UA_air*(x7-x6))/(M_air*Cp_air))*tf;&lt;br /&gt;
    der(x8)=(((M_ref-x8)/t_fill)*u1-((UA_wall/(M_ref*((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)))*x8*(x6-(-4.3544*x0*x0+29.224*x0-51.2005)))*(1-u1))*tf;&lt;br /&gt;
//    der(cost) = ((-1.0/((1.0/*time*/)))*cost+(1.0/((1.0/*time*/)))*((u2)*0.5*eta_vol*V_sl*((0.0265*x0*x0*x0-0.4346*x0*x0+2.4923*x0+1.2189)*10^5)))*tf;&lt;br /&gt;
    der(cost) = 1.0 / 650 * (((u2)*0.5*eta_vol*V_sl*((0.0265*x0*x0*x0-0.4346*x0*x0+2.4923*x0+1.2189)*10^5)))*tf;&lt;br /&gt;
&lt;br /&gt;
  constraint&lt;br /&gt;
    x3&amp;gt;=2.0;&lt;br /&gt;
    x3&amp;lt;=5.0;&lt;br /&gt;
    x7&amp;gt;=2.0;&lt;br /&gt;
    x7&amp;lt;=5.0;&lt;br /&gt;
    x0&amp;lt;=1.7;&lt;br /&gt;
    x0(tf)=x0(startTime);&lt;br /&gt;
    x1(tf)=x1(startTime);&lt;br /&gt;
    x2(tf)=x2(startTime);&lt;br /&gt;
    x3(tf)=x3(startTime);&lt;br /&gt;
    x4(tf)=x4(startTime);&lt;br /&gt;
    x5(tf)=x5(startTime);&lt;br /&gt;
    x6(tf)=x6(startTime);&lt;br /&gt;
    x7(tf)=x7(startTime);&lt;br /&gt;
    x8(tf)=x8(startTime);&lt;br /&gt;
&lt;br /&gt;
  end Supermarket_Opt;&lt;br /&gt;
&lt;br /&gt;
end Supermarket_pack;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
&lt;br /&gt;
Since the compressors are parallel connected one can introduce a single control &amp;lt;math&amp;gt; u_2 \in \{0,1,2\}&amp;lt;/math&amp;gt; instead of two equivalent controls. The same holds for scenarions with &amp;lt;math&amp;gt; n &amp;lt;/math&amp;gt; parallel connected compressors.&lt;br /&gt;
&lt;br /&gt;
In the paper &amp;lt;bibref&amp;gt;Larsen2007&amp;lt;/bibref&amp;gt; mentioned above, the problem was stated slightly different:&lt;br /&gt;
&lt;br /&gt;
* The temperature constraints weren&#039;t hard bounds but there was a penalization term added to the objective function to minimize the violation of these constraints.&lt;br /&gt;
* The differential equation for the mass of the refrigerant had another switch, if the valve (e.g. &amp;lt;math&amp;gt;u_0&amp;lt;/math&amp;gt;) is closed. It was formulated this way:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\dot{x_4} =  \begin{cases}&lt;br /&gt;
&lt;br /&gt;
\dfrac{M_{ref,max} - x_4}{\tau_{fill}} &amp;amp; \qquad \text{if} \quad u_0 = 1 \\ \\&lt;br /&gt;
- \dfrac{UA_{wall-ref,max}}{M_{ref,max} \cdot \Delta h_{lg}(x_0)} x_4 \big( x_2 - T_e(x_0) \big) &amp;amp; \qquad \text{if} \quad u_0 = 0 \quad \text{and}\quad  x_4 &amp;gt; 0 \\ \\ &lt;br /&gt;
0 &amp;amp; \qquad \text{if} \quad u_0 = 0 \quad \text{and} \quad x_4 = 0&lt;br /&gt;
&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This additional switch is redundant because the mass itself is a factor on the right hand side and so the complete right hand side is 0 if &amp;lt;math&amp;gt;x_4 = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
* A night scenario with two different parameters was given. At night the following parameters change their value:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{lcrr}&lt;br /&gt;
\dot{Q}_{airload}   &amp;amp;=&amp;amp; 1800.00 &amp;amp; \frac{J}{s}, \\&lt;br /&gt;
\dot{m}_{ref,const} &amp;amp;=&amp;amp;    0.00 &amp;amp; \frac{kg}{s},  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the constraint on the suction pressure &amp;lt;math&amp;gt;x_0(t)&amp;lt;/math&amp;gt; is softened to &amp;lt;math&amp;gt;x_0(t) \leq 1.9&amp;lt;/math&amp;gt;.&lt;br /&gt;
* No periodicity was required but the solution on a fixed time horizon 4 hours - 2 in day scenario and 2 in night scenario - with &amp;lt;math&amp;gt;t_f = 14400&amp;lt;/math&amp;gt; was asked.&lt;br /&gt;
* The number of compressors and display cases is not fixed. Larsen also proposed the problem with 3 compressors and 3 display cases. This leads to a change in the compressor rack&#039;s preformance to &amp;lt;math&amp;gt;V_{sl} = 0.095 \frac{m^3}{s}&amp;lt;/math&amp;gt;. Unfortunately this constant is only given for these two cases although Larsen proposed scenarios with more compressors and display cases.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Periodic]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Supermarket_refrigeration_system&amp;diff=511</id>
		<title>Supermarket refrigeration system</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Supermarket_refrigeration_system&amp;diff=511"/>
		<updated>2009-08-11T14:25:44Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 9&lt;br /&gt;
|nw        = 4&lt;br /&gt;
|nre       = 9&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;supermarket refrigeration system problem&#039;&#039;&#039; is based on a model describing a refrigeration system with 2 parallel connected compressors (called a compressor rack) which only can be controlled stepwise (each single compressor can be turned on or off) and 2 open refrigerated display cases containing goods needed to be refrigerated. Each display case is connected to the refrigeration circuit through an expansion valve which also can only be closed or opened. This valve controls the flow of refrigerant into the evaporator, where it absorbs heat from the surrounding air. The refrigerated air then creates the well-known air-curtain at the front of the display case.&lt;br /&gt;
&lt;br /&gt;
The air temperatures surrounding the goods in each display case are modeled by one differential state each. These states have to be bounded, so that the goods are properly refrigerated.&lt;br /&gt;
&lt;br /&gt;
The model was published by Larsen et. al. in 2007 &amp;lt;bibref&amp;gt;Larsen2007&amp;lt;/bibref&amp;gt;. The main goal is to control the refirgeration system energy-optimal. The problem was set up as a benchmark problem for MIOCPs. &lt;br /&gt;
&lt;br /&gt;
The mathematical equations form an [[:Category:ODE model|ODE model]]. The initial values of the differential states are not fixed but periodicity of the whole process is required.&lt;br /&gt;
&lt;br /&gt;
The optimal integer control function shows [[:Category:Chattering|chattering]] behavior, making the supermarket refrigeration system problem a candidate for benchmarking of algorithms.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\min_{x,u} \frac {1}{t_f - t_0}\int_{t_0}^{t_f} \left( (u_2)\cdot 0.5 \cdot \eta_{vol} \cdot V_{sl} \cdot f \right) dt &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle &lt;br /&gt;
 \mbox{s.t.} &amp;amp; &lt;br /&gt;
\dot{x_0}(t) &amp;amp;=&amp;amp;  \dfrac{1}{V_{suc} \cdot \frac{d\rho_{suc}}{dP_{suc}}(x_0)} \cdot \bigg[ &lt;br /&gt;
                    \left(\dfrac{UA_{wall-ref, max}}{M_{ref, max} \cdot&lt;br /&gt;
                    \Delta h_{lg}(x_0)}\right) \Big( x_4 \big( x_2 - T_e(x_0) \big)\\ &lt;br /&gt;
&amp;amp;           &amp;amp;&amp;amp;  + \, x_8 \big( x_6 - T_e(x_0) \big) \Big) + \, M_{ref,const}   - \eta_{vol} \cdot V_{sl} \cdot 0.5 \, \left(u_2\right) \rho_{suc}(x_0) &lt;br /&gt;
                \bigg] \\&lt;br /&gt;
 &amp;amp;\dot{x_1}(t) &amp;amp;=&amp;amp;  - \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_1 - x_3 \right)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{goods} \cdot C_{p,goods} &lt;br /&gt;
} \\ &lt;br /&gt;
 &amp;amp;\dot{x_2}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{air-wall} \left( x_3-x_2 \right)&lt;br /&gt;
                    - \dfrac{UA_{wall-ref,max}}{M_{ref,max}}&lt;br /&gt;
                    \, x_4 \big( x_2 - T_e(x_0) \big)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{wall} \cdot C_{p,wall}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_3}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_1-x_3 \right) + \dot{Q}_{airload}&lt;br /&gt;
                     - UA_{air-wall} \, (x_3-x_2)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{air} \cdot C_{p,air}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_4}(t) &amp;amp;=&amp;amp;   \left(\dfrac{M_{ref,max} - x_4}{\tau_{fill}} \right) u_0&lt;br /&gt;
                    - \left( \dfrac{UA_{wall-ref,max}}{M_{ref,max} \cdot \Delta h_{lg}(x_0)} \,&lt;br /&gt;
                    x_4 \big( x_2 - T_e(x_0) \big) \right) (1-u_0)&lt;br /&gt;
                 \\ \\&lt;br /&gt;
&amp;amp;\dot{x_5}(t) &amp;amp;=&amp;amp;  - \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_5 - x_7 \right)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{goods} \cdot C_{p,goods} &lt;br /&gt;
} \\ &lt;br /&gt;
 &amp;amp;\dot{x_6}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{air-wall} \left( x_7-x_6 \right)&lt;br /&gt;
                    - \dfrac{UA_{wall-ref,max}}{M_{ref,max}}&lt;br /&gt;
                    \, x_8 \big( x_6 - T_e(x_0) \big)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{wall} \cdot C_{p,wall}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_7}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_5-x_7 \right) + \dot{Q}_{airload}&lt;br /&gt;
                     - UA_{air-wall} \, (x_7-x_6)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{air} \cdot C_{p,air}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_8}(t) &amp;amp;=&amp;amp;   \left(\dfrac{M_{ref,max} - x_8}{\tau_{fill}} \right) u_1&lt;br /&gt;
                    - \left( \dfrac{UA_{wall-ref,max}}{M_{ref,max} \cdot \Delta h_{lg}(x_0)} \,&lt;br /&gt;
                    x_8 \big( x_6 - T_e(x_0) \big) \right) (1-u_1)&lt;br /&gt;
                 \\ [4ex]&lt;br /&gt;
&lt;br /&gt;
 &amp;amp; x_3(t) &amp;amp;\geq&amp;amp; 2.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_3(t) &amp;amp;\leq&amp;amp; 5.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_7(t) &amp;amp;\geq&amp;amp; 2.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_7(t) &amp;amp;\leq&amp;amp; 5.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_0(t) &amp;amp;\leq&amp;amp; 1.7 \quad \forall t \in [t_0, t_f], \\&lt;br /&gt;
 &amp;amp; x_i(t_0) &amp;amp;=&amp;amp; free \quad \forall i \in \{0,\dots, 8\}, \\&lt;br /&gt;
 &amp;amp; x_i(t_f) &amp;amp;=&amp;amp; x_i(t_0) \quad \forall i \in \{0,\dots, 8\}, \\&lt;br /&gt;
 &amp;amp; u_i(t)   &amp;amp;\in&amp;amp;  \{0, 1\} \quad \forall i \in \{0,\dots, 2\}, \\&lt;br /&gt;
 &amp;amp; t_f    &amp;amp;\in&amp;amp; [ 650, 750 ]. &lt;br /&gt;
&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here the differential state &amp;lt;math&amp;gt;x_0&amp;lt;/math&amp;gt; describes the suction pressure in the suction manifold (in bar). The next three states model temperatures in the first display case (in °C). &amp;lt;math&amp;gt;x_1&amp;lt;/math&amp;gt; is the goods&#039; temperature, &amp;lt;math&amp;gt;x_2&amp;lt;/math&amp;gt; the one of the evaporator wall and &amp;lt;math&amp;gt;x_3&amp;lt;/math&amp;gt; the air temperature surrounding the goods. &amp;lt;math&amp;gt;x_4&amp;lt;/math&amp;gt; then models the mass of the liquefied refrigerant in the evaporator (in kg).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;(x_5, x_6, x_7, x_8)&amp;lt;/math&amp;gt; describe the corresponding states in the second display case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_0&amp;lt;/math&amp;gt; describes the inlet valve of the first display case, &amp;lt;math&amp;gt;u_1&amp;lt;/math&amp;gt; respectively the valve of the second display case.&lt;br /&gt;
&amp;lt;math&amp;gt;u_2, u_3&amp;lt;/math&amp;gt; denote the activity of a single compressor.&lt;br /&gt;
&lt;br /&gt;
The following polynomial functions are used in the model description originating from interpolations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rcl}&lt;br /&gt;
&lt;br /&gt;
T_e(x_0)                             &amp;amp;=&amp;amp; -4.3544 x_0^2 + 29.224 x_0 - 51.2005,\\&lt;br /&gt;
\Delta h_{lg}(x_0)                   &amp;amp;=&amp;amp; (0.0217 x_0^2 - 0.1704 x_0 + 2.2988)\cdot 10^5, \\&lt;br /&gt;
\rho_{suc}(x_0)                      &amp;amp;=&amp;amp; 4.6073 x_0 + 0.3798, \\&lt;br /&gt;
\frac{d\rho_{suc}}{dP_{suc}}(x_0)    &amp;amp;=&amp;amp; -0.0329 {x_0}^3 + 0.2161 {x_0}^2 - 0.4742 x_0 + 5.4817,\\&lt;br /&gt;
f(x_0)                               &amp;amp;=&amp;amp; (0.0265 x_0^3 - 0.4346 x_0^2 + 2.4923 x_0 + 1.2189) \cdot 10^5.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
These fixed values are used within the model for the day scenario. A night scenario is also available, see [[#Variants|Variants]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|- bgcolor=#c7c7c7&lt;br /&gt;
! Symbol !! Value !! Unit !! Description&lt;br /&gt;
|- &lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\dot{Q}_{airload}&amp;lt;/math&amp;gt; || align=right | 3000.00 || &amp;lt;math&amp;gt;\frac{J}{s}&amp;lt;/math&amp;gt; || Disturbance, heat transfer from outside the display case&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\dot{m}_{ref,const}&amp;lt;/math&amp;gt; || align=right | 0.20 || &amp;lt;math&amp;gt;\frac{kg}{s}&amp;lt;/math&amp;gt; || Disturbance, constant mass flow of refrigerant&lt;br /&gt;
from unmodeled entities &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{goods}&amp;lt;/math&amp;gt; || align=right | 200.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Mass of goods &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;C_{p,goods}&amp;lt;/math&amp;gt; || align=right | 1000.00 || &amp;lt;math&amp;gt;\frac{J}{kg \cdot K}&amp;lt;/math&amp;gt; || Heat capacity of goods&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;&lt;br /&gt;
UA_{goods-air} &amp;lt;/math&amp;gt; || align=right | 300.00 || &amp;lt;math&amp;gt;\frac{J}{s \cdot K}&amp;lt;/math&amp;gt; || Heat transfer coefficient between goods&lt;br /&gt;
and air &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{wall} &amp;lt;/math&amp;gt; || align=right | 260.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Mass of evaporator wall &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;C_{p,wall} &amp;lt;/math&amp;gt; || align=right | 385.00 || &amp;lt;math&amp;gt;\frac{J}{kg \cdot K}&amp;lt;/math&amp;gt; || Heat capacity of evaporator wall&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;UA_{air-wall}&amp;lt;/math&amp;gt; || align=right | 500.00 || &amp;lt;math&amp;gt;\frac{J}{s \cdot K}&amp;lt;/math&amp;gt; || Heat transfer coefficient between air and&lt;br /&gt;
wall&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{air}&amp;lt;/math&amp;gt; || align=right | 50.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Mass of air in display case &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;C_{p,air}&amp;lt;/math&amp;gt; || align=right | 1000.00 || &amp;lt;math&amp;gt;\frac{J}{kg \cdot K}&amp;lt;/math&amp;gt; || Heat capacity of air&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;UA_{wall-ref,max}&amp;lt;/math&amp;gt; || align=right | 4000.00 || &amp;lt;math&amp;gt;\frac{J}{s \cdot K}&amp;lt;/math&amp;gt; || Maximum heat transfer coefficient between&lt;br /&gt;
refrigerant and evaporator wall&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\tau_{fill}&amp;lt;/math&amp;gt; || align=right | 40.00 || &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; || Parameter describing the filling time of the&lt;br /&gt;
evaporator under opened valve &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;T_{SH}&amp;lt;/math&amp;gt; || align=right | 10.00 || &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; || Superheat in the suction manifold&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{ref,max}&amp;lt;/math&amp;gt; || align=right | 1.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Maximum mass of refrigerant in evaporator&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;V_{suc}&amp;lt;/math&amp;gt; || align=right | 5.00 || &amp;lt;math&amp;gt;m^3&amp;lt;/math&amp;gt; || Total volume of suction manifold&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;V_{sl}&amp;lt;/math&amp;gt; || align=right | 0.08 || &amp;lt;math&amp;gt;\frac{m^3}{s}&amp;lt;/math&amp;gt; || Total displacement volume&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\eta_{vol}&amp;lt;/math&amp;gt; || align=right | 0.81 || &amp;lt;math&amp;gt;-&amp;lt;/math&amp;gt; || Volumetric efficiency&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
For the relaxed problem (we only demand &amp;lt;math&amp;gt;u_i(t) \in  [0,1]&amp;lt;/math&amp;gt; instead of &amp;lt;math&amp;gt;u_i(t) \in  \{0,1\}&amp;lt;/math&amp;gt; the optimal solution is 12072.45.&lt;br /&gt;
If we restrict ourselves to a solution with only integer controls we obtain the optimum objective value 12252.81.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;350px&amp;quot; heights=&amp;quot;300px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:FridgeControlsRelaxed.png| Optimal relaxed control.&lt;br /&gt;
 Image:FridgeControls.png| Optimal integer control.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// number of compressors&lt;br /&gt;
#define NVALVES 2&lt;br /&gt;
&lt;br /&gt;
// constants&lt;br /&gt;
#define M_GOODS 200.0&lt;br /&gt;
#define C_P_GOODS 1000.0&lt;br /&gt;
#define UA_GOODS_AIR 300.0&lt;br /&gt;
#define M_WALL 260.0&lt;br /&gt;
#define C_P_WALL 385.0&lt;br /&gt;
#define UA_AIR_WALL 500.0&lt;br /&gt;
#define M_AIR 50.0&lt;br /&gt;
#define C_P_AIR 1000.0&lt;br /&gt;
#define UA_WALL_REF_MAX 4000.0&lt;br /&gt;
#define M_REF_MAX 1.0&lt;br /&gt;
#define TAU_FILL 40.0&lt;br /&gt;
#define T_SH 10.0&lt;br /&gt;
#define V_SUC 5.0&lt;br /&gt;
#define V_SL 0.08 // 2 display cases - 2 compressors&lt;br /&gt;
// #define V_SL 0.095 // 3 display cases - 3 compressors&lt;br /&gt;
#define ETA_VOL 0.81&lt;br /&gt;
&lt;br /&gt;
// disturbances - day scenario&lt;br /&gt;
#define Q_AIRLOAD 3000.0&lt;br /&gt;
#define M_REF_CONST 0.2&lt;br /&gt;
&lt;br /&gt;
// disturbances - night scenario&lt;br /&gt;
// #define Q_AIRLOAD 1800.0&lt;br /&gt;
// #define M_REF_CONST 0.0&lt;br /&gt;
&lt;br /&gt;
double delta_h = (0.0217*xd[0]*xd[0] - 0.1704*xd[0] + 2.2988)*1e5;&lt;br /&gt;
double T_e = -4.3544*xd[0]*xd[0] + 29.224*xd[0] - 51.2005;&lt;br /&gt;
double rho_suc = 4.6073*xd[0] + 0.3798;&lt;br /&gt;
double rho_suc__P_suc = -0.0329*xd[0]*xd[0]*xd[0] + 0.2161*xd[0]*xd[0] - 0.4742*xd[0] + 5.4817;&lt;br /&gt;
double f = (0.0265*xd[0]*xd[0]*xd[0] -0.4346*xd[0]*xd[0] + 2.4923*xd[0] + 1.2189)*1e5;&lt;br /&gt;
&lt;br /&gt;
double Q_goods_air[NVALVES];&lt;br /&gt;
double Q_air_wall[NVALVES];&lt;br /&gt;
double UA_wall_ref[NVALVES];&lt;br /&gt;
double Q_e[NVALVES];&lt;br /&gt;
double m[NVALVES];&lt;br /&gt;
&lt;br /&gt;
double m_in_suc = 0.0;&lt;br /&gt;
&lt;br /&gt;
int i;&lt;br /&gt;
&lt;br /&gt;
for (i=0; i&amp;lt;NVALVES; i++){&lt;br /&gt;
    Q_goods_air[i] = UA_GOODS_AIR*(xd[1 + i*4] - xd[3 + i*4]);&lt;br /&gt;
    Q_air_wall[i] = UA_AIR_WALL*(xd[3 + i*4] - xd[2 + i*4]);&lt;br /&gt;
    UA_wall_ref[i] = UA_WALL_REF_MAX * xd[4 + 4*i]/M_REF_MAX;&lt;br /&gt;
    Q_e[i] = UA_wall_ref[i]*(xd[2 + 4*i] - T_e);&lt;br /&gt;
&lt;br /&gt;
    m[i] = Q_e[i]/delta_h;&lt;br /&gt;
    m_in_suc += m[i];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
double V_comp = 0.0;&lt;br /&gt;
double comp_scale = (double) 1.0/NCOMPS;&lt;br /&gt;
V_comp = comp_scale*u[NVALVES]*ETA_VOL*V_SL;&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
// suction pressure&lt;br /&gt;
rhs[0] = (m_in_suc + M_REF_CONST - V_comp*rho_suc) / (V_SUC*rho_suc__P_suc);&lt;br /&gt;
&lt;br /&gt;
// for each display/valve&lt;br /&gt;
for (i=0; i&amp;lt;NVALVES; i++){&lt;br /&gt;
&lt;br /&gt;
    // temperatures:&lt;br /&gt;
&lt;br /&gt;
    // goods&lt;br /&gt;
    rhs[1 + i*4] = - Q_goods_air[i]/(M_GOODS*C_P_GOODS);&lt;br /&gt;
&lt;br /&gt;
    // wall&lt;br /&gt;
    rhs[2 + i*4] = (Q_air_wall[i] - Q_e[i])/(M_WALL*C_P_WALL);&lt;br /&gt;
&lt;br /&gt;
    // air&lt;br /&gt;
    rhs[3 + i*4] = ((Q_goods_air[i] + Q_AIRLOAD - Q_air_wall[i]) /(M_AIR*C_P_AIR));&lt;br /&gt;
&lt;br /&gt;
    // mass of liquefied refrigerant:&lt;br /&gt;
    rhs[4 + i*4] = ((M_REF_MAX - xd[4 + 4*i])/TAU_FILL * u[i] - m[i] * (1 - u[i]));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
=== Optimica ===&lt;br /&gt;
package Supermarket_pack&lt;br /&gt;
&lt;br /&gt;
  optimization Supermarket_Opt (objective = cost(tf),&lt;br /&gt;
                         startTime = 0,&lt;br /&gt;
                         finalTime=1)&lt;br /&gt;
&lt;br /&gt;
    // Parameters&lt;br /&gt;
    parameter Real Q_airload = 3000.00;             &lt;br /&gt;
    parameter Real m_ref = 0.20;             &lt;br /&gt;
    parameter Real M_goods=200.00;&lt;br /&gt;
    parameter Real Cp_goods=1000.00;&lt;br /&gt;
    parameter Real UA_goods=300.00;&lt;br /&gt;
    parameter Real M_wall=260.00;&lt;br /&gt;
    parameter Real Cp_wall=385.00;&lt;br /&gt;
    parameter Real UA_air=500.00;&lt;br /&gt;
    parameter Real M_air=50.00;&lt;br /&gt;
    parameter Real Cp_air=1000.00;&lt;br /&gt;
    parameter Real UA_wall=4000.00;&lt;br /&gt;
    parameter Real t_fill=40.00;&lt;br /&gt;
    parameter Real T_sh=10.00;&lt;br /&gt;
    parameter Real M_ref=1.00;&lt;br /&gt;
    parameter Real V_suc=5.00;&lt;br /&gt;
    parameter Real V_sl=0.08;             &lt;br /&gt;
    parameter Real eta_vol=0.81;&lt;br /&gt;
    parameter Real tf(free=true,min=650,max=750)=650;&lt;br /&gt;
 &lt;br /&gt;
   // The states&lt;br /&gt;
    Real x0;&lt;br /&gt;
    Real x1;&lt;br /&gt;
    Real x2;&lt;br /&gt;
    Real x3;&lt;br /&gt;
    Real x4;&lt;br /&gt;
    Real x5;&lt;br /&gt;
    Real x6;&lt;br /&gt;
    Real x7;&lt;br /&gt;
    Real x8;&lt;br /&gt;
    Real cost(start=0);&lt;br /&gt;
&lt;br /&gt;
    // The control signal&lt;br /&gt;
    input Real u0(free=true,min=0,max=1);&lt;br /&gt;
    input Real u1(free=true,min=0,max=1);&lt;br /&gt;
    input Real u2(free=true,min=0,max=1);&lt;br /&gt;
&lt;br /&gt;
//Te=(-4.3544*x0*x0+29.224*x0-51.2005)&lt;br /&gt;
//delta_h=((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)&lt;br /&gt;
//rho_suc=(4.6073*x0+0.3798)&lt;br /&gt;
//drho=(-0.0329*x0*x0*x0+0.2161*x0*x0-0.4742*x0+5.4817)&lt;br /&gt;
//f=((0.0265*x0*x0*x0-0.4346*x0*x0+2.4923*x0+1.2189)*10^5)&lt;br /&gt;
&lt;br /&gt;
  equation&lt;br /&gt;
    der(x0) = ((1.0/(V_suc*(-0.0329*x0*x0*x0+0.2161*x0*x0-0.4742*x0+5.4817)))*((UA_wall/(M_ref*((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)))*(x4*(x2-(-4.3544*x0*x0+29.224*x0-51.2005))+x8*(x6-(-4.3544*x0*x0+29.224*x0-51.2005)))+M_ref-eta_vol*V_sl*0.5*(u2)*(4.6073*x0+0.3798)))*tf;&lt;br /&gt;
    der(x1) =(-UA_goods*(x1-x3)/M_goods*Cp_goods)*tf;&lt;br /&gt;
    der(x2)=((UA_air*(x3-x2)-(UA_wall/M_ref)*x4*(x2-(-4.3544*x0*x0+29.224*x0-51.2005)))/(M_wall*Cp_wall))*tf;&lt;br /&gt;
    der(x3)=((UA_goods*(x1-x3)+Q_airload-UA_air*(x3-x2))/(M_air*Cp_air))*tf;&lt;br /&gt;
    der(x4)=(((M_ref-x4)/t_fill)*u0-((UA_wall/(M_ref*((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)))*x4*(x2-(-4.3544*x0*x0+29.224*x0-51.2005)))*(1-u0))*tf;&lt;br /&gt;
    der(x5)=(-UA_goods*(x5-x7)/(M_goods*Cp_goods))*tf;&lt;br /&gt;
    der(x6)=((UA_air*(x7-x6)-(UA_wall/M_ref)*x8*(x6-(-4.3544*x0*x0+29.224*x0-51.2005)))/(M_wall*Cp_wall))*tf;&lt;br /&gt;
    der(x7)=((UA_goods*(x5-x7)+Q_airload-UA_air*(x7-x6))/(M_air*Cp_air))*tf;&lt;br /&gt;
    der(x8)=(((M_ref-x8)/t_fill)*u1-((UA_wall/(M_ref*((0.0217*x0*x0-0.1704*x0+2.2988)*10^5)))*x8*(x6-(-4.3544*x0*x0+29.224*x0-51.2005)))*(1-u1))*tf;&lt;br /&gt;
//    der(cost) = ((-1.0/((1.0/*time*/)))*cost+(1.0/((1.0/*time*/)))*((u2)*0.5*eta_vol*V_sl*((0.0265*x0*x0*x0-0.4346*x0*x0+2.4923*x0+1.2189)*10^5)))*tf;&lt;br /&gt;
    der(cost) = 1.0 / 650 * (((u2)*0.5*eta_vol*V_sl*((0.0265*x0*x0*x0-0.4346*x0*x0+2.4923*x0+1.2189)*10^5)))*tf;&lt;br /&gt;
&lt;br /&gt;
  constraint&lt;br /&gt;
    x3&amp;gt;=2.0;&lt;br /&gt;
    x3&amp;lt;=5.0;&lt;br /&gt;
    x7&amp;gt;=2.0;&lt;br /&gt;
    x7&amp;lt;=5.0;&lt;br /&gt;
    x0&amp;lt;=1.7;&lt;br /&gt;
    x0(tf)=x0(startTime);&lt;br /&gt;
    x1(tf)=x1(startTime);&lt;br /&gt;
    x2(tf)=x2(startTime);&lt;br /&gt;
    x3(tf)=x3(startTime);&lt;br /&gt;
    x4(tf)=x4(startTime);&lt;br /&gt;
    x5(tf)=x5(startTime);&lt;br /&gt;
    x6(tf)=x6(startTime);&lt;br /&gt;
    x7(tf)=x7(startTime);&lt;br /&gt;
    x8(tf)=x8(startTime);&lt;br /&gt;
&lt;br /&gt;
  end Supermarket_Opt;&lt;br /&gt;
&lt;br /&gt;
end Supermarket_pack;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
&lt;br /&gt;
Since the compressors are parallel connected one can introduce a single control &amp;lt;math&amp;gt; u_2 \in \{0,1,2\}&amp;lt;/math&amp;gt; instead of two equivalent controls. The same holds for scenarions with &amp;lt;math&amp;gt; n &amp;lt;/math&amp;gt; parallel connected compressors.&lt;br /&gt;
&lt;br /&gt;
In the paper &amp;lt;bibref&amp;gt;Larsen2007&amp;lt;/bibref&amp;gt; mentioned above, the problem was stated slightly different:&lt;br /&gt;
&lt;br /&gt;
* The temperature constraints weren&#039;t hard bounds but there was a penalization term added to the objective function to minimize the violation of these constraints.&lt;br /&gt;
* The differential equation for the mass of the refrigerant had another switch, if the valve (e.g. &amp;lt;math&amp;gt;u_0&amp;lt;/math&amp;gt;) is closed. It was formulated this way:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\dot{x_4} =  \begin{cases}&lt;br /&gt;
&lt;br /&gt;
\dfrac{M_{ref,max} - x_4}{\tau_{fill}} &amp;amp; \qquad \text{if} \quad u_0 = 1 \\ \\&lt;br /&gt;
- \dfrac{UA_{wall-ref,max}}{M_{ref,max} \cdot \Delta h_{lg}(x_0)} x_4 \big( x_2 - T_e(x_0) \big) &amp;amp; \qquad \text{if} \quad u_0 = 0 \quad \text{and}\quad  x_4 &amp;gt; 0 \\ \\ &lt;br /&gt;
0 &amp;amp; \qquad \text{if} \quad u_0 = 0 \quad \text{and} \quad x_4 = 0&lt;br /&gt;
&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This additional switch is redundant because the mass itself is a factor on the right hand side and so the complete right hand side is 0 if &amp;lt;math&amp;gt;x_4 = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
* A night scenario with two different parameters was given. At night the following parameters change their value:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{lcrr}&lt;br /&gt;
\dot{Q}_{airload}   &amp;amp;=&amp;amp; 1800.00 &amp;amp; \frac{J}{s}, \\&lt;br /&gt;
\dot{m}_{ref,const} &amp;amp;=&amp;amp;    0.00 &amp;amp; \frac{kg}{s},  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the constraint on the suction pressure &amp;lt;math&amp;gt;x_0(t)&amp;lt;/math&amp;gt; is softened to &amp;lt;math&amp;gt;x_0(t) \leq 1.9&amp;lt;/math&amp;gt;.&lt;br /&gt;
* No periodicity was required but the solution on a fixed time horizon 4 hours - 2 in day scenario and 2 in night scenario - with &amp;lt;math&amp;gt;t_f = 14400&amp;lt;/math&amp;gt; was asked.&lt;br /&gt;
* The number of compressors and display cases is not fixed. Larsen also proposed the problem with 3 compressors and 3 display cases. This leads to a change in the compressor rack&#039;s preformance to &amp;lt;math&amp;gt;V_{sl} = 0.095 \frac{m^3}{s}&amp;lt;/math&amp;gt;. Unfortunately this constant is only given for these two cases although Larsen proposed scenarios with more compressors and display cases.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Periodic]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Annihilation_of_calcium_oscillations&amp;diff=510</id>
		<title>Annihilation of calcium oscillations</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Annihilation_of_calcium_oscillations&amp;diff=510"/>
		<updated>2009-08-11T14:18:30Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Optimica */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 4&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The aim of the control problem is to identify strength and timing of inhibitor stimuli that lead to a phase singularity which annihilates intracellular calcium oscillations. This is formulated as an objective function that aims at minimizing the state deviation from a desired unstable steady state, integrated over time.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix the initial values of the differential states. The problem is, despite of its low dimension, very hard to solve, as the target state is [[:Category:Unstable | unstable]].&lt;br /&gt;
&lt;br /&gt;
== Biological motivation ==&lt;br /&gt;
&lt;br /&gt;
Biological rhythms as impressing manifestations of self-organized dynamics associated with the phenomenon life have been of particular interest since quite a long time. Even before the mechanistic basis of certain biochemical oscillators was elucidated by molecular biology techniques, their investigation and the issue of perturbation by external stimuli has attracted much attention.&lt;br /&gt;
&lt;br /&gt;
A calcium oscillator model describing intracellular calcium spiking in hepatocytes induced by an extracellular increase in adenosine triphosphate (ATP) concentration is described. The calcium signaling pathway is initiated via a receptor activated G-protein inducing the intracellular release of inositol triphoshate (IP3) by phospholipase C. The IP3 triggers the opening of endoplasmic reticulum and plasma membrane calcium channels and a subsequent inflow of calcium ions from intracellular and extracellular stores leading to transient calcium spikes.&lt;br /&gt;
&lt;br /&gt;
As a source of external control a temporally varying concentration of an uncompetitive inhibitor of the PMCA ion pump is considered.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w, w^{\mathrm{max}}} &amp;amp; &amp;amp; &amp;amp; {\int_{t_0}^{t_f} || x(\tau) - \tilde{x} ||_2^2 + p_1 w(\tau) \; \mathrm{d}\tau} \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0 &amp;amp; = &amp;amp; k_1 + k_2 x_0 - \frac{k_3 x_0 x_1}{x_0 + K_4} -  \frac{k_5 x_0 x_2}{x_0 + K_6} \\&lt;br /&gt;
&amp;amp; \dot{x}_1 &amp;amp; = &amp;amp; k_7 x_0 - \frac{k_8 x_1}{x_1 + K_9} \\&lt;br /&gt;
&amp;amp; \dot{x}_2 &amp;amp; = &amp;amp; \frac{k_{10} x_1 x_2 x_3}{x_3 + K_{11}} + k_{12} x_1 + k_{13} x_0 - \frac{k_{14} x_2}{w \cdot x_2 + K_{15}} - \frac{k_{16} x_2}{x_2 + K_{17}} + \frac{x_3}{10} \\&lt;br /&gt;
&amp;amp; \dot{x}_3 &amp;amp; = &amp;amp; - \frac{k_{10} x_1 x_2 x_3}{x_3 + K_{11}} + \frac{k_{16} x_2}{x_2 + K_{17}} - \frac{x_3}{10} \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; (0.03966, 1.09799, 0.00142, 1.65431)^T, \\&lt;br /&gt;
 &amp;amp; x(t) &amp;amp; \ge &amp;amp; 0.0, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{1, w^{\mathrm{max}}\}, \\&lt;br /&gt;
 &amp;amp; w^{\mathrm{max}} &amp;amp; \ge &amp;amp; 1.1, \\&lt;br /&gt;
 &amp;amp; w^{\mathrm{max}} &amp;amp; \le &amp;amp; 1.3.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the differential states &amp;lt;math&amp;gt;(x_0, x_1, x_2, x_3)&amp;lt;/math&amp;gt; describe concentrations of activated G-proteins, active phospholipase C, intracellular calcium, and intra-ER calcium, respectively. &lt;br /&gt;
&lt;br /&gt;
Modeling details including a comprehensive discussion of parameter values and the dynamical behavior observed in simulations with a comparison to experimental observations can be found in &amp;lt;bibref&amp;gt;Kummer2000&amp;lt;/bibref&amp;gt;. In the given equations that stem from &amp;lt;bibref&amp;gt;Lebiedz2005&amp;lt;/bibref&amp;gt;, the model is identical to the one derived there, except for an additional first-order leakage flow of calcium from the ER back to the cytoplasm, which is modeled by &amp;lt;math&amp;gt;\frac{x_3}{10}&amp;lt;/math&amp;gt; in equations 3 and 4. It reproduces well experimental observations of cytoplasmic calcium oscillations as well as bursting behavior and in particular the frequency encoding of the triggering stimulus strength, which is a well known mechanism for signal processing in cell biology.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
These fixed values are used within the model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rcl}&lt;br /&gt;
[t_0, t_f] &amp;amp;=&amp;amp; [0, 22],\\&lt;br /&gt;
k_1 &amp;amp;=&amp;amp; 0.09, \\&lt;br /&gt;
k_2 &amp;amp;=&amp;amp; 2.30066, \\&lt;br /&gt;
k_3 &amp;amp;=&amp;amp; 0.64, \\&lt;br /&gt;
K_4 &amp;amp;=&amp;amp; 0.19, \\&lt;br /&gt;
k_5 &amp;amp;=&amp;amp; 4.88, \\&lt;br /&gt;
K_6 &amp;amp;=&amp;amp; 1.18, \\&lt;br /&gt;
k_7 &amp;amp;=&amp;amp; 2.08, \\&lt;br /&gt;
k_8 &amp;amp;=&amp;amp; 32.24, \\&lt;br /&gt;
K_9 &amp;amp;=&amp;amp; 29.09, \\&lt;br /&gt;
k_{10} &amp;amp;=&amp;amp; 5.0, \\&lt;br /&gt;
K_{11} &amp;amp;=&amp;amp; 2.67, \\&lt;br /&gt;
k_{12} &amp;amp;=&amp;amp; 0.7, \\&lt;br /&gt;
k_{13} &amp;amp;=&amp;amp; 13.58, \\&lt;br /&gt;
k_{14} &amp;amp;=&amp;amp; 153.0, \\&lt;br /&gt;
K_{15} &amp;amp;=&amp;amp; 0.16, \\&lt;br /&gt;
k_{16} &amp;amp;=&amp;amp; 4.85, \\&lt;br /&gt;
K_{17} &amp;amp;=&amp;amp; 0.05, \\&lt;br /&gt;
p_1    &amp;amp;=&amp;amp; 100, \\&lt;br /&gt;
\tilde{x}_0 &amp;amp;=&amp;amp; 6.78677, \\&lt;br /&gt;
\tilde{x}_1 &amp;amp;=&amp;amp; 22.65836, \\&lt;br /&gt;
\tilde{x}_2 &amp;amp;=&amp;amp; 0.384306, \\&lt;br /&gt;
\tilde{x}_3 &amp;amp;=&amp;amp; 0.28977.&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:calciumControl.png| Optimal stimuli determined by mixed-integer optimal control.&lt;br /&gt;
 Image:calciumStates.png| Corresponding differential states.&lt;br /&gt;
 Image:calciumStatesPerturbed.png| Slightly perturbed control: stimulus 0.001 too early.&lt;br /&gt;
 Image:calciumStatesLongTime.png| Long time behavior of optimal solution: numerical rounding errors lead to transition back from unstable steady-state to stable limit-cycle.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The depicted optimal solution consists of a stimulus of &amp;lt;math&amp;gt;w^{\mathrm{max}}=1.3&amp;lt;/math&amp;gt; and a timing given by the stage lengths 4.6947115, 0.1491038, and 17.1561845. The optimal objective function value is 1610.654. As can be seen from the additional plots, this solution is extremely unstable. A small perturbation in the control, or simply rounding errors on a longer time horizon lead to a transition back to the stable limit-cycle oscillations.&lt;br /&gt;
&lt;br /&gt;
== Optimization ==&lt;br /&gt;
&lt;br /&gt;
The determination of the stimulus by means of optimization is quite hard for two reasons. First, the unstable target steady-state. Only a stable all-at-once algorithm such as multiple shooting or collocation can be applied successfully.&lt;br /&gt;
&lt;br /&gt;
Second, the objective landscape of the problem in switching time formulation (this is, for a fixed stimulus strength and modifying only beginning and length of the stimulus) is quite nasty, as the following visualizations obtained by simulation show.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Objective landscape simulation plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:calciumObjectiveSimulation1.png| Brute-force simulation of objective landscape for different values of stimulus beginning and length.&lt;br /&gt;
 Image:calciumObjectiveSimulation2.png| Zoom in.&lt;br /&gt;
 Image:calciumObjectiveSimulation3.png| Zoom in.&lt;br /&gt;
 Image:calciumObjectiveSimulation4.png| Note that the border line of the small channel is a local maximum, hence an initialization slightly away will not lead to the correct global minimum.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
rhs[0] = p[0]&lt;br /&gt;
         + p[1]*xd[0]&lt;br /&gt;
         - p[2]*xd[0]*xd[1]/(xd[0]+p[3])&lt;br /&gt;
         - p[4]*xd[0]*xd[2]/(xd[0]+p[5]);&lt;br /&gt;
&lt;br /&gt;
rhs[1] = p[6]*xd[0]&lt;br /&gt;
         - p[7]*xd[1]/(xd[1]+p[8]);&lt;br /&gt;
&lt;br /&gt;
rhs[2] = p[9]*xd[1]*xd[2]*xd[3]/(xd[3]+p[10])&lt;br /&gt;
         + p[18]*p[11]*xd[1]&lt;br /&gt;
         + p[12]*xd[0]&lt;br /&gt;
         - p[13]*xd[2]/(u[0]*xd[2]+p[14])&lt;br /&gt;
         - p[15]*xd[2]/(xd[2]+p[16])&lt;br /&gt;
         + 0.1*xd[3];&lt;br /&gt;
&lt;br /&gt;
rhs[3] = -p[9]*xd[1]*xd[2]*xd[3]/(xd[3]+p[10])&lt;br /&gt;
         + p[15]*xd[2]/(xd[2]+p[16])&lt;br /&gt;
         - 0.1*xd[3];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Optimica ===&lt;br /&gt;
&lt;br /&gt;
The optimica code of the problem:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;optimica&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package Calcium_pack&lt;br /&gt;
&lt;br /&gt;
  optimization Calcium_Opt (objective = cost(finalTime),&lt;br /&gt;
                         startTime = 0,&lt;br /&gt;
                         finalTime = 22)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    // Parameters&lt;br /&gt;
    parameter Real k1 = 0.09;             // Parameter k1&lt;br /&gt;
    parameter Real k2 = 2.30066;          // Parameter k2&lt;br /&gt;
    parameter Real k3 = 0.64;             // Parameter k3&lt;br /&gt;
    parameter Real K4 = 0.19;             // Parameter K4&lt;br /&gt;
    parameter Real k5 = 4.88;             // Parameter k5&lt;br /&gt;
    parameter Real K6 = 1.18;             // Parameter K6&lt;br /&gt;
    parameter Real k7 = 2.08;             // Parameter k7&lt;br /&gt;
    parameter Real k8 = 32.24;            // Parameter k8&lt;br /&gt;
    parameter Real K9 = 29.09;            // Parameter K9&lt;br /&gt;
    parameter Real k10 = 5.0;             // Parameter k10&lt;br /&gt;
    parameter Real K11 = 2.67;            // Parameter K11&lt;br /&gt;
    parameter Real k12 = 0.7;             // Parameter k12&lt;br /&gt;
    parameter Real k13 = 13.58;           // Parameter k13&lt;br /&gt;
    parameter Real k14 = 153.0;           // Parameter k14&lt;br /&gt;
    parameter Real K15 = 0.16;            // Parameter K15&lt;br /&gt;
    parameter Real k16 = 4.85;            // Parameter k16&lt;br /&gt;
    parameter Real K17 = 0.05;            // Parameter K17&lt;br /&gt;
    parameter Real p1 = 100;              // Parameter p1&lt;br /&gt;
    parameter Real x0tilde = 6.78677;     // Parameter x0tilde &lt;br /&gt;
    parameter Real x1tilde = 22.65836;    // Parameter x1tilde&lt;br /&gt;
    parameter Real x2tilde = 0.384306;    // Parameter x2tilde &lt;br /&gt;
    parameter Real x3tilde = 0.28977;     // Parameter x3tilde &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    // The states&lt;br /&gt;
    Real x0(start=0.03966);&lt;br /&gt;
    Real x1(start=1.09799);&lt;br /&gt;
    Real x2(start=0.00142);&lt;br /&gt;
    Real x3(start=1.65431);&lt;br /&gt;
&lt;br /&gt;
    // The control signal&lt;br /&gt;
    input Real u(free=true);&lt;br /&gt;
    //parameter Real umax(free=true,min=1.1,max=1.3);&lt;br /&gt;
    //parameter Real umax=1.3;&lt;br /&gt;
&lt;br /&gt;
    Real cost(start=0);&lt;br /&gt;
&lt;br /&gt;
  equation&lt;br /&gt;
    der(x0) = k1+k2*x0-((k3*x0*x1)/(8*x0+K4))-((k5*x0*x2)/(x0+K6));&lt;br /&gt;
    der(x1) = k7*x0 - ((k8*x1)/(x1+K9));&lt;br /&gt;
    der(x2)=(k10*x1*x2*x3)/(x3+K11)+k12*x1+k13*x0-(k14*x2)/(u*x2+K15)-(k16*x2)/(x2+K17)+x3/10;&lt;br /&gt;
    der(x3)=-(k10*x1*x2*x3)/(x3+K11)+(k16*x2)/(x2+K17)-x3/10;&lt;br /&gt;
    der(cost)=sqrt((x0-x0tilde)*(x0-x0tilde)+(x1-x1tilde)*(x1-x1tilde)+&lt;br /&gt;
              (x2-x2tilde)*(x2-x2tilde)+(x3-x3tilde)*(x3-x3tilde))+p1*u;&lt;br /&gt;
  constraint&lt;br /&gt;
     x0&amp;gt;=0;&lt;br /&gt;
     x1&amp;gt;=0;&lt;br /&gt;
     x2&amp;gt;=0;&lt;br /&gt;
     x3&amp;gt;=0;&lt;br /&gt;
    // u={0,1.1,1.3};&lt;br /&gt;
     u&amp;gt;=1;&lt;br /&gt;
     u&amp;lt;=1.3;&lt;br /&gt;
  end Calcium_Opt;&lt;br /&gt;
&lt;br /&gt;
end Calcium_pack;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt; [[Annihilation of calcium oscillations with PLC activation inhibition| Use of two control functions]].&lt;br /&gt;
 &amp;lt;li&amp;gt; Scaled deviation in objective function.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, or presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Unstable]]&lt;br /&gt;
[[Category:Bang bang]]&lt;br /&gt;
[[Category:Systems biology]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Supermarket_refrigeration_system&amp;diff=509</id>
		<title>Supermarket refrigeration system</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Supermarket_refrigeration_system&amp;diff=509"/>
		<updated>2009-08-11T13:59:34Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: Removed control u_3 from model formulation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 9&lt;br /&gt;
|nw        = 4&lt;br /&gt;
|nre       = 9&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;supermarket refrigeration system problem&#039;&#039;&#039; is based on a model describing a refrigeration system with 2 parallel connected compressors (called a compressor rack) which only can be controlled stepwise (each single compressor can be turned on or off) and 2 open refrigerated display cases containing goods needed to be refrigerated. Each display case is connected to the refrigeration circuit through an expansion valve which also can only be closed or opened. This valve controls the flow of refrigerant into the evaporator, where it absorbs heat from the surrounding air. The refrigerated air then creates the well-known air-curtain at the front of the display case.&lt;br /&gt;
&lt;br /&gt;
The air temperatures surrounding the goods in each display case are modeled by one differential state each. These states have to be bounded, so that the goods are properly refrigerated.&lt;br /&gt;
&lt;br /&gt;
The model was published by Larsen et. al. in 2007 &amp;lt;bibref&amp;gt;Larsen2007&amp;lt;/bibref&amp;gt;. The main goal is to control the refirgeration system energy-optimal. The problem was set up as a benchmark problem for MIOCPs. &lt;br /&gt;
&lt;br /&gt;
The mathematical equations form an [[:Category:ODE model|ODE model]]. The initial values of the differential states are not fixed but periodicity of the whole process is required.&lt;br /&gt;
&lt;br /&gt;
The optimal integer control function shows [[:Category:Chattering|chattering]] behavior, making the supermarket refrigeration system problem a candidate for benchmarking of algorithms.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\min_{x,u} \frac {1}{t_f - t_0}\int_{t_0}^{t_f} \left( (u_2)\cdot 0.5 \cdot \eta_{vol} \cdot V_{sl} \cdot f \right) dt &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle &lt;br /&gt;
 \mbox{s.t.} &amp;amp; &lt;br /&gt;
\dot{x_0}(t) &amp;amp;=&amp;amp;  \dfrac{1}{V_{suc} \cdot \frac{d\rho_{suc}}{dP_{suc}}(x_0)} \cdot \bigg[ &lt;br /&gt;
                    \left(\dfrac{UA_{wall-ref, max}}{M_{ref, max} \cdot&lt;br /&gt;
                    \Delta h_{lg}(x_0)}\right) \Big( x_4 \big( x_2 - T_e(x_0) \big)\\ &lt;br /&gt;
&amp;amp;           &amp;amp;&amp;amp;  + \, x_8 \big( x_6 - T_e(x_0) \big) \Big) + \, M_{ref,const}   - \eta_{vol} \cdot V_{sl} \cdot 0.5 \, \left(u_2\right) \rho_{suc}(x_0) &lt;br /&gt;
                \bigg] \\&lt;br /&gt;
 &amp;amp;\dot{x_1}(t) &amp;amp;=&amp;amp;  - \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_1 - x_3 \right)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{goods} \cdot C_{p,goods} &lt;br /&gt;
} \\ &lt;br /&gt;
 &amp;amp;\dot{x_2}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{air-wall} \left( x_3-x_2 \right)&lt;br /&gt;
                    - \dfrac{UA_{wall-ref,max}}{M_{ref,max}}&lt;br /&gt;
                    \, x_4 \big( x_2 - T_e(x_0) \big)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{wall} \cdot C_{p,wall}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_3}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_1-x_3 \right) + \dot{Q}_{airload}&lt;br /&gt;
                     - UA_{air-wall} \, (x_3-x_2)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{air} \cdot C_{p,air}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_4}(t) &amp;amp;=&amp;amp;   \left(\dfrac{M_{ref,max} - x_4}{\tau_{fill}} \right) u_0&lt;br /&gt;
                    - \left( \dfrac{UA_{wall-ref,max}}{M_{ref,max} \cdot \Delta h_{lg}(x_0)} \,&lt;br /&gt;
                    x_4 \big( x_2 - T_e(x_0) \big) \right) (1-u_0)&lt;br /&gt;
                 \\ \\&lt;br /&gt;
&amp;amp;\dot{x_5}(t) &amp;amp;=&amp;amp;  - \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_5 - x_7 \right)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{goods} \cdot C_{p,goods} &lt;br /&gt;
} \\ &lt;br /&gt;
 &amp;amp;\dot{x_6}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{air-wall} \left( x_7-x_6 \right)&lt;br /&gt;
                    - \dfrac{UA_{wall-ref,max}}{M_{ref,max}}&lt;br /&gt;
                    \, x_8 \big( x_6 - T_e(x_0) \big)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{wall} \cdot C_{p,wall}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_7}(t) &amp;amp;=&amp;amp;  \dfrac{&lt;br /&gt;
                    UA_{goods-air} \left( x_5-x_7 \right) + \dot{Q}_{airload}&lt;br /&gt;
                     - UA_{air-wall} \, (x_7-x_6)&lt;br /&gt;
}{&lt;br /&gt;
                    M_{air} \cdot C_{p,air}&lt;br /&gt;
} \\ [2.5ex]&lt;br /&gt;
&amp;amp;\dot{x_8}(t) &amp;amp;=&amp;amp;   \left(\dfrac{M_{ref,max} - x_8}{\tau_{fill}} \right) u_1&lt;br /&gt;
                    - \left( \dfrac{UA_{wall-ref,max}}{M_{ref,max} \cdot \Delta h_{lg}(x_0)} \,&lt;br /&gt;
                    x_8 \big( x_6 - T_e(x_0) \big) \right) (1-u_1)&lt;br /&gt;
                 \\ [4ex]&lt;br /&gt;
&lt;br /&gt;
 &amp;amp; x_3(t) &amp;amp;\geq&amp;amp; 2.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_3(t) &amp;amp;\leq&amp;amp; 5.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_7(t) &amp;amp;\geq&amp;amp; 2.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_7(t) &amp;amp;\leq&amp;amp; 5.0 \quad \forall t \in [t_0, t_f],\\&lt;br /&gt;
 &amp;amp; x_0(t) &amp;amp;\leq&amp;amp; 1.7 \quad \forall t \in [t_0, t_f], \\&lt;br /&gt;
 &amp;amp; x_i(t_0) &amp;amp;=&amp;amp; free \quad \forall i \in \{0,\dots, 8\}, \\&lt;br /&gt;
 &amp;amp; x_i(t_f) &amp;amp;=&amp;amp; x_i(t_0) \quad \forall i \in \{0,\dots, 8\}, \\&lt;br /&gt;
 &amp;amp; u_i(t)   &amp;amp;\in&amp;amp;  \{0, 1\} \quad \forall i \in \{0,\dots, 2\}, \\&lt;br /&gt;
 &amp;amp; t_f    &amp;amp;\in&amp;amp; [ 650, 750 ]. &lt;br /&gt;
&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here the differential state &amp;lt;math&amp;gt;x_0&amp;lt;/math&amp;gt; describes the suction pressure in the suction manifold (in bar). The next three states model temperatures in the first display case (in °C). &amp;lt;math&amp;gt;x_1&amp;lt;/math&amp;gt; is the goods&#039; temperature, &amp;lt;math&amp;gt;x_2&amp;lt;/math&amp;gt; the one of the evaporator wall and &amp;lt;math&amp;gt;x_3&amp;lt;/math&amp;gt; the air temperature surrounding the goods. &amp;lt;math&amp;gt;x_4&amp;lt;/math&amp;gt; then models the mass of the liquefied refrigerant in the evaporator (in kg).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;(x_5, x_6, x_7, x_8)&amp;lt;/math&amp;gt; describe the corresponding states in the second display case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_0&amp;lt;/math&amp;gt; describes the inlet valve of the first display case, &amp;lt;math&amp;gt;u_1&amp;lt;/math&amp;gt; respectively the valve of the second display case.&lt;br /&gt;
&amp;lt;math&amp;gt;u_2, u_3&amp;lt;/math&amp;gt; denote the activity of a single compressor.&lt;br /&gt;
&lt;br /&gt;
The following polynomial functions are used in the model description originating from interpolations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rcl}&lt;br /&gt;
&lt;br /&gt;
T_e(x_0)                             &amp;amp;=&amp;amp; -4.3544 x_0^2 + 29.224 x_0 - 51.2005,\\&lt;br /&gt;
\Delta h_{lg}(x_0)                   &amp;amp;=&amp;amp; (0.0217 x_0^2 - 0.1704 x_0 + 2.2988)\cdot 10^5, \\&lt;br /&gt;
\rho_{suc}(x_0)                      &amp;amp;=&amp;amp; 4.6073 x_0 + 0.3798, \\&lt;br /&gt;
\frac{d\rho_{suc}}{dP_{suc}}(x_0)    &amp;amp;=&amp;amp; -0.0329 {x_0}^3 + 0.2161 {x_0}^2 - 0.4742 x_0 + 5.4817,\\&lt;br /&gt;
f(x_0)                               &amp;amp;=&amp;amp; (0.0265 x_0^3 - 0.4346 x_0^2 + 2.4923 x_0 + 1.2189) \cdot 10^5.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
These fixed values are used within the model for the day scenario. A night scenario is also available, see [[#Variants|Variants]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|- bgcolor=#c7c7c7&lt;br /&gt;
! Symbol !! Value !! Unit !! Description&lt;br /&gt;
|- &lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\dot{Q}_{airload}&amp;lt;/math&amp;gt; || align=right | 3000.00 || &amp;lt;math&amp;gt;\frac{J}{s}&amp;lt;/math&amp;gt; || Disturbance, heat transfer from outside the display case&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\dot{m}_{ref,const}&amp;lt;/math&amp;gt; || align=right | 0.20 || &amp;lt;math&amp;gt;\frac{kg}{s}&amp;lt;/math&amp;gt; || Disturbance, constant mass flow of refrigerant&lt;br /&gt;
from unmodeled entities &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{goods}&amp;lt;/math&amp;gt; || align=right | 200.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Mass of goods &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;C_{p,goods}&amp;lt;/math&amp;gt; || align=right | 1000.00 || &amp;lt;math&amp;gt;\frac{J}{kg \cdot K}&amp;lt;/math&amp;gt; || Heat capacity of goods&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;&lt;br /&gt;
UA_{goods-air} &amp;lt;/math&amp;gt; || align=right | 300.00 || &amp;lt;math&amp;gt;\frac{J}{s \cdot K}&amp;lt;/math&amp;gt; || Heat transfer coefficient between goods&lt;br /&gt;
and air &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{wall} &amp;lt;/math&amp;gt; || align=right | 260.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Mass of evaporator wall &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;C_{p,wall} &amp;lt;/math&amp;gt; || align=right | 385.00 || &amp;lt;math&amp;gt;\frac{J}{kg \cdot K}&amp;lt;/math&amp;gt; || Heat capacity of evaporator wall&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;UA_{air-wall}&amp;lt;/math&amp;gt; || align=right | 500.00 || &amp;lt;math&amp;gt;\frac{J}{s \cdot K}&amp;lt;/math&amp;gt; || Heat transfer coefficient between air and&lt;br /&gt;
wall&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{air}&amp;lt;/math&amp;gt; || align=right | 50.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Mass of air in display case &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;C_{p,air}&amp;lt;/math&amp;gt; || align=right | 1000.00 || &amp;lt;math&amp;gt;\frac{J}{kg \cdot K}&amp;lt;/math&amp;gt; || Heat capacity of air&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;UA_{wall-ref,max}&amp;lt;/math&amp;gt; || align=right | 4000.00 || &amp;lt;math&amp;gt;\frac{J}{s \cdot K}&amp;lt;/math&amp;gt; || Maximum heat transfer coefficient between&lt;br /&gt;
refrigerant and evaporator wall&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\tau_{fill}&amp;lt;/math&amp;gt; || align=right | 40.00 || &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; || Parameter describing the filling time of the&lt;br /&gt;
evaporator under opened valve &lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;T_{SH}&amp;lt;/math&amp;gt; || align=right | 10.00 || &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; || Superheat in the suction manifold&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;M_{ref,max}&amp;lt;/math&amp;gt; || align=right | 1.00 || &amp;lt;math&amp;gt;kg&amp;lt;/math&amp;gt; || Maximum mass of refrigerant in evaporator&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;V_{suc}&amp;lt;/math&amp;gt; || align=right | 5.00 || &amp;lt;math&amp;gt;m^3&amp;lt;/math&amp;gt; || Total volume of suction manifold&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;V_{sl}&amp;lt;/math&amp;gt; || align=right | 0.08 || &amp;lt;math&amp;gt;\frac{m^3}{s}&amp;lt;/math&amp;gt; || Total displacement volume&lt;br /&gt;
|-&lt;br /&gt;
| align=center | &amp;lt;math&amp;gt;\eta_{vol}&amp;lt;/math&amp;gt; || align=right | 0.81 || &amp;lt;math&amp;gt;-&amp;lt;/math&amp;gt; || Volumetric efficiency&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
For the relaxed problem (we only demand &amp;lt;math&amp;gt;u_i(t) \in  [0,1]&amp;lt;/math&amp;gt; instead of &amp;lt;math&amp;gt;u_i(t) \in  \{0,1\}&amp;lt;/math&amp;gt; the optimal solution is 12072.45.&lt;br /&gt;
If we restrict ourselves to a solution with only integer controls we obtain the optimum objective value 12252.81.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;350px&amp;quot; heights=&amp;quot;300px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:FridgeControlsRelaxed.png| Optimal relaxed control.&lt;br /&gt;
 Image:FridgeControls.png| Optimal integer control.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// number of compressors&lt;br /&gt;
#define NVALVES 2&lt;br /&gt;
&lt;br /&gt;
// constants&lt;br /&gt;
#define M_GOODS 200.0&lt;br /&gt;
#define C_P_GOODS 1000.0&lt;br /&gt;
#define UA_GOODS_AIR 300.0&lt;br /&gt;
#define M_WALL 260.0&lt;br /&gt;
#define C_P_WALL 385.0&lt;br /&gt;
#define UA_AIR_WALL 500.0&lt;br /&gt;
#define M_AIR 50.0&lt;br /&gt;
#define C_P_AIR 1000.0&lt;br /&gt;
#define UA_WALL_REF_MAX 4000.0&lt;br /&gt;
#define M_REF_MAX 1.0&lt;br /&gt;
#define TAU_FILL 40.0&lt;br /&gt;
#define T_SH 10.0&lt;br /&gt;
#define V_SUC 5.0&lt;br /&gt;
#define V_SL 0.08 // 2 display cases - 2 compressors&lt;br /&gt;
// #define V_SL 0.095 // 3 display cases - 3 compressors&lt;br /&gt;
#define ETA_VOL 0.81&lt;br /&gt;
&lt;br /&gt;
// disturbances - day scenario&lt;br /&gt;
#define Q_AIRLOAD 3000.0&lt;br /&gt;
#define M_REF_CONST 0.2&lt;br /&gt;
&lt;br /&gt;
// disturbances - night scenario&lt;br /&gt;
// #define Q_AIRLOAD 1800.0&lt;br /&gt;
// #define M_REF_CONST 0.0&lt;br /&gt;
&lt;br /&gt;
double delta_h = (0.0217*xd[0]*xd[0] - 0.1704*xd[0] + 2.2988)*1e5;&lt;br /&gt;
double T_e = -4.3544*xd[0]*xd[0] + 29.224*xd[0] - 51.2005;&lt;br /&gt;
double rho_suc = 4.6073*xd[0] + 0.3798;&lt;br /&gt;
double rho_suc__P_suc = -0.0329*xd[0]*xd[0]*xd[0] + 0.2161*xd[0]*xd[0] - 0.4742*xd[0] + 5.4817;&lt;br /&gt;
double f = (0.0265*xd[0]*xd[0]*xd[0] -0.4346*xd[0]*xd[0] + 2.4923*xd[0] + 1.2189)*1e5;&lt;br /&gt;
&lt;br /&gt;
double Q_goods_air[NVALVES];&lt;br /&gt;
double Q_air_wall[NVALVES];&lt;br /&gt;
double UA_wall_ref[NVALVES];&lt;br /&gt;
double Q_e[NVALVES];&lt;br /&gt;
double m[NVALVES];&lt;br /&gt;
&lt;br /&gt;
double m_in_suc = 0.0;&lt;br /&gt;
&lt;br /&gt;
int i;&lt;br /&gt;
&lt;br /&gt;
for (i=0; i&amp;lt;NVALVES; i++){&lt;br /&gt;
    Q_goods_air[i] = UA_GOODS_AIR*(xd[1 + i*4] - xd[3 + i*4]);&lt;br /&gt;
    Q_air_wall[i] = UA_AIR_WALL*(xd[3 + i*4] - xd[2 + i*4]);&lt;br /&gt;
    UA_wall_ref[i] = UA_WALL_REF_MAX * xd[4 + 4*i]/M_REF_MAX;&lt;br /&gt;
    Q_e[i] = UA_wall_ref[i]*(xd[2 + 4*i] - T_e);&lt;br /&gt;
&lt;br /&gt;
    m[i] = Q_e[i]/delta_h;&lt;br /&gt;
    m_in_suc += m[i];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
double V_comp = 0.0;&lt;br /&gt;
double comp_scale = (double) 1.0/NCOMPS;&lt;br /&gt;
V_comp = comp_scale*u[NVALVES]*ETA_VOL*V_SL;&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
// suction pressure&lt;br /&gt;
rhs[0] = (m_in_suc + M_REF_CONST - V_comp*rho_suc) / (V_SUC*rho_suc__P_suc);&lt;br /&gt;
&lt;br /&gt;
// for each display/valve&lt;br /&gt;
for (i=0; i&amp;lt;NVALVES; i++){&lt;br /&gt;
&lt;br /&gt;
    // temperatures:&lt;br /&gt;
&lt;br /&gt;
    // goods&lt;br /&gt;
    rhs[1 + i*4] = - Q_goods_air[i]/(M_GOODS*C_P_GOODS);&lt;br /&gt;
&lt;br /&gt;
    // wall&lt;br /&gt;
    rhs[2 + i*4] = (Q_air_wall[i] - Q_e[i])/(M_WALL*C_P_WALL);&lt;br /&gt;
&lt;br /&gt;
    // air&lt;br /&gt;
    rhs[3 + i*4] = ((Q_goods_air[i] + Q_AIRLOAD - Q_air_wall[i]) /(M_AIR*C_P_AIR));&lt;br /&gt;
&lt;br /&gt;
    // mass of liquefied refrigerant:&lt;br /&gt;
    rhs[4 + i*4] = ((M_REF_MAX - xd[4 + 4*i])/TAU_FILL * u[i] - m[i] * (1 - u[i]));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
&lt;br /&gt;
Since the compressors are parallel connected one can introduce a single control &amp;lt;math&amp;gt; u_2 \in \{0,1,2\}&amp;lt;/math&amp;gt; instead of two equivalent controls. The same holds for scenarions with &amp;lt;math&amp;gt; n &amp;lt;/math&amp;gt; parallel connected compressors.&lt;br /&gt;
&lt;br /&gt;
In the paper &amp;lt;bibref&amp;gt;Larsen2007&amp;lt;/bibref&amp;gt; mentioned above, the problem was stated slightly different:&lt;br /&gt;
&lt;br /&gt;
* The temperature constraints weren&#039;t hard bounds but there was a penalization term added to the objective function to minimize the violation of these constraints.&lt;br /&gt;
* The differential equation for the mass of the refrigerant had another switch, if the valve (e.g. &amp;lt;math&amp;gt;u_0&amp;lt;/math&amp;gt;) is closed. It was formulated this way:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\dot{x_4} =  \begin{cases}&lt;br /&gt;
&lt;br /&gt;
\dfrac{M_{ref,max} - x_4}{\tau_{fill}} &amp;amp; \qquad \text{if} \quad u_0 = 1 \\ \\&lt;br /&gt;
- \dfrac{UA_{wall-ref,max}}{M_{ref,max} \cdot \Delta h_{lg}(x_0)} x_4 \big( x_2 - T_e(x_0) \big) &amp;amp; \qquad \text{if} \quad u_0 = 0 \quad \text{and}\quad  x_4 &amp;gt; 0 \\ \\ &lt;br /&gt;
0 &amp;amp; \qquad \text{if} \quad u_0 = 0 \quad \text{and} \quad x_4 = 0&lt;br /&gt;
&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This additional switch is redundant because the mass itself is a factor on the right hand side and so the complete right hand side is 0 if &amp;lt;math&amp;gt;x_4 = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
* A night scenario with two different parameters was given. At night the following parameters change their value:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{lcrr}&lt;br /&gt;
\dot{Q}_{airload}   &amp;amp;=&amp;amp; 1800.00 &amp;amp; \frac{J}{s}, \\&lt;br /&gt;
\dot{m}_{ref,const} &amp;amp;=&amp;amp;    0.00 &amp;amp; \frac{kg}{s},  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally the constraint on the suction pressure &amp;lt;math&amp;gt;x_0(t)&amp;lt;/math&amp;gt; is softened to &amp;lt;math&amp;gt;x_0(t) \leq 1.9&amp;lt;/math&amp;gt;.&lt;br /&gt;
* No periodicity was required but the solution on a fixed time horizon 4 hours - 2 in day scenario and 2 in night scenario - with &amp;lt;math&amp;gt;t_f = 14400&amp;lt;/math&amp;gt; was asked.&lt;br /&gt;
* The number of compressors and display cases is not fixed. Larsen also proposed the problem with 3 compressors and 3 display cases. This leads to a change in the compressor rack&#039;s preformance to &amp;lt;math&amp;gt;V_{sl} = 0.095 \frac{m^3}{s}&amp;lt;/math&amp;gt;. Unfortunately this constant is only given for these two cases although Larsen proposed scenarios with more compressors and display cases.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Periodic]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Annihilation_of_calcium_oscillations&amp;diff=508</id>
		<title>Annihilation of calcium oscillations</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Annihilation_of_calcium_oscillations&amp;diff=508"/>
		<updated>2009-08-11T12:58:04Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 4&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The aim of the control problem is to identify strength and timing of inhibitor stimuli that lead to a phase singularity which annihilates intracellular calcium oscillations. This is formulated as an objective function that aims at minimizing the state deviation from a desired unstable steady state, integrated over time.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix the initial values of the differential states. The problem is, despite of its low dimension, very hard to solve, as the target state is [[:Category:Unstable | unstable]].&lt;br /&gt;
&lt;br /&gt;
== Biological motivation ==&lt;br /&gt;
&lt;br /&gt;
Biological rhythms as impressing manifestations of self-organized dynamics associated with the phenomenon life have been of particular interest since quite a long time. Even before the mechanistic basis of certain biochemical oscillators was elucidated by molecular biology techniques, their investigation and the issue of perturbation by external stimuli has attracted much attention.&lt;br /&gt;
&lt;br /&gt;
A calcium oscillator model describing intracellular calcium spiking in hepatocytes induced by an extracellular increase in adenosine triphosphate (ATP) concentration is described. The calcium signaling pathway is initiated via a receptor activated G-protein inducing the intracellular release of inositol triphoshate (IP3) by phospholipase C. The IP3 triggers the opening of endoplasmic reticulum and plasma membrane calcium channels and a subsequent inflow of calcium ions from intracellular and extracellular stores leading to transient calcium spikes.&lt;br /&gt;
&lt;br /&gt;
As a source of external control a temporally varying concentration of an uncompetitive inhibitor of the PMCA ion pump is considered.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w, w^{\mathrm{max}}} &amp;amp; &amp;amp; &amp;amp; {\int_{t_0}^{t_f} || x(\tau) - \tilde{x} ||_2^2 + p_1 w(\tau) \; \mathrm{d}\tau} \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0 &amp;amp; = &amp;amp; k_1 + k_2 x_0 - \frac{k_3 x_0 x_1}{x_0 + K_4} -  \frac{k_5 x_0 x_2}{x_0 + K_6} \\&lt;br /&gt;
&amp;amp; \dot{x}_1 &amp;amp; = &amp;amp; k_7 x_0 - \frac{k_8 x_1}{x_1 + K_9} \\&lt;br /&gt;
&amp;amp; \dot{x}_2 &amp;amp; = &amp;amp; \frac{k_{10} x_1 x_2 x_3}{x_3 + K_{11}} + k_{12} x_1 + k_{13} x_0 - \frac{k_{14} x_2}{w \cdot x_2 + K_{15}} - \frac{k_{16} x_2}{x_2 + K_{17}} + \frac{x_3}{10} \\&lt;br /&gt;
&amp;amp; \dot{x}_3 &amp;amp; = &amp;amp; - \frac{k_{10} x_1 x_2 x_3}{x_3 + K_{11}} + \frac{k_{16} x_2}{x_2 + K_{17}} - \frac{x_3}{10} \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; (0.03966, 1.09799, 0.00142, 1.65431)^T, \\&lt;br /&gt;
 &amp;amp; x(t) &amp;amp; \ge &amp;amp; 0.0, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{1, w^{\mathrm{max}}\}, \\&lt;br /&gt;
 &amp;amp; w^{\mathrm{max}} &amp;amp; \ge &amp;amp; 1.1, \\&lt;br /&gt;
 &amp;amp; w^{\mathrm{max}} &amp;amp; \le &amp;amp; 1.3.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the differential states &amp;lt;math&amp;gt;(x_0, x_1, x_2, x_3)&amp;lt;/math&amp;gt; describe concentrations of activated G-proteins, active phospholipase C, intracellular calcium, and intra-ER calcium, respectively. &lt;br /&gt;
&lt;br /&gt;
Modeling details including a comprehensive discussion of parameter values and the dynamical behavior observed in simulations with a comparison to experimental observations can be found in &amp;lt;bibref&amp;gt;Kummer2000&amp;lt;/bibref&amp;gt;. In the given equations that stem from &amp;lt;bibref&amp;gt;Lebiedz2005&amp;lt;/bibref&amp;gt;, the model is identical to the one derived there, except for an additional first-order leakage flow of calcium from the ER back to the cytoplasm, which is modeled by &amp;lt;math&amp;gt;\frac{x_3}{10}&amp;lt;/math&amp;gt; in equations 3 and 4. It reproduces well experimental observations of cytoplasmic calcium oscillations as well as bursting behavior and in particular the frequency encoding of the triggering stimulus strength, which is a well known mechanism for signal processing in cell biology.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
These fixed values are used within the model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rcl}&lt;br /&gt;
[t_0, t_f] &amp;amp;=&amp;amp; [0, 22],\\&lt;br /&gt;
k_1 &amp;amp;=&amp;amp; 0.09, \\&lt;br /&gt;
k_2 &amp;amp;=&amp;amp; 2.30066, \\&lt;br /&gt;
k_3 &amp;amp;=&amp;amp; 0.64, \\&lt;br /&gt;
K_4 &amp;amp;=&amp;amp; 0.19, \\&lt;br /&gt;
k_5 &amp;amp;=&amp;amp; 4.88, \\&lt;br /&gt;
K_6 &amp;amp;=&amp;amp; 1.18, \\&lt;br /&gt;
k_7 &amp;amp;=&amp;amp; 2.08, \\&lt;br /&gt;
k_8 &amp;amp;=&amp;amp; 32.24, \\&lt;br /&gt;
K_9 &amp;amp;=&amp;amp; 29.09, \\&lt;br /&gt;
k_{10} &amp;amp;=&amp;amp; 5.0, \\&lt;br /&gt;
K_{11} &amp;amp;=&amp;amp; 2.67, \\&lt;br /&gt;
k_{12} &amp;amp;=&amp;amp; 0.7, \\&lt;br /&gt;
k_{13} &amp;amp;=&amp;amp; 13.58, \\&lt;br /&gt;
k_{14} &amp;amp;=&amp;amp; 153.0, \\&lt;br /&gt;
K_{15} &amp;amp;=&amp;amp; 0.16, \\&lt;br /&gt;
k_{16} &amp;amp;=&amp;amp; 4.85, \\&lt;br /&gt;
K_{17} &amp;amp;=&amp;amp; 0.05, \\&lt;br /&gt;
p_1    &amp;amp;=&amp;amp; 100, \\&lt;br /&gt;
\tilde{x}_0 &amp;amp;=&amp;amp; 6.78677, \\&lt;br /&gt;
\tilde{x}_1 &amp;amp;=&amp;amp; 22.65836, \\&lt;br /&gt;
\tilde{x}_2 &amp;amp;=&amp;amp; 0.384306, \\&lt;br /&gt;
\tilde{x}_3 &amp;amp;=&amp;amp; 0.28977.&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:calciumControl.png| Optimal stimuli determined by mixed-integer optimal control.&lt;br /&gt;
 Image:calciumStates.png| Corresponding differential states.&lt;br /&gt;
 Image:calciumStatesPerturbed.png| Slightly perturbed control: stimulus 0.001 too early.&lt;br /&gt;
 Image:calciumStatesLongTime.png| Long time behavior of optimal solution: numerical rounding errors lead to transition back from unstable steady-state to stable limit-cycle.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The depicted optimal solution consists of a stimulus of &amp;lt;math&amp;gt;w^{\mathrm{max}}=1.3&amp;lt;/math&amp;gt; and a timing given by the stage lengths 4.6947115, 0.1491038, and 17.1561845. The optimal objective function value is 1610.654. As can be seen from the additional plots, this solution is extremely unstable. A small perturbation in the control, or simply rounding errors on a longer time horizon lead to a transition back to the stable limit-cycle oscillations.&lt;br /&gt;
&lt;br /&gt;
== Optimization ==&lt;br /&gt;
&lt;br /&gt;
The determination of the stimulus by means of optimization is quite hard for two reasons. First, the unstable target steady-state. Only a stable all-at-once algorithm such as multiple shooting or collocation can be applied successfully.&lt;br /&gt;
&lt;br /&gt;
Second, the objective landscape of the problem in switching time formulation (this is, for a fixed stimulus strength and modifying only beginning and length of the stimulus) is quite nasty, as the following visualizations obtained by simulation show.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Objective landscape simulation plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:calciumObjectiveSimulation1.png| Brute-force simulation of objective landscape for different values of stimulus beginning and length.&lt;br /&gt;
 Image:calciumObjectiveSimulation2.png| Zoom in.&lt;br /&gt;
 Image:calciumObjectiveSimulation3.png| Zoom in.&lt;br /&gt;
 Image:calciumObjectiveSimulation4.png| Note that the border line of the small channel is a local maximum, hence an initialization slightly away will not lead to the correct global minimum.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
rhs[0] = p[0]&lt;br /&gt;
         + p[1]*xd[0]&lt;br /&gt;
         - p[2]*xd[0]*xd[1]/(xd[0]+p[3])&lt;br /&gt;
         - p[4]*xd[0]*xd[2]/(xd[0]+p[5]);&lt;br /&gt;
&lt;br /&gt;
rhs[1] = p[6]*xd[0]&lt;br /&gt;
         - p[7]*xd[1]/(xd[1]+p[8]);&lt;br /&gt;
&lt;br /&gt;
rhs[2] = p[9]*xd[1]*xd[2]*xd[3]/(xd[3]+p[10])&lt;br /&gt;
         + p[18]*p[11]*xd[1]&lt;br /&gt;
         + p[12]*xd[0]&lt;br /&gt;
         - p[13]*xd[2]/(u[0]*xd[2]+p[14])&lt;br /&gt;
         - p[15]*xd[2]/(xd[2]+p[16])&lt;br /&gt;
         + 0.1*xd[3];&lt;br /&gt;
&lt;br /&gt;
rhs[3] = -p[9]*xd[1]*xd[2]*xd[3]/(xd[3]+p[10])&lt;br /&gt;
         + p[15]*xd[2]/(xd[2]+p[16])&lt;br /&gt;
         - 0.1*xd[3];&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Optimica ===&lt;br /&gt;
&lt;br /&gt;
The optimica code of the problem:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;optimica&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package Calcium_pack&lt;br /&gt;
&lt;br /&gt;
  optimization Calcium_Opt (objective = cost(finalTime),&lt;br /&gt;
                         startTime = 0,&lt;br /&gt;
                         finalTime = 22)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    // Parameters&lt;br /&gt;
    parameter Real k1 = 0.09;             // Parameter k1&lt;br /&gt;
    parameter Real k2 = 2.30066;          // Parameter k2&lt;br /&gt;
    parameter Real k3 = 0.64;             // Parameter k3&lt;br /&gt;
    parameter Real K4 = 0.19;             // Parameter K4&lt;br /&gt;
    parameter Real k5 = 4.88;             // Parameter k5&lt;br /&gt;
    parameter Real K6 = 1.18;             // Parameter K6&lt;br /&gt;
    parameter Real k7 = 2.08;             // Parameter k7&lt;br /&gt;
    parameter Real k8 = 32.24;            // Parameter k8&lt;br /&gt;
    parameter Real K9 = 29.09;            // Parameter K9&lt;br /&gt;
    parameter Real k10 = 5.0;             // Parameter k10&lt;br /&gt;
    parameter Real K11 = 2.67;            // Parameter K11&lt;br /&gt;
    parameter Real k12 = 0.7;             // Parameter k12&lt;br /&gt;
    parameter Real k13 = 13.58;           // Parameter k13&lt;br /&gt;
    parameter Real k14 = 153.0;           // Parameter k14&lt;br /&gt;
    parameter Real K15 = 0.16;            // Parameter K15&lt;br /&gt;
    parameter Real k16 = 4.85;            // Parameter k16&lt;br /&gt;
    parameter Real K17 = 0.05;            // Parameter K17&lt;br /&gt;
    parameter Real p1 = 100;              // Parameter p1&lt;br /&gt;
    parameter Real x0tilde = 6.78677;     // Parameter x0tilde &lt;br /&gt;
    parameter Real x1tilde = 22.65836;    // Parameter&lt;br /&gt;
    parameter Real x2tilde = 0.384306;    // Parameter x2tilde &lt;br /&gt;
    parameter Real x3tilde = 0.28977;     // Parameter x3tilde &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    // The states&lt;br /&gt;
    Real x0(start=0.03966);&lt;br /&gt;
    Real x1(start=1.09799);&lt;br /&gt;
    Real x2(start=0.00142);&lt;br /&gt;
    Real x3(start=1.65431);&lt;br /&gt;
&lt;br /&gt;
    // The control signal&lt;br /&gt;
    input Real u(free=true);&lt;br /&gt;
    //parameter Real umax(free=true,min=1.1,max=1.3);&lt;br /&gt;
    //parameter Real umax=1.3;&lt;br /&gt;
&lt;br /&gt;
    Real cost(start=0);&lt;br /&gt;
&lt;br /&gt;
  equation&lt;br /&gt;
    der(x0) = k1+k2*x0-((k3*x0*x1)/(8*x0+K4))-((k5*x0*x2)/(x0+K6));&lt;br /&gt;
    der(x1) = k7*x0 - ((k8*x1)/(x1+K9));&lt;br /&gt;
    der(x2)=(k10*x1*x2*x3)/(x3+K11)+k12*x1+k13*x0-(k14*x2)/(u*x2+K15)-(k16*x2)/(x2+K17)+x3/10;&lt;br /&gt;
    der(x3)=-(k10*x1*x2*x3)/(x3+K11)+(k16*x2)/(x2+K17)-x3/10;&lt;br /&gt;
    der(cost)=sqrt((x0-x0tilde)*(x0-x0tilde)+(x1-x1tilde)*(x1-x1tilde)+&lt;br /&gt;
              (x2-x2tilde)*(x2-x2tilde)+(x3-x3tilde)*(x3-x3tilde))+p1*u;&lt;br /&gt;
  constraint&lt;br /&gt;
     x0&amp;gt;=0;&lt;br /&gt;
     x1&amp;gt;=0;&lt;br /&gt;
     x2&amp;gt;=0;&lt;br /&gt;
     x3&amp;gt;=0;&lt;br /&gt;
    // u={0,1.1,1.3};&lt;br /&gt;
     u&amp;gt;=1;&lt;br /&gt;
     u&amp;lt;=1.3;&lt;br /&gt;
  end Calcium_Opt;&lt;br /&gt;
&lt;br /&gt;
end Calcium_pack;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt; [[Annihilation of calcium oscillations with PLC activation inhibition| Use of two control functions]].&lt;br /&gt;
 &amp;lt;li&amp;gt; Scaled deviation in objective function.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, or presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Unstable]]&lt;br /&gt;
[[Category:Bang bang]]&lt;br /&gt;
[[Category:Systems biology]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=507</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=507"/>
		<updated>2009-08-11T11:39:33Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
===Solutions obtained with optimica===&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
[[File:Fullerspng.png|left|200px|thumb|alt=a graph with the optimal solution of the Fuller&#039;s Problem with Optimica and Ipopt|Solution of the Fuller&#039;s Problem with Optimica and Ipopt]]&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=506</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=506"/>
		<updated>2009-08-11T11:39:06Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Reference Solutions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
===Solutions obtained with optimica===&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
[[File:Fullerspng.png|left|200px|thumb|alt=a graph with the optimal solution of the Fuller&#039;s Problem with Optimica and Ipopt|Solution of the Fuller&#039;s Problem with Optimica and Ipopt]]&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
[[File:Fullerspng.png|left|200px|thumb|alt=a graph with the optimal solution of the Fuller&#039;s Problem with Optimica and Ipopt|Solution of the Fuller&#039;s Problem with Optimica and Ipopt]]&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem&amp;diff=505</id>
		<title>Lotka Volterra fishing problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem&amp;diff=505"/>
		<updated>2009-08-11T09:57:02Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Mathematical formulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 3&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 3&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Lotka Volterra fishing problem&#039;&#039;&#039; looks for an optimal fishing strategy to be performed on a fixed time horizon to bring the biomasses of both predator as prey fish to a prescribed steady state. The problem was set up as a small-scale benchmark problem. &lt;br /&gt;
The well known [http://en.wikipedia.org/wiki/Lotka_volterra Lotka Volterra equations] for a predator-prey system have been augmented by an additional linear term, relating to fishing by man. The control can be regarded both in a relaxed, as in a discrete manner, corresponding to a part of the fleet, or the full fishing fleet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix the initial values of the differential states.&lt;br /&gt;
&lt;br /&gt;
The optimal integer control functions shows [[:Category:Chattering|chattering]] behavior, making the Lotka Volterra fishing problem an ideal candidate for benchmarking of algorithms.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp; x_2(t_f)   \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_0(t) - x_0(t) x_1(t) - \; c_0 x_0(t) \; w(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; - x_1(t) + x_0(t) x_1(t) - \; c_1 x_1(t) \; w(t),  \\&lt;br /&gt;
 &amp;amp; \dot{x}_2(t) &amp;amp; = &amp;amp; (x_0(t) - 1)^2 + (x_1(t) - 1)^2,  \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; (0.5, 0.7, 0)^T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the differential states &amp;lt;math&amp;gt;(x_0, x_1)&amp;lt;/math&amp;gt; describe the biomasses of prey and predator, respectively. The third differential state is used here to transform the objective, an integrated deviation, into the Mayer formulation &amp;lt;math&amp;gt;\min \; x_2(t_f)&amp;lt;/math&amp;gt;. The decision, whether the fishing fleet is actually fishing at time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; is denoted by &amp;lt;math&amp;gt;w(t)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
These fixed values are used within the model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rcl}&lt;br /&gt;
[t_0, t_f] &amp;amp;=&amp;amp; [0, 12],\\&lt;br /&gt;
(c_0, c_1) &amp;amp;=&amp;amp; (0.4, 0.2).&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
If the problem is relaxed, i.e., we demand that &amp;lt;math&amp;gt;w(t)&amp;lt;/math&amp;gt; be in the continuous interval &amp;lt;math&amp;gt;[0, 1]&amp;lt;/math&amp;gt; instead of the binary choice &amp;lt;math&amp;gt;\{0,1\}&amp;lt;/math&amp;gt;, the optimal solution can be determined by means of [http://en.wikipedia.org/wiki/Pontryagin%27s_minimum_principle Pontryagins maximum principle]. The optimal solution contains a singular arc, as can be seen in the plot of the optimal control. The two differential states and corresponding adjoint variables in the indirect approach are also displayed. A different approach to solving the relaxed problem is by using a direct method such as collocation or Bock&#039;s direct multiple shooting method. Optimal solutions for different control discretizations are also plotted in the leftmost figure.&lt;br /&gt;
&lt;br /&gt;
The optimal objective value of this relaxed problem is &amp;lt;math&amp;gt;x_2(t_f) = 1.34408&amp;lt;/math&amp;gt;. As follows from MIOC theory&amp;lt;bibref&amp;gt;Sager2008&amp;lt;/bibref&amp;gt; this is the best lower bound on the optimal value of the original problem with the integer restriction on the control function. In other words, this objective value can be approximated arbitrarily close, if the control only switches often enough between 0 and 1. As no optimal solution exists, two suboptimal ones are shown, one with only two switches and an objective function value of &amp;lt;math&amp;gt;x_2(t_f) = 1.38276&amp;lt;/math&amp;gt;, and one with 56 switches and &amp;lt;math&amp;gt;x_2(t_f) = 1.34416&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
 Image:lotkaindirektStates.png| Differential states and corresponding adjoint variables in the indirect approach.&lt;br /&gt;
 Image:lotka2Switches.png| Control and differential states with only two switches.&lt;br /&gt;
 Image:lotka56Switches.png| Control and differential states with 56 switches.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
Model descriptions are available in&lt;br /&gt;
&lt;br /&gt;
* [[:Category:C | C code]] at [[Lotka Volterra fishing problem (C)]]&lt;br /&gt;
* [[:Category:AMPL | AMPL]] at [[Lotka Volterra fishing problem (AMPL)]]&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Lotka Volterra fishing problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
&lt;br /&gt;
There are several alternative formulations and variants of the above problem, in particular&lt;br /&gt;
&lt;br /&gt;
* a prescribed time grid for the control function &amp;lt;bibref&amp;gt;Sager2006&amp;lt;/bibref&amp;gt;, see also [[Lotka Volterra fishing problem (AMPL)]],&lt;br /&gt;
* a time-optimal formulation to get into a steady-state &amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt;,&lt;br /&gt;
* the usage of a different target steady-state, as the one corresponding to &amp;lt;math&amp;gt; w(t) = 1&amp;lt;/math&amp;gt; which is &amp;lt;math&amp;gt;(1 + c_1, 1 - c_0)&amp;lt;/math&amp;gt;,&lt;br /&gt;
* different fishing control functions for the two species,&lt;br /&gt;
* different parameters and start values.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and Further Reading ==&lt;br /&gt;
The Lotka Volterra fishing problem was introduced by Sebastian Sager in a proceedings paper &amp;lt;bibref&amp;gt;Sager2006&amp;lt;/bibref&amp;gt; and revisited in his PhD thesis &amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt;. These are also the references to look for more details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Testing Graphviz&lt;br /&gt;
&amp;lt;graphviz border=&#039;frame&#039; format=&#039;svg&#039;&amp;gt;&lt;br /&gt;
digraph G {Hello-&amp;gt;World!}&lt;br /&gt;
&amp;lt;/graphviz&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Population dynamics]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=F-8_aircraft&amp;diff=501</id>
		<title>F-8 aircraft</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=F-8_aircraft&amp;diff=501"/>
		<updated>2009-08-10T08:44:16Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Optimica */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 3&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 6&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The F-8 aircraft control problem is based on a very simple aircraft model. The control problem was introduced by Kaya and Noakes and aims at controlling an aircraft in a time-optimal way from an initial state to a terminal state.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix both initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
The optimal, relaxed control function shows [[:Category:Bang bang|bang bang]] behavior. The problem is furthermore interesting as it should be reformulated equivalently.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [0, T]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w, T} &amp;amp; T \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0 &amp;amp;=&amp;amp; -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - 0.215 \; w + 0.28 \; x_0^2 \; w + 0.47 \; x_0 \; w^2 + 0.63 \; w^3 \\ &lt;br /&gt;
&amp;amp; \dot{x}_1 &amp;amp;=&amp;amp; x_2 \\&lt;br /&gt;
&amp;amp; \dot{x}_2 &amp;amp;=&amp;amp; -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;            - 20.967 \; w + 6.265 \; x_0^2 \; w + 46 \; x_0 \; w^2 + 61.4 \; w^3 \\ &lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; (0.4655,0,0)^T, \\&lt;br /&gt;
 &amp;amp; x(T) &amp;amp;=&amp;amp; (0,0,0)^T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp; \{-0.05236,0.05236\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x_0&amp;lt;/math&amp;gt; is the angle of attack in radians, &amp;lt;math&amp;gt;x_1&amp;lt;/math&amp;gt; is the pitch angle, &amp;lt;math&amp;gt;x_2&amp;lt;/math&amp;gt; is the pitch rate in rad/s, and the control function &amp;lt;math&amp;gt;w = w(t)&amp;lt;/math&amp;gt; is the tail deflection angle in radians. This model goes back to Garrard&amp;lt;bibref&amp;gt;Garrard1977&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In the control problem, both initial and terminal values of the differential states are fixed.&lt;br /&gt;
&lt;br /&gt;
== Reformulation ==&lt;br /&gt;
&lt;br /&gt;
The control w(t) is restricted to take values from a finite set only. Hence, the control problem can be reformulated equivalently to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w, T} &amp;amp; T \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0 &amp;amp;=&amp;amp; -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 0.215 \; \xi - 0.28 \; x_0^2 \; \xi - 0.47 \; x_0 \; \xi^2 - 0.63 \; \xi^3 \right) \; w \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( - 0.215 \; \xi + 0.28 \; x_0^2 \; \xi - 0.47 \; x_0 \; \xi^2 + 0.63 \; \xi^3 \right) \; (1 - w) \\ &lt;br /&gt;
&amp;amp;           &amp;amp;=&amp;amp; -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           + 0.215 \; \xi - 0.28 \; x_0^2 \; \xi + 0.47 \; x_0 \; \xi^2 - 0.63 \; \xi^3 \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 0.215 \; \xi - 0.28 \; x_0^2 \; \xi - 0.63 \; \xi^3 \right) \; 2 w \\ &lt;br /&gt;
&amp;amp; \dot{x}_1 &amp;amp;=&amp;amp; x_2 \\&lt;br /&gt;
&amp;amp; \dot{x}_2 &amp;amp;=&amp;amp; -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 20.967 \; \xi - 6.265 \; x_0^2 \; \xi -46 \; x_0 \; \xi^2 - 61.4 \; \xi^3 \right) \; w \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( - 20.967 \; \xi + 6.265 \; x_0^2 \; \xi -46 \; x_0 \; \xi^2 + 61.4 \; \xi^3 \right) \; (1 - w) \\ &lt;br /&gt;
&amp;amp;           &amp;amp;=&amp;amp; -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           + 20.967 \; \xi - 6.265 \; x_0^2 \; \xi + 46 \; x_0 \; \xi^2 - 61.4 \; \xi^3 \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 20.967 \; \xi - 6.265 \; x_0^2 \; \xi - 61.4 \; \xi^3 \right) \; 2 w \\ &lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; (0.4655,0,0)^T, \\&lt;br /&gt;
 &amp;amp; x(T) &amp;amp;=&amp;amp; (0,0,0)^T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp; \{0,1\},&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\xi = 0.05236&amp;lt;/math&amp;gt;. Note that there is a bijection between optimal solutions of the two problems.&lt;br /&gt;
&lt;br /&gt;
== Reference solutions ==&lt;br /&gt;
&lt;br /&gt;
We provide here a comparison of different solutions reported in the literature. The numbers show the respective lengths &amp;lt;math&amp;gt;t_i - t_{i-1}&amp;lt;/math&amp;gt; of the switching arcs with the value of &amp;lt;math&amp;gt;w(t)&amp;lt;/math&amp;gt; on the upper or lower bound (given in the second column). &#039;&#039;Claim&#039;&#039; denotes what is stated in the respective publication, &#039;&#039;Simulation&#039;&#039; shows values obtained by a simulation with a Runge-Kutta-Fehlberg method of 4th/5th order and an integration tolerance of &amp;lt;math&amp;gt;10^{-8}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|- bgcolor=#c7c7c7&lt;br /&gt;
! Arc !! w(t) !! Lee et al.&amp;lt;bibref&amp;gt;Lee1997a&amp;lt;/bibref&amp;gt; !! Kaya&amp;lt;bibref&amp;gt;Kaya2003&amp;lt;/bibref&amp;gt; !! Sager&amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt; !! [[User:MartinSchlueter | Schlueter]]/[[User:Matthias.gerdts | Gerdts]] !! Sager&lt;br /&gt;
|- &lt;br /&gt;
| align=center | 1 || align=center | 1 || 0.00000 || 0.10292 || 0.10235 || 0.0 || 1.13492&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || align=center | 0 || 2.18800 || 1.92793 || 1.92812 || 0.608750 || 0.34703&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || align=center | 1 || 0.16400 || 0.16687 || 0.16645 || 3.136514 || 1.60721&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 4 || align=center | 0 || 2.88100 || 2.74338 || 2.73071 || 0.654550 || 0.69169&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 || align=center | 1 || 0.33000 || 0.32992 || 0.32994 || 0.0 || 0.0&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 6 || align=center | 0 || 0.47200 || 0.47116 || 0.47107 || 0.0 || 0.0&lt;br /&gt;
|-&lt;br /&gt;
| Claim: Infeasibility || align=center | - || 1.00E-10 || 7.30E-06 || 5.90E-06 || 3.29169e-06 || 2.21723e-07&lt;br /&gt;
|-&lt;br /&gt;
| Claim: Objective     || align=center | - || 6.03500 || 5.74217 || 5.72864 || 4.39981 || 3.78086&lt;br /&gt;
|- style=&amp;quot;font-style:italic;background-color:#ffffcc;&amp;quot;&lt;br /&gt;
! Simulation: Infeasibility   || align=center | - || 1.75E-03 || 1.64E-03 || 5.90E-06 || 3.29169e-06 || 2.21723e-07&lt;br /&gt;
|- style=&amp;quot;font-style:italic;background-color:#ffffcc;&amp;quot;&lt;br /&gt;
! Simulation: Objective       || align=center | - || 6.03500 || 5.74218 || 5.72864 || 4.39981 || 3.78086&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The best known optimal objective value of this  problem given is given by &amp;lt;math&amp;gt;T = 3.78086&amp;lt;/math&amp;gt;. The corresponding solution is shown in the rightmost plot. The solution of bang-bang type switches three times, starting with &amp;lt;math&amp;gt;w(t) = 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;240px&amp;quot; heights=&amp;quot;167px&amp;quot; perrow=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
 Image:f8aircraftRelaxedCoarse.png| Locally optimal relaxed control on a coarse control discretization grid and corresponding differential states.&lt;br /&gt;
 Image:f8aircraftRelaxedFine.png| Locally optimal relaxed control on a fine, adaptively chosen control discretization grid and corresponding differential states.&lt;br /&gt;
 Image:f8aircraftInteger.png| Integer control and corresponding differential states from Sager&amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Image:f8aircraftSchlueter.png| Integer control and corresponding differential states from [[User:MartinSchlueter | Schlueter]]/[[User:Matthias.gerdts | Gerdts]] solution.&lt;br /&gt;
 Image:f8aircraftSager2009.png| Best known integer control and corresponding differential states from Sager solution.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
  double x1 = xd[0];&lt;br /&gt;
  double x2 = xd[1];&lt;br /&gt;
  double x3 = xd[2];&lt;br /&gt;
&lt;br /&gt;
#ifdef CONVEXIFIED&lt;br /&gt;
  double xi = 0.05236;&lt;br /&gt;
&lt;br /&gt;
  rhs[0] = -0.877*x1 + x3 - 0.088*x1*x3 + 0.47*x1*x1 - 0.019*x2*x2 -x1*x1*x3 + 3.846*x1*x1*x1&lt;br /&gt;
	         + 0.215*xi - 0.28*x1*x1*xi + 0.47*x1*xi*xi - 0.63*xi*xi*xi&lt;br /&gt;
	         - 2*u[0] * ( 0.215*xi - 0.28*x1*x1*xi - 0.63*xi*xi*xi );&lt;br /&gt;
  rhs[1] = x3;&lt;br /&gt;
  rhs[2] = - 4.208*x1 - 0.396*x3 - 0.47*x1*x1 - 3.564*x1*x1*x1&lt;br /&gt;
	         + 20.967*xi - 6.265*x1*x1*xi + 46*x1*xi*xi - 61.4*xi*xi*xi&lt;br /&gt;
	         - 2*u[0] * ( 20.967*xi - 6.265*x1*x1*xi - 61.4*xi*xi*xi );&lt;br /&gt;
#else&lt;br /&gt;
  double u_ = -0.05236 + u[0]*2.0*0.05236;&lt;br /&gt;
&lt;br /&gt;
  rhs[0] = -0.877*x1 + x3 - 0.088*x1*x3 + 0.47*x1*x1 - 0.019*x2*x2&lt;br /&gt;
           -x1*x1*x3 + 3.846*x1*x1*x1 - 0.215*u_ + 0.28*x1*x1*u_ + 0.47*x1*u_*u_ + 0.63*u_*u_*u_;&lt;br /&gt;
  rhs[1] = x3;&lt;br /&gt;
  rhs[2] = -4.208*x1 - 0.396*x3 - 0.47*x1*x1 - 3.564*x1*x1*x1&lt;br /&gt;
           - 20.967*u_ + 6.265*x1*x1*u_ + 46*x1*u_*u_ + 61.4*u_*u_*u_;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optimica ===&lt;br /&gt;
Model description in Optimica.Solver=Ipopt&lt;br /&gt;
Objective     : 5.12799232&lt;br /&gt;
infeasibility : 6.2235588037251599e-10&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;optimica&amp;quot;&amp;gt;&lt;br /&gt;
package F8_aircraft_pack&lt;br /&gt;
&lt;br /&gt;
  optimization F8_aircraft_Opt (objective = tf,&lt;br /&gt;
                         startTime = 0,&lt;br /&gt;
                         finalTime = 1)&lt;br /&gt;
&lt;br /&gt;
    // The time is scaled so that the new&lt;br /&gt;
    // time variable, call it \tau,&lt;br /&gt;
    // is related to the original time,&lt;br /&gt;
    // call it t as \tau=tf*t where tf&lt;br /&gt;
    // is a parameter to be minimized &lt;br /&gt;
    // subject to the dynamics&lt;br /&gt;
    // \dot x = tf*f(x,w)&lt;br /&gt;
&lt;br /&gt;
    // Parameters&lt;br /&gt;
    parameter Real tf(free=true,min=0.1);&lt;br /&gt;
    parameter Real ksi=0.05236;&lt;br /&gt;
&lt;br /&gt;
    // The states&lt;br /&gt;
    Real x0(start=0.4655); //angle of attack&lt;br /&gt;
    Real x1(start=0); //pitch angle&lt;br /&gt;
    Real x2(start=0); //pitch rate&lt;br /&gt;
&lt;br /&gt;
    // The control signal&lt;br /&gt;
    input Real  w(min=0,max=1);&lt;br /&gt;
&lt;br /&gt;
  equation&lt;br /&gt;
&lt;br /&gt;
    der(x0)= tf*(-0.877*x0 + x2 - 0.088*x0*x2 + 0.47*x0^2 - 0.019*x1^2 -x0^2*x2 + 3.846*x0^3&lt;br /&gt;
           -(0.215*ksi -0.28*x0^2*ksi -0.47*x0*ksi^2 - 0.63*ksi^3)*w&lt;br /&gt;
           -(-0.215*ksi + 0.28*x0^2 -0.47*x0*ksi^2 + 0.63*ksi^3)*(1-w));&lt;br /&gt;
    der(x1) = tf*x2;&lt;br /&gt;
    der(x2) = tf*(-4.208*x0 - 0.396*x2 - 0.47*x0^2 - 3.564*x0^3&lt;br /&gt;
              +20.967*ksi - 6.265*x0^2*ksi + 46*x0*ksi^2 - 61.4*ksi^3&lt;br /&gt;
              -(20.967*ksi - 6.265*x0^2*ksi - 61.4*ksi^3)*2*w);&lt;br /&gt;
  constraint&lt;br /&gt;
    x0(finalTime)=0;&lt;br /&gt;
    x1(finalTime)=0;&lt;br /&gt;
    x2(finalTime)=0;&lt;br /&gt;
&lt;br /&gt;
  end F8_aircraft_Opt;&lt;br /&gt;
&lt;br /&gt;
end F8_aircraft_pack;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Obtained solution plots&amp;quot; widths=&amp;quot;240px&amp;quot; heights=&amp;quot;167px&amp;quot; perrow=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
Image:f8aircraft1.png|.&lt;br /&gt;
Image:f8aircraft2.png|.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
&lt;br /&gt;
* a prescribed time grid for the control function, see [[F-8 aircraft (AMPL)]],&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and Further Reading ==&lt;br /&gt;
See &amp;lt;bibref&amp;gt;Kaya2003&amp;lt;/bibref&amp;gt; and &amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:Bang bang]]&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Aeronautics]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=F-8_aircraft&amp;diff=500</id>
		<title>F-8 aircraft</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=F-8_aircraft&amp;diff=500"/>
		<updated>2009-08-10T08:40:53Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 3&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 6&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The F-8 aircraft control problem is based on a very simple aircraft model. The control problem was introduced by Kaya and Noakes and aims at controlling an aircraft in a time-optimal way from an initial state to a terminal state.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix both initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
The optimal, relaxed control function shows [[:Category:Bang bang|bang bang]] behavior. The problem is furthermore interesting as it should be reformulated equivalently.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [0, T]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w, T} &amp;amp; T \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0 &amp;amp;=&amp;amp; -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - 0.215 \; w + 0.28 \; x_0^2 \; w + 0.47 \; x_0 \; w^2 + 0.63 \; w^3 \\ &lt;br /&gt;
&amp;amp; \dot{x}_1 &amp;amp;=&amp;amp; x_2 \\&lt;br /&gt;
&amp;amp; \dot{x}_2 &amp;amp;=&amp;amp; -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;            - 20.967 \; w + 6.265 \; x_0^2 \; w + 46 \; x_0 \; w^2 + 61.4 \; w^3 \\ &lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; (0.4655,0,0)^T, \\&lt;br /&gt;
 &amp;amp; x(T) &amp;amp;=&amp;amp; (0,0,0)^T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp; \{-0.05236,0.05236\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x_0&amp;lt;/math&amp;gt; is the angle of attack in radians, &amp;lt;math&amp;gt;x_1&amp;lt;/math&amp;gt; is the pitch angle, &amp;lt;math&amp;gt;x_2&amp;lt;/math&amp;gt; is the pitch rate in rad/s, and the control function &amp;lt;math&amp;gt;w = w(t)&amp;lt;/math&amp;gt; is the tail deflection angle in radians. This model goes back to Garrard&amp;lt;bibref&amp;gt;Garrard1977&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In the control problem, both initial and terminal values of the differential states are fixed.&lt;br /&gt;
&lt;br /&gt;
== Reformulation ==&lt;br /&gt;
&lt;br /&gt;
The control w(t) is restricted to take values from a finite set only. Hence, the control problem can be reformulated equivalently to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w, T} &amp;amp; T \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0 &amp;amp;=&amp;amp; -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 0.215 \; \xi - 0.28 \; x_0^2 \; \xi - 0.47 \; x_0 \; \xi^2 - 0.63 \; \xi^3 \right) \; w \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( - 0.215 \; \xi + 0.28 \; x_0^2 \; \xi - 0.47 \; x_0 \; \xi^2 + 0.63 \; \xi^3 \right) \; (1 - w) \\ &lt;br /&gt;
&amp;amp;           &amp;amp;=&amp;amp; -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           + 0.215 \; \xi - 0.28 \; x_0^2 \; \xi + 0.47 \; x_0 \; \xi^2 - 0.63 \; \xi^3 \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 0.215 \; \xi - 0.28 \; x_0^2 \; \xi - 0.63 \; \xi^3 \right) \; 2 w \\ &lt;br /&gt;
&amp;amp; \dot{x}_1 &amp;amp;=&amp;amp; x_2 \\&lt;br /&gt;
&amp;amp; \dot{x}_2 &amp;amp;=&amp;amp; -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 20.967 \; \xi - 6.265 \; x_0^2 \; \xi -46 \; x_0 \; \xi^2 - 61.4 \; \xi^3 \right) \; w \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( - 20.967 \; \xi + 6.265 \; x_0^2 \; \xi -46 \; x_0 \; \xi^2 + 61.4 \; \xi^3 \right) \; (1 - w) \\ &lt;br /&gt;
&amp;amp;           &amp;amp;=&amp;amp; -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           + 20.967 \; \xi - 6.265 \; x_0^2 \; \xi + 46 \; x_0 \; \xi^2 - 61.4 \; \xi^3 \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 20.967 \; \xi - 6.265 \; x_0^2 \; \xi - 61.4 \; \xi^3 \right) \; 2 w \\ &lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; (0.4655,0,0)^T, \\&lt;br /&gt;
 &amp;amp; x(T) &amp;amp;=&amp;amp; (0,0,0)^T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp; \{0,1\},&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\xi = 0.05236&amp;lt;/math&amp;gt;. Note that there is a bijection between optimal solutions of the two problems.&lt;br /&gt;
&lt;br /&gt;
== Reference solutions ==&lt;br /&gt;
&lt;br /&gt;
We provide here a comparison of different solutions reported in the literature. The numbers show the respective lengths &amp;lt;math&amp;gt;t_i - t_{i-1}&amp;lt;/math&amp;gt; of the switching arcs with the value of &amp;lt;math&amp;gt;w(t)&amp;lt;/math&amp;gt; on the upper or lower bound (given in the second column). &#039;&#039;Claim&#039;&#039; denotes what is stated in the respective publication, &#039;&#039;Simulation&#039;&#039; shows values obtained by a simulation with a Runge-Kutta-Fehlberg method of 4th/5th order and an integration tolerance of &amp;lt;math&amp;gt;10^{-8}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|- bgcolor=#c7c7c7&lt;br /&gt;
! Arc !! w(t) !! Lee et al.&amp;lt;bibref&amp;gt;Lee1997a&amp;lt;/bibref&amp;gt; !! Kaya&amp;lt;bibref&amp;gt;Kaya2003&amp;lt;/bibref&amp;gt; !! Sager&amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt; !! [[User:MartinSchlueter | Schlueter]]/[[User:Matthias.gerdts | Gerdts]] !! Sager&lt;br /&gt;
|- &lt;br /&gt;
| align=center | 1 || align=center | 1 || 0.00000 || 0.10292 || 0.10235 || 0.0 || 1.13492&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || align=center | 0 || 2.18800 || 1.92793 || 1.92812 || 0.608750 || 0.34703&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || align=center | 1 || 0.16400 || 0.16687 || 0.16645 || 3.136514 || 1.60721&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 4 || align=center | 0 || 2.88100 || 2.74338 || 2.73071 || 0.654550 || 0.69169&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 || align=center | 1 || 0.33000 || 0.32992 || 0.32994 || 0.0 || 0.0&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 6 || align=center | 0 || 0.47200 || 0.47116 || 0.47107 || 0.0 || 0.0&lt;br /&gt;
|-&lt;br /&gt;
| Claim: Infeasibility || align=center | - || 1.00E-10 || 7.30E-06 || 5.90E-06 || 3.29169e-06 || 2.21723e-07&lt;br /&gt;
|-&lt;br /&gt;
| Claim: Objective     || align=center | - || 6.03500 || 5.74217 || 5.72864 || 4.39981 || 3.78086&lt;br /&gt;
|- style=&amp;quot;font-style:italic;background-color:#ffffcc;&amp;quot;&lt;br /&gt;
! Simulation: Infeasibility   || align=center | - || 1.75E-03 || 1.64E-03 || 5.90E-06 || 3.29169e-06 || 2.21723e-07&lt;br /&gt;
|- style=&amp;quot;font-style:italic;background-color:#ffffcc;&amp;quot;&lt;br /&gt;
! Simulation: Objective       || align=center | - || 6.03500 || 5.74218 || 5.72864 || 4.39981 || 3.78086&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The best known optimal objective value of this  problem given is given by &amp;lt;math&amp;gt;T = 3.78086&amp;lt;/math&amp;gt;. The corresponding solution is shown in the rightmost plot. The solution of bang-bang type switches three times, starting with &amp;lt;math&amp;gt;w(t) = 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;240px&amp;quot; heights=&amp;quot;167px&amp;quot; perrow=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
 Image:f8aircraftRelaxedCoarse.png| Locally optimal relaxed control on a coarse control discretization grid and corresponding differential states.&lt;br /&gt;
 Image:f8aircraftRelaxedFine.png| Locally optimal relaxed control on a fine, adaptively chosen control discretization grid and corresponding differential states.&lt;br /&gt;
 Image:f8aircraftInteger.png| Integer control and corresponding differential states from Sager&amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Image:f8aircraftSchlueter.png| Integer control and corresponding differential states from [[User:MartinSchlueter | Schlueter]]/[[User:Matthias.gerdts | Gerdts]] solution.&lt;br /&gt;
 Image:f8aircraftSager2009.png| Best known integer control and corresponding differential states from Sager solution.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
  double x1 = xd[0];&lt;br /&gt;
  double x2 = xd[1];&lt;br /&gt;
  double x3 = xd[2];&lt;br /&gt;
&lt;br /&gt;
#ifdef CONVEXIFIED&lt;br /&gt;
  double xi = 0.05236;&lt;br /&gt;
&lt;br /&gt;
  rhs[0] = -0.877*x1 + x3 - 0.088*x1*x3 + 0.47*x1*x1 - 0.019*x2*x2 -x1*x1*x3 + 3.846*x1*x1*x1&lt;br /&gt;
	         + 0.215*xi - 0.28*x1*x1*xi + 0.47*x1*xi*xi - 0.63*xi*xi*xi&lt;br /&gt;
	         - 2*u[0] * ( 0.215*xi - 0.28*x1*x1*xi - 0.63*xi*xi*xi );&lt;br /&gt;
  rhs[1] = x3;&lt;br /&gt;
  rhs[2] = - 4.208*x1 - 0.396*x3 - 0.47*x1*x1 - 3.564*x1*x1*x1&lt;br /&gt;
	         + 20.967*xi - 6.265*x1*x1*xi + 46*x1*xi*xi - 61.4*xi*xi*xi&lt;br /&gt;
	         - 2*u[0] * ( 20.967*xi - 6.265*x1*x1*xi - 61.4*xi*xi*xi );&lt;br /&gt;
#else&lt;br /&gt;
  double u_ = -0.05236 + u[0]*2.0*0.05236;&lt;br /&gt;
&lt;br /&gt;
  rhs[0] = -0.877*x1 + x3 - 0.088*x1*x3 + 0.47*x1*x1 - 0.019*x2*x2&lt;br /&gt;
           -x1*x1*x3 + 3.846*x1*x1*x1 - 0.215*u_ + 0.28*x1*x1*u_ + 0.47*x1*u_*u_ + 0.63*u_*u_*u_;&lt;br /&gt;
  rhs[1] = x3;&lt;br /&gt;
  rhs[2] = -4.208*x1 - 0.396*x3 - 0.47*x1*x1 - 3.564*x1*x1*x1&lt;br /&gt;
           - 20.967*u_ + 6.265*x1*x1*u_ + 46*x1*u_*u_ + 61.4*u_*u_*u_;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optimica ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;optimica&amp;quot;&amp;gt;&lt;br /&gt;
package F8_aircraft_pack&lt;br /&gt;
&lt;br /&gt;
  optimization F8_aircraft_Opt (objective = tf,&lt;br /&gt;
                         startTime = 0,&lt;br /&gt;
                         finalTime = 1)&lt;br /&gt;
&lt;br /&gt;
    // The time is scaled so that the new&lt;br /&gt;
    // time variable, call it \tau,&lt;br /&gt;
    // is related to the original time,&lt;br /&gt;
    // call it t as \tau=tf*t where tf&lt;br /&gt;
    // is a parameter to be minimized &lt;br /&gt;
    // subject to the dynamics&lt;br /&gt;
    // \dot x = tf*f(x,w)&lt;br /&gt;
&lt;br /&gt;
    // Parameters&lt;br /&gt;
    parameter Real tf(free=true,min=0.1);&lt;br /&gt;
    parameter Real ksi=0.05236;&lt;br /&gt;
&lt;br /&gt;
    // The states&lt;br /&gt;
    Real x0(start=0.4655); //angle of attack&lt;br /&gt;
    Real x1(start=0); //pitch angle&lt;br /&gt;
    Real x2(start=0); //pitch rate&lt;br /&gt;
&lt;br /&gt;
    // The control signal&lt;br /&gt;
    input Real  w(min=0,max=1);&lt;br /&gt;
&lt;br /&gt;
  equation&lt;br /&gt;
&lt;br /&gt;
    der(x0)= tf*(-0.877*x0 + x2 - 0.088*x0*x2 + 0.47*x0^2 - 0.019*x1^2 -x0^2*x2 + 3.846*x0^3&lt;br /&gt;
           -(0.215*ksi -0.28*x0^2*ksi -0.47*x0*ksi^2 - 0.63*ksi^3)*w&lt;br /&gt;
           -(-0.215*ksi + 0.28*x0^2 -0.47*x0*ksi^2 + 0.63*ksi^3)*(1-w));&lt;br /&gt;
    der(x1) = tf*x2;&lt;br /&gt;
    der(x2) = tf*(-4.208*x0 - 0.396*x2 - 0.47*x0^2 - 3.564*x0^3&lt;br /&gt;
              +20.967*ksi - 6.265*x0^2*ksi + 46*x0*ksi^2 - 61.4*ksi^3&lt;br /&gt;
              -(20.967*ksi - 6.265*x0^2*ksi - 61.4*ksi^3)*2*w);&lt;br /&gt;
  constraint&lt;br /&gt;
    x0(finalTime)=0;&lt;br /&gt;
    x1(finalTime)=0;&lt;br /&gt;
    x2(finalTime)=0;&lt;br /&gt;
&lt;br /&gt;
  end F8_aircraft_Opt;&lt;br /&gt;
&lt;br /&gt;
end F8_aircraft_pack;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Obtained solution plots&amp;quot; widths=&amp;quot;240px&amp;quot; heights=&amp;quot;167px&amp;quot; perrow=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
Image:f8aircraft1.png|.&lt;br /&gt;
Image:f8aircraft2.png|.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
&lt;br /&gt;
* a prescribed time grid for the control function, see [[F-8 aircraft (AMPL)]],&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and Further Reading ==&lt;br /&gt;
See &amp;lt;bibref&amp;gt;Kaya2003&amp;lt;/bibref&amp;gt; and &amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:Bang bang]]&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Aeronautics]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=F-8_aircraft&amp;diff=499</id>
		<title>F-8 aircraft</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=F-8_aircraft&amp;diff=499"/>
		<updated>2009-08-10T08:39:40Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Optimica */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 3&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 6&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The F-8 aircraft control problem is based on a very simple aircraft model. The control problem was introduced by Kaya and Noakes and aims at controlling an aircraft in a time-optimal way from an initial state to a terminal state.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix both initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
The optimal, relaxed control function shows [[:Category:Bang bang|bang bang]] behavior. The problem is furthermore interesting as it should be reformulated equivalently.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [0, T]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w, T} &amp;amp; T \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0 &amp;amp;=&amp;amp; -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - 0.215 \; w + 0.28 \; x_0^2 \; w + 0.47 \; x_0 \; w^2 + 0.63 \; w^3 \\ &lt;br /&gt;
&amp;amp; \dot{x}_1 &amp;amp;=&amp;amp; x_2 \\&lt;br /&gt;
&amp;amp; \dot{x}_2 &amp;amp;=&amp;amp; -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;            - 20.967 \; w + 6.265 \; x_0^2 \; w + 46 \; x_0 \; w^2 + 61.4 \; w^3 \\ &lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; (0.4655,0,0)^T, \\&lt;br /&gt;
 &amp;amp; x(T) &amp;amp;=&amp;amp; (0,0,0)^T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp; \{-0.05236,0.05236\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x_0&amp;lt;/math&amp;gt; is the angle of attack in radians, &amp;lt;math&amp;gt;x_1&amp;lt;/math&amp;gt; is the pitch angle, &amp;lt;math&amp;gt;x_2&amp;lt;/math&amp;gt; is the pitch rate in rad/s, and the control function &amp;lt;math&amp;gt;w = w(t)&amp;lt;/math&amp;gt; is the tail deflection angle in radians. This model goes back to Garrard&amp;lt;bibref&amp;gt;Garrard1977&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In the control problem, both initial and terminal values of the differential states are fixed.&lt;br /&gt;
&lt;br /&gt;
== Reformulation ==&lt;br /&gt;
&lt;br /&gt;
The control w(t) is restricted to take values from a finite set only. Hence, the control problem can be reformulated equivalently to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w, T} &amp;amp; T \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0 &amp;amp;=&amp;amp; -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 0.215 \; \xi - 0.28 \; x_0^2 \; \xi - 0.47 \; x_0 \; \xi^2 - 0.63 \; \xi^3 \right) \; w \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( - 0.215 \; \xi + 0.28 \; x_0^2 \; \xi - 0.47 \; x_0 \; \xi^2 + 0.63 \; \xi^3 \right) \; (1 - w) \\ &lt;br /&gt;
&amp;amp;           &amp;amp;=&amp;amp; -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           + 0.215 \; \xi - 0.28 \; x_0^2 \; \xi + 0.47 \; x_0 \; \xi^2 - 0.63 \; \xi^3 \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 0.215 \; \xi - 0.28 \; x_0^2 \; \xi - 0.63 \; \xi^3 \right) \; 2 w \\ &lt;br /&gt;
&amp;amp; \dot{x}_1 &amp;amp;=&amp;amp; x_2 \\&lt;br /&gt;
&amp;amp; \dot{x}_2 &amp;amp;=&amp;amp; -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 20.967 \; \xi - 6.265 \; x_0^2 \; \xi -46 \; x_0 \; \xi^2 - 61.4 \; \xi^3 \right) \; w \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( - 20.967 \; \xi + 6.265 \; x_0^2 \; \xi -46 \; x_0 \; \xi^2 + 61.4 \; \xi^3 \right) \; (1 - w) \\ &lt;br /&gt;
&amp;amp;           &amp;amp;=&amp;amp; -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           + 20.967 \; \xi - 6.265 \; x_0^2 \; \xi + 46 \; x_0 \; \xi^2 - 61.4 \; \xi^3 \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 20.967 \; \xi - 6.265 \; x_0^2 \; \xi - 61.4 \; \xi^3 \right) \; 2 w \\ &lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; (0.4655,0,0)^T, \\&lt;br /&gt;
 &amp;amp; x(T) &amp;amp;=&amp;amp; (0,0,0)^T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp; \{0,1\},&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\xi = 0.05236&amp;lt;/math&amp;gt;. Note that there is a bijection between optimal solutions of the two problems.&lt;br /&gt;
&lt;br /&gt;
== Reference solutions ==&lt;br /&gt;
&lt;br /&gt;
We provide here a comparison of different solutions reported in the literature. The numbers show the respective lengths &amp;lt;math&amp;gt;t_i - t_{i-1}&amp;lt;/math&amp;gt; of the switching arcs with the value of &amp;lt;math&amp;gt;w(t)&amp;lt;/math&amp;gt; on the upper or lower bound (given in the second column). &#039;&#039;Claim&#039;&#039; denotes what is stated in the respective publication, &#039;&#039;Simulation&#039;&#039; shows values obtained by a simulation with a Runge-Kutta-Fehlberg method of 4th/5th order and an integration tolerance of &amp;lt;math&amp;gt;10^{-8}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|- bgcolor=#c7c7c7&lt;br /&gt;
! Arc !! w(t) !! Lee et al.&amp;lt;bibref&amp;gt;Lee1997a&amp;lt;/bibref&amp;gt; !! Kaya&amp;lt;bibref&amp;gt;Kaya2003&amp;lt;/bibref&amp;gt; !! Sager&amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt; !! [[User:MartinSchlueter | Schlueter]]/[[User:Matthias.gerdts | Gerdts]] !! Sager&lt;br /&gt;
|- &lt;br /&gt;
| align=center | 1 || align=center | 1 || 0.00000 || 0.10292 || 0.10235 || 0.0 || 1.13492&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || align=center | 0 || 2.18800 || 1.92793 || 1.92812 || 0.608750 || 0.34703&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || align=center | 1 || 0.16400 || 0.16687 || 0.16645 || 3.136514 || 1.60721&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 4 || align=center | 0 || 2.88100 || 2.74338 || 2.73071 || 0.654550 || 0.69169&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 || align=center | 1 || 0.33000 || 0.32992 || 0.32994 || 0.0 || 0.0&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 6 || align=center | 0 || 0.47200 || 0.47116 || 0.47107 || 0.0 || 0.0&lt;br /&gt;
|-&lt;br /&gt;
| Claim: Infeasibility || align=center | - || 1.00E-10 || 7.30E-06 || 5.90E-06 || 3.29169e-06 || 2.21723e-07&lt;br /&gt;
|-&lt;br /&gt;
| Claim: Objective     || align=center | - || 6.03500 || 5.74217 || 5.72864 || 4.39981 || 3.78086&lt;br /&gt;
|- style=&amp;quot;font-style:italic;background-color:#ffffcc;&amp;quot;&lt;br /&gt;
! Simulation: Infeasibility   || align=center | - || 1.75E-03 || 1.64E-03 || 5.90E-06 || 3.29169e-06 || 2.21723e-07&lt;br /&gt;
|- style=&amp;quot;font-style:italic;background-color:#ffffcc;&amp;quot;&lt;br /&gt;
! Simulation: Objective       || align=center | - || 6.03500 || 5.74218 || 5.72864 || 4.39981 || 3.78086&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The best known optimal objective value of this  problem given is given by &amp;lt;math&amp;gt;T = 3.78086&amp;lt;/math&amp;gt;. The corresponding solution is shown in the rightmost plot. The solution of bang-bang type switches three times, starting with &amp;lt;math&amp;gt;w(t) = 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;240px&amp;quot; heights=&amp;quot;167px&amp;quot; perrow=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
 Image:f8aircraftRelaxedCoarse.png| Locally optimal relaxed control on a coarse control discretization grid and corresponding differential states.&lt;br /&gt;
 Image:f8aircraftRelaxedFine.png| Locally optimal relaxed control on a fine, adaptively chosen control discretization grid and corresponding differential states.&lt;br /&gt;
 Image:f8aircraftInteger.png| Integer control and corresponding differential states from Sager&amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Image:f8aircraftSchlueter.png| Integer control and corresponding differential states from [[User:MartinSchlueter | Schlueter]]/[[User:Matthias.gerdts | Gerdts]] solution.&lt;br /&gt;
 Image:f8aircraftSager2009.png| Best known integer control and corresponding differential states from Sager solution.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
  double x1 = xd[0];&lt;br /&gt;
  double x2 = xd[1];&lt;br /&gt;
  double x3 = xd[2];&lt;br /&gt;
&lt;br /&gt;
#ifdef CONVEXIFIED&lt;br /&gt;
  double xi = 0.05236;&lt;br /&gt;
&lt;br /&gt;
  rhs[0] = -0.877*x1 + x3 - 0.088*x1*x3 + 0.47*x1*x1 - 0.019*x2*x2 -x1*x1*x3 + 3.846*x1*x1*x1&lt;br /&gt;
	         + 0.215*xi - 0.28*x1*x1*xi + 0.47*x1*xi*xi - 0.63*xi*xi*xi&lt;br /&gt;
	         - 2*u[0] * ( 0.215*xi - 0.28*x1*x1*xi - 0.63*xi*xi*xi );&lt;br /&gt;
  rhs[1] = x3;&lt;br /&gt;
  rhs[2] = - 4.208*x1 - 0.396*x3 - 0.47*x1*x1 - 3.564*x1*x1*x1&lt;br /&gt;
	         + 20.967*xi - 6.265*x1*x1*xi + 46*x1*xi*xi - 61.4*xi*xi*xi&lt;br /&gt;
	         - 2*u[0] * ( 20.967*xi - 6.265*x1*x1*xi - 61.4*xi*xi*xi );&lt;br /&gt;
#else&lt;br /&gt;
  double u_ = -0.05236 + u[0]*2.0*0.05236;&lt;br /&gt;
&lt;br /&gt;
  rhs[0] = -0.877*x1 + x3 - 0.088*x1*x3 + 0.47*x1*x1 - 0.019*x2*x2&lt;br /&gt;
           -x1*x1*x3 + 3.846*x1*x1*x1 - 0.215*u_ + 0.28*x1*x1*u_ + 0.47*x1*u_*u_ + 0.63*u_*u_*u_;&lt;br /&gt;
  rhs[1] = x3;&lt;br /&gt;
  rhs[2] = -4.208*x1 - 0.396*x3 - 0.47*x1*x1 - 3.564*x1*x1*x1&lt;br /&gt;
           - 20.967*u_ + 6.265*x1*x1*u_ + 46*x1*u_*u_ + 61.4*u_*u_*u_;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optimica ===&lt;br /&gt;
package F8_aircraft_pack&lt;br /&gt;
&lt;br /&gt;
  optimization F8_aircraft_Opt (objective = tf,&lt;br /&gt;
                         startTime = 0,&lt;br /&gt;
                         finalTime = 1)&lt;br /&gt;
&lt;br /&gt;
    // The time is scaled so that the new&lt;br /&gt;
    // time variable, call it \tau,&lt;br /&gt;
    // is related to the original time,&lt;br /&gt;
    // call it t as \tau=tf*t where tf&lt;br /&gt;
    // is a parameter to be minimized &lt;br /&gt;
    // subject to the dynamics&lt;br /&gt;
    // \dot x = tf*f(x,w)&lt;br /&gt;
&lt;br /&gt;
    // Parameters&lt;br /&gt;
    parameter Real tf(free=true,min=0.1);&lt;br /&gt;
    parameter Real ksi=0.05236;&lt;br /&gt;
&lt;br /&gt;
    // The states&lt;br /&gt;
    Real x0(start=0.4655); //angle of attack&lt;br /&gt;
    Real x1(start=0); //pitch angle&lt;br /&gt;
    Real x2(start=0); //pitch rate&lt;br /&gt;
&lt;br /&gt;
    // The control signal&lt;br /&gt;
    input Real  w(min=0,max=1);&lt;br /&gt;
&lt;br /&gt;
  equation&lt;br /&gt;
&lt;br /&gt;
    der(x0)= tf*(-0.877*x0 + x2 - 0.088*x0*x2 + 0.47*x0^2 - 0.019*x1^2 -x0^2*x2 + 3.846*x0^3&lt;br /&gt;
           -(0.215*ksi -0.28*x0^2*ksi -0.47*x0*ksi^2 - 0.63*ksi^3)*w&lt;br /&gt;
           -(-0.215*ksi + 0.28*x0^2 -0.47*x0*ksi^2 + 0.63*ksi^3)*(1-w));&lt;br /&gt;
    der(x1) = tf*x2;&lt;br /&gt;
    der(x2) = tf*(-4.208*x0 - 0.396*x2 - 0.47*x0^2 - 3.564*x0^3&lt;br /&gt;
              +20.967*ksi - 6.265*x0^2*ksi + 46*x0*ksi^2 - 61.4*ksi^3&lt;br /&gt;
              -(20.967*ksi - 6.265*x0^2*ksi - 61.4*ksi^3)*2*w);&lt;br /&gt;
  constraint&lt;br /&gt;
    x0(finalTime)=0;&lt;br /&gt;
    x1(finalTime)=0;&lt;br /&gt;
    x2(finalTime)=0;&lt;br /&gt;
&lt;br /&gt;
  end F8_aircraft_Opt;&lt;br /&gt;
&lt;br /&gt;
end F8_aircraft_pack;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Obtained solution plots&amp;quot; widths=&amp;quot;240px&amp;quot; heights=&amp;quot;167px&amp;quot; perrow=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
Image:f8aircraft1.png|.&lt;br /&gt;
Image:f8aircraft2.png|.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
&lt;br /&gt;
* a prescribed time grid for the control function, see [[F-8 aircraft (AMPL)]],&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and Further Reading ==&lt;br /&gt;
See &amp;lt;bibref&amp;gt;Kaya2003&amp;lt;/bibref&amp;gt; and &amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:Bang bang]]&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Aeronautics]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=F-8_aircraft&amp;diff=498</id>
		<title>F-8 aircraft</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=F-8_aircraft&amp;diff=498"/>
		<updated>2009-08-10T08:38:44Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* C */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 3&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 6&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The F-8 aircraft control problem is based on a very simple aircraft model. The control problem was introduced by Kaya and Noakes and aims at controlling an aircraft in a time-optimal way from an initial state to a terminal state.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix both initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
The optimal, relaxed control function shows [[:Category:Bang bang|bang bang]] behavior. The problem is furthermore interesting as it should be reformulated equivalently.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [0, T]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w, T} &amp;amp; T \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0 &amp;amp;=&amp;amp; -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - 0.215 \; w + 0.28 \; x_0^2 \; w + 0.47 \; x_0 \; w^2 + 0.63 \; w^3 \\ &lt;br /&gt;
&amp;amp; \dot{x}_1 &amp;amp;=&amp;amp; x_2 \\&lt;br /&gt;
&amp;amp; \dot{x}_2 &amp;amp;=&amp;amp; -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;            - 20.967 \; w + 6.265 \; x_0^2 \; w + 46 \; x_0 \; w^2 + 61.4 \; w^3 \\ &lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; (0.4655,0,0)^T, \\&lt;br /&gt;
 &amp;amp; x(T) &amp;amp;=&amp;amp; (0,0,0)^T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp; \{-0.05236,0.05236\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x_0&amp;lt;/math&amp;gt; is the angle of attack in radians, &amp;lt;math&amp;gt;x_1&amp;lt;/math&amp;gt; is the pitch angle, &amp;lt;math&amp;gt;x_2&amp;lt;/math&amp;gt; is the pitch rate in rad/s, and the control function &amp;lt;math&amp;gt;w = w(t)&amp;lt;/math&amp;gt; is the tail deflection angle in radians. This model goes back to Garrard&amp;lt;bibref&amp;gt;Garrard1977&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In the control problem, both initial and terminal values of the differential states are fixed.&lt;br /&gt;
&lt;br /&gt;
== Reformulation ==&lt;br /&gt;
&lt;br /&gt;
The control w(t) is restricted to take values from a finite set only. Hence, the control problem can be reformulated equivalently to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w, T} &amp;amp; T \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0 &amp;amp;=&amp;amp; -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 0.215 \; \xi - 0.28 \; x_0^2 \; \xi - 0.47 \; x_0 \; \xi^2 - 0.63 \; \xi^3 \right) \; w \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( - 0.215 \; \xi + 0.28 \; x_0^2 \; \xi - 0.47 \; x_0 \; \xi^2 + 0.63 \; \xi^3 \right) \; (1 - w) \\ &lt;br /&gt;
&amp;amp;           &amp;amp;=&amp;amp; -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           + 0.215 \; \xi - 0.28 \; x_0^2 \; \xi + 0.47 \; x_0 \; \xi^2 - 0.63 \; \xi^3 \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 0.215 \; \xi - 0.28 \; x_0^2 \; \xi - 0.63 \; \xi^3 \right) \; 2 w \\ &lt;br /&gt;
&amp;amp; \dot{x}_1 &amp;amp;=&amp;amp; x_2 \\&lt;br /&gt;
&amp;amp; \dot{x}_2 &amp;amp;=&amp;amp; -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 20.967 \; \xi - 6.265 \; x_0^2 \; \xi -46 \; x_0 \; \xi^2 - 61.4 \; \xi^3 \right) \; w \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( - 20.967 \; \xi + 6.265 \; x_0^2 \; \xi -46 \; x_0 \; \xi^2 + 61.4 \; \xi^3 \right) \; (1 - w) \\ &lt;br /&gt;
&amp;amp;           &amp;amp;=&amp;amp; -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\&lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           + 20.967 \; \xi - 6.265 \; x_0^2 \; \xi + 46 \; x_0 \; \xi^2 - 61.4 \; \xi^3 \\ &lt;br /&gt;
&amp;amp;&amp;amp;&amp;amp;           - \left( 20.967 \; \xi - 6.265 \; x_0^2 \; \xi - 61.4 \; \xi^3 \right) \; 2 w \\ &lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; (0.4655,0,0)^T, \\&lt;br /&gt;
 &amp;amp; x(T) &amp;amp;=&amp;amp; (0,0,0)^T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp; \{0,1\},&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;math&amp;gt;\xi = 0.05236&amp;lt;/math&amp;gt;. Note that there is a bijection between optimal solutions of the two problems.&lt;br /&gt;
&lt;br /&gt;
== Reference solutions ==&lt;br /&gt;
&lt;br /&gt;
We provide here a comparison of different solutions reported in the literature. The numbers show the respective lengths &amp;lt;math&amp;gt;t_i - t_{i-1}&amp;lt;/math&amp;gt; of the switching arcs with the value of &amp;lt;math&amp;gt;w(t)&amp;lt;/math&amp;gt; on the upper or lower bound (given in the second column). &#039;&#039;Claim&#039;&#039; denotes what is stated in the respective publication, &#039;&#039;Simulation&#039;&#039; shows values obtained by a simulation with a Runge-Kutta-Fehlberg method of 4th/5th order and an integration tolerance of &amp;lt;math&amp;gt;10^{-8}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|- bgcolor=#c7c7c7&lt;br /&gt;
! Arc !! w(t) !! Lee et al.&amp;lt;bibref&amp;gt;Lee1997a&amp;lt;/bibref&amp;gt; !! Kaya&amp;lt;bibref&amp;gt;Kaya2003&amp;lt;/bibref&amp;gt; !! Sager&amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt; !! [[User:MartinSchlueter | Schlueter]]/[[User:Matthias.gerdts | Gerdts]] !! Sager&lt;br /&gt;
|- &lt;br /&gt;
| align=center | 1 || align=center | 1 || 0.00000 || 0.10292 || 0.10235 || 0.0 || 1.13492&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 2 || align=center | 0 || 2.18800 || 1.92793 || 1.92812 || 0.608750 || 0.34703&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 3 || align=center | 1 || 0.16400 || 0.16687 || 0.16645 || 3.136514 || 1.60721&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 4 || align=center | 0 || 2.88100 || 2.74338 || 2.73071 || 0.654550 || 0.69169&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 5 || align=center | 1 || 0.33000 || 0.32992 || 0.32994 || 0.0 || 0.0&lt;br /&gt;
|-&lt;br /&gt;
| align=center | 6 || align=center | 0 || 0.47200 || 0.47116 || 0.47107 || 0.0 || 0.0&lt;br /&gt;
|-&lt;br /&gt;
| Claim: Infeasibility || align=center | - || 1.00E-10 || 7.30E-06 || 5.90E-06 || 3.29169e-06 || 2.21723e-07&lt;br /&gt;
|-&lt;br /&gt;
| Claim: Objective     || align=center | - || 6.03500 || 5.74217 || 5.72864 || 4.39981 || 3.78086&lt;br /&gt;
|- style=&amp;quot;font-style:italic;background-color:#ffffcc;&amp;quot;&lt;br /&gt;
! Simulation: Infeasibility   || align=center | - || 1.75E-03 || 1.64E-03 || 5.90E-06 || 3.29169e-06 || 2.21723e-07&lt;br /&gt;
|- style=&amp;quot;font-style:italic;background-color:#ffffcc;&amp;quot;&lt;br /&gt;
! Simulation: Objective       || align=center | - || 6.03500 || 5.74218 || 5.72864 || 4.39981 || 3.78086&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The best known optimal objective value of this  problem given is given by &amp;lt;math&amp;gt;T = 3.78086&amp;lt;/math&amp;gt;. The corresponding solution is shown in the rightmost plot. The solution of bang-bang type switches three times, starting with &amp;lt;math&amp;gt;w(t) = 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;240px&amp;quot; heights=&amp;quot;167px&amp;quot; perrow=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
 Image:f8aircraftRelaxedCoarse.png| Locally optimal relaxed control on a coarse control discretization grid and corresponding differential states.&lt;br /&gt;
 Image:f8aircraftRelaxedFine.png| Locally optimal relaxed control on a fine, adaptively chosen control discretization grid and corresponding differential states.&lt;br /&gt;
 Image:f8aircraftInteger.png| Integer control and corresponding differential states from Sager&amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Image:f8aircraftSchlueter.png| Integer control and corresponding differential states from [[User:MartinSchlueter | Schlueter]]/[[User:Matthias.gerdts | Gerdts]] solution.&lt;br /&gt;
 Image:f8aircraftSager2009.png| Best known integer control and corresponding differential states from Sager solution.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
  double x1 = xd[0];&lt;br /&gt;
  double x2 = xd[1];&lt;br /&gt;
  double x3 = xd[2];&lt;br /&gt;
&lt;br /&gt;
#ifdef CONVEXIFIED&lt;br /&gt;
  double xi = 0.05236;&lt;br /&gt;
&lt;br /&gt;
  rhs[0] = -0.877*x1 + x3 - 0.088*x1*x3 + 0.47*x1*x1 - 0.019*x2*x2 -x1*x1*x3 + 3.846*x1*x1*x1&lt;br /&gt;
	         + 0.215*xi - 0.28*x1*x1*xi + 0.47*x1*xi*xi - 0.63*xi*xi*xi&lt;br /&gt;
	         - 2*u[0] * ( 0.215*xi - 0.28*x1*x1*xi - 0.63*xi*xi*xi );&lt;br /&gt;
  rhs[1] = x3;&lt;br /&gt;
  rhs[2] = - 4.208*x1 - 0.396*x3 - 0.47*x1*x1 - 3.564*x1*x1*x1&lt;br /&gt;
	         + 20.967*xi - 6.265*x1*x1*xi + 46*x1*xi*xi - 61.4*xi*xi*xi&lt;br /&gt;
	         - 2*u[0] * ( 20.967*xi - 6.265*x1*x1*xi - 61.4*xi*xi*xi );&lt;br /&gt;
#else&lt;br /&gt;
  double u_ = -0.05236 + u[0]*2.0*0.05236;&lt;br /&gt;
&lt;br /&gt;
  rhs[0] = -0.877*x1 + x3 - 0.088*x1*x3 + 0.47*x1*x1 - 0.019*x2*x2&lt;br /&gt;
           -x1*x1*x3 + 3.846*x1*x1*x1 - 0.215*u_ + 0.28*x1*x1*u_ + 0.47*x1*u_*u_ + 0.63*u_*u_*u_;&lt;br /&gt;
  rhs[1] = x3;&lt;br /&gt;
  rhs[2] = -4.208*x1 - 0.396*x3 - 0.47*x1*x1 - 3.564*x1*x1*x1&lt;br /&gt;
           - 20.967*u_ + 6.265*x1*x1*u_ + 46*x1*u_*u_ + 61.4*u_*u_*u_;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Optimica ===&lt;br /&gt;
ackage F8_aircraft_pack&lt;br /&gt;
&lt;br /&gt;
  optimization F8_aircraft_Opt (objective = tf,&lt;br /&gt;
                         startTime = 0,&lt;br /&gt;
                         finalTime = 1)&lt;br /&gt;
&lt;br /&gt;
    // The time is scaled so that the new&lt;br /&gt;
    // time variable, call it \tau,&lt;br /&gt;
    // is related to the original time,&lt;br /&gt;
    // call it t as \tau=tf*t where tf&lt;br /&gt;
    // is a parameter to be minimized &lt;br /&gt;
    // subject to the dynamics&lt;br /&gt;
    // \dot x = tf*f(x,w)&lt;br /&gt;
&lt;br /&gt;
    // Parameters&lt;br /&gt;
    parameter Real tf(free=true,min=0.1);&lt;br /&gt;
    parameter Real ksi=0.05236;&lt;br /&gt;
&lt;br /&gt;
    // The states&lt;br /&gt;
    Real x0(start=0.4655); //angle of attack&lt;br /&gt;
    Real x1(start=0); //pitch angle&lt;br /&gt;
    Real x2(start=0); //pitch rate&lt;br /&gt;
&lt;br /&gt;
    // The control signal&lt;br /&gt;
    input Real  w(min=0,max=1);&lt;br /&gt;
&lt;br /&gt;
  equation&lt;br /&gt;
&lt;br /&gt;
    der(x0)= tf*(-0.877*x0 + x2 - 0.088*x0*x2 + 0.47*x0^2 - 0.019*x1^2 -x0^2*x2 + 3.846*x0^3&lt;br /&gt;
           -(0.215*ksi -0.28*x0^2*ksi -0.47*x0*ksi^2 - 0.63*ksi^3)*w&lt;br /&gt;
           -(-0.215*ksi + 0.28*x0^2 -0.47*x0*ksi^2 + 0.63*ksi^3)*(1-w));&lt;br /&gt;
    der(x1) = tf*x2;&lt;br /&gt;
    der(x2) = tf*(-4.208*x0 - 0.396*x2 - 0.47*x0^2 - 3.564*x0^3&lt;br /&gt;
              +20.967*ksi - 6.265*x0^2*ksi + 46*x0*ksi^2 - 61.4*ksi^3&lt;br /&gt;
              -(20.967*ksi - 6.265*x0^2*ksi - 61.4*ksi^3)*2*w);&lt;br /&gt;
  constraint&lt;br /&gt;
    x0(finalTime)=0;&lt;br /&gt;
    x1(finalTime)=0;&lt;br /&gt;
    x2(finalTime)=0;&lt;br /&gt;
&lt;br /&gt;
  end F8_aircraft_Opt;&lt;br /&gt;
&lt;br /&gt;
end F8_aircraft_pack;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Obtained solution plots&amp;quot; widths=&amp;quot;240px&amp;quot; heights=&amp;quot;167px&amp;quot; perrow=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
Image:f8aircraft1.png|.&lt;br /&gt;
Image:f8aircraft2.png|.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
&lt;br /&gt;
* a prescribed time grid for the control function, see [[F-8 aircraft (AMPL)]],&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and Further Reading ==&lt;br /&gt;
See &amp;lt;bibref&amp;gt;Kaya2003&amp;lt;/bibref&amp;gt; and &amp;lt;bibref&amp;gt;Sager2005&amp;lt;/bibref&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:Bang bang]]&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Aeronautics]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=File:F8aircraft2.png&amp;diff=497</id>
		<title>File:F8aircraft2.png</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=File:F8aircraft2.png&amp;diff=497"/>
		<updated>2009-08-10T08:38:08Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=File:F8aircraft1.png&amp;diff=496</id>
		<title>File:F8aircraft1.png</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=File:F8aircraft1.png&amp;diff=496"/>
		<updated>2009-08-10T08:35:34Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=495</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=495"/>
		<updated>2009-08-07T10:13:34Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
[[File:Fullerspng.png|left|200px|thumb|alt=a graph with the optimal solution of the Fuller&#039;s Problem with Optimica and Ipopt|Solution of the Fuller&#039;s Problem with Optimica and Ipopt]]&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=494</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=494"/>
		<updated>2009-08-07T10:12:56Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
[[File:Fullerspng.png|left|500px|thumb|alt=a graph with the optimal solution of the Fuller&#039;s Problem with Optimica and Ipopt|Solution of the Fuller&#039;s Problem with Optimica and Ipopt]]&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=493</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=493"/>
		<updated>2009-08-07T10:11:53Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
[[File:Fullerspng.png|left|1500px|thumb|alt=a graph with the optimal solution of the Fuller&#039;s Problem with Optimica and Ipopt|Solution of the Fuller&#039;s Problem with Optimica and Ipopt]]&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both;&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=492</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=492"/>
		<updated>2009-08-07T10:08:01Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
[[File:Fullerspng.png|left|1500px|thumb|alt=a graph with the optimal solution of the Fuller&#039;s Problem with Optimica and Ipopt|Solution of the Fuller&#039;s Problem with Optimica and Ipopt]]&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=491</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=491"/>
		<updated>2009-08-07T10:06:56Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
[[File:Fullerspng.png|left|500px|thumb|alt=a graph with the optimal solution of the Fuller&#039;s Problem with Optimica and Ipopt|Solution of the Fuller&#039;s Problem with Optimica and Ipopt]]&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=490</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=490"/>
		<updated>2009-08-07T10:06:34Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
[[File:Fullerspng.png|left|270px|thumb|alt=a graph with the optimal solution of the Fuller&#039;s Problem with Optimica and Ipopt|Solution of the Fuller&#039;s Problem with Optimica and Ipopt]]&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=489</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=489"/>
		<updated>2009-08-07T10:04:57Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
[[File:Fullerspng.png|270px|thumb|alt=a graph with the optimal solution of the Fuller&#039;s Problem with Optimica and Ipopt|Solution of the Fuller&#039;s Problem with Optimica and Ipopt]]&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=488</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=488"/>
		<updated>2009-08-07T10:04:06Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
[[File:Fullerspng.png|thumb|alt=a graph with the optimal solution of the Fuller&#039;s Problem with Optimica and Ipopt|Solution of the Fuller&#039;s Problem with Optimica and Ipopt]]&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=487</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=487"/>
		<updated>2009-08-07T09:46:04Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
[[Fichier:Fullerspng.png|thumb|alt=a graph with the optimal solution of the Fuller&#039;s Problem with Optimica and Ipopt|Solution of the Fuller&#039;s Problem with Optimica and Ipopt]]&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=486</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=486"/>
		<updated>2009-08-07T09:45:23Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
[[Fichier:Fullerspng|thumb|alt=a graph with the optimal solution of the Fuller&#039;s Problem with Optimica and Ipopt|Solution of the Fuller&#039;s Problem with Optimica and Ipopt]]&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=File:Fullerspng.png&amp;diff=485</id>
		<title>File:Fullerspng.png</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=File:Fullerspng.png&amp;diff=485"/>
		<updated>2009-08-07T09:38:21Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: Solution of Fuller&amp;#039;s Problem with Optimica and Ipopt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Solution of Fuller&#039;s Problem with Optimica and Ipopt&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=484</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=484"/>
		<updated>2009-08-07T09:32:34Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=483</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=483"/>
		<updated>2009-08-07T09:30:34Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=482</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=482"/>
		<updated>2009-08-07T09:29:58Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The solution found for the relaxed Fuller&#039;s problem with optimica using the solver Ipopt (with the linear solver MA27) is obtained with 12 iterations and the objective is 1.5296058259296967e-05.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=481</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=481"/>
		<updated>2009-08-07T09:20:34Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* C Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=479</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=479"/>
		<updated>2009-08-07T09:03:38Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:optimica | optimica]] at [[Fuller&#039;s Problem (optimica)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== C Code ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=478</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=478"/>
		<updated>2009-08-07T08:58:32Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Optimica Code&#039;&#039;&#039; ===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== C Code ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=477</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=477"/>
		<updated>2009-08-07T08:56:58Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Optimica Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
=== Optimica Code ===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== C Code ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=476</id>
		<title>Fuller&#039;s problem</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Fuller%27s_problem&amp;diff=476"/>
		<updated>2009-08-07T08:55:51Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Dimensions&lt;br /&gt;
|nd        = 1&lt;br /&gt;
|nx        = 2&lt;br /&gt;
|nw        = 1&lt;br /&gt;
|nre       = 4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first control problem with an optimal [[:Category:Chattering|chattering]] solution was given by &amp;lt;bibref&amp;gt;Fuller1963&amp;lt;/bibref&amp;gt;. An optimal trajectory does exist for all initial and terminal values in a vicinity of the origin. As Fuller showed, this optimal trajectory contains a bang-bang control function that switches infinitely often.&lt;br /&gt;
&lt;br /&gt;
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix initial and terminal values of the differential states.&lt;br /&gt;
&lt;br /&gt;
== Mathematical formulation ==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;t \in [t_0, t_f]&amp;lt;/math&amp;gt; almost everywhere the mixed-integer optimal control problem is given by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{llcl}&lt;br /&gt;
 \displaystyle \min_{x, w} &amp;amp;  \int_{0}^{1} x_0^2 \; \mathrm{d} t \\[1.5ex]&lt;br /&gt;
 \mbox{s.t.} &amp;amp; \dot{x}_0(t) &amp;amp; = &amp;amp; x_1(t), \\&lt;br /&gt;
 &amp;amp; \dot{x}_1(t) &amp;amp; = &amp;amp; 1 - 2 \; w(t), \\[1.5ex]&lt;br /&gt;
 &amp;amp; x(0) &amp;amp;=&amp;amp; x_S, \\&lt;br /&gt;
 &amp;amp; x(t_f) &amp;amp;=&amp;amp; x_T, \\&lt;br /&gt;
 &amp;amp; w(t) &amp;amp;\in&amp;amp;  \{0, 1\}.&lt;br /&gt;
\end{array} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
We use &amp;lt;math&amp;gt;x_S = x_T = (0.01, 0)^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Reference Solutions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The optimal trajectory for the relaxed control problem on an equidistant grid $\mathcal{G}^0$ with $n_\mathrm{ms} = 19$ is shown in the top row of figure \ref{GCSEX3}. Note that this solution is not bang--bang due to the discretization of the control space. Even if this discretization is made very fine, a trajectory with $w(t) = 0.5$ on an interval in the middle of $[0,1]$ will be found as a minimum. &lt;br /&gt;
&lt;br /&gt;
The switching time optimization method yields an objective value of $1.89 \; 10^{-4}$. As the objective function value of the relaxed problem is smaller, $\Phi^{\mathrm{RL}} = 1.53 \; 10^{-5}$, one might want to reduce the function value further, e.g. closer than $\varepsilon = 10^{-6}$ to $\Phi^{\mathrm{RL}}$. If we apply algorithm \ref{AlgMIOC}, we obtain the trajectory shown in the bottommost row of figure \ref{GCSEX3} that yields an objective function value of $1.52 \; 10^{-5}$ and switches $35$ times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Reference solution plots&amp;quot; widths=&amp;quot;180px&amp;quot; heights=&amp;quot;140px&amp;quot; perrow=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
 Image:lotkaRelaxedControls.png| Optimal relaxed control determined by an indirect approach and by a direct approach on different control discretization grids.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
=== Optimica Code ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== C Code ===&lt;br /&gt;
&lt;br /&gt;
The differential equations in C code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous and further reading ==&lt;br /&gt;
&lt;br /&gt;
An extensive analytical investigation of this problem and a discussion of the ubiquity of Fuller&#039;s problem can be found in &amp;lt;bibref&amp;gt;Zelikin1994&amp;lt;/bibref&amp;gt;, a recent investigation of chattering controls in relay feedback systems in &amp;lt;bibref&amp;gt;Johansson2002&amp;lt;/bibref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;bibreferences/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here --&amp;gt;&lt;br /&gt;
[[Category:MIOCP]]&lt;br /&gt;
[[Category:ODE model]]&lt;br /&gt;
[[Category:Tracking objective]]&lt;br /&gt;
[[Category:Chattering]]&lt;br /&gt;
[[Category:Bang bang]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Template:Current_News&amp;diff=475</id>
		<title>Template:Current News</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Template:Current_News&amp;diff=475"/>
		<updated>2009-07-31T11:55:35Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| style=&amp;quot;background:#EEEEFF;&amp;quot;&lt;br /&gt;
&amp;lt;!-- Add news below this comment --&amp;gt;&lt;br /&gt;
{{News|2009/07/31|New category [[:Category:Optimica | optimica]] introduced}}&lt;br /&gt;
{{News|2009/07/17|New results for [[Lotka Volterra fishing problem (AMPL)]] with Knitro}}&lt;br /&gt;
{{News|2009/07/09|[[F-8 aircraft (AMPL)]] page}}&lt;br /&gt;
{{News|2009/07/07|[[:Category:AMPL]] revised page with discretized MINLPs in AMPL format}}&lt;br /&gt;
{{News|2009/04/08|[[F-8 aircraft]] new solutions found}}&lt;br /&gt;
&amp;lt;!-- Add news above this comment --&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;!-- Text within the following tag is not shown when this page is included in a different page (e.g. the main page, &amp;quot;News&amp;quot; section --&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt; &lt;br /&gt;
== Adding items ==&lt;br /&gt;
If you want to add events you have to edit this page. At the top of the page you will see something like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
{| style=&amp;quot;background:#EEEEFF;&amp;quot;&lt;br /&gt;
&amp;lt;!-- Add items below this comment --&amp;gt;&lt;br /&gt;
{{News|2008/08/14, 15:15|Presentation of the restructured group wiki in the group meeting, room 432.}}&lt;br /&gt;
&amp;lt;!-- Add items above this comment --&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a new item you have to enter a line of the form:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
{{News|date|content}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt; is the date and &amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt; is the subject and further information. The field &amp;lt;code&amp;gt;News&amp;lt;/code&amp;gt; is mandatory. Please write the &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt; in the format &#039;&#039;&#039;YYYY/MM/DD, HH:MM&#039;&#039;&#039; to keep it nice and clean. The field &amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt; can contain any information you like (but please keep it short) and even wiki syntax is possible.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Please keep the items in a chronological order and remove older ones to keep the list short.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:News]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Main_Page&amp;diff=474</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Main_Page&amp;diff=474"/>
		<updated>2009-07-31T11:40:21Z</updated>

		<summary type="html">&lt;p&gt;PaulineBoizet: Added optimica and C code characterization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
This wiki contains a &#039;&#039;&#039;benchmark library&#039;&#039;&#039; of &#039;&#039;&#039;mixed-integer optimal control problems&#039;&#039;&#039;. The main intention is to provide algorithm developers with a set of challenging problems to evaluate their numerical optimization methods. An important focus is given on &#039;&#039;&#039;reproducibility&#039;&#039;&#039; of optimal solutions.&lt;br /&gt;
As, in contrast to say linear programming, there are no standard formats for the formulation of such problems, and they often show completely different characteristics, these pages dedicate some space for a thorough description of problem and solutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- TOP TABLE WITH NEWS  --&amp;gt;&lt;br /&gt;
&amp;lt;table bgcolor=&amp;quot;#EEEEFF&amp;quot; width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;80%&amp;quot; bgcolor=&amp;quot;#EEEEFF&amp;quot;&amp;gt;&lt;br /&gt;
==[[:Category:News|News]] &amp;lt;span style=&amp;quot;font-variant:small-caps&amp;quot; style=&amp;quot;font-size:10px&amp;quot;&amp;gt;[[Current News|(add)]]&amp;lt;/span&amp;gt;==&lt;br /&gt;
&amp;lt;!-- The actual news are being included from the page Current News with the following line. --&amp;gt;&lt;br /&gt;
{{:Current News}}&lt;br /&gt;
&amp;lt;!-- Do not edit between this comment and the next &#039;&amp;lt;td&amp;gt;&#039; tag! --&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=&amp;quot;100%&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- CATEGORY FIELD--&amp;gt;&lt;br /&gt;
&amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;50%&amp;quot;&amp;gt;&lt;br /&gt;
==[[:Category:Problem characterization|Problem characterization]] &amp;lt;span style=&amp;quot;font-variant:small-caps&amp;quot; style=&amp;quot;font-size:10px&amp;quot;&amp;gt;[[Help:Adding a problem characterization|(add)]]&amp;lt;/span&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
via &#039;&#039;[[:Category:Model characterization|mathematical model]]&#039;&#039; - via &#039;&#039;[[:Category:Solution characterization|optimal solution]]&#039;&#039; - via &#039;&#039;[[:Category:Application|application area]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[[:Category:ODE model|ODE model]]&#039;&#039; - &#039;&#039;[[:Category:Bang bang|Bang bang]]&#039;&#039; - &#039;&#039;[[:Category:Chattering|Chattering]]&#039;&#039; - &#039;&#039;[[:Category:AMPL|AMPL]]&#039;&#039; - &#039;&#039;[[:Category:C|C code]]&#039;&#039; - &#039;&#039;[[:Category:Optimica|optimica]]&#039;&#039; - &#039;&#039;[[:Category:Periodic|Periodicity]]&#039;&#039;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- PROBLEM FIELD--&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;50%&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[:Category:MIOCP|Problems]] &amp;lt;span style=&amp;quot;font-variant:small-caps&amp;quot; style=&amp;quot;font-size:10px&amp;quot;&amp;gt;[[Help:Adding a Problem|(add)]]&amp;lt;/span&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[[Lotka Volterra fishing problem]]&#039;&#039; - [[F-8 aircraft]] - [[Annihilation of calcium oscillations | Calcium]] - [[Annihilation of calcium oscillations with PLC activation inhibition| Calcium 2]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[[Supermarket refrigeration system]] - &#039;&#039;[[Car testdrive]]&#039;&#039; - &#039;&#039;[[Fuller&#039;s problem]]&#039;&#039;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- HELP FIELD--&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;50%&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[:Category:Help|Help]] &amp;lt;span style=&amp;quot;font-variant:small-caps&amp;quot; style=&amp;quot;font-size:10px&amp;quot;&amp;gt;[[User:SebastianSager|(contact)]]&amp;lt;/span&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[[Help:How to contribute|How to contribute]]&#039;&#039; - &#039;&#039;[[Help:How to cite|How to cite]]&#039;&#039; - &#039;&#039;[[Help:Using LaTeX|LaTeX]]&#039;&#039; - &#039;&#039;[[Help:Description guidelines | Guidelines]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- COMMUNITY FIELD--&amp;gt;&lt;br /&gt;
&amp;lt;td width=&amp;quot;50%&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[:Category:Community|Community]] &amp;lt;span style=&amp;quot;font-variant:small-caps&amp;quot; style=&amp;quot;font-size:10px&amp;quot;&amp;gt;[[Help:Adding a User|(add)]]&amp;lt;/span&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Have a look at the contributors to this benchmark library. Feel encouraged to participate!&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Main]]&lt;/div&gt;</summary>
		<author><name>PaulineBoizet</name></author>
	</entry>
</feed>