## 4 Design of a Self-Adaptive Evolutionary Algorithm
### Generation of the Initial Chromosomes and Population  
The first half of the SAEA population will be initialized randomly (i.e., vessels will be assigned randomly to the MCT berthing positions, while the crossover and mutation probabilities will be generated as random values, ranging between 0.01 and 1.00). The second half of the SAEA population will be initialized using a local search heuristic for the vessel to berthing position to service order assignment, while the crossover and mutation probabilities will be still generated randomly. The local search heuristic is based on the First Come First Served (FCFS) policy. Note that a typical FCFS policy, which has been widely used in the BSP literature, will not be applicable for the **BSPSR** mathematical model, as it may cause violation of the spatial requirements (i.e., a vessel can be assigned to the berthing position, which does not have sufficient length and/or depth). This study proposes the FCFS with spatial requirements (FCFS-SR) heuristic, which ensures that the spatial requirements are not violated for the generated berth schedules. The main steps of the FCFS-SR heuristic are outlined in Algorithm 1. Notation \(\widehat{T^{B}}\) is used in Algorithm 1 to represent the updated availability of berthing positions (measured in h), while the rest of notations are adopted from Section 3 of the manuscript. The data structures, required by the FCFS-SR heuristic, are initialized in step 0. Then, the vessels to be served at the MCT are sorted based on their arrival times in step 1. The availability of berthing positions is set equal to the initial availability in step 2. After that, the FCFS-SR heuristic starts an iterative procedure (steps 4-13), where the first available berthing position, which can accommodate the next arriving vessel (and satisfy both horizontal and vertical clearance requirements), is determined in steps 5 and 6. The earliest service order for the first available berthing position is identified in step 7. Then, the vessel is assigned to the first available berthing position, which satisfies both horizontal and vertical clearance requirements, in the earliest service order (step 8). The start and finish vessel service times are estimated in steps 9 and 10. The availability of a berthing position is updated based on the vessel finish service time in step 11. The FCFS-SR heuristic terminates an iterative procedure, once the initial vessel to berthing position to service order assignment is generated for all vessels, calling for service at the MCT. Figure 4: An example of the SAEA chromosome representation. Note that the FCFS-SR heuristic is deterministic in its nature; therefore, the chromosome portions, which represent vessel to berthing position to service order assignments and are created using FCFS-SR, will be identical. The latter will substantially limit the explorative capabilities at early stages of the SAEA run. To maintain the population diversity and improve the SAEA explorative capabilities, only half of the initial SAEA population will be generated using the FCFS-SR heuristic, while another half will be created randomly (as discussed at the beginning of Section 4.3 of the manuscript). The number of chromosomes in the population (i.e., population size: \(\Theta\)) will be established based on the parameter tuning analysis, which is described in Section 6.2 of the manuscript.