## 6 DeepFogSim: Supported Formats of the Rendered Data  
Under the current version of the simulator, both the _DeepFogSim_ and _DeepFogSimGUI_ interfaces (see Appendix A) support four main formats, in order to render the results output by the three main routines of Table 4. The functions, used to obtain these formats, are listed in Table 5 and are described in depth in the _DeepFogSim_ User Guide (see Section 9). These rendering formats are:  
1. the **Tabular** format, which is enabled by the _print_solution_ graphic function;
2. the **Colored Graphic Plot** format, which is enabled by the _plot_solution_ graphic function;
3. the **Colored Time-tracker Plot** format, which is enabled by the _plot_FogTracker_ graphic function; and
4. the **Fog Topology** format, which is enabled by the _plot_Topology_ graphic function. Specifically, the _print_solution_ function prints on the MATLAB prompt the result obtained by running the tested strategies under the selected topology and given input parameters (see Table A2). This function has an optional input parameter that allows the print of the results obtained by the _DynDeF_RAS_ function and the _Static_Allocation_ function, respectively. The function prints, in a numerical form, the results related to the optimized frequencies of the convolutional and classifier processors, the optimized energies \(\mathcal{E}_{TOT}^{(best)}\), \(\mathcal{E}_{COP}^{(best)}\), and \(\mathcal{E}_{NET}^{(best)}\), and the ratio \(\mathcal{E}_{NET}^{(best)}/\mathcal{E}_{TOT}^{(best)}\). If the _Static_Allocation_ is selected in the main script, it also prints the maximum energies \(\mathcal{E}_{TOT}^{(MAX)}\), \(\mathcal{E}_{COP}^{(MAX)}\), and \(\mathcal{E}_{NET}^{(MAX)}\) consumed by the maximal resource allocation strategy and the ratio \(\mathcal{E}_{NET}^{(MAX)}/\mathcal{E}_{TOT}^{(MAX)}\). In addition, the _print_solution_ function prints on the MATLAB prompt the total computing time needed for running all the selected strategies. The _plot_solution_ function opens a number of figure windows, which graphically display the numerical results obtained by the _DeepFogSim_ simulator. This function accepts two optional input parameters, i.e., (i) the number of figure from which to start and (ii) a flag used to choose whether the results returned by the _Static_Allocation_ function must be also plotted. A maximum of eleven different figures may be opened. Specifically, this function displays the traces of the resources allocated by the _DynDeF_RAS_ function (and eventually by the _Static_Allocation_ one) and the related consumed total, computing and networking energy. A figure showing a bar plot of the per-exit actual-vs.-maximum tolerated delay ratio is also provided. \begin{table}
\begin{tabular}{c c} \hline \hline
**Function** & **Asymptotic Computational Complexity** \\ \hline _DynDeF_RAS_ & \(\mathcal{O}(I_{MAX}(2(Q+M)-1))\) \\ \hline _Static_Allocation_ & \(\mathcal{O}(2(Q+M)-1)\) \\ \hline _DynDeFog_TRACKER_ & \(\mathcal{O}((2(Q+M)-1)\times iter\_number\times 3)\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: A synoptic overview of the computational complexities of the main functions supported by the _DeepFogSim_ toolkit. \begin{table}
\begin{tabular}{l l} \hline \hline
**Function** & **Description** \\ \hline plot\_Topology() & Implements the Fog topology format. \\ \hline print\_solution(\(strategy\)) & Implements the tabular format. \\ \hline \(fignumber=\text{plot\_solution}(fignumber,\ options)\) & Implements the colored graphic plot format. \\ \hline \(fignumber=\text{plot\_FogTracker}(fignumber)\) & Implements the colored time-tracker plot format. \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Rendering functions for the supported formats implemented in _DeepFogSim_. The _plot_Topology_ function returns a graphic representation of the Fog topology set in the input configuration for the Fog platform to be simulated. This function reads the global matrix variable \((A)\), which represents the _adjacency matrix_ of the tree.