## 4 Formulation of the Optimization Problem  
The solution to the problem of optimizing medical rescue operations after the MCI consists in assigning each injured person:  
* The MRTB from which the MRT should be allocated.
* the HED to which the injured person should be taken.
* the mode of MRT which should be chosen.  
To achieve minimization of the MCI consequences, i.e., the minimum expected value of the death, the minimum expected value of the disability, the minimum expected value of the cost of the rescue operation and the minimum expected value of the cost of long-term treatment and rehabilitation of the injured person.  
In the formulated optimization problem, a binary decision variable is introduced using the following function:  
\[x=x(l,b,s,r)=\left\{\begin{array}{ll}1,&\text{if the $l$-th injured person is taken}\\ &\text{from the $b$-th MRTB}\\ &\text{to the $s$-th HED}\\ &\text{by the $r$-th mode of MRT},\\ 0,&\text{otherwise}.\end{array}\right., \tag{38}\]The vector of decision variables, is denoted as:  
\[\overset{\rightarrow}{x}=(x_{i})=(l_{i},b_{i},s_{i},r_{i})\in\mathbf{L}\times \mathbf{B}\times\mathbf{S}\times\mathbf{R}, \tag{39}\]  
where \(x_{i}\) is the \(i\)-th unique assignment variant \((l_{i},b_{i},s_{i},r_{i})\) where \(i=\overline{1,L\times B\times S\times R}\).  
It should be noted that decisions can take one of two values: zero or one. The value one in the described problem means a certain allocation of the \(r\)-th MRT and the \(s\)-th HED to treat the indicated person. The zero value means there is no exact allocation. Taking into account this limitation, the optimization problem becomes a special case of MILP, namely the binary integer programming (BIP) problem.  
The consequences of the MCI are described by many criteria (multi-criteria optimization). Let the objective function vector be:  
\[f=<f_{1},f_{2},f_{3},f_{4}>, \tag{40}\]  
where:  
\(f_{k}\Big{(}\overset{\rightarrow}{x}\Big{)}\)--objective function due to the \(k\)-th criterion for evaluating the effectiveness of DES activities for decision variables vector \(\overset{\rightarrow}{x}\). There are four objective functions of DES effectiveness:  
\(f_{1}\)--the expected value of death,  
\(f_{2}\)--the expected value of disability,  
\(f_{3}\)--the expected value of the cost of carrying out the rescue operation and  
\(f_{4}\)--the expected value of long-term treatment and rehabilitation costs.  
The optimization problem of DES activities in the case of the MCI, i.e., the problem of minimization of consequences of the MCI, can be presented as follows:  
\[\min_{l,b,s,r}\Big{\{}f\Big{[}\overset{\rightarrow}{x}(l,b,s,r)\Big{]}\Big{\}} \tag{41}\]  
Subject to:  
\[\left\{\begin{array}{c}\underset{l}{\forall\sum}x(l,b,s,r)=1\\ \underset{b\,r}{\forall\sum}x(l,b,s,r)\leq f^{limit}_{MRTB}(b,r)\\ \underset{s}{\forall\sum}x(l,b,s,r)\leq f^{limit}_{HED}(s)\\ x(l,b,s,r)\in\{0;1\}\\ l\in\mathbf{L},b\in\mathbf{B},s\in\mathbf{S},r\in\mathbf{R}\end{array}\right.\]  
In this optimization task, the following constraints must be met:  
* for each injured person, exactly one mode of MRT is taken, and exactly one HED is assigned to treat this person: \[\underset{l}{\forall\sum}x(l,b,s,r)=1,\] (42)
* The number of MRTs already assigned to transport service cannot exceed the number of still available MRTs: \[\underset{b\,r}{\forall\forall\sum}x(l,b,s,r)\leq f^{limit}_{MRTB}(b,r),\] (43) where \(f^{limit}_{MRTB}(b,r)\) is a function which describes the number of still available \(r\)-th modes of MRT in the \(b\)-th MRTB,
* The number of HED beds assigned for injured persons cannot exceed a limit of vacant beds in a certain HED: \[\underset{s}{\forall\sum}x(l,b,s,r)\leq f^{limit}_{HED}(s),\] (44)where \(f_{HED}^{limit}(s)\) is a function which describes the number of still available beds for injured persons in the \(s\)-th HED.
* The assignment of the HED and the MRT mode to each person can take exactly one of two values zero or one (binary variable constraint), i.e., \[x\in\{0;1\}.\] (45)