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 diskinitial_marking (
Marking
) – initial marking of the Petri netfinal_marking (
Marking
) – final marking of the Petri netfile_path (
str
) – target file path on disk of the.pnml
fileencoding (
str
) – the encoding to be used (default: utf-8)
import pm4py log = pm4py.write_pnml(pn, im, fm, '<path_to_export_to>')