# Bounding the Likelihood of Exceeding Ward Capacity in Stochastic Surgery Scheduling
## 2 Model Development
### Ward Combination Optimization
Additionally, each operator is only permitted to work according to a single ORDS per day,  
\[\sum_{p\in P,r\in R:(d,p,r)\in DPR}x_{d,p,r}\leq 1,\quad\forall d\in D,\;o\in O \tag{10}\]  
Figure 1: Approximating the expected length of stay (LOS) in ward with equal probability intervals of length \(|\mathcal{K}|\). Here, \(|\mathcal{K}|=5\). where \(P_{o}\subseteq P\) are the ORDS containing the patients of operator \(o\). Finally, we assume a quota system for ICU admission as proposed by [31]; that is to say, for each day, no more than \(\bar{M}^{ICU}\) patients can be admitted to the ICU,  
\[\sum_{p\in P,r\in R:(d,p,r)\in DPR}n_{p}^{ICU}x_{d,p,r}\leq\bar{M}^{ICU}\quad \forall d\in D \tag{11}\]  
where \(n_{p}^{ICU}\) denotes the number of ICU patients in ORDS \(p\). Given a schedule defined by the decision variables \(x_{d,p,r}\), a constraint is posed to bound the likelihood of exceeding the staffed ward beds by a given probability. This is important as exceeding the staffed ward beds may result in cancellations. To start with, one must establish the daily availability of the staffed ward beds for any given surgery schedule. For each schedule, the number of patients that will occupy a ward bed with 100% certainty (\(\rho_{1}=1.00\)) is assumed to be known for any given day. The number of staffed wards beds that are available each day (\(a_{d}\)) can be calculated as follows:  
\[a_{d}=M^{A}-\Big{(}\bar{n}_{d,1}+\sum_{ \begin{subarray}{c}r\in R,p\in P,j\in \{0,1,\ldots,M^{W}-1\}:\\ (d-j,p,r)\in DPR\end{subarray} }Q_{j,1,p}x_{d-j,p,r}\Big{)},\quad\forall d\in D \tag{12}\]  
where \(M^{W}\) is the upper bound on LOS in the ward. The parameter \(\bar{n}_{d,1}\) denotes the number of patients still in the ward from previous weeks (prior to the start of our planning horizon) with 100% (\(\rho_{1}=1.00\)) certainty of occupying a staffed ward bed on the day \(j\). This evaluation may be carried out with a Monte Carlo sampling using the previous week's known schedule. The parameter \(Q_{j,1,p}\) denotes the number of ward patients on the day \(j\) after a surgery, belonging to ORDS \(p\), with \(\rho_{1}=1.00\), or a 100% chance of being in the ward that day. By multiplying the decision variable \(x_{d-j,p,r}\) by this parameter for each day, we can calculate the total number of patients within each scheduled ORDS that are in the ward on the day \(d\) after their surgery, conducted on the day \(d-j\). The daily availability of staffed ward beds is bounded by the maximum number of staffed ward beds (\(M^{A}\)), so  
\[a_{d}\leq M^{A}\quad\forall d\in D \tag{13}\]  
The number of patients (\(n_{d,k}\)) with the probability \(\rho_{k}\), where \(k\in\mathcal{K}^{\prime}\), of being in the ward at given day \(d\) may be calculated as follows:  
\[n_{d,k}=\bar{n}_{d,k}\quad+\sum_{ \begin{subarray}{c}r\in R,p\in P,j\in\{0,1, \ldots,M^{W}-1\}:\\ (d-j,p,r)\in DPR\end{subarray} }Q_{j,k,p}x_{d-j,p,r},\quad\forall d\in D,\quad k \in\mathcal{K}^{\prime} \tag{14}\]  
where \(Q_{j,k,p}\) denotes the number of patients in ward with probability \(\rho_{k}\) on the day \(j\) after the surgery belonging to ORDS \(p\). \(\bar{n}_{d,k}\) is number of patients from the previous planning period with the probability of \(\rho_{k}\) of occupying the staffed ward beds on day \(d\). As a final step in bounding the likelihood of exceeding the staffed ward beds that are available, one must make sure that the combination of ward admission probabilities, associated with the schedule defined by the decision variables \(x_{d,p,r}\), is feasible. That means connecting the available staffed ward beds each day \(a_{d}\), the number of patients \(n_{d,k}\), with the probability \(\rho_{k}\) of being in the ward at a given day and the set of feasible ward combinations specified by \(F_{l,a}\). We may now introduce the binary decision variable \(y_{d,l}\) that takes the value \(1\) if ward combination \(l\) is realized on day \(d\); otherwise, it is \(0\).