## 5 Implementation
### Fire Spreading Based on a Large-Scale Cellular Model  
To analyze the proposed heterogeneous architecture, we simulate a fire propagation phenomenon, as displayed in Figure 7b. We adopted the fire-spreading models as a case study, which is one of the tightly-coupled hybrid model of continuous and discrete-event models, for which inefficient simulation is caused by the single high-speed sequential CPU architecture, but this paper focuses on accelerating the simulation for the cross-coupled complex models of continuous time and discrete event models by utilizing the heterogeneous architecture of CPU-GPU powered hardware platform. The proposed method can be applied to the simulation for the limited cases of sensor-based IoT applications such as the collaborative fire sensor design in the case of a fire-spreading environment. This system is modeled based on the DEVS formalism. Each cell is in an unstable state when the received states of neighbor cells are over a threshold value. This state transition process is modeled in the CS and simulated in the GPU as a proposed method. Each cell is the same as in a DEVS cellular model, and all of the state transition functions in the cells are the same as those in hybrid systems, which have the same differential equations based on the Runge-Kutta method. We can then pick a time to copy the data to the GPU. For a cellular model-based fire-spreading simulation, we can obtain more detailed results by using a large number of cells. The proposed fire-spreading model can be divided into two parts: the overall operation process of each cell, including interaction with neighbor cells and the local state-changing part that is affected by the external and internal states. These two parts are divided into multi-cores and GPUs based on their characteristics that are related to the accelerated simulation. The structure of the DEVS-based fire-spreading model of the hybrid system is displayed in Figure 8. The \(M_{Cell}\) consists of \(M_{Gen}\), which generates states for internal state-change, and \(M_{Proc}\), which changes the neighbor's state value and its own state value. The results of this model evaluation  
Figure 7: (**a**) Simulation flow in proposed heterogeneous architecture; (**b**) case study: fire-spreading on large-scale cellular model (base territory image is captured from earth.google.com). are transferred to the connected state sensing model \(M_{Sen}\), which is used to determine whether the current cell has fire state transition compared to the pre-defined threshold value. Each cell receives temperature data around neighbor cells and determines the next temperature based on its current temperature and heat injections from adjacent cells, for which the propagation model is represented with the differential equation. The temperature variable of this differential equation is compared to the pre-defined threshold value to perform the next transition of stable and unstable state. Therefore, two heterogeneous models of continuous-time model for temperature transition and discrete-event model for fire state transition have a cross-coupled relationship in the simulation process. \(M_{HS}\) is modeled based on the hybrid system's specifications. The specifications of a formal representation of the \(M_{HS}\) model is depicted below. **Definition 1**.