## 2 Problem Description
### Medium-Level Planning  
Based on the lists of patients from the higher-level planning for each operating room, ICU, and ward, the bottleneck is identified from these three units based on the load of each planning horizon. The percentage utilization of all three units, such as the operating rooms, ICU, and ward, is calculated to identify the system's bottleneck. The unit with the highest percentage utilization is identified as the bottleneck. The workload of surgery patients in operating rooms can be calculated using Equation (9). The total workload of all operating rooms is calculated by adding the workload of all patients on the day of the planning horizon as given by Equation (9).  
\[\text{TWL}_{od\tau}=\sum_{p=1}^{p}\left(\left(t_{p}^{pre}+t_{p}^{set}+t_{p}^{ sur}+t_{p}^{cl}\right)\times H_{pd\tau}\right)\;\forall 0<d\leq D\;\forall\tau \tag{9}\]  
\[\text{UTL}_{od\tau}^{\%}=\frac{\text{TWL}_{od\tau}}{At_{od\tau}\times N_{od\tau }\times\eta_{o}^{avg}}\;\forall o\in O_{d\tau}\;\forall 0<d\leq D\;\forall\tau \tag{10}\]  
\[\text{UTL}_{id\tau}^{\%}=\frac{N_{id\tau}^{ul\eta}}{N_{id\tau}\times\eta_{i} ^{avg}}\;\forall i\in I_{d\tau}\;\forall 0<d\leq D\;\forall\tau \tag{11}\]  
\[\text{UTL}_{ud\tau}^{\%}=\frac{N_{ud\tau}^{ul\tau}}{N_{ud\tau}\times\eta_{w} ^{avg}}\;\forall w\in W_{d\tau}\;\forall 0<d\leq D,\;\forall\tau \tag{12}\]  
\[N_{id\tau}^{ul\eta}=N_{d\tau}^{p}\;\forall 0<d\leq D\;\forall\tau \tag{13}\]  
\[N_{ud\tau}^{ul\eta}=N_{d\tau}^{pv}\;\forall 0<d\leq D\;\forall\tau \tag{14}\]  
The percentage utilization of operating rooms is calculated as the ratio of the total workload of operating rooms to the total available capacity of all operating rooms, and is given by Equation (10), where \(N_{od\tau}\) is the total number of operating rooms on the day \(d\) of the planning horizon \(\tau\) and \(\eta_{o}^{avg}\) is the average efficiency of the operating rooms. Similarly, the percentage utilization of the ICU and the downstream ward is calculated in Equation (11) and Equation (12), respectively. Where \(N_{id\tau}\) and \(N_{ud\tau}\) are the total number of beds in the ICU and ward, respectively, on the day \(d\) of the planning horizon \(\tau\); \(N_{id\tau}^{wl}\) and \(N_{ud\tau}^{wl}\) are the number of occupied beds in the ICU and downstream ward, respectively; and \(\eta_{i}^{avg}\) and \(\eta_{w}^{avg}\) are the average efficiency of the ICU and ward, respectively. Equations (13) and (14) provide the method to calculate workload in the ICU and ward, respectively.  
After calculating the percentage utilization of the operating room, ICU, and ward, the bottleneck is identified. The resource with the highest percentage utilization is identified as a bottleneck on that day of the planning horizon. The following is the condition for a resource to be considered a bottleneck. Consider that R is a set of critical resourcesconsisting of the OT, ICU, and ward, and R* is the resource with maximum utilization and is the bottleneck resource as given in Equation (15)  
\[R*=resource\ with\ \max\{UTL\%\}_{dr}\ \forall r\in R=[OT,ICU,Ward] \tag{15}\]  
The condition for any resource to be bottlenecked is represented by the expression given below:  
\[\text{if}\left\{\begin{array}{l}UTL\%_{r}>UTL\%_{r},where\ r\in R,\ r^{ \prime}\in[R-r]&r=R*\quad\text{for any }r\cup r^{\prime}=R\\ UTL\%_{r}<UTL\%_{r},where\ r\in R,\ r^{\prime}\in[R-r]&r\
eq R*\quad\quad \quad\quad\quad r\cap r^{\prime}=\phi\end{array}\right.\]  
After identifying the bottleneck, the respective planning and scheduling model is triggered, as explained here.