## 4 Design of a Self-Adaptive Evolutionary Algorithm
### SAEA Operations
#### 4.6.1 Crossover Operation  
The crossover operation plays an important role in the design of EAs, as it allows exploration of various domains of the search space [20; 21]. Typical crossover operators, which have been widely used in the BSP literature (e.g., one-point crossover, two-point crossover, partially mapped crossover), will not be applicable for the adopted hybrid chromosome representation (where the vessel to berthing position to service order assignment is defined using integer numbers, while the crossover and mutation probabilities are defined using real-valued numbers), as they may generate infeasible offspring chromosomes. A custom crossover operator was developed in this study, which combines features of the order crossover and the whole arithmetic crossover. An example of the SAEA crossover operation is presented in Figure 5, where two parent chromosomes are selected at random from the available parent chromosomes. Note that the probability of a given parent chromosome to undergo a crossover operation is determined by parameter \(p^{c}\), which is encoded in each chromosome of the population (since the proposed SAEA algorithm is self-adaptive).  
Once the parent chromosomes are selected, the SAEA algorithm applies the order crossover for the integer portion of the parent chromosomes. In the considered example, a segment of the integer chromosome portion with vessels \"7\", \"5\", \"8\", and \"1\" is copied from parent \"1\" to offspring \"1\". The segment length is set randomly by SAEA and, hence, may vary from one crossover operation to  
Figure 5: An example of the SAEA crossover operation.  
another. After that, the genes with missing vessels are copied from parent \"2\". Specifically, the genes with vessels \"4\", \"3\", \"2\" and \"6\" are copied from parent \"2\" to offspring \"1\" for the considered example (see Figure 5). A similar procedure is used to generate the integer portion for offspring \"2\". Once the order crossover has been applied for the integer portion of the parent chromosomes, the SAEA algorithm deploys the whole arithmetic crossover for the real-valued portion of the parent chromosomes. Let \(X_{1}\) and \(X_{2}\) be the alleles of the parent chromosomes, and \(Y_{1}\) and \(Y_{2}\) be the alleles of the offspring chromosomes. Note that \(X_{1},X_{2},Y_{1}\), and \(Y_{2}\) correspond to the real-valued portions of the parent and offspring chromosomes, representing the crossover and mutation probabilities. As a result of the whole arithmetic crossover operation, the offspring gene values \(Y_{1}\) and \(Y_{2}\) will be set based on the parent gene values \(X_{1}\) and \(X_{2}\), and randomly generated value \(a\) (\(a\in[0.00;1.00]\)) as follows:  
\[Y_{1}=aX_{1}+(1-a)X_{2} \tag{17}\]  
\[Y_{2}=(1-a)X_{1}+aX_{2} \tag{18}\]  
In the example, illustrated in Figure 5, the value of parameter \(a\) was assumed to be \(a=0.30\). The crossover probability for offspring \"1\" was estimated based on the parent crossover probabilities as follows: \(p_{1}^{c}=0.30\cdot 0.50+(1-0.30)\cdot 0.60=0.57\). The crossover probability for offspring \"2\" was computed as follows:\(p_{2}^{c}=(1-0.30)\cdot 0.50+0.30\cdot 0.60=0.53\). On the other hand, the mutation probability for offspring \"1\" in the considered example was calculated based on the parent mutation probabilities as follows: \(p_{1}^{m}=0.30\cdot 0.050+(1-0.30)\cdot 0.040=0.043\). The mutation probability for offspring \"2\" was estimated as follows:\(p_{2}^{m}=(1-0.30)\cdot 0.050+0.30\cdot 0.040=0.047\). The value of parameter \(a\) for the whole arithmetic crossover will vary within SAEA from one operation to another and will be set based on the following equation: \(a=U[0.00;1.00]\), where notation \(U[Val_{1};Val_{2}]\) is used for the uniformly distributed pseudorandom numbers that vary between \(Val_{1}\) and \(Val_{2}\).