## 4 Methodology
### Efficient Search Algorithms Based on Transformations and Metaheuristics
#### 4.3.2 Fair Technology Distribution  
We propose to solve the fair technology distribution problem through the Genetic Algorithm (GA) technique. This technique belongs to the more general evolutionary algorithms, relies on natural selection ideas and genetic operators, such as mutation and crossover, and is highly employed in non-well-structured problems [48]. For the GA technique, we coded the chromosome, which represents a possible solution, in a fixed-length integer-valued string as depicted in Figure 4. The \(j\)th position in the chromosome of length \(N\) denotes the \(j\)th node in the network. The \(j\)th chromosome position stores a non-negative integer value, say, \(k\), which specifies that the \(j\)th node belongs to the \(k\)th technology. Regarding the GA operators, we followed standard guidelines from the GA theory to set the algorithm parameters at recommended values. Thus, population size is set to 500 chromosomes. We employ the single point crossover, with a probability of 0.8 for executing the operation, as the crossover operator. For mutations, one position of the chromosome is selected randomly, and its value is changed, with a probability of 0.01, by one of the other technologies available in the design. For selection, we used the fitness proportional selection, implemented by a roulette wheel. Following standard procedures to handle constrained optimization problems using GAs, we transformed ours into a non-constrained problem by adding the constraints as penalty functions to the objective function, [49; 50; 51; 52]. Following [49], the penalty functions should increase their values as the generation number \(g\) does, thereby adding more selective pressure on the GA to converge to feasible solutions. From these ideas, the fitness function, \(f_{1}(g)\), at the generation number \(g\) is given by:  
\[f_{1}(g)=\Big{(}\sum_{k=1}^{\kappa}\big{(}\alpha_{k}n_{k}-\alpha_{c}\frac{n}{ \kappa}\big{)}^{2}+1.2^{g}\big{(}\max\big{\{}0,\sum_{k=1}^{\kappa}n_{k}Q_{k}- B\big{\}}\big{)}^{2}\Big{)}^{-1}, \tag{15}\]  
Figure 4: Chromosome coding for the fair technology distribution problem. which clearly addresses a minimization problem through the fitness proportional selection. Note that, the smaller the cost function, the higher the probability that a chromosome should be selected to the next generation and vice versa. We also note that Equation (15) contains both the cost function Equation (6) (at the left-hand side of the denominator) and the penalty function that represents the inequality constraint Equation (7) (at the right-hand side of the denominator). However, the number of nodes constraint Equation (8) is not included as a penalty function in Equation (15) because is directly handled by the chromosome coding. Lastly, the stopping criteria for the GA considers two options: (i) The number of iterations carried out achieves a maximum, predefined number; and (ii) the absolute difference between the mean values of the cost function, in two consecutive generations, for the entire population is smaller than some predefined tolerance \(\epsilon\). The mean value of the cost function, \(MV_{1}(g)\), at the generation number \(g\) is defined as:  
\[MV_{1}(g)=\frac{1}{P_{1}(g)}\sum_{h=1}^{P_{1}(g)}\sum_{k=1}^{ \kappa}\Big{(}\alpha_{k}n_{k}^{(h)}-\alpha_{c}^{(h)}\frac{n}{\kappa}\Big{)}^{ 2}, \tag{16}\]  
where \(P_{1}(g)\) is the total number of chromosomes in the population at the generation \(g\), \(n_{k}^{(h)}\) is the number of nodes of the \(k\)th technology as specified by the \(h\)th chromosome in the population at the generation \(g\), and \(\alpha_{c}^{(h)}=n^{-1}\sum_{k=1}^{\kappa}\alpha_{k}n_{k}^{(h)}\). (For the sake of notation, we have omitted in \(n_{k}^{(h)}\) and \(\alpha_{c}^{(h)}\) their dependency on the generation number \(g\).)