## 5 Simulation Results  
The proposed SAPKM formulation was evaluated on various real networks from the Internet Topology Zoo [40], and the comparisons on the performance of the SAPKM and other algorithms, i.e., OEAJ and SACA, were analyzed by simulation. If interested in the details of the proof of the computational complexity of OEAJ and SACA, readers can refer to Theorem 1 and 2 in [24]. Six real network topologies with distinguishing intrinsic properties were included: Nsfnet, Aamet, ATT, Agis, Geant, and Chinnet, with detailed topologies and failure probability settings listed in Table 3[24]. In order to obtain stable performance, we repeated random placement algorithms 1000 times and took the average value. All the algorithms were performed in MATLAB (R2018a) running on a MacBook Air, with 1.8-GHz Intel Core i5 CPUs and 8 GB of 1600 MHz DDR3 RAM. The simulation consisted of the four following steps: First, topology settings were referenced from the Topology Zoo, including the node coordinates and the links among them. Then, the Dijkstra algorithm was employed to choose the shortest path between any two nodes, and the length of the corresponding path was computed by the Haversine formula. Furthermore, the associated network latency was calculated with propagation velocity \(c=2\times 10^{8}\) m/s [41]. Finally, with the above look-up topology data and topology settings on failure probability, joint gateway, and controller placement were solved by various efficient algorithms to maximize the system reliability with network latency constraints. In order to evaluate the performance and complexity of the proposed algorithm, we compared SAPKM with two other representative solutions, OEAJ and SACA. The former is the theoretically best solution to the joint placement problem since all results are enumerated and compared. The latter is an efficient algorithm proposed by [24], which applies the Simulated Annealing and Clustering hybrid Algorithm (SACA) to obtain a near-optimal result solution. It is noted that the authors in [24] proved the superiority of SACA in reliability over other algorithms, i.e., RANDJ, SAKM. Thus, we mainly focused on the comparison results between SAPKM and SACA. We first evaluated the SAPKM algorithm in comparison with the above solutions and then demonstrated how the reliability was enhanced in large topologies with less running time. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Topology** & **Number of Nodes** & **Number of Links** & \(\mathbf{P_{u}}\) & \(\mathbf{P_{e}}\) & \(\mathbf{P_{e_{\infty}}}\) \\ \hline Nsfnet & 13 & 15 & [0, 0.05] & [0, 0.02] & [0, 0.02] \\ Aarnet & 19 & 24 & [0, 0.05] & [0, 0.02] & [0, 0.02] \\ ATT & 25 & 57 & [0, 0.06] & [0, 0.04] & [0, 0.03] \\ Agis & 25 & 30 & [0, 0.06] & [0, 0.04] & [0, 0.03] \\ Geant & 37 & 58 & [0, 0.08] & [0, 0.08] & [0, 0.05] \\ Chinnet & 38 & 62 & [0, 0.08] & [0, 0.08] & [0, 0.05] \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Topology and failure probability settings. Figure 2 demonstrates the comparison results of the overall running time in different topologies when the number of gateways was five. Figures 4 and 6 show the overall running time in Agis and Chinnet when the number of gateways varied from 1-5. It is obviously depicted that PKM and SAA had a short running time, while the running time of OEA increased exponentially as the number of gateways became larger. Besides, the computational complexity of PKM was much lower than that of SAA, with less than 1 ms to converge. Figure 5: Comparisons of the overall average network latency in Agis. Figure 6: Comparisons of the overall running time in Chinnet. Figure 7: Comparisons of the overall average network latency in Chinnet. On the other hand, Figure 3 demonstrates the comparison results of average network latency in various topologies when the number of gateways was five. OEA obtained the optimal solution with the lowest average network latency, while both SAA and PKM acquired near-optimal solutions.