pm4py.objects.petri_net.utils.reachability_graph module#

PM4Py – A Process Mining Library for Python

Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.

Website: https://processintelligence.solutions Contact: info@processintelligence.solutions

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.