Skip to content

Commit

Permalink
bugfix for silence on transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamBanham committed Oct 14, 2024
1 parent b3cda89 commit db66fdf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pmkoalas/models/petrinet.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,13 +712,19 @@ def parse_pnml_for_dpn(filepath:str) -> PetriNetWithData:
guard = Guard(Expression(transition.attrib['guard']))
else:
guard = Guard(Expression("true"))
# check for silence
if "invisible" in transition.attrib.keys():
silent = transition.attrib["invisible"] == "true"
else:
silent = False
# making a transition
tid = lid if lid != None else id
transition_ids[id] = tid
parsed = GuardedTransition(
transition.find("name").find("text").text,
guard,
tid
tid,
silent
)
transitions[tid] = parsed
### parse the arcs
Expand Down

0 comments on commit db66fdf

Please sign in to comment.