# Bounding the Likelihood of Exceeding Ward Capacity in Stochastic Surgery Scheduling
## 2 Model Development
### Operating Room Day Schedule Generation  
For a given MSS, we assume that each surgical specialty is assigned one or more ORs \(r\in R\) on each day \(d\in D\) for the planning horizon \(D\), where the available surgery time for each block is given the capacity parameter \(\mathbb{C}_{d,r}\). Note that \(C_{d,r}\) can be of any size, and different values can be specified for each block. These values are determined by the hospital. Further, we assume that the surgical specialties allocate their blocks to its operators where each operator has at least one assignment in \(D\) per week. A patient \(i\in I\) then belongs to an operator's list of patients (\(I_{o}\)) and can be assigned to one of the operator's blocks.  
For each operator's block, we generate a set of feasible ORDS of patients to be scheduled. The feasibility of the ORDS is determined, on the one hand, by practical rules set by the hospital and, on the other hand, by limits on overtime. The ORDS are all feasible combinations of patients within the operator's waiting list. The number of combinations will grow exponentially. However, in real life, hospitals have a diverse set of practical rules [29; 31; 32] that determine which ORDS are permitted. The application of these rules significantly reduces the number of feasible combinations. Here, we make use of two rules. First, we pose an upper bound on the number of patients assigned to an ORDS. Second, we pose an upper bound on the number of ICU patients assigned to an ORDS. However, these ORDS may not be feasible towards restrictions on overtime and are eliminated using Monte Carlo sampling.  
Let \(M^{P}\) be the maximum number of surgeries assigned to an ORDS and \(z_{i,p}\) be a binary decision variable taking the value 1 if patient \(i\) is assigned to ORDS \(p\); otherwise, it is 0. Then, one may pose an upper limit on the number of patients assigned to an ORDS using the following constraint:  
\[\sum_{i\in I_{o}}z_{i,p}\leq M^{P},\quad\forall p\in P,\quad o\in O \tag{1}\]  
Second, one may pose an upper bound on the number of ICU patients (\(M^{ICU}\)) for each ORDS by  
\[\sum_{i\in I_{o}}giz_{i,p}\leq M^{ICU},\quad\forall p\in P,\quad o\in O \tag{2}\]where \(g_{i}\) is a binary parameter taking the value \(1\) if patient \(i\) requires ICU admission; otherwise, it is \(0\). It is assumed that a patient's need for ICU admission is known in advance.  
As the block length of each block (\(C_{d,r}\)) is finite and surgery duration differs significantly across surgical types, only a subset of ORDS is feasible. That is to say, a set of patients is considered a feasible ORDS \(p\) when the probability of exceeding \(C_{d,r}\) is no more than \(\delta\); that is,  
\[\Pr[\sum_{i\in L_{o}}S(i)z_{i,p}\geq C_{d,r}]\leq\delta,\quad\forall p\in P, \quad o\in O,\quad r\in R,\quad d\in D \tag{3}\]  
where \(S(i)\) is a random variable denoting the surgery duration of patient \(i\), including overhead such as preparation and cleaning. Note that only unique values for \(C_{d,r}\) need to be considered. To make sure that all patients can be assigned to at least one ORDS, an exception to this rule must be given to single surgeries. This is important since some surgeries may span the entire block and exceed the limit of \(\delta\).  
When generating the ORDS, a limit (\(\delta\)) is set on the probability that the sum of surgery duration in an ORDS surpasses the available surgery time \(C_{d,r}\) as posed by constraint (3). For each ORDS, the expected value of this probability is calculated for regular overtime \(\delta_{p}\) and extended overtime \(\delta_{p}^{\Delta}\), as  
\[\delta_{p}=\Pr[\sum_{i\in L_{o}}S(i)z_{i,p}\geq C_{d,r}],\\ \delta_{p}^{\Delta}=\Pr[\sum_{i\in L_{o}}S(i)z_{i,p}\geq C_{d,r} +\Delta_{d,r}],\\ \forall p\in P,\quad o\in O,\quad r\in R,\quad d\in D \tag{4}\]  
where \(\Delta_{d,r}\) is the time added to extend the block length. Our MIP model uses these values to estimate the number of days resulting in regular and extended overtime along with the set of feasible ORDS \(P\).