pm4py/pm4py-core

Trouble Generating Log File with 'Extensive' Playout Variant in Petri Net Simulation from .pmml File

juancolonna opened this issue · 1 comments

Hello everyone,

I am currently working with a .pmml file and attempting to simulate a Petri net to generate a log file. As per the documentation, I have been using the 'playout' function, specifically the 'extensive' variant. However, I've encountered an issue where both attempts result in an empty log file. Here are the two approaches I've tried:

gt_net, gt_net_initial_marking, gt_net_final_marking = pm4py.read_pnml('pdc2023_000000.pnml')
pm4py.view_petri_net(gt_net, gt_net_initial_marking, gt_net_final_marking)

simulated_log = pm4py.algo.simulation.playout.petri_net.variants.extensive.apply(gt_net, gt_net_initial_marking, gt_net_final_marking)
simulated_log

or

from pm4py.algo.simulation.playout.petri_net import algorithm as simulator

simulated_log = simulator.apply(gt_net, gt_net_initial_marking, gt_net_final_marking, variant=simulator.Variants.EXTENSIVE)
simulated_log

Interestingly, when I use the 'basic_playout' variant, I don't encounter this issue, and I'm able to obtain a non-empty log file:

simulated_log = pm4py.algo.simulation.playout.petri_net.variants.basic_playout.apply(gt_net, gt_net_initial_marking, gt_net_final_marking)
simulated_log

I'm seeking insights into why the 'extensive' variant might be causing this problem. Any suggestions or assistance would be greatly appreciated.

The file I'm using can be downloaded from pdc2023_000000.pnml

Thank you for your help.

Dear @juancolonna

Thanks for your inquiry. You need to provide a value for the parameter "maxTraceLength". For example, in the model that you considered, the typical trace length is 20 (while the default value of the parameter is 10).

Cheers