Review
DEVS Formalism
Discrete-Event formalism: time advances using a
continuous time base.
Basic models that can be coupled to build complex
simulations.
Abstract simulation mechanism
Atomic Models:
M = < X, S, Y, int, ext, , D >.
Coupled Models:
CM = < X, Y, D, {Mi}, {Ii}, {Zij}, select >
DEVS atomic models semantics
y (3)
x (5)
s’ = ext (s,e,x)
(s) (2)
(6)
s’ = int (s)
s
ta(s) (1)
(4)
DEVS = < X, S, Y, int , ext , ta, >
Dynamic behavior of DEVS models
in
out
M
event
x1
y1
x2
t
S
s2
s
s01
s2=ext((s0,e),x1)
s1=int(x2)
t
e
ta(s1)
ta(s0)
ta(s2)
t
Atomic model example: Processing Server
ext (Job-Queue, Job, e, x (type: Job)) {
case phase
Sigma
Out
passive:
In
Job
S
Job
Queue
sigma = x.Processing-time;
phase = busy;
Job = x.Job-id;
busy:
State Variables:
add( x, Job-Queue );
sigma = , phase = Passive;
sigma = sigma - e;
Job = none (< Job-id, Processing-time >); }
/* Represents the job being executed */
int (Job-Queue, Job, e) {
Job-Queue = Empty (Job*)
case phase
/* Contains the Job-id's waiting for the
busy:
CPU. */
if empty(Job-Queue)
phase = passive;
Formal specification for P:
sigma = ;
else
X = { Job <N, R>};
Job = Get(Job-Queue);
Y = { Job-id N}
sigma = Job.Processing-time;
S = { { Phase, sigma, Job-Queue, Job} }
endif
passive: /* Never happens*/
}
(s) { send Job.Job-Id to the port out }
Atomic Model: P
Coupled models
Structural models (multicomponent)
Hierarchical vs. Incremental modelling
GEN-BUF-PROC
BUF-PROC
out
GEN
in
done
BUF
out
in
PROC out
out
G+B+P
A
G
B
C
B+P
Incremental : A and B: connect
B
P
ABC
– Petri Net : incremental
– DEVS : hierarchical
BC
A
B
C
Hierarchical : A and BC: connect
Coupled models formal specification
CM = < X, Y, D, {Mi}, IC, EIC, EOC, select >
X is the set of input events;
Y is the set of output events;
D is an index for the components of the coupled
model, and
" i D, Mi is a basic DEVS model (that is, an atomic
or coupled model), defined by
Mi = < Ii, Xi, Si, Yi, inti, exti, tai >
IC is the set of Input Couplings;
EIC is the set of External Input Couplings;
EOC is the set of External Output Couplings;
Finally, select is the tie-breaking selector.
Closure Under Coupling
DN
< X , Y, D, {Mi }, {Ii }, {Zi,j }>
DEVS
< X, S, Y, int, ext, con, ta, >
DEVS
< X, S, Y, int, ext, con, ta, >
Every DEVS
coupled model
has a DEVS
Basic equivalent
Input/output ports concepts
Components (D)
couplings
– Internal Couplings (IC)
– External Input Couplings (EIC)
– External Output Couplings (EOC)
start
start
generator
(genr)
out
repair
faulty shop
stop
repaired
sent
transducer
(transd)
finished
out
report
Coupled DEVS example
< GEN-BUF-PROC model >
GEN
out
in
done
BUF
out
in
PROC out
out
– GEN-BUF-PROC = < X, Y, {GEN, BUF, PROC}, EIC, EOC,
IC, SELECT >
X=
Y = { out }
EIC =
EOC = { (PROC.out, GEN_BUF_PROC.out) }
IC = { (GEN.out, BUF.in), (BUF.out, PROC.in), (PROC.out,
BUF.done)}
• SELECT : ({GEN, BUF, PROC}) = GEN
({BUF, PROC}) = BUF
:
•
•
•
•
•
Concept of Scheduling and Tie-break
– Internal transition
• Model knows its schedule time (by time advance)
– External transition
• Model doesn’t know its schedule time influencer’s schedule
M1
M2
– Conflict case
• Internal and external events
• External events
M2 : M1’s influencee
M1 : M2’s influencer
Tie-Breaking example
out
GEN
in
done
out
out
BUFFER
* GEN = < S, X, Y, int , ext , , ta >
X=
Y = {out}
S = {G}
int: int(G) = G
ext :unavailable
(G) = out
ta(G) = GEN_TIME
in
PROC
* PROC = < S, X, Y, int , ext , , ta >
X = {in}
Y = {out}
S = { B, F }
int: int(B) = F
ext : ext(F, in) = B
(B) = out
ta(B) = PROCESS_TIME
(in,e)
(out, ta(G))
G
B
(out, ta(B))
< PROC model >
< GEN model >
BUFFER: Exercise
F
BUF
(coupled model)
Tie-breaking
– conflict schedule is resolved by assigning priority between
models that cause schedules.
• Internal and external events
out(BUF)
n,F
in(GEN)
Priority(BUF,GEN) = GEN
• External events
done(PROC)
n,B
– Sel : 2{Mi} {Mi}
In(GEN)
Priority(PROC,GEN) = GEN
© Copyright 2026 Paperzz