add Jinja2-based tapaal exporter
This commit is contained in:
parent
6aa5302e36
commit
26d8655147
4 changed files with 110 additions and 0 deletions
6
examples/petrinet/helpers.py
Normal file
6
examples/petrinet/helpers.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
from uuid import UUID
|
||||
|
||||
def get_num_tokens(odapi, place: UUID):
|
||||
pn_of = odapi.get_incoming(place, "pn_of")[0]
|
||||
place_state = odapi.get_source(pn_of)
|
||||
return odapi.get_slot_value(place_state, "numTokens")
|
||||
Loading…
Add table
Add a link
Reference in a new issue