str, auto_guess_final_marking: bool = False) Tuple[PetriNet, Marking, Marking][source]#

Reads a Petri net object from a .pnml file. The Petri net object returned is a triple containing the following objects:

  1. Petrinet Object, encoded as a PetriNet class

  2. Initial Marking

  3. Final Marking

Return type:

Tuple[PetriNet, Marking, Marking]


file_path (str) – file path of the Petri net model (.pnml file) on disk

import pm4py

pn = pm4py.read_pnml("<path_to_pnml_file>")