pm4py.conformance.replay_prefix_tbr#

pm4py.conformance.replay_prefix_tbr(prefix: List[str], net: PetriNet, im: Marking, fm: Marking, activity_key: str = 'concept:name') Marking[source]#

Replays a prefix (list of activities) on a given accepting Petri net, using Token-Based Replay.

Parameters:
  • prefix – list of activities

  • net (PetriNet) – Petri net

  • im (Marking) – initial marking

  • fm (Marking) – final marking

  • activity_key (str) – attribute to be used as activity

Return type:

Marking

import pm4py

net, im, fm = pm4py.read_pnml('tests/input_data/running-example.pnml')
marking = pm4py.replay_prefix_tbr(['register request', 'check ticket'], net, im, fm)