Simulation algorithms for coupled DEVS
# Simulation algorithms for coupled DEVS

Given a coupled DEVS model, simulation algorithms are methods to generate the model's legal behaviors, which are a set of trajectories not to reach illegal states. (see behavior of a Coupled DEVS model.) originally introduced the algorithms that handle time variables related to lifespan $t_{s}\in [0,\infty ]$ and elapsed time $t_{e}\in [0,\infty )$ by introducing two other time variables, last event time, $t_{l}\in [0,\infty )$, and next event time $t_{n}\in [0,\infty ]$ with the following relations:

$\,t_{e}=t-t_{l}$

and

$\,t_{s}=t_{n}-t_{l}$

where $t\in [0,\infty )$ denotes the current time. And the remaining time,

$\,t_{r}=t_{s}-t_{e}$

is equivalently computed as

$\,t_{r}=t_{n}-t,$

apparently $t_{r}\in [0,\infty ]$.

Based on these relationships, the algorithms to simulate the behavior of a given Coupled DEVS are written as follows.

