## 3 Methods
### Network Planning and Genetic Algorithm
#### 3.4.2 ML + GA Based Network Planning Approach  
To find the deployment with a minimal number of 5G APs, while still providing the required quality of service, we used the architecture in Figure 1, and the link budget parameters from Table 2. The core of the architecture is a GA [13] taking as inputs the floor plan and the PL estimation (only one time calculation) made with the ML algorithm for every possible AP-Rx link (we refer the reader to Section 4.2.1 for more details). The output is a wireless network deployment with a minimal set of APs, that provides the required coverage at all the points inside the building, according to the ML-based PL model. It is then required to verify this coverage percentage with the actual IDP PL model. Genetic Algorithm  
Figure 2 shows a flow graph of the GA developed to find the minimal number of APs that can provide the required bit rate, according to the parameters from Table 2. Logically, Rx locations are excluded as possible AP locations in the optimization process. Each \"individual\" in the population corresponds to a possible network solution and is characterized by an array containing the state of the respective APs, where each AP corresponds to a gene of a solution. Every individual solution \(X_{i}\), \(i=1\ldots\) _population_size_ is represented by an M-dimensional vector, where M represents the number of candidate APs, of which the locations are set on a 4 m grid spanning the entire building (we refer the reader to Section 4.2 for more details). The parameter _population_size_ is set to 100. \[X_{i}=(X_{i,1},\ X_{i,2},\ldots X_{i,M}) \tag{5}\]  
with \(X_{i,j},j=1\ldots\). \(M\), a gene of solution \(X_{i}\), representing either switched off (set to 0) or switched on (set to 1). The GA starts with an \"Initialization\" step during which the scenario parameters are set. It defines the \(Rx_{Min}\), which is equal to the Rx threshold defined in Table 2 for each throughput. After the initialization phase, all candidate APs are randomly switched on \begin{table}
\begin{tabular}{l l} \hline \hline
\begin{tabular}{c} **QPSK** \\ **[dBm]** \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameter settings for the network optimization. CQI is the Channel Quality Indicator. SNR is the Signal to Noise Ratio. Rx is the minimal received power to satisfy the SNR requirement accounting for the given shadowing and fading margins. Figure 2: Flow graph of Genetic Algorithm for network deployment. (set to 1) or off (set to 0). Each iteration _it_ (_it_ = 1,..., _max_it_, _max_it_ = 100) consists of the following consecutive steps. * **Sorting**--sort all previous individuals (solutions) by their score values. The score is based on the characteristics of the solution, where coverage of all grid points is a hard requirement, and where a minimal number of deployed APs is desired, with (optionally) a maximal \(AVE_{Rx}\) value. This leads to the following score formula: \[Score=2\big{(}100-cov_{perct}\big{)}+AP_{dep}+0.05(Rx_{Min}-AVE_{Rx})\] (6) where \(cov_{perct}\) is the percentage of grid points that are covered with the minimum Rx level, \(AP_{dep}\) is the sum of the active gene (APs switched on) of solution \(X_{i}\) (see Equation (3)), \(Rx_{Min}\) is equal to the \(Rx\) threshold defined in Table 2 for each throughput, and \(AVE_{Rx}\) is the received signal level average of 100% of grid points. * **Crossover**--from the sorted population, a new population is created where the _best_individuals_ (five individuals) from the previous population are transferred unchanged to the new population. The other new child solutions (_population_size_--_best_individuals_) are obtained from a crossover operation between two individuals, each chosen as the fittest individual out of a set of 5 random individuals from the population of the previous generation. Each child gene is inherited from either one of the corresponding parent genes, with equal probability. The newly created child solution is added to the new population.