# A Methodology for the Design of Application-Specific Cyber-Physical Social Sensing Co-Simulators
## 1 Introduction
In that situation, the role of software architects is vital, as they must guarantee that the selected design or solution is the most adequate for every case: depending on the application, the users' needs, the acquired requirements, the development team and the simulations to be performed (among other topics). In order to obtain a truly correct, efficient and functional co-simulator, appropriate to each specific situation, all important factors must be considered following an ordered process. However, the methodology that software architects should follow in order to acquire the users' requirements and select their own design for an application-specific co-simulator has been scarcely studied: only partial and incomplete proposals have been reported. Therefore, in this paper a methodology for the design of CPSS co-simulation tools is proposed. The work describes the four steps that software architects should follow in order to design their own application-specific CPSS co-simulator, as well as the previous phase of requirements and characteristics capture involving both software architects and final users. The proposal includes from the characteristics fixing and the selection of the most appropriate co-simulation paradigm, to the choice of the graphic environments for results presentation. The paper provides, also, the first practical use case of the proposed methodology, implementing the obtained design using currently available technologies. Finally, results obtained from the implemented CPSS co-simulator are included. From the analysis of these experimental results, future challenges and research lines are identified. During the last months CPSS has become a very popular research topic. Different works about the applications of the CPSS paradigm to social Big Data [32], robotics [26], people tracking [27] and wireless sensor networks (WSN) [33] have been recently reported. In most of these papers, experimental validations are based on laboratory deployments, theoretical analyses or concept proofs [24]. However, some variables (such as scalability) are not easily evaluable using these techniques and/or imply a huge cost. Thus, papers consisting of an exhaustive evaluation of algorithms for CPSS or other similar proposals usually include the design and implementation of a CPSS co-simulator [34; 35]. A commercial co-simulator may require several months or years before it can be released, however, many times, CPSS researchers need to design and built and ad-hoc co-simulator in order to evaluate the performance of their proposals. The scope of these instruments is to be used as a general-purpose CPSS co-simulator, but be employed in a specific application. In that way, the objective of this paper is to guide every researcher working on CPSS (which sometimes does not have technical knowledge on programming or simulator construction) during the design process of his own application-specific co-simulator. The rest of the paper is organized as follows. Section 2 reviews previous works about methodologies for co-simulation tools design and describes the state of the art in social, physical and cyber simulation. Section 3 describes the proposed methodology and discusses the requirements all CPSS co-simulator should fulfill. Later it deeply discusses the four steps which made up the proposed methodology, including the requirements capture and characteristic fixing, the different available co-simulation paradigms, the simulation model and simulation lifecycle, the different coordination and synchronization mechanisms, and the different options for the graphic environment for results presentation. Section 4 describes the first use case of the proposed methodology and the proposed experimental validation in order to evaluate its performance and the correctness of the proposed methodology. Finally, Section 5 shows the results obtained from the experiments. Section 6 concludes the paper and refers some future challenges.