# Birth Allocation and Query Crane Assignment Considering the Uncertain Maintenance Requirements
## 4 Model Formulation

Table 1: _Cont._\[\alpha\leq\Delta q=\sum\limits_{q\in Q}\sum\limits_{v_{1}\
eq v_{2}}I_{v_{1}v_{2} }\cdot T_{v_{1},v_{2}}^{q}\ \leq\beta \forall v_{1},v_{2}\in V,b\in B \tag{10}\]  
\[y_{v_{1}q}\cdot y_{v_{2}q}\cdot|b_{v_{1}}-b_{v_{2}}|\leq\Delta q=\sum\limits_{q \in Q}\sum\limits_{v_{1}\
eq v_{2}}I_{v_{1},v_{2}}\cdot T_{v_{1},v_{2}}^{q} \forall v_{1},v_{2}\in V,b\in B \tag{11}\]  
\[\sum\limits_{t=1}^{T}y_{vq}(t)\leq\tau_{\max} \forall q\in Q \tag{12}\]  
\[T_{handling,v}=\frac{C_{v}}{\sum\limits_{q\in Q}y_{vq}\cdot\eta_{q}} \forall v\in V \tag{13}\]  
\[\frac{\sum\limits_{v\in V}\sum\limits_{b\in B}x_{vb}\cdot T_{v}}{\sum\limits_{ b\in B}T_{\max,b}}\geq\rho_{min} \tag{14}\]  
\[T_{\text{mainence,}q}^{i+1}-T_{\text{mainence,}q}^{i}\geq\Delta t_{\min} \forall q\in Q \tag{15}\]  
The objective function seeks to minimize the total turnaround time of vessels by optimizing berth and quay crane scheduling while accounting for the impacts of crane maintenance. Equation (1) ensures that each vessel is allocated a unique berth, avoiding spatial conflicts between vessels. Equations (2) and (3) introduce spatial and temporal constraints, ensuring that no two vessels overlap in space or time. Specifically, Equation (2) dictates that if the berthing position of one vessel is to the left of another in a space-time diagram, the two cannot overlap spatially, while an earlier berthing time for one vessel ensures no temporal overlap. This guarantees distinct berthing periods and positions for vessels. Equations (4)-(6) impose further spatial constraints on berthing availability, ensuring that vessels are assigned within the physical limits of the berth and that the number of quay cranes allocated to each vessel does not exceed available capacity. Equation (7) introduces time constraints governing the start and completion of berthing operations, while Equation (8) ensures that vessel handling commences after the assigned berthing time and is completed before departure, reinforcing the sequential order of operations. Equation (9) imposes variable bounds, particularly concerning crane allocation and berthing time, to ensure feasibility of the scheduling decisions. Equation (10) guarantees that vessels assigned to the same berth maintain both spatial and temporal separation, preventing conflicts and ensuring efficient resource use. Equation (11) defines the spatial and temporal limits on crane movement, ensuring cranes do not shift excessively between berths and that vessel handling tasks are scheduled without overlap. Equation (12) limits the maximum operational time for each quay crane, preventing overuse and reducing the risk of breakdowns. Equation (13) ties vessel handling time to the number of allocated quay cranes and their efficiency, ensuring that handling time is proportional to the resources deployed. Equation (14) establishes a minimum berth utilization rate to enhance operational efficiency, ensuring that berths are used productively and not left idle. Lastly, Equation (15) dictates the minimum time interval between quay crane maintenance operations, ensuring regular servicing to maintain crane reliability and operational readiness. Together, these equations create a comprehensive framework for optimizing berth and quay crane scheduling while balancing operational constraints and minimizing disruptions from crane maintenance activities.