# A Methodology for the Design of Application-Specific Cyber-Physical Social Sensing Co-Simulators
## 2 State of the Art
### Particularization of the General Simulation Model and Simulation Lifecycle
#### 3.3.2 Simulation Lifecycle
Some considered models (see Figure 6) are _person_, _behavior_ (describe individual and collective human behavior), _environmental elements_ or _actuators_, _sensors_ (describe the physical characteristics of the AmI environment). Domain Specific Languages (DSLs) are used to create simulation models by model-driven development techniques. Other end-user development tools present in the co-simulation framework will be used to transform these models to simulation specifications. These tools are reusable across domains and permit the developer or any other stakeholder to describe specific aspects of the problem. Some questions arise regarding the correct definition of the simulation model. Are there many simulation models in the literature or this is the very first of its kind? Is the underlying social theory correctly instantiated using proper methods and algorithms? Figure 7: Basic simulation lifecycle. **Experiment definition:** Simulation experiments take into account the selected models depending on the aspects to be addressed. It is foreseen to take into account the agent behavior, and all the key elements included in the particular developed simulation model. Simulations addressing one or more of these aspects will be produced and evaluated by the developers. The required simulations will be described by the experiments model and will incorporate specific information, such as building blueprints or device limitations. Experiment definition is done via configuration tools. Particular applications are chosen and different models are selected (users, populations, spaces, actuators, sensors), and combined, and then the different experiments that are going to be applied are prepared. Experts would facilitate end-users the task of creating those experiments by reusing existing information and allowing them to decide which information should be extracted from the simulation, for its later analysis. The result of applying these tools would be simulation specifications. Simulation execution in co-simulation system: The problem to be simulated is parameterized, producing the problem specific components the reusable co-simulation framework requires. Actions from the experiment definition and control system behavior are applied on the simulation so as to affect the simulated actors and to product the expected effect. The system would be adjusted to deal with the different situations that might occur: necessity of repeating stimulus (without saturating the audience), unexpected problems with devices, etc. Besides, communication among devices is tested, assessing effectiveness and cost. Possible problems like bandwidth, transmission quality, etc., must be also validated. **Simulation verification:** A verification step is required to ensure that simulation model and experiments were well-defined. In this step passive and active tests are conducted to verify that the model is behaving in the way it is intended to behave (internal validity). Also, some tools and techniques such as code debugging, unit testing, profiling [129] as well as test suites (histograms, spatial analysis, pattern matching, etc.) must be considered, as these techniques allow us to validate the proposed model and the implementation of the framework. Some questions arise: In terms of the definition and implementation of social behavior, is the underlying social theory correctly instantiated using proper tools or programing languages? In terms of computational efficiency, how efficient is the implementation of social behavior in terms of using computational resources? Is there any architectural implication in the publication and acquisition of user behavioral models? **Results analysis**: Experiments are analyzed according domain knowledge to improve our current model and identify new needs. When the experiments are successful, an exhaustive documentation is thus available about how the system is wanted to behave. The work carried out can be used to track the behavior in the real setting.