pm4py.objects.conversion.dcr package#

Subpackages#

Submodules#

pm4py.objects.conversion.dcr.converter module#

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

Bases: Enum

TO_INHIBITOR_NET = <module 'pm4py.objects.conversion.dcr.variants.to_inhibitor_net' from '/home/vco/Projects/pm4py-dcr4py/pm4py/objects/conversion/dcr/variants/to_inhibitor_net.py'>#
TO_TIMED_ARC_PETRI_NET = <module 'pm4py.objects.conversion.dcr.variants.to_timed_arc_petri_net' from '/home/vco/Projects/pm4py-dcr4py/pm4py/objects/conversion/dcr/variants/to_timed_arc_petri_net.py'>#
pm4py.objects.conversion.dcr.converter.apply(obj: DcrGraph | ExtendedDcrGraph | HierarchicalDcrGraph | TimedDcrGraph, variant=Variants.TO_INHIBITOR_NET, parameters=None) Tuple[PetriNet, Marking, Marking | None][source]#

Converts a DCR Graph to a Petri Net

Reference paper: Vlad Paul Cosma, Thomas T. Hildebrandt & Tijs Slaats. “Transforming Dynamic Condition Response Graphs to Safe Petri Nets” https://doi.org/10.1007/978-3-031-33620-1_22 Parameters ———- obj :

A DCR Graph with all 6 relations and optionally timed.

variant:

TO_INHIBITOR_NET|TO_TIMED_ARC_PETRI_NET Create either an untimed inhibitor net or a timed arc petri net respectively.

parameters:
Configurable parameters:

-preoptimize: True if the conversion should be optimized based on the reachable DCR Markings else False -postoptimize: True if the conversion should be optimized based on the reachable Petri Net Marking else False -map_unexecutable_events: True if events not executable in the DCR Graph should be mapped, else False -tapn_path: Path to export the net to. Can end in .pnml or .tapn for timed arc petri nets[1] -debug: True if debug information should be displayed and a Petri Net for each step in the conversion should be generated else False

Returns#

A Petri Net, an initial marking and None representing that there is no final marking

References:

[1] Lasse Jacobsen, Morten Jacobsen, Mikael H. Møller, and Jirı Srba. “Verification of Timed-Arc Petri Nets” https://doi.org/10.1007/978-3-642-18381-2_4

Note:

The Petri Net final marking is None as declarative DCR Graphs have no unique accepting state based on its markings

Module contents#