# A Model-Driven Approach for Solving the Software Component Allocation Problem
## 6 Results and Discussion  
This section presents the results of mainly three sets of experiments. The first one compares our framework against approaches which use meta-heuristics for solving the CAP. In the second set of experiments, we compare our framework against SCALL. In the final set of experiments, we apply our framework in optimizing container allocations to heterogeneous devices in the contexts of Fog Computing and next generation wireless network planning. In the first set of experiments, we apply our framework to solve the component allocation problems presented in [19]. These problems were collectively referred to as _Systems_ 0 through 9. The models corresponding to the systems were obtained from the GitHub project on [36]. All of the models conform to the component allocation problem meta-model in [19]. The definition of these allocation problems was based on a realistic deployment problem of a vision-based software system on an autonomous underwater vehicle [16]. The allocation problems presented in [19] are of different sizes. For the allocation problems corresponding to _Systems_ 0 to 4, the number of components is \(C=11\) and the number of units is \(U=4\). For _Systems_ 5 and 6, the number of units is \(U=8\) and the number of components is the same as that of _Systems_ 0 to 4. For _Systems_ 7 and 8, \(U=16\) and \(C=22\). _System_ 9 represents the largest allocation problem and is composed of \(U=32\) units and \(C=30\) components. There are \(M=3\) resources in all of the systems. The corresponding meta-model is the source meta-model for the model transformation example considered in Section 5.4. Table 3 compares the optimal cost results found by using our framework against those found by using implementations of two meta-heuristics for solving the component allocation problem: the first one is a genetic algorithm (GA), and the second is an ant colony optimization (ACO) algorithm. These implementations were presented in [19]. For the GA, the number of generations was set to 10,000, and for the ACO the number of iterations was 200. More details on the setup and parameters used for both meta-heuristics can be found in [19]. It is clear from the results that our framework returns optimal allocations that are the same or better (i.e., have less allocation cost) than those found by the GA and ACO meta-heuristics. This is especially true for large component allocation problems, such as those in _Systems_ 7-9. Figure 7: Visualization of three solutions using petal diagrams. Table 4 shows the execution times comparing GA, ACO, and our framework. The reported statistical measures are based on samples of 10 runs for each system. The execution times are the elapsed times for executing the solvers, and they exclude the times for reading the input models and generating the output models. The experiments were carried out on a desktop computer with a 3.70 GHz dual-core processor and 8 GB RAM. The results indicate that the execution times for the GA and ACO are several orders of magnitude larger than the execution times incurred by our framework. At the same time, the optimal allocations returned by our framework are better, as demonstrated in Table 3.  
Figure 8 shows the Pareto fronts obtained by the multi-objective optimization of _Systems_ 1 and 9. Without loss of generality and due to space constraints, we only include the results for these two systems. The scatter plots in the figure present visualizations of the objective space showing the non-dominated solutions in the Pareto fronts. For _System_ 1, we implemented an exhaustive search algorithm to determine the Pareto front. The non-dominated solutions found by the exhaustive search method are colored in orange. On the other hand, the non-dominated solutions found by using our framework are marked with the character x. The Pareto fronts for _System_ 1 are shown in Figure 8a. The figure shows that the set of non-dominated solutions found by our framework is a subset of the set of non-dominated solutions found by the exhaustive search method.