# A Hybrid Brain Storm Optimization Algorithm to Solve the Emergency Relief Routing Model
## 3 The Emergency Relief Routing Problem
### Building the Model  
When constructing the ERRP model, the relief vehicle can arrive at the patient before the left time window, but it must wait until the left time window to operate for the patient. The relief vehicle is not permitted to reach the patient after the right time window.  
Figure 1: The constant penalty and deprivation cost.  
Therefore, the constructed ERRP model is as follows:  
\[min\sum_{k\in K}\sum_{(i,j)\in A}\left(c_{ij}x_{ijk}+MI_{i}+\alpha*q+\beta*w\right) \tag{3}\]  
\[\sum_{k\in K}\sum_{j\in\Delta^{+}(i)}x_{ijk}=1\quad\forall i\in N \tag{4}\]  
\[\sum_{j\in\Delta^{+}(0)}x_{0 jk}=1\quad\forall k\in K \tag{5}\]  
\[\sum_{i\in\Delta_{-}(j)}x_{ijk}-\sum_{i\in\Delta^{+}(j)}x_{jik}=0\quad\forall j \in N,\forall k\in K \tag{6}\]  
\[\sum_{i\in\Delta^{-}(n+1)}x_{i,n+1,k}=1\quad\forall k\in K \tag{7}\]  
\[t_{ij}=\frac{c_{ij}}{v} \tag{8}\]  
\[w_{ik}+s_{i}+t_{ij}-w_{jk}\leq\left(1-x_{ijk}\right)M\quad\forall(i,j)\in A, \forall k\in K \tag{9}\]  
\[a_{i}\left(\sum_{j\in\Delta^{+}(i)}x_{ijk}\right)\leq w_{ik}\leq b_{i}\left( \sum_{j\in\Delta^{+}(i)}x_{ijk}\right)\quad\forall i\in N,\forall k\in K \tag{10}\]  
\[E\leq w_{ik}\leq L\quad\forall i\in\{0,n+1\}\quad\forall k\in K \tag{11}\]  
\[L_{0k}=\sum_{i\in N}d_{i}\sum_{j\in\Delta^{+}(i)}x_{ijk}\quad\forall k\in K \tag{12}\]  
\[L_{j}\geq L_{0k}-d_{j}-p_{j}-M\left(1-x_{0 jk}\right)\quad\forall j\in N, \forall k\in K \tag{13}\]  
\[L_{j}\geq L_{i}-d_{j}+p_{j}-M\left(1-\sum_{k\in K}x_{ijk}\right)\quad\forall i \in N,\forall j\in N \tag{14}\]  
\[L_{0k}\leq C\quad\forall k\in K \tag{15}\]  
\[L_{j}\leq C+M\left(1-\sum_{i\in V\setminus\{0\}}x_{ijk}\right)\quad\forall j \in N,\forall k\in K \tag{16}\]  
\[x_{ijk}\in\{0,1\}\quad\forall(i,j)\in A,\forall k\in K \tag{17}\]  
The objective function (3) specifies that the total travel distance, the patients' deprivation costs, and the default costs are minimized. Constraint (4) restricts each patient to appear on only one relief route. Constraints (5) to (7) indicate the traffic restriction of the relief vehicle \(k\) on the relief routes. According to constraint (8), the ratio of the distance between node \(i\) and \(j\) to the vehicle's travel speed determines the travel time that the relief vehicle costs to go from node \(i\) to node \(j\). Constraint (9) indicates the continuity of the travel time of the relief vehicle \(k\). Constraint (10) denotes that the start service time of the relief vehicle \(k\) to the patient \(i\) is requested to stay within the time window of patient \(i\). Constraint (11) reveals that the departure time of the relief vehicle \(k\) from the emergency logistics center and the time of returning to the emergency logistics center must stay within the time window of the emergency logistics center. Constraint (12) is for calculating the initial loading of the relief vehicle \(k\) at the emergency logistics center. Constraint (13) is to calculate the loading of the relief vehicle \(k\) after the operation on the first patient of the relief route where it is located. Constraint (14) is to compute the loading of the relief vehicle \(k\) after the operation on any patient (not including the first patient) of the relief route where it is located. Constraint (15) indicates that the initial loading of the relief vehicle \(k\) at the emergency logistics center must be no greater than the maximum loading. Constraint (16) indicates that the loading of the relief vehicle \(k\) at the end of the operation on any one patient of the relief route where it is located must be no greater than the maximum loading.