pm4py / pm4py-core

Public repository for the PM4Py (Process Mining for Python) project.
https://pm4py.fit.fraunhofer.de
GNU General Public License v3.0
722 stars 286 forks source link

About PN to PT question #362

Closed JackEnzo closed 1 year ago

JackEnzo commented 1 year ago

I don't know why it doesn't work?

import pm4py
from pm4py.algo.discovery.heuristics.variants import plusplus
from pm4py.visualization.heuristics_net import visualizer
from pm4py.visualization.petri_net import visualizer as pn_visualizer
import pandas as pd

def execute_script():

    log = pm4py.read_xes("../tests/input_data/interval_event_log.xes")
    net1, im1, fm1 = plusplus.apply(log)
    tree = pm4py.convert_to_process_tree(net1, im1, fm1)
    print(tree)

if __name__ == "__main__":
    execute_script()
fit-sebastiaan-van-zelst commented 1 year ago

Hi JackEnzo,

Can you upload a visualization of the Petri net discovered by the heuristic miner? It can be the case that the resulting Petri net is not a process tree. In that case, the conversion should break.

JackEnzo commented 1 year ago

Dear @fit-sebastiaan-van-zelst, I upload the Petri net using the Heuristics Miner ++ algorithm as following graph. heu_net

fit-alessandro-berti commented 1 year ago

Dear @JackEnzo

The Petri net is not block-structured therefore it cannot be converted to a process tree using the implemented approach.

The approach is described in the paper:

"Translating Workflow Nets to Process Trees: An Algorithmic Approach"