*2.1. Genetic Algorithms*

The Genetic Algorithm (GA), proposed in [37], is probably the best-known metaheuristic algorithm. In the GA, population members are named 'chromosomes', and their elements are 'genes'. The search and optimization mechanisms use Darwinist natural evolution, based on perpetuation through genetic material exchange and mutation inside a population of same-species individuals, across a significant number of generations (iterations).

For finding new and improved solutions for an optimization problem, the GA relies on changing the population by using in each iteration the three main genetic operators (Figure 2):


**Figure 2.** The flowchart of a GA iteration.

Optionally, an elitist procedure can also be incorporated in the GA, which ensures the preservation of the best-found optimal solution and its fitness function across generations.

The literature offers a high variety of selection [38] and crossover [39] types, which together with the user-chosen crossover and mutation rates provide significant customization possibilities, making the GA a flexible problem-solving tool.

In this paper, the tournament selection method was used, which draws randomly *p* members from the existing population, out of which retains the best *q*, according to their fitness function. The procedure is repeated until a new population of size *N* is created.

The method of choice for the crossover operator was the uniform crossover, illustrated in Figure 3. Two parents are randomly chosen from the population and, for each gene, a random number is generated. The parents swap the genes only if the generated random number exceeds a customizable threshold *tr*.

**Figure 3.** The uniform crossover.
