A fully working version of the scheduling language with added examples
This commit is contained in:
parent
ec42f74960
commit
ebfd85a666
126 changed files with 7235 additions and 981 deletions
13
examples/petrinet/models/rules/all_incoming.od
Normal file
13
examples/petrinet/models/rules/all_incoming.od
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# A place with no tokens:
|
||||
|
||||
p:RAM_PNPlace
|
||||
ps:RAM_PNPlaceState {
|
||||
RAM_numTokens = `True`;
|
||||
}
|
||||
:RAM_pn_of (ps -> p)
|
||||
|
||||
# An incoming arc from that place to our transition:
|
||||
|
||||
t:RAM_PNTransition
|
||||
|
||||
:RAM_arc (p -> t)
|
||||
13
examples/petrinet/models/rules/all_incomming.od
Normal file
13
examples/petrinet/models/rules/all_incomming.od
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# A place with no tokens:
|
||||
|
||||
p:RAM_PNPlace
|
||||
ps:RAM_PNPlaceState {
|
||||
RAM_numTokens = `True`;
|
||||
}
|
||||
:RAM_pn_of (ps -> p)
|
||||
|
||||
# An incoming arc from that place to our transition:
|
||||
|
||||
t:RAM_PNTransition
|
||||
|
||||
:RAM_arc (p -> t)
|
||||
13
examples/petrinet/models/rules/all_outgoing.od
Normal file
13
examples/petrinet/models/rules/all_outgoing.od
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# A place with no tokens:
|
||||
|
||||
p:RAM_PNPlace
|
||||
ps:RAM_PNPlaceState {
|
||||
RAM_numTokens = `True`;
|
||||
}
|
||||
:RAM_pn_of (ps -> p)
|
||||
|
||||
# An incoming arc from that place to our transition:
|
||||
|
||||
t:RAM_PNTransition
|
||||
|
||||
:RAM_arc (t -> p)
|
||||
13
examples/petrinet/models/rules/increase_outgoing.od
Normal file
13
examples/petrinet/models/rules/increase_outgoing.od
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# A place with no tokens:
|
||||
|
||||
p:RAM_PNPlace
|
||||
ps:RAM_PNPlaceState {
|
||||
RAM_numTokens = `get_value(this) + 1`;
|
||||
}
|
||||
:RAM_pn_of (ps -> p)
|
||||
|
||||
# An outgoing arc from that place to our transition:
|
||||
|
||||
t:RAM_PNTransition
|
||||
|
||||
:RAM_arc (t -> p)
|
||||
13
examples/petrinet/models/rules/input_without_token.od
Normal file
13
examples/petrinet/models/rules/input_without_token.od
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# A place with no tokens:
|
||||
|
||||
p:RAM_PNPlace
|
||||
ps:RAM_PNPlaceState {
|
||||
RAM_numTokens = `get_value(this) == 0`;
|
||||
}
|
||||
:RAM_pn_of (ps -> p)
|
||||
|
||||
# An incoming arc from that place to our transition:
|
||||
|
||||
t:RAM_PNTransition
|
||||
|
||||
:RAM_arc (p -> t)
|
||||
3
examples/petrinet/models/rules/places.od
Normal file
3
examples/petrinet/models/rules/places.od
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# A place with no tokens:
|
||||
|
||||
p:RAM_PNPlace
|
||||
13
examples/petrinet/models/rules/reduce_incoming.od
Normal file
13
examples/petrinet/models/rules/reduce_incoming.od
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# A place with no tokens:
|
||||
|
||||
p:RAM_PNPlace
|
||||
ps:RAM_PNPlaceState {
|
||||
RAM_numTokens = `get_value(this) -1`;
|
||||
}
|
||||
:RAM_pn_of (ps -> p)
|
||||
|
||||
# An incoming arc from that place to our transition:
|
||||
|
||||
t:RAM_PNTransition
|
||||
|
||||
:RAM_arc (p -> t)
|
||||
13
examples/petrinet/models/rules/reduce_incomming.od
Normal file
13
examples/petrinet/models/rules/reduce_incomming.od
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# A place with no tokens:
|
||||
|
||||
p:RAM_PNPlace
|
||||
ps:RAM_PNPlaceState {
|
||||
RAM_numTokens = `get_value(this) -1`;
|
||||
}
|
||||
:RAM_pn_of (ps -> p)
|
||||
|
||||
# An incoming arc from that place to our transition:
|
||||
|
||||
t:RAM_PNTransition
|
||||
|
||||
:RAM_arc (p -> t)
|
||||
1
examples/petrinet/models/rules/transition.od
Normal file
1
examples/petrinet/models/rules/transition.od
Normal file
|
|
@ -0,0 +1 @@
|
|||
t:RAM_PNTransition
|
||||
Loading…
Add table
Add a link
Reference in a new issue