## 5 Performance Evaluation
### Experimental Results
#### 5.2.2 Scenario 2: Task Scheduling in Cloud-Fog Environment
The best solution was found in 240 th generation; afterwards, the fitness range narrowed, meaning the population gathered around the extreme. TCaS converged after 300 generations. The mechanism of BLA that all drones perform crossover operator with only one queen each generation made the population easily fall into local extreme. Similarly, in MPSO, the leader had a great influence on every particle in the population, thus there was high probability that the population fell into local extreme when the leader was stuck. Consequently, both algorithms converged quickly with low fitness values. Meanwhile, the proposed TCaS algorithm maintained population diversity, thus could reach more optimal solution. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{**Number**} & \multicolumn{4}{c}{**Makespan (s)**} & \multicolumn{4}{c}{**Total Cost (GS)**} \\ \cline{2-9}  & **TCaS** & ** BLA** & **MPSO** & **RR** & **TCaS** & ** BLA** & **MPSO** & **RR** \\ \hline
40 & **114.37\({}^{\star}\)** & 185.37 & 157.41 & 313.01 & 861.53 & **811.34** & 811.45 & 859.96 \\
80 & **232.91** & 368.78 & 352.50 & 965.32 & 1817.90 & 1732.46 & **1689.26** & 1793.53 \\
120 & **357.42** & 580.29 & 546.70 & 1267.54 & 2779.72 & 2639.79 & **2583.55** & 2687.34 \\
160 & **515.38** & 776.68 & 763.41 & 1729.19 & 3694.69 & 3543.08 & **3464.33** & 3587.65 \\
200 & **633.28** & 894.42 & 873.06 & 1521.44 & 4403.63 & 4247.69 & **4134.09** & 4323.92 \\
250 & **816.59** & 1127.48 & 1112.33 & 2190.21 & 5485.85 & 5349.45 & **5155.44** & 5411.28 \\
300 & **1052.92** & 1436.58 & 1375.54 & 2861.95 & 6740.36 & 6591.75 & **6405.11** & 6666.58 \\
350 & **1241.28** & 1628.91 & 1583.82 & 2835.65 & 7666.27 & 7553.36 & **751.25** & 7610.78 \\
400 & **1486.92** & 1925.29 & 1864.29 & 3139.76 & 8877.14 & 8763.91 & **882.87** & 8792.12 \\
450 & **1754.18** & 2251.06 & 2168.70 & 3653.46 & 10,124.56 & 10,033.83 & **9682.45** & 10,026.13 \\
500 & **1994.21** & 2512.40 & 2425.86 & 4633.48 & 11,299.53 & 11,219.18 & **10,823.84** & 11,266.31 \\ \hline \hline \end{tabular} \({}^{\star}\)The bold indicates the superiority of the corresponding algorithm throughout four algorithms.  
\end{table} 
Table 8: Makespan and total cost comparison of the four algorithms. Figure 7: Convergence comparison between three evolutionary algorithms. Figure 8 indicates the effect of balance coefficient \(\alpha\) in time and cost achieved by TCaS algorithm when a set of 120 tasks was processed. In the case \(\alpha=0\), monetary cost was maximized, however makespan was too large at 1827 s because many tasks were assigned centrally to cheap nodes. When \(\alpha\) = 0.5, makespan was improved 5.09 times while 1.20 times of total cost was needed compared with case \(\alpha=0\). Increasing \(\alpha\) gradually to 1, the scheduling length decreased slightly together with a small amount of cost added. This is because execution time was more concentrated to be optimized than cost. This experiment showed that, by adjusting the balance coefficient \(\alpha\), our model could flexibly satisfy user's requirements when they are interested in high performance execution or cost efficiency.