# Modeling and Simulation Tools for Fog Computing--A Comprehensive Survey from a Cost Perspective
## 1 Introduction
Simulation is a way to mimic the operation of real systems, with the freedom to modify the inputs, and to model a number of characteristics, analyze existing systems or support the design of new systems and helps to identify and balance the cost [9]. It should be, thus, apparent that modeling and simulation are appropriate tools to study and analyze how fog computing and its applications are deployed and act in the intermediate layer between the cloud and the network edges. There are several surveys on fog computing and related issues. They cover fog computing platforms [10]; they analyze challenges, architectures and open issues [2; 4; 6; 11; 12]; they summarize emerging computing paradigms to drive the shift from the centralized cloud computing to distributed edge computing [13]; they focus on resource management [14; 15; 16], or applications [17]. Other relevant surveys examine various aspect of modeling and simulation in the fog environment. [PERSON] et al. [8] investigate simulation challenges in fog and edge computing environments. [PERSON] and [PERSON] [18] consider fog models and the quality of simulators from a software viewpoint. [PERSON] et al. [19] assess the quality of simulators. [PERSON] et al. [20] provide a conceptual review of cloud/fog simulation tools. We note the relation of fog computing to other technologies such as edge computing and mobile edge computing. Edge computing also extends the cloud but in a limited manner, focusing on the IoT devices end, while mobile edge computing provides cloud computing services close to mobile users. While facing similar issues to fog computing, these technologies are distinct [4; 6; 13]. As such, they are out of the scope of this work. We focus on models and on the most recent fog computing simulators. In contrast to previous works, for the first time we consider the cost parameter and its significance in fog computing deployments. In this work, we present a comprehensive survey of modeling techniques and simulation tools for fog computing and investigate how to reduce the system cost in terms of network, application and management/configuration requirements. More specifically, our contributions are:  
* We identify the major research aspects in the area and how modeling and simulation helps towards their solution. * We provide an extensive overview of state-of-the-art fog computing simulation tools, pinpointing their distinct characteristics and the way they address several critical issues such as latency, energy consumption, and so forth. * We underline the limitations of existing tools and highlight open issues and research trends
* We highlight various quantities that can be used as metrics or system parameters when considering the cost dimension  
The rest of the paper is organized as follows. Section 2 serves as an overview of the basic notions and concepts of fog computing. In Section 3 we identify fog computing challenges for the study of which, modeling and simulation can play an important role. Sections 4 and 5 focus on modeling techniques and simulation tools, respectively, for fog computing systems. Finally, Section 6 concludes this work.