pm4py.objects.petri_net.utils.reachability_graph module#

class pm4py.objects.petri_net.utils.reachability_graph.Parameters(*values)[source]#

Bases: Enum

MAX_ELAB_TIME = 'max_elab_time'#
PETRI_SEMANTICS = 'petri_semantics'#
pm4py.objects.petri_net.utils.reachability_graph.staterep(name)[source]#

Creates a string representation for a state of a transition system. Necessary because graphviz does not support symbols simulation than alphanimerics and ‘_’. TODO: find a better representation.

Parameters:

name (the name of a state)

Return type:

Version of the name filtered of non-alphanumerical characters (except ‘_’).

pm4py.objects.petri_net.utils.reachability_graph.marking_flow_petri(net, im, return_eventually_enabled=False, parameters=None)[source]#

Construct the marking flow of a Petri net

Parameters:
  • net – Petri net

  • im – Initial marking

  • return_eventually_enabled – Return the eventually enabled (visible) transitions

pm4py.objects.petri_net.utils.reachability_graph.construct_reachability_graph_from_flow(incoming_transitions, outgoing_transitions, use_trans_name=False, parameters=None)[source]#

Construct the reachability graph from the marking flow

Parameters:
  • incoming_transitions – Incoming transitions

  • outgoing_transitions – Outgoing transitions

  • use_trans_name – Use the transition name

Returns:

Transition system that represents the reachability graph of the input Petri net.

Return type:

re_gr

pm4py.objects.petri_net.utils.reachability_graph.construct_reachability_graph(net, initial_marking, use_trans_name=False, parameters=None) TransitionSystem[source]#

Creates a reachability graph of a certain Petri net. DO NOT ATTEMPT WITH AN UNBOUNDED PETRI NET, EVER.

Parameters:
  • net (Petri net)

  • initial_marking (initial marking of the Petri net.)

Returns:

re_gr

Return type:

Transition system that represents the reachability graph of the input Petri net.