## 2 Problem Description
### Medium-Level Planning
#### 2.2.1 Operating Room Is the Bottleneck Resource (R*)  
As a result of the allocation of patients and utilization of the operating room, ICU, and ward, if the operating room is identified as the bottleneck, the model for the operating room planning operates. Figure 3 explains the procedure of multi-level integrated planning when the operating room is identified as the bottleneck. After identifying the bottleneck, the patients are allocated to the operating rooms considering the available capacity of operating rooms on each day \(d\) of the medium-level planning horizon \(\tau\). It is worth mentioning that if the available capacity of the operating rooms is less than the required capacity of the operating room, the patients are moved to the next day by considering the patients' due dates. The patients are then allocated to the operating rooms to maximize the workload of the operating rooms such that the patients of the same specialty are allocated to the same operating room to minimize the operating room turnover time when a patient of one specialty is operated in the same operating room after a patient of a different specialty. The objective function of medium-level planning when the operating room is identified as bottleneck resource R* is given by Equation (16). \[obj=\text{maximize}(WL)_{od\tau}\ \forall o\in O\ \forall o<d\leq D\ \forall\tau \tag{16}\]  
\[WL_{od\tau}=\sum_{p=1}^{P}\Bigl{(}\left(t_{p}^{pre}+t_{p}^{set}+t_{p}^{sur}+t_{ p}^{cl}\right)\times X_{po}^{dt}\Bigr{)}\ \forall o\in O\ \forall 0<d\leq D,\ \forall\tau \tag{17}\]  
\[WL_{od\tau}\leq At_{od\tau}\ \forall o\in O\ \forall 0<d\leq D\ \forall\tau \tag{18}\]  
\[\sum_{d=1}^{D}\sum_{o=1}^{O}X_{po}^{dt\tau}=1\ \forall p\in P\ \forall\tau \tag{19}\]  
\[\sum_{s=1}^{S}U_{spod\tau}=1\ \forall p\in P\ \forall o\in O\ \forall 0<d\leq D\ \forall t \tag{20}\]  
\[\sum_{p=1}^{P}U_{spod\tau}\leq N_{sd\tau}^{all}\ \forall s\in S\ \forall 0<d\leq D,\ \forall\tau \tag{21}\]  
\[U_{spod\tau}=1\ \forall p\in P_{e}\ \forall s\in S_{e}\ \forall 0<d\leq D,\ \forall\tau \tag{22}\]  
\[\sum_{o=1}^{O}U_{spod\tau}=1\ \forall s\in S\ \forall 0<d\leq D,\ \forall\tau \tag{23}\]  
The objective function of the medium-level planning of operating rooms is to maximize the workload of all operating rooms. Equation (17) provides the expression to calculate the workload of each operating room. The objective function of the medium level is significant to increase the utilization of the operating rooms. Greater operating room utilization leads to less idle time and hence reduced costs. Equation (18) puts an upper bound on an operating room's workload such that the operating room's workload should be less than or equal to the available capacity on the day \(d\) of the planning horizon \(\tau\). Equation (19) ensures that each patient is allocated to one operating room and only one day of the planning horizon. Equation (20) ensures that each patient is assigned to one surgeon only. Equation (21) puts an upper bound to the number of surgeries a surgeon performs on a day \(d\) of the planning horizon \(\tau\). Equation (22) states that only a surgeon of the same specialty can be assigned for the surgery of a patient from a specialty. Equation (23) states that each surgeon can be assigned to one operating room on a day \(d\) of the planning horizon \(\tau\). The output of medium-level planning is the allocation of patients to operating rooms and surgeons' assignment for patients' surgery. As a result of the allocation of surgery patients to operating rooms, the corresponding number of patients that require beds in the ICU and ward is calculated using Equations (7) and (8), respectively. The number of beds required by the surgery patients in the ICU and ward is fixed, and the information is sent to both the ICU and ward to freeze the capacity for patients in the operating room, which is the bottleneck in the considered planning horizon.