## 3 Problem Definition and Optimization Model
### Model Formulation
#### 3.2.3 PAVP Model  
Based on the vessel arrival plan, the multiple optimization objectives for the PAVP were established: minimize the cost of using oil transfer arm; minimize the cost of pipelines transportation; minimize the cost of using valves; and minimize the operation time of a planning cycle. Generally, increased use of oil transfer arms results in faster unloading of ships, but this also raises the cost associated with using the oil transfer arms. Pipeline transportation costs are generally lower but may require multiple valve opening and closing operations to increase valve usage costs and operating energy consumption. Minimizing the operating time of vessels in port can lead to an increased number of oil transfer arms, pipelines, and valves being used, which, in turn, raises the overall operational costs. To sum up, the dual-objective functions proposed in this article are defined as Equation (1):  
\[MIN\{C,T\} \tag{1}\]  
Equation (2) represents all ship handling costs within the planning cycle, including the cost of using oil transfer arms, the cost of pipelines transportation and the cost associated with valve operations. \[C=\sum_{a\in A}\left(C_{1}+C_{2}+C_{3}\right) \tag{2}\]  
Equation (3) represents the total time of all vessel in port during the planning cycle, including the preparation time for the oil transfer arm, the time of unloading of cargo and the pipeline oil circuit emptying time. \[T=\sum_{a\in A}\left(T_{C}+T_{ca}+T_{pa}\right) \tag{3}\]  
To calculate the estimated time of departure of vessel \(a\), including the oil transfer arm preparation and handling time, the oil unloading time and the pipeline oil circuit emptying time, the calculation formula is provided in Equation (4):  
\[ETD_{a}=ATA_{a}+T_{C}+T_{ca}+T_{pa} \tag{4}\]  
Total time for the vessel liquid cargo to be unloaded into the pipeline is given by Equation (5):  
\[T_{ca}=\frac{W_{a}}{N_{ca}\times V_{ca}} \tag{5}\]  
The unloading flow rate of the oil transfer arm is determined by the efficiency of the pump equipped on the vessel. Setting the coefficient \(\beta\), which is defined as the efficiency coefficient of the vessel's pump, this coefficient \(\beta\) is related to the size of the vessel and the service life of the pump. Due to the fixed diameter of the pipeline, when multiple oil transfer arms are used simultaneously, their flow rates will affect each other. Setting the coefficient \(\gamma\), which is defined as the mutual influence coefficient of multiple oil transfer arms, set \(\gamma=1\) for one oil transfer arm; \(\gamma=0.95\) for two oil transfer arms; \(\gamma=0.9\) for three oil transfer arms; \(\gamma=0.85\) for four oil transfer arms, and so on. Equation (6) calculates the unloading flow rate:  
\[V_{ca}=\beta\times\gamma\times V_{a} \tag{6}\]  
Among them \(V_{a}\) is the standard flow rate of one oil transfer arm of vessel \(a\), and the standard flow rate is equal for each oil transfer arm of vessel \(a\). Pipeline oil circuit emptying time is calculated by Equation (7):  
\[T_{pa}=\frac{\left(D_{s}\times\delta\right)\times L_{a}\times\rho}{\
u\times D _{s}\times\theta\times\rho}=\frac{\delta\times L_{a}}{\
u\times\theta} \tag{7}\]In Equation (7), \(\delta\) is the pipeline section occupation coefficient, \(\theta\) is the actual speed coefficient, \(v\) is the maximum passable flow velocity of the pipeline, and \(\rho\) is the universal calculating density of liquid cargo. In practice, the density of each type of cargo is different, but a common value is used for calculation, set \(\delta\) = 0.75, \(\theta\) = 0.8, \(v\) = 4.5 m/s, \(\rho\) = 0.87 \(\times\) 10\({}^{3}\) kg/m\({}^{3}\). The cost is mainly divided into three parts, the cost of oil transfer arms, the cost of pipelines and the cost of valves. The cost of oil transfer arms includes the fixed cost and the per-use cost.