# Adaptive Test Suits Generation for Self-Adaptive Systems Using SPEA2 Algorithm
## 4 Experiments and Results
### Objective Functions
This metric generates a single value that aids in estimating solutions that are not dominated [34]. For our real-time tests, we set up two feature models of SAS that are adopted for experiments. The two separate SASs are intended to look at the universality and application of SPEA2-SAS across various parameters. The proposed approach assists in showing how SPEA2-SAS may be used to analyze various feature models, reliance designs, environmental variables, aspects of quality targets, and levels of objective differences. In general, the large number of constraints means the feature model SAS is under more pressure, which reduces the number of viable solutions and increases the complexity of the issue. The objective is to continuously decrease the following two incompatible quality criteria in the form of two-objective optimization. We believe this is the case because, even though SPEA2-SAS can direct the search for better solutions, the advantages of avoiding the exploration of invalid solutions, which could be highly unbalanced for the competing objectives, have been overshadowed by randomly choosing a solution for adaptation from the final non-dominated options. In our experiments, the parameters have been customized for runtime efficiency concerning quality and overhead, or they are standard values. SPEA2 used in the experiments is extended from the MOEA framework [21]. Table 1 shows the SAS feature models selected for the experimentation process. The two feature models have been selected: SmartHome 2.2 and Coche Ecologico; their attributes have been mentioned in detail in Table 1, like the total number of features, configurations, and number of pairs. Table 2 describes the number of parameters that have been adopted in our experiments. Before starting the experiments, parameter settings are adopted. To have a consistent outcome and to compare the effectiveness of the algorithms used in experiments, the fixed parameters have been decided upon at the beginning. The population size, the maximum number of assessments, the size of FM, crossover, and mutation rates are the selected parameter values. The number of evaluation iterations for each FM and method is the specified benchmark to determine whether to discontinue the experiment process. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Feature Models** & **Features** & **Configurations** & **Number of Pairs** \\ \hline Smart Homev2.2 & 60 & \(3.87\times 10^{9}\) & 6189 \\ \hline Coche Ecologico & 94 & \(2.32\times 10^{7}\) & 11,075 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Feature model SAS. Table 3 displays the feature models (FMs) chosen for the experiment in the first column, along with the methods, solutions, generation convergence, and elapsed time (in milliseconds) in the other columns. The duration of time that an algorithm takes to complete from beginning to end is known as the elapsed time. The amount of time is expressed in milliseconds. The proposed approach generated solutions that maintain a balanced trade-off between all objectives. This is especially intriguing since SPEA2-SAS targets situations where the relative relevance of SAS's competing objectives is uncertain and their quantification is too challenging. These balanced solutions are probably to occur around the obvious curve, showing a good compromise of solutions in terms of two objectives, as we can see in Figure 4, which offers options that minimize both the number of test cases and cost. These Pareto front solutions, also known as the extreme solutions, are often the ones that have the worst outcomes for each individual target. Finding these solutions in a non-dominated set is comparable to seeking the solution or solutions with the greatest general distance from the set's extreme solutions. To accomplish this, we implement a SPEA2 technique for selecting just one solution from the MOEA results set. We are given the final non-dominated set produced by the feature-guided MOEA, as illustrated in Figure 4. SPEA2-SAS may operate with a variety of MOEAs with no loss of generality.