pm4py.objects.conversion.dcr.variants package#

Subpackages#

Submodules#

pm4py.objects.conversion.dcr.variants.reachability_analysis module#

class pm4py.objects.conversion.dcr.variants.reachability_analysis.Parameters(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

MAX_ELAB_TIME = 'max_elab_time'#
PETRI_SEMANTICS = 'petri_semantics'#
pm4py.objects.conversion.dcr.variants.reachability_analysis.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

Returns#

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

pm4py.objects.conversion.dcr.variants.reachability_analysis.get_visible_transitions_eventually_enabled_by_marking(net, marking, semantics)[source]#

Get visible transitions eventually enabled by marking (passing possibly through hidden transitions) Parameters ———- net

Petri net

marking

Current marking

semantics

Petri net semantics

pm4py.objects.conversion.dcr.variants.reachability_analysis.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.conversion.dcr.variants.reachability_analysis.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#

re_gr

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

pm4py.objects.conversion.dcr.variants.reachability_analysis.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: Transition system that represents the reachability graph of the input Petri net.

pm4py.objects.conversion.dcr.variants.to_inhibitor_net module#

class pm4py.objects.conversion.dcr.variants.to_inhibitor_net.Dcr2PetriNet(preoptimize=True, postoptimize=True, map_unexecutable_events=False, debug=False, **kwargs)[source]#

Bases: object

initialize_helper_struct(graph: dict) None[source]#

Initializes a helper structure to keep track of DCR Events and their related places and transitions in the Petri Net Parameters ———- graph

the DcrGraph

Returns#

None

create_event_pattern_places(event: str, graph: dict, net: ~pm4py.objects.petri_net.obj.PetriNet, m: ~pm4py.objects.petri_net.obj.Marking) -> (<class 'pm4py.objects.petri_net.obj.InhibitorNet'>, <class 'pm4py.objects.petri_net.obj.Marking'>)[source]#

Creates petri net places and the petri net marking for a single event

create_event_pattern(event: str, graph: dict, net: ~pm4py.objects.petri_net.obj.PetriNet, m: ~pm4py.objects.petri_net.obj.Marking) -> (<class 'pm4py.objects.petri_net.obj.InhibitorNet'>, <class 'pm4py.objects.petri_net.obj.Marking'>)[source]#

Creates the petri net for a single event

post_optimize_petri_net_reachability_graph(net, m, graph=None, merge_parallel_places=True) InhibitorNet[source]#

Removes dead regions in the petri net based on the reachability graph. Parameters ———- merge_parallel_places

If True it will remove duplicate places that behave the same in their marking

Returns#

Reduced petri net

export_debug_net(net, m, path, step, pn_export_format)[source]#

Helper function to export a petri net at any intermediary step in the conversion of the DcrGraph

apply(graph, pn_path=None, **kwargs) -> (<class 'pm4py.objects.petri_net.obj.InhibitorNet'>, <class 'pm4py.objects.petri_net.obj.Marking'>)[source]#
pm4py.objects.conversion.dcr.variants.to_inhibitor_net.apply(dcr, parameters)[source]#

pm4py.objects.conversion.dcr.variants.to_timed_arc_petri_net module#

class pm4py.objects.conversion.dcr.variants.to_timed_arc_petri_net.Dcr2TimedArcPetri(preoptimize=True, postoptimize=True, map_unexecutable_events=False, debug=False, **kwargs)[source]#

Bases: object

initialize_helper_struct(G) None[source]#
create_event_pattern_places(event, G, tapn, m) -> (<class 'pm4py.objects.petri_net.timed_arc_net.obj.TimedArcNet'>, <class 'pm4py.objects.petri_net.timed_arc_net.obj.TimedMarking'>)[source]#
create_event_pattern(event, G, tapn, m) -> (<class 'pm4py.objects.petri_net.timed_arc_net.obj.TimedArcNet'>, <class 'pm4py.objects.petri_net.timed_arc_net.obj.TimedMarking'>)[source]#
post_optimize_petri_net_reachability_graph(tapn, m, G=None) TimedArcNet[source]#
static post_optimize_parallel_places(event_place, event_place_prime, parallel_places, places_to_rename, type_prime, m)[source]#
export_debug_net(tapn, m, path, step, pn_export_format)[source]#
apply(G, tapn_path=None, **kwargs) -> (<class 'pm4py.objects.petri_net.timed_arc_net.obj.TimedArcNet'>, <class 'pm4py.objects.petri_net.timed_arc_net.obj.TimedMarking'>)[source]#
pm4py.objects.conversion.dcr.variants.to_timed_arc_petri_net.apply(dcr, parameters)[source]#

Module contents#