# Optimizing Ambulance Allocation in Dynamic Urban Environments: A Historic Data-Driven Approach
## 3 Problem Description and Mathematical Model
### Mathematical Model  
In this section, we present a mathematical model based on integer programming for the concomitant problem. \[\text{Max}\quad\alpha\sum_{i\in\mathcal{I}}\sum_{t\in\mathcal{T}} \sum_{k=1}^{P_{t}}(1-q_{t})q_{t}{}^{k-1}d_{it}y_{kit}-\sum_{c\in\mathcal{C}_{ new}}\beta_{c}z_{c}-\sum_{c\in\mathcal{C}^{\prime}}\sum_{c^{\prime}\in \mathcal{C}\setminus\{c\}}\sum_{t\in\mathcal{T}\setminus\{1\}}\gamma_{cc^{ \prime}}r_{cc^{\prime}t}+\delta\sum_{i\in I}\sum_{t\in\mathcal{T}}y_{iIt} \tag{1}\] \[\text{s.t.}\quad\sum_{k=1}^{P_{t}}y_{kit}-\sum_{c\in\mathcal{C}_{ b}}a_{cit}x_{ct}\leq 0\quad\forall i\in\mathcal{I}_{b},b\in\mathcal{B}\] (2) \[\sum_{c\in\mathcal{C}}x_{ct}=\mathcal{P}_{t}\quad\forall t\in \mathcal{T}\] (3) \[\sum_{t\in\mathcal{T}}x_{ct}\leq Mz_{c}\quad\forall c\in\mathcal{ C}_{new}\] (4) \[x_{ct}+\sum_{c^{\prime}\in\mathcal{C}\setminus\{c\}}r_{c^{ \prime}ct}-\sum_{c^{\prime}\in\mathcal{C}\setminus\{c\}}r_{cc^{\prime}t}=x_{c( t+1)}\quad\forall c\in\mathcal{C},t\in\mathcal{T}\setminus\{T\}\] (5) \[x_{cT}+\sum_{c^{\prime}\in\mathcal{C}\setminus\{c\}}r_{c^{ \prime}cT}-\sum_{c^{\prime}\in\mathcal{C}\setminus\{c\}}r_{cc^{\prime}T}=x_{c( 1)}\quad\forall c\in\mathcal{C}\] (6) \[y_{iIt}\geq y_{kit}\quad\forall k^{\prime}\in\{1,\ldots,k-1\},i \in\mathcal{I},t\in\mathcal{T} \tag{7}\] \begin{table}
\begin{tabular}{c l} \hline \hline
**Sets** & **Description** \\ \hline \(\mathcal{B}\) & A set of Boroughs, \(b\in\mathcal{B}\) \\ \(\mathcal{I}\) & A set of demand cells, \(i\in\mathcal{I}\) \\ \(\mathcal{I}_{b}\) & A set of demand cells in borough \(b\), \(\mathcal{I}_{b}\subset\mathcal{I}\) \\ \(\mathcal{C}\) & A set of centers to assign ambulances to, \(c\in\mathcal{C}\) \\ \(\mathcal{C}_{new}\) & A set of potential centers to assign ambulances to, \(\mathcal{C}_{new}\subset\mathcal{C}\) \\ \(\mathcal{C}_{b}\) & A set of centers for assigning ambulances in borough \(b\in\mathcal{B}\), \(\mathcal{C}_{b}\subset\mathcal{C}\) \\ \(\mathcal{T}\) & A set of planning horizons, \(t\in\mathcal{T}=\{1,2,3,\ldots,T\}\) \\ \hline
**Decision** \\
**Variables** & **Description** \\ \hline \(x_{ct}\) & Number of ambulances to assign to location \(c\in\mathcal{C}\) at time \(t\) \\ \(r_{cc^{\prime}t}\) & Number of ambulances relocated from location \(c\in\mathcal{C}\) at time \(t-1\) to location \(c^{\prime}\in\mathcal{C}\setminus\{c\}\) at time t. \\ \(y_{kit}\) & 1 if at least k ambulances cover demand cell \(i\in\mathcal{I}\) at time \(t\), otherwise 0 \\ \(z_{c}\) & 1 if the new location \(c\in\mathcal{C}_{new}\) is used at least once, otherwise 0 \\ \hline
**Parameters** & **Description** \\ \hline \(\mathcal{P}_{t}\) & Number of ambulances that should be assigned at time \(t\) \\ \(d_{it}\) & Demand in cell \(i\in\mathcal{I}\) at time \(t\) \\ \(a_{cit}\) & 1 if demand cell \(i\in\mathcal{I}\) is covered by location \(c\in\mathcal{C}\) at time \(t\), otherwise 0 \\ \(q_{t}\) & The probability that, after receiving an emergency call at time \(t\), an ambulance will arrive within a golden time. \\ \(\alpha\) & Reward parameters for demand coverage expressions \\ \(\beta_{c}\) & Penalty parameters for placing an ambulance in a new potential center \(c\in\mathcal{C}_{new}\) \\ \(\gamma_{cc^{\prime}}\) & The cost of relocating an ambulance from location \(c\in\mathcal{C}\) to location \(c^{\prime}\in\mathcal{C}\setminus\{c\}\) \\ \(\delta\) & Reward parameter for cells covered by at least one ambulance within the golden hour \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Sets, parameters, and decision variables. \[y_{ik^{\prime}t}\leq y_{ikt}\quad\forall k^{\prime\prime}\in\{k+1, \ldots,P_{t}\},i\in\mathcal{I},t\in\mathcal{T} \tag{8}\] \[y_{ikt}\in\{0,1\}\quad\forall i\in\mathcal{I},k\in\{1,\ldots,P_{t} \},t\in\mathcal{T}\] (9) \[x_{ct},t_{cc^{\prime}t}\in\mathbb{Z}\quad\forall c\in\mathcal{C},c^{\prime}\in\mathcal{C},t\in\mathcal{T},c\
eq c^{\prime} \tag{10}\]  
The objective function consists of four terms. When we analyze an objective expression in Section 4.3, we give it an index to analyze each term separately.