Autonomous (with output) red πππππ§ π ππ π = , π, π ππππ’ , π πππ’ , , π’π π π π = {red, yellow, green} π πππ’ = { red β green, !show_red green β yellow, yellow β red} π ππππ’ = (green, 0) π’π = {red β πππππ§ π ππ , yellow !show_green green β πππππ§ ππ πππ , πππππ§ π§πππππ₯ yellow β πππππ§ π§πππππ₯ } π : set of output events π = {β show_red β, β show_green β, β show_yellow β} !show_yellow π : π β π βͺ {π} π = { green β β show_yellow β, green π = 0π‘ yellow β β show_red β, πππππ§ ππ πππ red β β show_green β}
Abstract Syntax Concrete Syntax atomic_out.py π = {red, yellow, green} π ππππ’ = (green, 0) from pypdevs.DEVS import * π πππ’ = { red β green, green β yellow, class TrafficLightWithOutput(AtomicDEVS): yellow β red} def __init__( self, β¦): π’π = {red β πππππ§ π ππ , AtomicDEVS.__init __(self, βlightβ) green β πππππ§ ππ πππ , self.observe = self.addOutPort (βobserverβ) yellow β πππππ§ π§πππππ₯ } β¦ π = {β show_red β, β show_green β, β¦ β show_yellow β} π = {green β β show_yellow β, def outputFnc(self): yellow β β show_red β, state = self.state red β β show_green β} if state == βredβ: return {self.observe: β show_green β} Operational Semantics elif state == βyellowβ: time = 0 return {self.observe: β show_red β} current_state = initial_state elif state == βgreenβ: last_time = -initial_elapsed return {self.observe: β show_yellow β} while not termination_condition(): time = last_time + ta(current_state) output( π (current_state)) current_state = π πππ’ (current_state) last_time = time
__ Current Time: 0.00 __________________________________________ INITIAL CONDITIONS in model <light> Initial State: green Next scheduled internal transition at time 57.00 __ Current Time: 57.00 __________________________________________ INTERNAL TRANSITION in model <light> New State: yellow Output Port Configuration: port <observer>: show_yellow Next scheduled internal transition at time 60.00 __ Current Time: 60.00 __________________________________________ INTERNAL TRANSITION in model <light> New State: red Output Port Configuration: port <observer>: show_red Next scheduled internal transition at time 120.00
X toManual red πππππ§ π ππ ?toManual toAuto t !show_red ?toAuto S manual !show_green red yellow manual yellow πππππ§ π§πππππ₯ β green ?toManual t !show_yellow Y show_green green ?toManual πππππ§ ππ πππ π = 0π‘ t
Reactive π π ππ¦π’ π = , π, π, π ππππ’ , π πππ’ , , π, π’π π = {β show_red β, β show_green β, β show_yellow β} red π = {red, yellow, green, manual} πππππ§ π ππ ?toManual π ππππ’ = (green, 0) π πππ’ = {red β green, green β yellow, !show_red yellow β red} ?toAuto π = {green β β show_yellow β, yellow β β show_red β, !show_green red β β show_green β} yellow manual π’π = {red β πππππ§ π ππ , πππππ§ π§πππππ₯ β green β πππππ§ ππ πππ , ?toManual yellow β πππππ§ π§πππππ₯ , manual β +β } !show_yellow π : set of input events π = {β toAuto β, β toManual β} green ?toManual π ππ¦π’ : Q Γ π β π πππππ§ ππ πππ π = π‘, π π‘ β π, 0 β€ π β€ π’π(π‘) π ππ¦π’ = {( (*, *), β toManual β) β βmanualβ, ( (βmanualβ, *), β toAuto β) β βredβ} π = 0π‘
Abstract Syntax π = {β show_red β, β show_green β, β show_yellow β} Operational Semantics π = {red, yellow, green, manual} time = 0 π ππππ’ = (green, 0) current_state = initial_state π πππ’ = {red β green, last_time = -initial_elapsed green β yellow, while not termination_condition(): yellow β red} next_time = last_time + ta(current_state) π = {green β β show_yellow β, if time_next_ev <= next_time: yellow β β show_red β, e = time_next_ev β last_time red β β show_green β} time = time_next_ev π’π = {red β πππππ§ π ππ , current_state = π ππ¦π’ ((current_state, e), next_ev) green β πππππ§ ππ πππ , else: yellow β πππππ§ π§πππππ₯ , time = next_time manual β β } output( π (current_state)) π = {β toAuto β, β toManual β} current_state = π _ πππ’ (current_state) π ππ¦π’ = {( (*, *), β toManual β) β manual, last_time = time ( (manual, *), β toAuto β) β red}
Abstract Syntax Concrete Syntax atomic_ext.py π = {β show_red β, β show_green β, β show_yellow β} from pypdevs.DEVS import * π = {red, yellow, green, manual} π ππππ’ = (green, 0) class TrafficLight(AtomicDEVS): π πππ’ = {red β green, def __init__( self, β¦): green β yellow, AtomicDEVS.__init __(self, βlightβ) yellow β red} self.interrupt = self.addInPort (βinterruptβ) π = {green β β show_yellow β, β¦ yellow β β show_red β, β¦ red β β show_green β} π’π = {red β πππππ§ π ππ , def extTransition(self, inputs): green β πππππ§ ππ πππ , inp = inputs[self.interrupt] yellow β πππππ§ π§πππππ₯ , if inp == β toManual β: manual β β } return βmanualβ π = {β toAuto β, β toManual β} elif inp == β toAuto β: π ππ¦π’ = {( (*, *), β toManual β) β manual, if self.state == βmanualβ: ( (manual, *), β toAuto β) β red} return βredβ
__ Current Time: 0.00 __________________________________________ INITIAL CONDITIONS in model <light> Initial State: green Next scheduled internal transition at time 57.00 __ Current Time: 57.00 __________________________________________ INTERNAL TRANSITION in model <light> New State: yellow Output Port Configuration: port <observer>: show_yellow Next scheduled internal transition at time 60.00 __ Current Time: 60.00 __________________________________________ INTERNAL TRANSITION in model <light> New State: red Output Port Configuration: port <observer>: show_red Next scheduled internal transition at time 120.00
π = π‘, π π‘ β π, 0 β€ π β€ π’π(π‘) π = 0 0 < π < π’π(π‘) π = π’π π‘ ?
red πππππ§ π ππ ?toManual/ !turn_off ?toAuto/ !show_red !show_red !show_green yellow manual πππππ§ π§πππππ₯ β ?toManual/ !turn_off !show_yellow green ?toManual/ πππππ§ ππ πππ !turn_off π = 0π‘
X toManual red πππππ§ π ππ ?toManual/ toAuto !turn_off t ?toAuto/ !show_red S !show_red manual !show_green red yellow manual yellow πππππ§ π§πππππ₯ β green ?toManual/ !turn_off t !show_yellow Y show_green green ?toManual/ show_red πππππ§ ππ πππ !turn_off turn_off π = 0π‘ t
X toManual red πππππ§ π ππ ?toManual/ toAuto !turn_off time = 0 current_state = initial_state t ?toAuto/ last_time = -initial_elapsed !show_red S !show_red while not termination_condition(): manual next_time = last_time + ta(current_state) !show_green if time_next_ev <= next_time: red yellow manual e = time_next_ev β last_time yellow πππππ§ π§πππππ₯ time = time_next_ev β green current_state = π ππ¦π’ ((current_state, e), next_ev) ?toManual/ else: !turn_off t time = next_time !show_yellow output( π (current_state)) Y current_state = π _ πππ’ (current_state) last_time = time show_green green ?toManual/ show_red πππππ§ ππ πππ !turn_off turn_off π = 0π‘ t
X !show_red red toManual going_auto 0π‘ πππππ§ π ππ toAuto !show_green t ?toAuto ?toManual !show_red S manual going_auto yellow manual going_manual πππππ§ π§πππππ₯ β red green t !show_yellow !turn_off ?toManual Y show_green green going_manual show_red πππππ§ ππ πππ 0π‘ turn_off π = 0π‘ t ?toManual
Full Atomic DEVS Specification π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π : set of input events π : set of output events π : set of sequential states π ππππ’ : π π = π‘, π π‘ β π, 0 β€ π β€ π’π(π‘) π πππ’ : π β π π ππ¦π’ : π Γ π β π π : π β π βͺ π π’π : π β β 0,+β +
S (π ππ¦π’ π‘ π , π , π¦ , 0) π ππ¦π’ π (π‘ π , 0) output π(π‘ π ) π’π π‘ π π πππ’ (π πππ’ (π‘ π ), 0) t π’ π + π π’ π π’ π + π’π π‘ π
Coupled Models
!show_red red going_auto 0π‘ πππππ§ π ππ !show_green ?toAuto ?toManual !show_red yellow manual πππππ§ π§πππππ₯ β !show_yellow !turn_off ?toManual green going_manual πππππ§ ππ πππ 0π‘ π = 0π‘ ?toManual
work 3600s !go_to_work !take_break idle 300s π = 280π‘
ππππ π· = πΈ, ππ π΅ ππππππ π΅ ππππ ππ = π π π β πΈ π π = π π , π π , π π , π ππππ’,π , π πππ’,π , π ππ¦π’,π , π π , π’π π , β π β πΈ
πΈ = {πππβπ’ 1 , πππ 1 } ππππ π· = πΈ, ππ π΅ ππππππ π΅ ππππ ππ = π π π β πΈ π π = π π , π π , π π , π ππππ’,π , π πππ’,π , π ππ¦π’,π , π π , π’π π , β π β πΈ
ππππ π· = π π‘πππ , π π‘πππ , πΈ, ππ π΅ ππππππ π΅ ππππ ππ = π π π β πΈ π π = π π , π π , π π , π ππππ’,π , π πππ’,π , π ππ¦π’,π , π π , π’π π , β π β πΈ
ππππ π· = π π‘πππ , π π‘πππ , πΈ, ππ, π½π π΅ ππππππ π΅ ππππ ππ = π π π β πΈ π π = π π , π π , π π , π ππππ’,π , π πππ’,π , π ππ¦π’,π , π π , π’π π , β π β πΈ π½π = π½ π π β πΈ βͺ π‘πππ β π β πΈ βͺ π‘πππ βΆ π½ π β πΈ βͺ π‘πππ β π β πΈ βͺ π‘πππ βΆ π β π½ π π½ π : Influencees of π
ππππ π· = π π‘πππ , π π‘πππ , πΈ, ππ, π½π π΅ ππππππ π΅ ππππ ππ = π π π β πΈ π π = π π , π π , π π , π ππππ’,π , π πππ’,π , π ππ¦π’,π , π π , π’π π , β π β πΈ π½π = π½ π π β πΈ βͺ π‘πππ β π β πΈ βͺ π‘πππ βΆ π½ π β πΈ βͺ π‘πππ β π β πΈ βͺ π‘πππ βΆ π β π½ π π½ π : Influencees of π π½ π‘πππ = {πππβπ’1} π½ πππ1 = {πππβπ’1} π½ πππβπ’1 = {π‘πππ}
π πππ1 = {ππ_π’π_π₯ππ π, π’πππ_ππ πππ} ππππ π· = π π‘πππ , π π‘πππ , πΈ, ππ, π½π, ππ π΅ ππππππ π΅ ππππ ππ = π π π β πΈ π π = π π , π π , π π , π ππππ’,π , π πππ’,π , π ππ¦π’,π , π π , π’π π , β π β πΈ π½π = π½ π π β πΈ βͺ π‘πππ β π β πΈ βͺ π‘πππ βΆ π½ π β πΈ βͺ π‘πππ β π β πΈ βͺ π‘πππ βΆ π β π½ π ππ = π π,π π β πΈ βͺ π‘πππ , π β π½ π π π‘πππ,π βΆ π π‘πππ β π π , β π β πΈ π π,π‘πππ βΆ π π β π π‘πππ , β π β πΈ π π,π βΆ π π β π π , β π, π β πΈ π πππβπ’1 = {π’πππππ£ππ, π’ππ΅π£π’π}
ππππ π· = π π‘πππ , π π‘πππ , πΈ, ππ, π½π, ππ π΅ ππππππ π΅ ππππ ππ = π π π β πΈ π π = π π , π π , π π , π ππππ’,π , π πππ’,π , π ππ¦π’,π , π π , π’π π , β π β πΈ π½π = π½ π π β πΈ βͺ π‘πππ β π β πΈ βͺ π‘πππ βΆ π½ π β πΈ βͺ π‘πππ β π β πΈ βͺ π‘πππ βΆ π β π½ π ππ = π π,π π β πΈ βͺ π‘πππ , π β π½ π π π‘πππ,π βΆ π π‘πππ β π π , β π β πΈ π π,π‘πππ βΆ π π β π π‘πππ , β π β πΈ π π,π βΆ π π β π π , β π, π β πΈ take_break ο toAuto go_to_work ο toManual
ππππ π· = π π‘πππ , π π‘πππ , πΈ, ππ, π½π, ππ, π‘πππππ’ π΅ ππππππ π΅ ππππ ππ = π π π β πΈ π π = π π , π π , π π , π ππππ’,π , π πππ’,π , π ππ¦π’,π , π π , π’π π , β π β πΈ π½π = π½ π π β πΈ βͺ π‘πππ β π β πΈ βͺ π‘πππ βΆ π½ π β πΈ βͺ π‘πππ β π β πΈ βͺ π‘πππ βΆ π β π½ π ππ = π π,π π β πΈ βͺ π‘πππ , π β π½ π π π‘πππ,π βΆ π π‘πππ β π π , β π β πΈ π π,π‘πππ βΆ π π β π π‘πππ , β π β πΈ π π,π βΆ π π β π π , β π, π β πΈ π‘πππππ’ βΆ 2 πΈ β πΈ β πΉ β πΈ, πΉ β β : π‘πππππ’ πΉ β πΉ take_break ο toAuto go_to_work ο toManual
Concrete Syntax trafficlight_system.py from pypdevs.DEVS import * from trafficlight import TrafficLight from policeman import Policeman def translate(in_evt): mapping = {β take_break β: β toAuto β, β go_to_work β: β toManual β} return mapping[in_evt] class TrafficLightSystem(CoupledDEVS): def __init__(self): CoupledDEVS.__init __(self, βsystemβ) self.light = self.addSubModel(TrafficLight()) self.police = self.addSubModel(Policeman()) self.connectPorts(self.police.out, self.light.interrupt, translate) def select(self, immlist): if self.police in immlist: return self.police else: return self.light
__ Current Time: 0.00 __________________________________________ INITIAL CONDITIONS in model <system.light> Initial State: green Next scheduled internal transition at time 57.00 INITIAL CONDITIONS in model <system.policeman> Initial State: idle Next scheduled internal transition at time 20.00
__ Current Time: 20.00 __________________________________________ EXTERNAL TRANSITION in model <system.light> Input Port Configuration: port <interrupt>: toManual New State: going_manual Next scheduled internal transition at time 20.0 INTERNAL TRANSITION in model <system.policeman> New State: working Output Port Configuration: port <output>: go_to_work Next scheduled internal transition at time 3620.00
__ Current Time: 20.00 __________________________________________ INTERNAL TRANSITION in model <system.light> Output Port Configuration: port <observer>: turn_off New State: manual Next scheduled internal transition at time inf
__ Current Time: 3620.00 __________________________________________ EXTERNAL TRANSITION in model <system.light> Input Port Configuration: port <interrupt>: toAuto New State: going_auto Next scheduled internal transition at time 3620.00 INTERNAL TRANSITION in model <system.policeman> New State: idle Output Port Configuration: port <output>: take_break Next scheduled internal transition at time 3920.00
__ Current Time: 3620.00 __________________________________________ INTERNAL TRANSITION in model <system.light> Output Port Configuration: port <observer>: show_red New State: red Next scheduled internal transition at time 3680.00
__ Current Time: 3620.00 __________________________________________ EXTERNAL TRANSITION in model <system.light> Input Port Configuration: port <interrupt>: toAuto New State: going_auto Next scheduled internal transition at time 3620.00 INTERNAL TRANSITION in model <system.policeman> New State: idle Output Port Configuration: port <output>: take_break Next scheduled internal transition at time 3920.00
__ Current Time: 3920.00 __________________________________________ CONFLICT between models: <system.light> * <system.policeman> EXTERNAL TRANSITION in model <system.light> Input Port Configuration: port <interrupt>: toManual New State: going_manual Next scheduled internal transition at time 3920.00 INTERNAL TRANSITION in model <system.policeman> New State: work Output Port Configuration: port <output>: go_to_work Next scheduled internal transition at time 7520.00
Closure under Coupling
ππππ π΅ ππππππ π΅ ππππ take_break ο toAuto go_to_work ο toManual ?
? flatten π·π = π π‘πππ , π π‘πππ , πΈ, ππ, π½π, ππ ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π
CM 1 π π·π 2 π 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 π π·π
CM 1 π π·π 2 π 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 π = π π·π π = π π·π π π·π
CM 1 π π·π 2 π 1 π 1 π‘ 1 , π 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 π 2 π‘ 2 , π 2 π π·π
CM 1 π π·π 2 π 1 π 1 π‘ 1 , π 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 π 2 π = Γ πβπΈ π π π‘ 2 , π 2 π π·π
CM 1 π π·π 2 π 1 π‘ 1 , π 1 = π ππππ’,1 π 1 π’π 1 π‘ 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 π 2 π‘ 2 , π 2 = π ππππ’,2 π’π 2 π‘ 2 π π·π
CM 1 π π·π 2 π 1 π‘ 1 , π 1 = π ππππ’,1 π 1 π’π 1 π‘ 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 π 2 π ππππ’ = π‘ ππππ’ , π ππππ’ π‘ 2 , π 2 = π ππππ’,2 π’π 2 π‘ 2 π π·π
CM 1 π π·π 2 π 1 π‘ 1 , π 1 = π ππππ’,1 π 1 π’π 1 π‘ 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 π 2 π ππππ’ = π‘ ππππ’ , π ππππ’ π‘ 2 , π 2 = π ππππ’,2 π‘ ππππ’ = β¦ , π‘ ππππ’,π , π ππππ’,π β π ππππ’ , β¦ π’π 2 π‘ 2 π π·π
CM 1 π π·π 2 π 1 π‘ 1 , π 1 = π ππππ’,1 π 1 π’π 1 π‘ 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 π 2 π ππππ’ = π‘ ππππ’ , π ππππ’ π‘ 2 , π 2 = π ππππ’,2 π‘ ππππ’ = β¦ , π‘ ππππ’,π , π ππππ’,π β π ππππ’ , β¦ π’π 2 π‘ 2 π ππππ’ = min πβπΈ π ππππ’,π π π·π
CM 1 π π·π 2 π 1 π‘ 1 , π 1 = π ππππ’,1 π 1 π’π 1 π‘ 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 π 2 π ππππ’ = π‘ ππππ’ , π ππππ’ π‘ 2 , π 2 = π ππππ’,2 π‘ ππππ’ = β¦ , π‘ ππππ’,π , π ππππ’,π β π ππππ’ , β¦ π’π 2 π‘ 2 π ππππ’ = min πβπΈ π ππππ’,π π‘ ππππ’,π , π ππππ’,π = π ππππ’,π π π·π
CM 1 π π·π 2 π 1 π’π 1 π 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 π’π 2 π π·π π’
CM 1 π π·π 2 π 1 π’π 1 π 1 π 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 + π’π βΆ π β β 0,+β π’π 2 π’π π‘ = min πβπΈ π π = π’π π π‘ π β π π π 2 π π·π π’
CM 1 π π·π 2 π 1 π’π 1 π 1 π 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 + π’π βΆ π β β 0,+β π’π 2 π’π π‘ = min πβπΈ π π = π’π π π‘ π β π π π 2 π½ππ π‘ = π β πΈ π π = π’π(π‘) π‘πππππ’(π½ππ π‘ ) = π β π π·π π’
CM 1 π π·π 2 π 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 π π·π π’
CM 1 π π·π 2 π 1 π§ 2 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 π π‘ = ΰ΅ π π β ,π‘πππ π π β π‘ π β ππ π‘πππ β π½ π β ππ π‘πππ β π½ π β β π π·π π’
CM 1 π π·π π’π π‘ 2 π 1 π‘ 1 , π’π 1 π‘ 1 π‘ 1 , 0 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 β² , 0 π‘ 2 π‘ 2 , π 2 π‘ 2 , π 2 + π’π π‘ = π’π 2 (π‘ 2 ) π π·π π’
CM 1 π π·π π’π π‘ 2 π 1 π‘ 1 , π’π 1 π‘ 1 π‘ 1 , 0 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π β² , β¦ π 2 β² , π π πππ’ π‘ = β¦ , π‘ β² , 0 π π π‘ 2 πππ π = π β π πππ’,π π‘ π , 0 π‘ 2 , π 2 β² = πππ π β π½ π β β π‘πππ ? β² , π π‘ 2 , π 2 + π’π π‘ = π’π 2 (π‘ 2 ) π‘ π π π‘ π , π π + π’π π‘ πππ‘π π π·π π’
π¦ 2 CM 1 π π·π 2 π§ 1 π 1 β² , 0 π‘ 1 π πππ’ π‘ 1 , π 1 π‘ 1 , π 1 + π’π π‘ = π’π 1 (π‘ 1 ) ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π β² , β¦ π 2 β² , π π πππ’ π‘ = β¦ , π‘ β² , 0 π‘ 2 π π πππ π = π β π πππ’,π π‘ π , 0 π ππ¦π’ π‘ 2 , π 2 π‘ 2 , π 2 + π’π π‘ β€ π’π 2 π‘ 2 β² = , π π β ,π π π β π‘ π β πππ π β π½ π β β π‘πππ π ππ¦π’,π π‘ π , π π + π’π π‘ , 0 β² , π π‘ π π π‘ π , π π + π’π π‘ πππ‘π π π·π π’
CM π 1 π π·π 2 π 1 π 1 ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π 2 π π·π π’
CM π 1 π π·π 2 π 1 π 1 π§ π‘πππ ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π β² , β¦ π 2 β² , π π π ππ¦π’ π‘, π , π¦ = β¦ , π‘ π β² = α π ππ¦π’,π π‘ π , π π + π , π π‘πππ,π π¦ , 0 πππ π β π½ π‘πππ β² , π π π‘ π π‘ π , π π + π πππ‘π π π·π π’
ππππ’π’ππ π·π = π, π, π, π ππππ’ , π πππ’ , π ππ¦π’ , π, π’π π = π π·π π = π π·π π = Γ πβπΈ π π π = π‘, π π‘ β π, 0 β€ π β€ π’π(π‘) π ππππ’ = π‘ ππππ’ , π ππππ’ β π π‘ ππππ’ = (β¦ , π‘ ππππ’,π , π ππππ’,π β π ππππ’ , β¦ ) π ππππ’ = min πβπΈ π ππππ’,π π‘ ππππ’,π , π ππππ’,π = π ππππ’,π β² , β¦ β² , π π πππ’ π‘ = β¦ , π‘ π π πππ π = π β π πππ’,π π‘ π , 0 β² = , π π β ,π π π β π‘ π β β² , π π ππ¦π’,π π‘ π , π π + π’π π‘ , 0 πππ π β π½ π β π‘ π π π‘ π , π π + π’π π‘ πππ‘π β² , β¦ β² , π π π ππ¦π’ π‘, π , π¦ = β¦ , π‘ π β² = α π ππ¦π’,π π‘ π , π π + π , π π‘πππ,π π¦ , 0 πππ π β π½ π‘πππ β² , π π π‘ π π‘ π , π π + π πππ‘π π π‘ = ΰ΅π π β ,π‘πππ π π β π‘ π β ππ π‘πππ β π½ π β ππ π‘πππ β π½ π β π π β = π‘πππππ’(π½ππ π‘ ) π½ππ π‘ = π β πΈ π π = π’π(π‘) π’π π‘ = min πβπΈ π π = π’π π π‘ π β π π
Hierarchical Simulator
Root coordinator (i, t) (*, t) (done, t) (done, t) Coupled DEVS Coordinator (i, t) (*, t) (x, t) (y, t) (done, t) (done, t) (done, t) (done, t) Simulator Simulator Atomic DEVS Atomic DEVS
DEVS Semantics Operational Denotational Semantics Semantics Abstract Atomic DEVS [1] Simulator Hierarchical Closure under Coupled DEVS Simulator Coupling [1] Ashvin Radiya and Robert G. Sargent. A logic-based foundation of discrete event modeling and simulation. ACM Transactions on Modeling and Computer Simulation, 1(1):3-51, 1994.
Conclusions (*, t) (done, t) (i,t) (y, t) (x, t) ο΅ Atomic DEVS ππππ π΅ ππππππ π΅ ππππ ο΅ Coupled DEVS ο΅ Closure under coupling ο΅ Abstract Simulator take_break ο toAuto go_to_work ο toManual
http://msdl.cs.mcgill.ca/projects/PythonPDEVS
Limitations of Classic DEVS ο΅ Parallel implementation ο΅ Parallel DEVS [1] ο΅ Select function is artificial ο΅ Parallel DEVS [1] ο΅ Dynamic Structure systems ο΅ Dynamic Structure DEVS [2] [1] A.C.-H. Chow. Parallel DEVS: A parallel, hierarchical, modular modeling formalism and its distributed simulator. Transactions of the Society for Computer Simulation International, 13(2):55-68, 1996. [2] F . Barros. The dynamic structure discrete event system specification formalism. Transactions of the Society for Computer Simulation International, 13(1):35-46, 1996.
Recommend
More recommend