pm4py.visualization.petri_net.util.vis_trans_shortest_paths module#

pm4py.visualization.petri_net.util.vis_trans_shortest_paths.get_shortest_paths_from_trans(original_trans, trans, spaths, visited_arcs, visited_transitions, added_elements, rec_depth)[source]#

Get shortest paths from a given transition

Parameters:
  • original_trans – Original transition

  • trans – Current considered transition

  • spaths – Map of shortest paths

  • visited_arcs – Set of visited arcs

  • visited_transitions – Set of visited transitions

  • added_elements – Elements to add recursively

  • rec_depth – Recursion depth

Returns:

  • spaths – Map of shortest paths

  • visited_arcs – Set of visited arcs

  • added_elements – Elements to add recursively

pm4py.visualization.petri_net.util.vis_trans_shortest_paths.get_shortest_paths(net, enable_extension=False)[source]#

Gets shortest paths between visible transitions in a Petri net

Parameters:
  • net – Petri net

  • enable_extension – Enable decoration of more arcs, in a risky way, when needed

Returns:

Shortest paths

Return type:

spaths

pm4py.visualization.petri_net.util.vis_trans_shortest_paths.get_decorations_from_dfg_spaths_acticount(net, dfg, spaths, activities_count, variant='frequency', aggregation_measure=None)[source]#

Get decorations from Petrinet without doing any replay but based on DFG measures, shortest paths and activities count. The variant could be ‘frequency’ or ‘performance’. Aggregation measure could also be specified

Parameters:
  • net – Petri net

  • dfg – Directly-Follows graph

  • spaths – Shortest paths between visible transitions in the Petri net

  • activities_count – Count of activities in the Petri net

  • variant – Describe how to decorate the Petri net (could be frequency or performance)

  • aggregation_measure – Specifies the aggregation measure

Returns:

Decorations to use for the Petri net

Return type:

decorations