## 3 Model Formulation
The electricity consumption rate per unit time of the AMRs is \(r\). The AMR charging rate is \(v_{q}\), which means that the AMR increases \(v_{q}\) percent of its fully charged battery if it is charged for a second. The AMR is allowed to perform partial charging. When the battery level is lower than \(\alpha\) the AMR needs to charge, and it can start to work when the battery level is greater than or equal to \(\beta\), where \(0\leq\alpha<\beta\leq 1\). For the above scheduling problem of medical AMRs, the objective is to minimize the operation cost of the hospital, including the fixed cost and dynamic cost of AMRs, where the fixed cost is the cost of AMRs and the dynamic cost is the energy consumption cost of AMRs during operation. The daily fixed cost of each AMR is \(\xi_{1}\) and the unit travel cost of the AMR is \(\xi_{2}\). For this problem, the following mixed-integer programming model is established. The constraints include the battery and capacity of the AMR, the medical request time window, etc. Objective function:  
\[\min f(m,x)=\xi_{1}m+\xi_{2}\sum_{k=1}^{m}\sum_{p\in L_{k}} \sum_{ \begin{array}{c}i\in V_{1}\\ j\in V_{2}\\ i\
eq j\end{array} }d_{ij}x_{pij}^{k} \tag{2}\]  
subject to:  
\[\sum_{k=1}^{m}\sum_{p=1}^{k_{max}}\sum_{j\in V_{2},i\
eq j}x_{pij}^{k}=1, \forall i\in R \tag{3}\]  
\[\sum_{j\in V_{2},j\
eq i}x_{pij}^{k}=\sum_{j\in V_{1},j\
eq i}x_{pij}^{k}, \forall i\in V,k=1,2,\ldots,m,p\in L_{k} \tag{4}\]  
\[q_{j}\leq u_{pij}^{k}\leq u_{pi}^{k}-x_{pij}^{k}\cdot q_{i}+Q(1-x_{pij}^{k}), \forall i\in V_{1},j\in V_{2},i\
eq j,k=1,2,\ldots,m,p\in L_{k} \tag{5}\]  
\[Y_{pi}^{k}+S_{i}+T_{ij}\cdot x_{pij}^{k}-h_{0}\cdot\left(1-x_{pij}^{k}\right) \leq Y_{pij}^{k},\ \forall i\in D_{1}\cup R,j\in V_{2},i\
eq j,k=1,2,\ldots,m,p\in L_{k} \tag{6}\]  
\[Y_{pi}^{k}+\frac{\beta-\gamma_{pi}^{k}}{v_{q}}+T_{ij}-h_{0}\cdot\left(1-x_{pij }^{k}\right)\leq Y_{pij}^{k},\ \forall i\in C,j\in D_{2}\cup R,k=1,2,\ldots,m,p\in L_{k} \tag{7}\]  
\[Y_{pi}^{k}=Y_{p+1,i}^{k},\forall i\in D_{1}\cap D_{2},k=1,2,\ldots,m,p\in L_{k} \tag{8}\]  
\[Y_{pi}^{k}\geq e_{i},\forall i\in R,k=1,2,\ldots,m,p\in L_{k} \tag{9}\]\[P\Big{\{}X_{pi}^{k}\leq h_{i}\Big{\}}\geq 1-\varepsilon,\forall i\in V,k=1,2, \ldots,m,p\in L_{k} \tag{10}\]  
\[\alpha\leq\gamma_{pi}^{k}\leq\gamma_{pi}^{k}-(r\cdot d_{ij})\cdot x_{pij}^{k}+ \Big{(}1-x_{pij}^{k}\Big{)},\ \forall\ i\in V_{1},j\in V_{2},i\
eq j,k=1,2,\ldots m,p\in L_{k} \tag{11}\]  
\[\gamma_{pi}^{k}=\gamma_{p+1,i}^{k}\forall i\in D_{1}\cap D_{2},k=1,2,\ldots, m,p\in L_{k} \tag{12}\]  
\[\sum_{j\in V_{2},j\
eq i}x_{pij}^{k}=\sum_{j\in V_{1},j\
eq i}x_{pij}^{k}, \forall i\in V,k=1,2,\ldots,m,p\in L_{k} \tag{4}\]0  
\[\sum_{j\in V_{2},j\
eq i}x_{pij}^{k}=\sum_{j\in V_{1},j\
eq i}x_{pij}^{k}, \forall i\in V,k=1,2,\ldots,m,p\in L_{k} \tag{4}\]1  
The objective function (2) is formed by three parts: the daily fixed cost, transportation cost, and the penalty cost of violating the time window. Equation (3) ensures that each request is served in one and only one route. Equation (4) indicates that the number of input arcs at each point is equal to the number of output arcs. The inequality (5) represents the capacity constraint of the \(k\)th AMR on its \(p\)th route. The inequality (6) is the time constraint of the \(k\)th AMR reaching request \(j\) from request \(i\) on its \(p\)th route. The inequality (7) is the time constraint for the \(k\)th AMR leaving charging station \(i\) and reaching request \(j\) on its \(p\)th route. Equation (8) means that the time when the \(k\)th AMR arrives at the ending point of the \(p\)th route is equal to the time when the \(k\)th AMR departs from the starting point of its \((p+1)\)th route. The inequality (9) ensures that the AMR serves request \(i\) later than or equal to the lower bound of the time window. The inequality (10) represents the chance constraint which ensures that request \(i\) is served in its time window with a confidence level \(1-\varepsilon\). The constraints (11) and (12) are about the battery level of AMRs.