# ST-DEVS: A Methodology Using Time-Dependent-Variable-Based Spatiotemporal Computation

## Abstract

**:**

## 1. Introduction

_{ST-DEVS}) and coupled model type (N

_{ST-DEVS}), respectively. In Section 4, an example of an action execution on a simple transportation system is presented. The desired goal is presented by a TL rule, and the execution process is demonstrated until the goal is achieved. In Section 5, various issues and important design considerations related to ST-DEVS are discussed. The final section concludes this paper with a summary of the motivations and contributions of the proposed methodology, as well as future research directions.

## 2. Related Work and Background

#### 2.1. DEVS Formalism

_{int}, δ

_{ext}, λ, t

_{a}),

_{int}is the internal transition function expressing state transitions due to internal events, δ

_{ext}is the external transition function expressing state transitions due to external events, λ is the output function generating external events at the output, and t

_{a}is a time advance function.

_{d}| d∈D}, EIC, EOC, IC, Select),

_{d}is the component, EIC is the set of external input coupling that connects external inputs to component model inputs, EOC is the set of external output coupling that connects external outputs to component model outputs, IC is the set of internal coupling that connects component outputs to component inputs, and Select is the tie-breaking function [1,2].

#### 2.2. TL and BM-DEVS

**∪**for the continuation until some future moment, and W for the continuation excepting some future moment [26].

_{BM-DEVS}rules, within a coupled model that consists of multiple component models. The structure for the basic models is the same as that of DEVS, and the coupled models are defined by the structure

_{BM-DEVS}= (N, P, B, Z

_{f,p}),

_{d}×P, where P

_{d}is a set of sequential phases of component models; and d∈D, where D is a set of component names. The phase is a symbolic name representing the state of a model.

_{BM-DEVS}rules describing the trajectories for monitoring. A TL

_{BM-DEVS}rule is a TL implication formula whose arguments are BM-DEVS models.

_{f,p}is a set defined by Z

_{f,p}= {(f

_{b}, p)|f

_{b}∈F

_{b}, b∈B, p∈P} ⊆ (∪

_{b}

_{∈}

_{B}F

_{b}) × P, where F

_{b}is the set of final states of b. That is, Z is a translator function that maps the final state of b into a phase of the N

_{BM-DEVS}model.

#### 2.3. Automata, Set Theory, and Logic

_{0}, F)

**,**where Q is a finite set of states, Σ is a finite input alphabet, q

_{0}in Q is the initial state, F⊆Q is the set of final states, and δ is the transition function mapping Q × Σ → Q [29,30]. In the formalisms described in this study, basic concepts and notations of set theory are used, such as: union ∪; member ∈; subset⊆; cartesian product ×; and logical operators, such as implication => and ˄ [31].

## 3. ST-DEVS Formalism and Action Execution Algorithm

_{ST-DEVS}), which is executed by the proposed execution algorithm to monitor and execute actions in the software systems that control the real systems. The monitoring capability is provided by integrating BM-DEVS [6], a previously defined formalism for monitoring the behaviors of models. Therefore, this article mainly describes how action rules are interpreted and executed to achieve their goals.

#### 3.1. ST-DEVS Structure

_{ST-DEVS}) are embedded in coupled models because they involve building larger models from components, and the components’ information required to execute the actions on the components is available.

_{ST-DEVS}= (M, G, ⸹*),

- M is a DEVS basic model [1],
- G is a set of goals that can be achieved by this model, and
- ⸹* is a state transition function that maps ⸹*: S × G → S, where S is a sequential state set. That is, the function is executed on receipt of a ⁎-message to achieve a goal, or one of the subgoals in the parent’s action rule, TL
_{ST-DEVS}.

_{ST-DEVS}= (N

_{BM-DEVS}, G, B

^{a}, GA, DG)

- N
_{BM-DEVS}is a coupled model defined by BM-DEVS [6], - G is a set of goals that can be achieved by this model,
- GA is a goal−to−action rules translation function that maps GA: G → B
^{a}; that is, the GA function determines the action rule to be executed once a goal is received from the parent. - DG is a done−to−goal translation function that maps DG: B
^{a}× DONE → D × G^{s}, where DONE is a set of done messages received from components whenever a state transition in the components is completed. G^{s}is a set of subgoals that can be achieved through component models. G^{s}is described in B^{a}or TL_{ST-DEVS}rules. D is a set of component names for each d in D, where d∈ D. That is, the DG function determines the next subgoal once a done message is received.

#### 3.2. Execution of the Action Rule, TL_{ST-DEVS}

_{ST-DEVS}, is similar to a TL implication formula. The difference is that the rule arguments are ST-DEVS models, the types of which are either atomic or coupled models. Figure 1 shows an action rule example (upper area) and its corresponding Büchi automaton (lower area) [27,28]. The action CM.θ ˄ ◊(P1.α ˄ ◊P2.β) => CM.ω states that if the current moment CM is at state θ, and sometime in the future P1 is at state α, and later in the future P2 is at state β, then make the CM transition to state ω. The structure of the CM is shown in Figure 2. The goal (CM.ω) appears in the consequent of the rule, where the CM is a model and ω is a state of the model indicating the goal or goal state of the model, which is achieved by executing the action rule. P1 and P2 are component models of the CM, and α and β are subgoals to be achieved for the antecedent of the action rule to be true. That is, for the action rule to be triggered, the components P1 and P2 must arrive at their goal states α and β, respectively.

^{a}, after being translated into the Büchi automaton [27,28] b

^{a}, causes the state transitions to reach the subgoals P1.α and P2.β, expressed in the rule condition. State s2, shown in the BA, is the final state, and reaching it indicates the subgoals are completed. Completing the subgoals renders the condition of the rule true and thereafter, the goal of the rule (CM.ω) is reached. Here, P1 and P2 are atomic models.

#### 3.3. Action Execution Algorithm of an Action Rule, TL_{ST-DEVS}

^{a}, translated from the action rule r

^{a}. The execution algorithm is invoked upon receipt of a ⁎-message [1] from the parent, which delivers a goal in the message to the abstract simulator. If the abstract simulator that receives the message is a coordinator (i.e., an abstract simulator for a coupled model [2]), then the manner in which the goal can be reached is described in b

^{a}. Otherwise, if the abstract simulator is for an atomic model, the goal is achieved by δ* of the model. To trigger the action rule through b

^{a}, the final state of the automaton must be reached. This requires all the preceding states leading to the final state to be reached first, which in turn requires the subgoals associated with the arcs in b

^{a}to be achieved (Figure 2). The subgoals are achieved by issuing ⁎-messages to the corresponding component models. After a ⁎-message is sent to a component, the sender coordinator waits for a done message from the component. The done message [1] is received from a component whenever a ⁎-message is sent to the component. If the received done message is from one of the components that appear in the invoked action rule, namely the rule currently being executed, and it indicates the achievement of the subgoal sent along with the ⁎-message, then the coordinator also checks whether the message is the last done message needed to reach the final state of the automaton b

^{a}. If the final state of b

^{a}is reached, then the corresponding coupled model transitions to the state described in the consequent of action rule r

^{a}. If the done message belongs to the action rule but is not the last done message, then the next ⁎-message is issued to the corresponding component model. If the done message does not belong to the action rule, it is ignored by the action processor or action execution algorithm.

^{a}, CM.θ ˄ ◊ (P1.α ˄ ◊ P2.β) => CM.ω, as shown in Figure 4. The top of the figure shows the arrival of a ⁎-message, ⁎(ω), indicating that the goal of the CM is ω. Because the consequent of the rule is CM.ω, this particular rule is invoked to trigger the antecedent; that is, the goal CM.ω is regressed to cause the antecedent of the rule CM.θ ˄ ◊(P1.α ˄ ◊P2.β) to be true. While triggering the rule, b

^{a}is used until the condition becomes true. If the current state of the CM is θ, then the action execution algorithm sends a ⁎(α) message down to the P1 model, indicating that P1 should achieve the subgoal α. Upon receipt of the message, P1 executes δ* to transition to the +α state; the state name +α describes that it is the state that performs operations necessary to reach the goal state α. Immediately after completing the state transition to +α, done(+α) is returned to the CM from P1 with the current state value of P1, +α. Because P1.+α makes a state transition from s0 to itself, there is no state transition to s1 in b

^{a}. Later, when P1 transits to α, done(α) is sent to the CM, which triggers a state transition from s0 to s1 in b

^{a}. Simultaneously, when P1 transits to α, the output function λ of P1 is executed to deliver its output to the P2 model for subsequent processing. P2 executes its external transition function δ

_{ext}to transition to state s’ after receiving the input sent from P1. Once b

^{a}is in s1, the next message, ⁎ (β), is sent to P2. The rest of the procedure is similar to the case when ⁎(α) was sent. Later, when done(β) arrives at the CM, b

^{a}transitions to its final state s2, which indicates that the condition of the rule r

^{a}is true. Once it becomes true, the CM transitions to the ω state and done(ω) is sent to the parent, indicating that the goal ω is achieved.

_{ext}and that of the done message are not shown in Figure 4 for the sake of simplicity. The internal transition function δ

_{int}is executed when an atomic model must make a state transition other than those that are due to an input and ⁎-message without a goal, as shown in P1 and P2.

^{a}is processed over time until the goal of the CM is achieved. The top part of the figure shows four rectangles corresponding to the CM model, C:CM (CM’s abstract simulator), S:P1 (P1’s abstract simulator), and S:P2 (P2’s abstract simulator). The execution of the state transition functions of the models and the necessary processing occurs within the abstract simulator counterparts. The models store state transition functions, state variables, and other information regarding the models. Therefore, when explaining the activities related to a certain model, the abstract simulator and model are not usually distinguished, as shown in the explanation regarding Figure 4. The activities shown in Figure 5 are self-explanatory because the order of the activities is already described in Figure 4. The GA is a goal−to−action rule translation function that determines the action rule to be invoked when a ⁎-message arrives. For example, in Figure 5, the action rule r

^{a}or b

^{a}is invoked when ⁎(ω) arrives. The DG is a done−to−goal translation function that determines the subgoals to be achieved next or where to send the next ⁎-message upon receiving a done message if it is not the last done message. If it is the last message, then DG returns a null value, indicating that the rule is triggered or the final state of b

^{a}is reached. In Figure 5, when done(α, t2) is received from P1, ⁎(β) is sent to P2 as the next message in response to done(α, t2).

## 4. Example Application of an Action Rule

## 5. Discussions

#### 5.1. Time-Dependent Variable

_{ST-DEVS}) and an action execution algorithm that executes the rules.

_{ST-DEVS}defined for a time-dependent variable of ST-DEVS determines the return value to be stored in the time-dependent variable, which is necessary for an action execution. If it is a monitoring rule, then the return value necessary for monitoring is stored. Action and monitoring rules express the state trajectories of models, where the trajectories are time−to−state mapping functions. Therefore, the time-dependent variables of ST-DEVS are general-purpose variables that can be used depending on the type of rule in which the time-dependent variable is an argument.

_{ST-DEVS}rules. Note that the rules are stored within the variable, variables are used as arguments of the rules, rules are stored within the variables, and so on, which continues until the bottom level variable is reached. That is, the structure of the variable or model is recursively defined to construct a hierarchical modular model or a compound temporal data structure, which is necessary to represent and store the behaviors of complex and large real systems. The hierarchical modular model construction is possible because the proposed formalism is extended from the DEVS [1,2] formalism.

#### 5.2. Important Considerations of ST-DEVS Implementation

_{ST-DEVS}rules can be used for both monitoring and action execution. Otherwise, the rules can be separately defined, and monitoring results can be used for initiation of the action execution, or vice versa.

_{ST-DEVS}(5) and N

_{ST-DEVS}(6), G, which is a set of goals, is one of the constituent elements of the formalism. G is included in the formalism, even if a model knows what its available goals are, because G is needed for a parent model to define action rules whose arguments are formed by component models and their goals, such as P1.α or P2.β, where α and β are the goals of the P1 and P2 models, respectively. When the goal itself can clearly indicate what the model is, then the argument can be defined by the goal alone (e.g., trp(x, B)), meaning the transporter should be at station-B with item x in it.

**○**is incremented when a done message is received from the component model if the model appears in the invoked action rules or monitoring rules; multiple rules of different types can be invoked at any instant. Both types of rules attempt to achieve their own goals through action execution and monitoring algorithms. The receipt of a done message [1] indicates that a state (or phase) change has occurred, which means that a subgoal has been achieved. If the state change at the component does not achieve one of the subgoals of the rules, incrementing the moment value is unnecessary because the moment value only marks the time-instant related to achieving goals in ST-DEVS, namely the occurrence of important events defined by the modeler. The principle is identical to the definition of important events in an atomic model. The difference is that as we go up along the hierarchy of the model structure, both time and space are abstracted in defining important events.

#### 5.3. Added Functionalities to Classic DEVS

## 6. Conclusions and Future Research

_{ST-DEVS}) can be executed to achieve a goal in the consequent of the rule. The action rule uses the time-dependent variables of the ST-DEVS models as arguments. The action execution algorithm invokes the necessary process to achieve subgoals through a goal regression on the rule, as described in Figure 3, Figure 4, and Figure 5. Notably, the necessary process to achieve the subgoals is given within the arguments, namely the time-dependent variables defined by the ST-DEVS models. This property enables the construction of hierarchical models or compound data structures to store behavioral and structural data required for the monitoring and action-executing. The process of achieving the subgoals is expressed by operations in the component atomic models or action rules in the component coupled models. The spatiotemporal computation proposed is accomplished by time-dependent variables and an execution algorithm that executes action rules (TL

_{ST-DEVS}).

## Funding

## Conflicts of Interest

## References

- Zeigler, B.P. Object-Oriented Simulation with Hierarchical, Modular Models: Intelligent Agents and Endomorphic Systems; Academic Press: San Diego, CA, USA, 1990; pp. 41–143. [Google Scholar]
- Zeigler, B.P.; Muzy, A.; Kofman, E. Theory of Modeling and Simulation: Discrete Event & Iterative System Computational Foundations; Academic Press: San Diego, CA, USA, 2018. [Google Scholar]
- Nance, R.E.; Overstreet, C.M. History of Computer Simulation Software: An Initial Perspective. In Proceedings of the 2017 Winter Simulation Conference, Las Vegas, NV, USA, 3–6 December 2017; pp. 243–261. [Google Scholar]
- Minerva, R.; Lee, G.M.; Crespi, N. Digital Twin in the IoT Context: A Survey on Technical Features, Scenarios, and Architectural Models. Proc. IEEE
**2020**, 108, 1785–1824. [Google Scholar] [CrossRef] - Barricelli, B.R.; Casiraghi, E.; Fogli, D. A Survey on Digital Twin: Definitions, Characteristics, Applications, and Design Implications. IEEE Access
**2019**, 7, 167653–167671. [Google Scholar] [CrossRef] - Cho, T.H. Simulation Methodology-Based Context-Aware Architecture Design for Behavior Monitoring of Systems. Symmetry
**2020**, 12, 1568. [Google Scholar] [CrossRef] - Metz, S. Practical Object-Oriented Design, 2nd ed.; Addison-Wesley: Boston, MA, USA, 2018. [Google Scholar]
- Forouzan, B.A.; Gilberg, R.F. C++ Programming: An Object-Oriented Approach; McGraw-Hill: New York, NY, USA, 2019. [Google Scholar]
- Heagerty, P.J.; Lumley, T.; Pepe, M.S. Time-Dependent ROC Curves for Censored Survival Data and a Diagnostic Marker. Biometrics
**2000**, 56, 337–344. [Google Scholar] [CrossRef] [PubMed] - Hoering, A.; Crowley, J.; Shaughnessy, J.D., Jr.; Hollmig, K.; Alsayed, Y.; Szymonifka, J.; Waheed, S.; Nair, B.; Rhee, F.V.; Anaissie, E.; et al. Complete remission in multiple myeloma examined as time-dependent variable in terms of both onset and duration in Total Therapy protocols. Clin. Trials Obs.
**2009**, 114, 1299–1305. [Google Scholar] [CrossRef] [PubMed] - Adhikari, S.; Billing, G.D. A time-dependent discrete variable representation method. J. Chem. Phys.
**2000**, 113, 1409–1414. [Google Scholar] [CrossRef] - Cheskes, S.; Schmicker, R.H.; Rea, T.; Powell, J.; Drennana, I.R.; Kudenchuk, P.; Vaillancourt, C.; Conwaye, W.; Stiell, I.; Stubg, D.; et al. Chest compression fraction: A time dependent variable of survival in shockable out-of-hospital cardiac arrest. Resuscitation
**2015**, 97, 129–135. [Google Scholar] [CrossRef] [PubMed] - Jung, S.Y.; Jo, H.; Son, H.; Hwang, H.J. Real-World Implications of a Rapidly Responsive COVID-19 Spread Model with Time-Dependent Parameters via Deep Learning: Model Development and Validation. J. Med. Internet Res.
**2020**, 22, e19907. [Google Scholar] [CrossRef] [PubMed] - Jitkajornwanich, K.; Pant, N.; Fouladgar, M.; Elmasri, R. A survey on spatial, temporal, and spatio-temporal database research and an original example of relevant applications using SQL ecosystem and deep learning. J. Inf. Telecommun.
**2020**, 4, 524–559. [Google Scholar] [CrossRef] - Bakli, M.; Sakr, M.; Soliman, T.H.A. HadoopTrajectory: A Hadoop spatiotemporal data processing extension. J. Geogr. Syst.
**2019**, 21, 211–235. [Google Scholar] [CrossRef] - Wen, Y.H.; Gao, L.; Fu, H.; Zhang, F.L.; Xia, S. Graph CNNs with Motif and Variable Temporal Block for Skeleton-Based Action Recognition. In Proceedings of the Thirty-Third AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 27 January–1 February 2019. [Google Scholar]
- Shi, Z.; Pun-Cheng, L.S.C. Spatiotemporal Data Clustering: A Survey of Methods. ISPRS Int. J. Geo-Inf.
**2019**, 8, 112. [Google Scholar] [CrossRef] [Green Version] - Largouët, C.; Krichen, O.; Zhao, Y. Temporal Planning with extended Timed Automata. In Proceedings of the 2016 IEEE 28th International Conference on Tools with Artificial Intelligence, San Jose, CA, USA, 6–8 November 2016. [Google Scholar]
- Bernardini, S.; Fox, M.; Long, D. Combining temporal planning with probabilistic reasoning for autonomous surveillance missions. Auton Robot.
**2017**, 41, 181–203. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Moon, S.I.; Lee, K.H.; Lee, D. Fuzzy Branching Temporal Logic. IEEE Trans. Syst. Man Cybern. Part B Cybern.
**2004**, 34, 1045–1055. [Google Scholar] [CrossRef] [PubMed] - Lamine, K.B.; Kabanza, F. History checking of temporal fuzzy logic formulas for monitoring behavior-based mobile robots. In Proceedings of the International Conference on Tools with Artificial Intelligence, Baltimore, MD, USA, 9–11 November 2000. [Google Scholar]
- Ko, H.; Lee, J.; Pack, S. Spatial and Temporal Computation Offloading Decision Algorithm in Edge Cloud-Enabled Heterogeneous Networks. IEEE Access
**2018**, 6, 18920–18932. [Google Scholar] [CrossRef] - Pnueli, A. The Temporal Logic Of Program. In Proceedings of the 18th Annual Symposium on Foundations of Computer Science, Providence, RI, USA, 31 October–2 November 1977. [Google Scholar]
- Cristiá, M.; Zeigler, B.P. Formalizing the semantics of modular DEVS models with temporal logic. In Proceedings of the 7e Conférence Francophone de MOdlisation et SIMulation-MOSIM, Paris, France, 31 March–2 April 2008; Volume 8. [Google Scholar]
- Mordechai, B.A.; Pnueli, A.; Manna, Z. The temporal logic of branching time. Acta Inform.
**1983**, 20, 207–226. [Google Scholar] - Fisher, M. An Introduction to Practical Formal Methods Using Temporal Logic; John Wiley & Sons: Hoboken, NJ, USA, 2011; pp. 12–48. [Google Scholar]
- Büchi, J.R. The Collected Works of J. Richard Büchi; Springer Science & Business Media: Berlin, Germany, 2012. [Google Scholar]
- Büchi, J.R. On a decision method in restricted second order arithmetic. In The Collected Works of J. Richard Büchi; Mac Lane, S., Siefkes, D., Eds.; Springer: New York, NY, USA. [CrossRef]
- Sipser, M. Introduction to the Theory of Computation, 3rd ed.; Cengage Learning: Boston, MA, USA, 2012. [Google Scholar]
- Hopcroft, J.E.; Motwani, R.; Ullman, J.D. Introduction to Automata Theory, Languages, and Computation, 3rd ed.; Pearson: Chennai, India, 2008. [Google Scholar]
- Kolman, B.; Busby, R.; Ross, S. Discrete Mathematical Structures, 6th ed; Pearson: London, UK, 2017. [Google Scholar]
- Zadeh, L.A. Information and Control. Fuzzy Sets
**1965**, 8, 338–353. [Google Scholar] - DeGroot, M.H.; Schervish, M.J. Probability and Statistics, 4th ed.; Pearson: London, UK, 2011. [Google Scholar]

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Cho, T.
ST-DEVS: A Methodology Using Time-Dependent-Variable-Based Spatiotemporal Computation. *Symmetry* **2022**, *14*, 912.
https://doi.org/10.3390/sym14050912

**AMA Style**

Cho T.
ST-DEVS: A Methodology Using Time-Dependent-Variable-Based Spatiotemporal Computation. *Symmetry*. 2022; 14(5):912.
https://doi.org/10.3390/sym14050912

**Chicago/Turabian Style**

Cho, Taeho.
2022. "ST-DEVS: A Methodology Using Time-Dependent-Variable-Based Spatiotemporal Computation" *Symmetry* 14, no. 5: 912.
https://doi.org/10.3390/sym14050912