140 likes | 251 Views
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. DEVS atomic models semantics. y (3). x (5). s ’ = d ext ( s,e,x) (6). l ( s ) (2). s.
E N D
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
DEVS atomic models semantics y (3) x (5) s’ = d ext (s,e,x) (6) l (s) (2) s s’ = d int (s) (4) ta(s) (1) DEVS = < X, S, Y, dint , dext , ta, l >
Dynamic behavior of DEVS models in M out event x1 y1 x2 t S s2=ext((s0,e),x1) s2 s1=int(x2) s1 s0 t e ta(s2) ta(s1) ta(s0) t
Coupled models Structural models (multicomponent)
Hierarchical vs. Incremental modelling G+B+P B+P G P B GEN-BUF-PROC BUF-PROC out in out in out out GEN BUF PROC done A B C Incremental : A andB: connect ABC BC • Petri Net : incremental • DEVS : hierarchical A B C Hierarchical : A and BC: connect
Coupled models formal specification CM = < X, Y, D, {Mi}, IC, EIC, EOC, select > • Xis 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, dinti, dexti, 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 DEVS <X, S, Y, dint,dext, dcon,ta,l > DN <X, Y, D, {Mi }, {Ii },{Zi,j }> Every DEVS coupled model has a DEVS Basic equivalent DEVS <X, S, Y, dint,dext, dcon,ta,l >
Input/output ports concepts start start generator (genr) out repair shop stop repaired faulty sent transducer (transd) report out finished • Components (D) • couplings • Internal Couplings (IC) • External Input Couplings (EIC) • External Output Couplings (EOC)
Coupled DEVS example < GEN-BUF-PROC model > out in out in out out GEN BUF PROC done • 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 • Conflict case • Internal and external events • External events M2 : M1’s influencee M1 : M2’s influencer M1 M2
Tie-Breaking example out in GEN BUFFER PROC out in out done • * 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 • * 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,e) BUF (coupled model) B F (out, ta(G)) (out, ta(B)) G < PROC model > < GEN model > BUFFER: Exercise
Tie-breaking • conflict schedule is resolved by assigning priority between models that cause schedules. • Internal and external events • External events • Sel : 2{Mi} {Mi} out(BUF) in(GEN) n,F Priority(BUF,GEN) = GEN done(PROC) In(GEN) n,B Priority(PROC,GEN) = GEN