# Modeling and Simulation Tools for Fog Computing--A Comprehensive Survey from a Cost Perspective
## 5 Simulation Tools
\begin{table}
\begin{tabular}{l l l l} \hline \hline
**Work** & **Problem Studied** & **Cost Metrics** & **Simulation Tool** \\ \hline \hline  & \multicolumn{3}{c}{Petri Nets Models} \\ \hline
[47] & Resource allocation & Price and time cost & N/A \\ \hline
[48] & System decomposition into & Price and time cost & N/A \\ \hline
[58] & System for learning process models in IoT edges & Time for discovering and & \\  & & delivering the process model & N/A \\ \hline
[32] & Deployment Mobile Crowd Sensing application & Number of participating & \
\begin{tabular}{l} Emulation \\ (contributors), rate of \\ contributor arrival/departure \\ \end{tabular} &
\begin{tabular}{l} Emulation \\ (Genymotion) \\ \end{tabular} \\ \hline  & \multicolumn{3}{c}{Markov Chain Models} \\ \hline
[46] & Energy consumption in wireless sensor networks &
\begin{tabular}{l} Maintenance costs, \\ energy consumption \\ \end{tabular} & Ansys Software \\ \hline
[39] & Services migration from the edge to the cloud &
\begin{tabular}{l} Operational cost, transmission \\ cost, routing costs, \\ reconfiguration cost \\ \end{tabular} & N/A \\ \hline
[43] & \
\begin{tabular}{l} System performance optimization via optimal \\ management of energy storage system. \\ \end{tabular} &
\begin{tabular}{l} Monetary cost, job losses \\ \end{tabular} & N/A \\ \hline
[45] & Offloading process optimization & Processing and storage costs & Cloudsim \\ \hline \multicolumn{3}{c}{Other Models} \\ \hline
[22] & Fog computing performance for IoT applications. & latency, energy consumption & Custom \\ \hline \hline \end{tabular}
\end{table} 
Table 2: _Cont._supporting basic network parameters [63], (ii) it focuses primarily on resource management, ignoring other important fog computing facets (e.g., mobility, infrastructure, cost) (iii) it supports only tree-like topologies (iv) it does not consider QoS requirements [64]. [PERSON] et al. [64] propose a model for fog computing which consists of QoS profiles, fog infrastructures, IoT applications and eligible deployments. This model is supported by a simulation tool named FogTorch. The simulator is written in Java and allows developers to customize the fog infrastructure (in terms of CPU cores, RAM and storage per node, to define QoS policies related to latency and bandwidth, and to specify the application requirements. FogTorch does not provide a cost model. FogTorchII [65] is an extension of FogTorch, capable of determining deployments of IoT applications over fog computing systems. FogTorchII inherits parameters related to hardware, software, QoS from FogTorch and provides facilities to define QoS for communication links. To simulate the behaviors of communication links, it exploits Monte-Carlo methods which are used to generate sampling probability distributions. FogTorchII provides metrics to estimate and compare resource consumption and QoS accuracy. FogNetSim++ [63] is a simulation framework capable of handling fog networks and devices. It is based on OMNeT++ [66], an open source component-based C++ simulation library and framework, widely used in academia. FogNetSim++ is an event-driven simulator and its main objective is to provide a static or dynamic environment that supports sensors, fog nodes, distributed data centers, and a broker node. The role of the latter is to manage the other devices and their requests. FogNetSim++ supports the execution of resource scheduling algorithms while it also provides an energy model and different pricing models. The pricing model applies to network, storage and compute components for network, storage, compute and other tasks. The simulator provides users with detailed configuration options. It also provides modules for the creation of the network environment, and the users may incorporate their own extensions. The authors claim that FogNetSim++ is scalable in terms of average execution time, CPU and memory usage. [PERSON] and [PERSON] proposed Parallel Discrete Event Simulation (PDES) for fog computing, implemented in C [67].