Review. A_DA_A Ball_A Ball_B player_A B_DB_A Ball_B Ball_A player_B Ball_A Ball_B A_A, B_DA_D, B_A...
-
Upload
derick-pitts -
Category
Documents
-
view
215 -
download
0
Transcript of Review. A_DA_A Ball_A Ball_B player_A B_DB_A Ball_B Ball_A player_B Ball_A Ball_B A_A, B_DA_D, B_A...
Review
A_D A_A
Ball_A
Ball_B
player_A B_D B_A
Ball_B
Ball_A
player_B
Ball_A Ball_A
Ball_B Ball_B
A_A, B_D A_D, B_A
Ball_A
Ball_B
CFSM
Player_A : X S SXA = {Ball_A}{} : internal event
A_A A_D
/Ball_A
A_A A_D
Ball_A feedback
CFMS for the ping-pong example
A_A A_DBall_B
Ball_ABall_B
Ex) ping-pong game
– (i) what if “attack” takes 2 steps: one state generating output, other state with no output. State independent of any
inputs.– (ii) what if we want to specify time to be spent for state A or D
– A takes 0.1sec. (A’s control : output)– D takes ? sec (B’s control : output)
• input event -> state transition
• time modeling Infinity
• No semantics for such sojourn time specification:
logical time models.
A_A A_DBall_B
Ball_ABall_B
A_A
R_B
A_A
Receiving state
A_A
A_DBall_B
Ball_A
Ball_B
R_B
Ball_A
?replace
Limitation of expressive power in FSM
internal transition & time advance function(defined)• introducing internal transition function
int : S S
• introducing time advance functionta : S R+
0,
Solution : DEVS (Discrete Event System Specification) Formalism
What is DEVS?
• DEVS = Discrete Event System Specification
• Provides sound formal M&S framework
• Supports full range of dynamic system representation capability
• Supports hierarchical, modular model development
(Zeigler, 1976/84/90/00)
DEVS Modeling & Simulation Framework
Separates Modeling from Simulation Derived from Generic Dynamic Systems
Formalism– Includes Continuous and Discrete Time
Systems Provides Well Defined Coupling of Components Supports
– Hierarchical Construction– Stand Alone Testing– Repository Reuse
Enables Provably Correct, Efficient, Event-Based, Distributed Simulation
The DEVS Framework for M&S
Formalism transformation
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 >
Atomic model definition
Behavioral models
DEVS Atomic models
Atomic DEVS = < S, X, Y, int ,ext , , ta >• X : external input event set
• Y : external output event set
• S : sequential state set int: internal transition function
ext :external transition function
: output function
• ta : time advance function
• ta : S R+0,
• Q = {(s,e) | s S, 0 e ta(s)} : total state set, e: elapsed time
int : S S
ext : X * Q S
: S Y
S
int
ext
R
X Y
DEVS Atomic models (cont.)
External Event Transition Function (ext): transforms state
and an input event into another state(e.g., receiving a faulty device, put it into a queue to await its turn for repair.)
Output Function (): maps a state into an output (e.g., number of parts available falls below a minimum
number, issue an order to restock.)
Internal Event Transition Function (int): transforms state
into another state after time has elapsed(e.g., there are 10 parts available and broken part requires
7 of them, after fixing broken part, 3 parts will remain.)
Time Advance Function (ta): maps a state into a duration (e.g., how long to fix a device once processing has started.)
Atomic model Discrete Event Dynamics
ta(s) ta(s) (1)(1)ss
DEVS = DEVS = < X, S, Y, < X, S, Y, int int , , ext ext , ta, , ta,
ss
y y (3)(3)
ss’ ’ = = int int ss
x x (5)(5)
ss’ ’ = = ext ext ((s,e,x)s,e,x)
(6)(6)
DEVS atomic models semantics
ta(s) ta(s) (1)(1)ss
DEVS = DEVS = < X, S, Y, < X, S, Y, int int , , ext ext , ta, , ta,
ss
y y (3)(3)
ss’ ’ = = int int ss
x x (5)(5)
ss’ ’ = = ext ext ((s,e,x)s,e,x)
(6)(6)
DEVS atomic models semantics
– AMplayer_A =< S, X, Y, int ,ext , , ta >
• X = {Ball_B}
• Y = {Ball_A}
• S = {A, D} int (A) = D
ext (Ball_B, D) = A
• ta(A) = thinking_time
• ta(D) = INFINITY (A) = Ball_A
A DBall_B
Ball_ABall_B
Atomic model example: ping-pong
Moutin
event
t
x1 y1 x2
t
S
s0
s1
s2
s2=ext((s0,e),x1)s1=int(s2)
t
e
ta(s0)ta(s2)ta(s1)
Dynamic behavior of DEVS models