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.) [Zeigler84] originally introduced the algorithms that handle time variables related to lifespan
ts\in[0,infty]
te\in[0,infty)
tl\in[0,infty)
tn\in[0,infty]
te=t-tl
and
ts=tn-tl
where
t\in[0,infty)
tr=ts-te
is equivalently computed as
tr=tn-t,
apparently
tr\in[0,infty]
algorithm DEVS-coordinator Variables: parent // parent coordinator
tl
tn
N=(X,Y,D,\{Mi\},Cxx,Cyx,Cyy,Select)
i\inD
i
tl\leftarrowmax\{tli:i\inD\}
tn\leftarrowmin\{tni:i\inD\}
t\netn
i*\leftarrowSelect(\{i\inD:tni=tn\});
i*
tl\leftarrowmax\{tli:i\inD\}
tn\leftarrowmin\{tni:i\inD\}
x\inX
(tl\let
t\letn)
(x,xi)\inCxx
xi
i
tl\leftarrowmax\{tli:i\inD\}
tn\leftarrowmin\{tni:i\inD\}
yi\inYi
(yi,xi)\inCyx
xi
i
Cyy(yi)\ne\phi
Cyy(yi)
tl\leftarrowmax\{tli:i\inD\}
tn\leftarrowmin\{tni:i\inD\}