pm4py.objects.petri_net package

Submodules

pm4py.objects.petri_net.obj module

class pm4py.objects.petri_net.obj.Marking(iterable=None, /, **kwds)[source]

Bases: collections.Counter

class pm4py.objects.petri_net.obj.PetriNet(name=None, places=None, transitions=None, arcs=None, properties=None)[source]

Bases: object

class Arc(source, target, weight=1, properties=None)[source]

Bases: object

property properties
property source
property target
property weight
class Place(name, in_arcs=None, out_arcs=None, properties=None)[source]

Bases: object

property in_arcs
property name
property out_arcs
property properties
class Transition(name, label=None, in_arcs=None, out_arcs=None, properties=None)[source]

Bases: object

property in_arcs
property label
property name
property out_arcs
property properties
property arcs
property name
property places
property properties
property transitions

pm4py.objects.petri_net.properties module

pm4py.objects.petri_net.semantics module

pm4py.objects.petri_net.semantics.enabled_transitions(pn, m)[source]

Returns a set of enabled transitions in a Petri net and given marking

Parameters
  • param pn: Petri net

  • param m: marking of the pn

Returns

Return type

return: set of enabled transitions

pm4py.objects.petri_net.semantics.execute(t, pn, m)[source]

Executes a given transition in a given Petri net and Marking

Parameters
  • param t: transition to execute

  • param pn: Petri net

  • param m: marking to use

Returns

Return type

return: newly reached marking if :param t: is enabled, None otherwise

pm4py.objects.petri_net.semantics.is_enabled(t, pn, m)[source]

Verifies whether a given transition is enabled in a given Petri net and marking

Parameters
  • param t: transition to check

  • param pn: Petri net

  • param m: marking to check

Returns

Return type

return: true if enabled, false otherwise

pm4py.objects.petri_net.semantics.try_to_execute(t, pn, m)[source]
pm4py.objects.petri_net.semantics.weak_execute(t, m)[source]

Execute a transition even if it is not fully enabled

Parameters
  • param t: transition to execute

  • param m: marking to use

Returns

Return type

return: newly reached marking if :param t: is enabled, None otherwise

Module contents