Difference between revisions of "Three Tank multimode problem"

From mintOC
Jump to: navigation, search
(Reference Solutions)
 
(One intermediate revision by the same user not shown)
Line 38: Line 38:
  
 
<gallery caption="Reference solution plots" widths="180px" heights="140px" perrow="2">
 
<gallery caption="Reference solution plots" widths="180px" heights="140px" perrow="2">
  Image:three_tank_relaxed_solution.png| Optimal relaxed controls and states determined by an direct approach with python 3.6 and CasADi, applied Multiple Shooting, 4th order Runge Kutta scheme and <math>n_u=100</math>.
+
  Image:three_tank_relaxed_solution.png| Optimal relaxed controls and states determined by an direct approach with python 3.6 and CasADi, applied Multiple Shooting, 4th order Runge Kutta scheme and 100 discretization intervals.
 
  Image:three_tank_binary_solution.png| According optimal binary controls and states determined by the direct approach. The relaxed controls were approximated by Combinatorial Integral Approximation.
 
  Image:three_tank_binary_solution.png| According optimal binary controls and states determined by the direct approach. The relaxed controls were approximated by Combinatorial Integral Approximation.
 
  Image:three_tank_rounding_solution.png| Binary and relaxed control values as part of the Combinatorial Integral Approximation problem
 
  Image:three_tank_rounding_solution.png| Binary and relaxed control values as part of the Combinatorial Integral Approximation problem
 
</gallery>
 
</gallery>
  
 +
== Source Code ==
 +
 +
Model description is available in (using pycombina for solving the (CIA) rounding problem step):
 +
* [[:Category:Casadi | Casadi code]] at [[Three Tank multimode problem (python/casadi)]]
  
  

Latest revision as of 11:18, 14 March 2020

Three Tank multimode problem
State dimension: 1
Differential states: 3
Discrete control functions: 3
Interior point equalities: 2

This site describes a Double tank problem variant with three binary controls instead of only one control and three tanks, i.e., three differential states representing different compartments.

Mathematical formulation

The mixed-integer optimal control problem is given by


\begin{array}{llll}
 \displaystyle \min_{x,w} &  \displaystyle \int_{0}^{T} & k_1(x_2-k_2)^2 + k_3(x_3-k_4)^2  \; \text{d}t\\[1.5ex]
 \mbox{s.t.} &  \dot{x}_1 & = -\sqrt{x_1}+c_1 w_1 + c_2 w_2 - w_3 \sqrt{c_3 x_3}, \\[1.5ex]
 &  \dot{x}_2 & = \sqrt{x_1}-\sqrt{x_2}, \\[1.5ex]
 &  \dot{x}_3 & = \sqrt{x_2}-\sqrt{x_3}+w_3 \sqrt{c_3 x_3}, \\[1.5ex]
 &  x(0) & = (2,2,2)^T, \\[1.5ex]
& 1 & = \sum\limits_{i=1}^{3}w_i(t), \\
 & w_i(t) &\in  \{0, 1\}, \quad i=1\ldots 3.
\end{array}


Parameters

These fixed values are used within the model.

 T=12, c_1=1, c_2=2, c_3=0.8, k_1=2, k_2=3, k_3 = 1, k_4 = 3.

Reference Solutions

If the problem is relaxed, i.e., we demand that w(t) be in the continuous interval [0, 1] instead of the binary choice \{0,1\}, the optimal solution can be determined by means of direct optimal control and the CIA decomposition. We denote the relaxed control values with a(t)\in[0, 1].

The optimal objective value of the relaxed problem with  n_t=100, \, n_u=100  is 8.775979. The objective value of the binary controls obtained by Combinatorial Integral Approimation (CIA) is 8.789487.

Source Code

Model description is available in (using pycombina for solving the (CIA) rounding problem step):