# Birth Allocation and Query Crane Assignment Considering the Uncertain Maintenance Requirements
## 4 Model Formulation  
We present parameter notations and decision variables, and then propose a Mixed-integer programming for the integrated berth allocation and quay crane assignment problem with uncertain maintenance activities. The notations involved in the proposed model are listed in Table 1. \begin{table}
\begin{tabular}{l l} \hline \hline Notations & \\ \hline \(V\) & Set of arriving vessels, \(\text{and}\ v\in V=\{1,2\ldots|V|\}\). \\ \hline \(B\) & Set of berth segments, \(\text{and}\ b\in B=\{1,2\ldots|B|\}\). \\ \hline \(Q\) & Set of total number of quay cranes, \(\text{and}\ k,l\in Q=\{1,2\ldots|Q|\}\). \\ \hline \(T\) & Set of discrete time periods of the schedule cycle, and \(t\in T=\{1,2\ldots|T|\}\). \\ \hline Parameters & \\ \hline \(A_{v}\) & Arrival time of vessel \(v\). \\ \hline \(D_{v}\) & Departure time of vessel \(v\). \\ \hline \(T_{start,v}\) & The time when the vessel begins service. \\ \hline \(T_{end,v}\) & The time when the vessel ends service. \\ \hline \(C_{v}\) & The cargo volume of the vessel \(v\). \\ \hline \hline \end{tabular}
\end{table} 
Table 1: List of notations. Figure 2: Illustration of a processing schedule with QC maintenance activity. _Mixed-Integer Programming Model for the Integrated Berth Allocation, QC Assignment Problem_  
The model and the constraints of model for are given as follows:  
Objective  
\[min\Sigma\left(\sum\limits_{b=1}^{B}\sum\limits_{q=1}^{Q}\left(\gamma_{1}\cdot(A _{v}-D_{v})+\gamma_{2}\cdot\frac{C_{v}}{E_{q}}\right)\cdot x_{vb}\cdot y_{qv} \right)+\gamma_{3}\cdot\sum\limits_{q\in Q}M_{qt}+\sum\limits_{q\in Q}\sum \limits_{\tau_{1}\
eq\tau_{2}}I_{\tau_{1},\tau_{2}}\cdot T_{\tau_{1},\tau_{2}}^ {q}\]  
subject to  
\[\sum\limits_{b\in B}x_{vb}=1 \forall v\in V \tag{1}\]  
\[A_{\tau_{1}}\leq A_{\tau_{2}}\ \Rightarrow T_{complete,\tau_{1}}\leq T_{start, \tau_{2}} \forall v_{1},v_{2}\in V,b\in B \tag{2}\]  
\[x_{v_{1}b}+x_{v_{2}b}\leq 1 \forall v_{1},v_{2}\in V,b\in B \tag{3}\]  
\[x_{v_{1}b}\cdot L_{v}\leq L_{b} \forall v_{1},v_{2}\in V,b\in B \tag{4}\]  
\[R_{v}\leq\sum\limits_{q\in Q}y_{vq}\leq Q_{v} \forall v\in V \tag{5}\]  
\[\sum\limits_{v\in V}y_{vq}\leq 1 \forall q\in Q \tag{6}\]  
\[y_{vq}\leq\sum\limits_{b\in B}x_{vb}\cdot\delta_{vb} \forall v\in V,b\in B \tag{7}\]  
Figure 2:0  
Figure 2:1 \begin{table}
\begin{tabular}{l l} \hline \(E_{q}\) & Efficiency of the quay c \(q\). \\ \hline \(L_{v}\) & The length of the vessel \(v\). \\ \hline \(T_{v}\) & The volume of vessel \(v\) loading and unloading tasks. \\ \hline \(R_{v}\) & The minimum number of quay cranes required by the vessel \(v\). \\ \hline \(Q_{v}\) & The maximum number of quay cranes that can be assigned to the vessel \(v\). \\ \hline \(M_{q}\) & The Total maintenance duration of the quay crane \(q\). \\ \hline \(\gamma_{1}\) & The Weight of vessel waiting time. \\ \hline \(\gamma_{2}\) & The Weight of vessel handling time. \\ \hline \(\gamma_{3}\) & The Weight of Penalty for delay of shipment. \\ \hline \(\alpha\) & Minimum interval time between quay crane \(q\) movements. \\ \hline \(\beta\) & Maximum interval time between quay crane \(q\) movements. \\ \hline \multicolumn{3}{l}{Decision variables} \\ \hline \(x_{vb}\) & a binary variable equal to 1 if the vessel is docked at a berth and 0 otherwise. \\ \hline \(y_{vq}\) & a binary variable equal to 1 if the vessel is assigned to a specific quay crane and \\  & 0 otherwise. \\ \hline \(z_{q}\) & a binary variable equal to 1 if the quay crane \(q\) is in maintenance and 0 otherwise. \\ \hline \(M_{qt}\) & a binary variable equal to 1 if the quay crane \(q\) is in the maintenance state at time \(t\) and 0 otherwise. \\ \hline \(T_{\tau_{1},\tau_{2}}^{q}\) & The movement time of the quay crane \(q\) from vessel \(v_{1}\) to vessel \(v_{2}\). \\ \hline \(\delta_{vb}\) & Indicates whether the location of the berth is within the berth range of the vessel \(v\). \\ \hline \(I_{v_{1},v_{2}}\) & Indicates whether vessel \(v_{1}\) is in overlapping with vessel \(v_{2}\) in time. \\ \hline \end{tabular}
\end{table}