Scheduler petrinet example
This commit is contained in:
parent
2c64ebda67
commit
87fc7362db
9 changed files with 139 additions and 6 deletions
70
examples/petrinet/models/schedule.od
Normal file
70
examples/petrinet/models/schedule.od
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
start:Start
|
||||
end:End
|
||||
|
||||
transitions:Match{
|
||||
file = "operational_semantics/transition";
|
||||
}
|
||||
|
||||
|
||||
d:Data_modify
|
||||
{
|
||||
rename = '
|
||||
{
|
||||
"tr": null
|
||||
}';
|
||||
delete = '
|
||||
{
|
||||
"tr": null
|
||||
}';
|
||||
}
|
||||
|
||||
nac_input_without:Match{
|
||||
file = "operational_semantics/all_input_have_token";
|
||||
n = "1";
|
||||
}
|
||||
|
||||
inputs:Match{
|
||||
file = "operational_semantics/all_inputs";
|
||||
}
|
||||
|
||||
rewrite_incoming:Rewrite
|
||||
{
|
||||
file = "operational_semantics/remove_incoming";
|
||||
}
|
||||
|
||||
loop_trans:Loop
|
||||
loop_input:Loop
|
||||
|
||||
p:Print
|
||||
{
|
||||
event = True;
|
||||
label = "transition: ";
|
||||
}
|
||||
|
||||
p2:Print
|
||||
{
|
||||
event = True;
|
||||
label = "inputs: ";
|
||||
}
|
||||
|
||||
:Exec_con(start -> transitions){gate_from = 0;gate_to = 0;}
|
||||
:Exec_con(transitions -> end){gate_from = 1;gate_to = 0;}
|
||||
:Exec_con(transitions -> loop_trans){gate_from = 0;gate_to = 0;}
|
||||
:Exec_con(loop_trans -> nac_input_without){gate_from = 0;gate_to = 0;}
|
||||
|
||||
[//]: # (:Exec_con(nac_input_without -> loop_trans){gate_from = 0;gate_to = 0;})
|
||||
:Exec_con(nac_input_without -> inputs){gate_from = 1;gate_to = 0;}
|
||||
:Exec_con(inputs -> loop_input){gate_from = 0;gate_to = 0;}
|
||||
:Exec_con(inputs -> loop_trans){gate_from = 1;gate_to = 0;}
|
||||
|
||||
:Exec_con(loop_trans -> end){gate_from = 1;gate_to = 0;}
|
||||
|
||||
:Data_con(transitions -> loop_trans)
|
||||
:Data_con(nac_input_without -> p)
|
||||
:Data_con(d -> nac_input_without)
|
||||
:Data_con(loop_trans -> d)
|
||||
:Data_con(loop_trans -> rewrite_incoming)
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue