Skip to content

Commit

Permalink
added example
Browse files Browse the repository at this point in the history
  • Loading branch information
fit-alessandro-berti committed Nov 12, 2024
1 parent a5d2160 commit 511d999
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions examples/wf_net_to_powl_alt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
def execute_script():
import pm4py
from pm4py.objects.conversion.wf_net.variants import to_powl

log = pm4py.read_xes("../tests/input_data/receipt.xes")
log = pm4py.filter_variants_top_k(log, 11)

powl = pm4py.discover_powl(log)
print(powl)
net, im, fm = pm4py.convert_to_petri_net(powl)

powl2 = to_powl.apply(net, im, fm)
print(powl2)
net2, im2, fm2 = pm4py.convert_to_petri_net(powl2)

fitness = pm4py.fitness_alignments(log, net, im, fm)
print(fitness)


if __name__ == "__main__":
execute_script()

0 comments on commit 511d999

Please sign in to comment.