# A Multi-Agent Optimization Approach for Multimodal Collaboration in Marine Terminals
## 4 Solution Methodology
### Multi-Objective Evolutionary Algorithms  
A common approach to solving multi-objective optimization problems involves population based algorithms that utilize evolutionary computation. Multi-Objective Evolutionary Algorithms (MOEAs) can efficiently generate a diverse set of trade-off solutions, focusing on convergence, diversity, and coverage of the examined solution space. These algorithms form the foundation of multi-objective optimization problems and have been extensively studied in the literature. To solve the problem presented in this study using MOEAs, the employed methodology, detailed in Figure 5, employs the following steps:  
Step 1: Initialize Problem Parameters-- This includes determining the number of vessels, available berths, logistics companies involved, and specific requirements such as vessel-to-berth compatibility. Step 2: Generate Initial Set of Solutions--An initial set of solutions for berth allocation \(x\) and priority of vessels \(y\) per berth is generated and evaluated by assigning a simple FCFS priority based on the chronological arrival times of vessels, and then a random assignment of berths for each vessel, provided that the allocation is feasible with respect to vessel-to-berth compatibility. The generated \(x\) and \(y\) are defined as observations of the search algorithm. \begin{table}
\begin{tabular}{l l} \hline \hline
**Subsets** & \\ \hline \(S_{v}^{1}=\left\{\left\lfloor\frac{m_{v}}{W}\right\rfloor,\left\lceil\frac{m_{v }+p_{v}^{2}}{W}\right\rceil\right\}\) & Time periods associated with the start of the mooring until the end of first processing in single mode for vessels \(v\) with \(I_{v}\geq E_{v}\). If \(I_{v}<E_{v}\), \(S_{v}^{1}=\emptyset\) \\ \(S_{v}^{2}=\left\{\left\lfloor\frac{m_{v}+p_{v}^{2}}{W}\right\rfloor,\left\lceil \frac{m_{v}+p_{v}}{W}\right\rceil\right\}\) & Time periods associated with end of first processing in single mode to exit time for vessels \(v\) with \(I_{v}\geq E_{v}\). If \(I_{v}<E_{v}\), \(S_{v}^{2}=\emptyset\) \\ \(S_{v}^{3}=\left\{\left\lfloor\frac{m_{v}}{W}\right\rfloor,\left\lceil\frac{m_{v }+p_{v}^{2}}{W}\right\rceil\right\}\) & Time periods associated with start of mooring until the end of first processing in double mode for vessels \(v\) with \(I_{v}<E_{v}\). If \(I_{v}\geq E_{v}\), \(S_{v}^{3}=\emptyset\) \\ \(S_{v}^{4}=\left\{\left\lfloor\frac{m_{v}+p_{v}^{2}}{W}\right\rfloor,\left\lceil \frac{m_{v}+p_{v}}{W}\right\rceil\right\}\) & Time periods associated with the end of the first processing in double mode to exit time for vessels \(v\) with \(I_{v}<E_{v}\). \(I_{v}\geq E_{v}\), \(S_{v}^{4}=\emptyset\) \\ \(\mathcal{I}^{*}=\mathcal{I}\setminus\{I_{0}\}\) & Time periods excluding first period \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Subsets used in the model, specific to the terminal. Figure 5: Methodology employed for use of multi-objective evolutionary algorithms. Step 3: Encoding of Observations--To facilitate the search process, observations of \(x\) and \(y\) must be encoded in a form that makes it easy to apply operators. To that end, we utilize real-encoding. For each vessel, a real number is generated randomly within the range from 0 to the total number of berths \(|\mathcal{B}-1|\). The integer part of this number indicates the assigned berth for the vessel, while the fractional part represents the vessel's priority among those allocated to the same berth. Vessels with the same integer part are sorted based on their fractional values to establish priority order. The chromosome structure is further illustrated in Figure 6.  
Step 4: Define evaluation method--The model defined in Section 3 must satisfy constraints during fitness evaluation. To handle constraint violations, hard constraints are transformed into soft constraints by adding high penalties to the objective value when violations occur. To compute the costs across agents, the vessel_process, incur_deviation and terminal_constraints(\(r\)) functions are deployed.