## 3 Optimization Model
### Model Variable  
The variables related to ship scheduling can be categorized into input, intermediate, output, and decision variables, which are defined in Tables 1-4. Table 1 presents the input variables, including ship number, berth number, sight range, visibility, wind, and others. These variables are primarily used to establish the context in which the scheduling model is applied. Table 2 shows \(G_{ijk}\), which is used to calculate the berth deviation distance. Table 3 presents the output variables, including the arrival time of ships at the berth, the start and finish times of insertions. These variables are used to determine the final scheduling plan. Table 4 presents the decision variables, which encompass the direction of ships entering and leaving the harbor, navigation patterns, berth types, and other factors. The values of these variables are adjusted to accommodate various practical scenarios. \begin{table}
\begin{tabular}{c c} \hline \hline
**Symbol** & **Definition** \\ \hline \(I\) & The set of ships; \(i\) denotes the ship number, \\  & \(i^{{}^{\prime}}\) denotes any ship number except \(i\), \(i^{{}^{\prime}}\
eq i\), and \(i\), \(i^{{}^{\prime}}\in I=\{1,2,...,n\}\) \\ \(J\) & The set of berths; \(j\) denotes the berth number, \(j^{{}^{\prime}}\) denotes any berth number except \(j\), \(j\
eq j^{{}^{\prime}}\), and \(j^{{}^{\prime}}\in J=\{a_{1},a_{2},...,a_{8};b_{1},b_{2},...,b_{8};\}\), \\  & where \(a_{j}\) and \(b_{j}\) are the berths in harbor pools \(I\) and \(1I\), respectively \\ \(M\) & A sufficiently large positive number \\ \(Ts_{i}\) & Safe time interval for two ships to navigate the channel \\ \(VR_{1}\) & If range of view is less than \(VR_{1}\), change to one-way navigation mode \\ \(W_{0}\) & If the wind is greater than \(W_{0}\), change to one-way navigation mode \\ \(V\) & Current waterway visibility \\ \(W\) & Current waterway winds \\ \(BL_{j}\) & Length of berth \(j\), unit: meters \\ \(SL_{i}\) & Length of ship \(i\), unit: meters \\ \(Vh_{i}\) & Ship \(i\) speed in the harbor pool, unit: meters per minute \\ \(Ta_{i}\) & Ship \(i\) arrival time at anchorage \\ \(Te_{i}\) & Time required for the identification of seagoing ships \\ \(P_{k}\) & Preferred berth \(k\) for ship \(i\) \\ \(CP_{i}\) & Vessel deviation cost factor, CNY 100 for every 300 meters deviation \\ \(SG_{j}\) & Distance of berth \(j\) from the entrance to \\  & the harbor basin in which it is located \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The list of input variables. \begin{table}
\begin{tabular}{c c} \hline \hline
**Symbol** & **Definition** \\ \hline \(TP_{1}\) & Time of ship to apply for entry into port \\ \(Tb_{i}\) & Actual dispatch time of ship \\ \(B_{ij}\) & Berthing position of ship \(i\) \\ \(Tsh_{ij}\) & Time spent by ship \(i\) traveling from the entrance \\  & of the harbor pool to the assigned berth \\ \(Trb_{ij}\) & Time that ship \(i\) actually berths at moment \(j\) \\ \(Tms_{i1}\) & Time of commencement of inspections prior to \\  & the operation of a seagoing ship \(i\) subject to inspection \\ \(Tme_{i1}\) & Completion time for pre-operational inspections \\  & of seagoing ship \(i\) subject to inspection \\ \(Tws_{i}\) & Time of commencement of operation of ship \(i\) \\ \(Tms_{i2}\) & Time of commencement of inspection after the operation \\  & of a seagoing ship \(i\) subject to inspection \\ \(Tme_{i2}\) & Completion time of inspections after the operation \\  & of a seagoing ship \(i\) requiring inspection \\  & The time when ship \(i\) applies to leave the port \\  & when the operation is completed \\ \(Tle_{i}\) & Actual time of departure of ship \(i\) from port \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The intermediate variable.