pm4py.objects.petri_net.data_petri_nets.semantics module#

class pm4py.objects.petri_net.data_petri_nets.semantics.DataPetriNetSemantics[source]#

Bases: Semantics

is_enabled(t, pn, m, **kwargs)[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

  • param e: associated event (optional, as keyword argument)

Return type:

return: true if enabled, false otherwise

execute(t, pn, m, **kwargs)[source]#

Executes a given transition in a given Petri net, the given data marking and the associated event

Parameters:
  • param t: transition to execute

  • param pn: Petri net

  • param m: marking to use

  • param e: associated event (optional, as keyword argument)

Return type:

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

weak_execute(t, pn, m, **kwargs)[source]#

Executes a given transition in a given Petri net, the given data marking and the associated event, even if not fully enabled

Parameters:
  • param t: transition to execute

  • param pn: Petri net

  • param m: marking to use

  • param e: associated event (optional, as keyword argument)

Return type:

return: newly reached marking

enabled_transitions(pn, m, **kwargs)[source]#

Returns a set of enabled transitions in a Petri net, the given data marking and the associated event

Parameters:
  • param pn: Petri net

  • param m: marking of the pn

  • param e: associated event (optional, as keyword argument)

Return type:

return: set of enabled transitions

pm4py.objects.petri_net.data_petri_nets.semantics.check_guard_safety(guard)[source]#

Checks the security of a guard before evaluating that

Parameters:

guard – Guard

Returns:

True if the guard is safe to execute, False otherwise

Return type:

safety

pm4py.objects.petri_net.data_petri_nets.semantics.evaluate_guard(guard, read_variables, data)[source]#

Evaluates a data Petri net guard given the current data

Parameters:
  • guard – Guard

  • read_variables – Read variables

Returns:

Boolean value

Return type:

boolean

pm4py.objects.petri_net.data_petri_nets.semantics.is_enabled(t, pn, m, e)[source]#
pm4py.objects.petri_net.data_petri_nets.semantics.execute(t, pn, m, e)[source]#
pm4py.objects.petri_net.data_petri_nets.semantics.weak_execute(t, m, e)[source]#
pm4py.objects.petri_net.data_petri_nets.semantics.enabled_transitions(pn, m, e)[source]#