## 3 Simulation Framework
### Simulator Structure  
Wireless mesh networks, _ad hoc_ networks and sensor networks are rather diverse when it comes to their applications and the underlying networking technologies; therefore, devising a generally applicable system simulation model is more challenging. The layering in our framework roughly follows the conventional ISO/OSIlayer model, but, depending on the specific standard and the simulation goals, the partitioning of the functionalities within the layers does not necessarily follow the conventional layering. The main components of the proposed framework are shown in Figure 2. These are:  
1. The application model, if present, models the behavior of the application associated with the system. Specifically, in the cyber-physical context, the application is often one or more networked control system consisting of plants, sensors, controllers and actuators.
2. The routing model specifies the end-to-end forwarding of packets within a multi-hop network.
3. Closely integrated with the routing model, the data link model is typically responsible for modeling the logical link control and the media access functionality within the respective wireless standard. In a wireless system, these functionalities include scheduling of the physical resources, queueing, link-level retransmission handling and providing multiple-access facilities. This model relies on the link performance model, which ultimately decides whether a certain link-level frame is successfully received by the respective receiver(s). In order to support systems relying on channel-dependent scheduling, this model can be complemented by the link measurement model that derives (either ideal or realistic) channel state information for the nodes, which typically will be used for scheduling users and/or transmission resources. In half-duplex sensor networks, these measurements are typically acquired from channel state feedback or by exploiting the reciprocity of the wireless channel between two nodes.
4. The space-time engine provides the link performance model with instantaneous channel realizations, which are generated using the geometry of the scenario, according to the specified channel models.
5. Finally, the network manager module might contain functions pertaining to centralized network management or any kind of cross-layer information flow that relates the interoperability of the modules. It might also contain some functionalities required for managing the simulations.  
We focus on proposing accurate, but efficient link performance models and realistic space-time models that can reproduce common propagation phenomena observed in wireless networks.  
Our simulator has a lower layer focus, and it omits some details of the actual protocols, which conventional packet-level simulators model in full detail. Depending on the application, such details might consist of packet exchanges associated with network configuration, node synchronization, mobility, _etc._ Our simulator follows the \"simulation drop\" concept: the simulation consist of multiple, independent Monte Carlo drops. A drop means an independently-generated initialization set for the simulation parameters and the subsequent temporal evolution of the same simulation scenario, during which the scenario geometry and the large-scale fading parameters are kept constant. For a subsequent drop, the large-scale fading parameters and, depending on the simulation goals, the entire node deployment will be randomly re-generated [4]. The drop concept ensures that the results are representative and statistically significant for the investigated scenario and not only for a particular configuration. Omitting the detailed message exchange allows us to run a large number of drops with low computational complexity, despite the high fidelity of the link performance models and channel descriptions.  
In most applications, we assume at the beginning of each simulation drop that the network has been configured.