pm4py.write.write_pnml#

pm4py.write.write_pnml(petri_net: PetriNet, initial_marking: Marking, final_marking: Marking, file_path: str, encoding: str = 'utf-8') None[source]#

Writes a Petri net object to disk in the .pnml format (see pnml-standard)

Parameters:
  • petri_net (PetriNet) – Petri net object that needs to be written to disk

  • initial_marking (Marking) – initial marking of the Petri net

  • final_marking (Marking) – final marking of the Petri net

  • file_path (str) – target file path on disk of the .pnml file

  • encoding (str) – the encoding to be used (default: utf-8)

import pm4py

log = pm4py.write_pnml(pn, im, fm, '<path_to_export_to>')