Im using the pm4py packege in order to simulate a Petri net model using a log. I do this by chosing random traces from the log file and than use induactive_miner to create Petri net for those traces. My goal is to save the Petri net and load it again so the model will stay the same (since any time i get diffrent model). Is there a way to do this?
I have tried to find such an option in the pm4py pakcge but i didn't saw this kind of option.
You can use the
pm4py.read_pnml()andpm4py.write_pnml()functions.Example:
Official docs:
https://pm4py.fit.fraunhofer.de/static/assets/api/2.5.0/generated/pm4py.read.read_pnml.html
https://pm4py.fit.fraunhofer.de/static/assets/api/2.5.0/generated/pm4py.write.write_pnml.html