pm4py.algo.simulation.playout.petri_net.variants.basic_playout module#

class pm4py.algo.simulation.playout.petri_net.variants.basic_playout.Parameters(*values)[source]#

Bases: Enum

ACTIVITY_KEY = 'pm4py:param:activity_key'#
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
CASE_ID_KEY = 'pm4py:param:case_id_key'#
RETURN_VISITED_ELEMENTS = 'return_visited_elements'#
NO_TRACES = 'noTraces'#
MAX_TRACE_LENGTH = 'maxTraceLength'#
PETRI_SEMANTICS = 'petri_semantics'#
ADD_ONLY_IF_FM_IS_REACHED = 'add_only_if_fm_is_reached'#
FM_LEQ_ACCEPTED = 'fm_leq_accepted'#
pm4py.algo.simulation.playout.petri_net.variants.basic_playout.apply_playout(net, initial_marking, no_traces=100, max_trace_length=100, case_id_key='concept:name', activity_key='concept:name', timestamp_key='time:timestamp', final_marking=None, return_visited_elements=False, semantics=<pm4py.objects.petri_net.semantics.ClassicSemantics object>, add_only_if_fm_is_reached=False, fm_leq_accepted=False)[source]#

Do the playout of a Petrinet generating a log

Parameters:
  • net – Petri net to play-out

  • initial_marking – Initial marking of the Petri net

  • no_traces – Number of traces to generate

  • max_trace_length – Maximum number of events per trace (do break)

  • case_id_key – Trace attribute that is the case ID

  • activity_key – Event attribute that corresponds to the activity

  • timestamp_key – Event attribute that corresponds to the timestamp

  • final_marking – If provided, the final marking of the Petri net

  • semantics – Semantics of the Petri net to be used (default: petri_net.semantics.ClassicSemantics())

  • add_only_if_fm_is_reached – Adds the case only if the final marking is reached

  • fm_leq_accepted – Accepts traces ending in a marking that is a superset of the final marking

pm4py.algo.simulation.playout.petri_net.variants.basic_playout.apply(net: PetriNet, initial_marking: Marking, final_marking: Marking = None, parameters: Dict[str | Parameters, Any] | None = None) EventLog[source]#

Do the playout of a Petrinet generating a log

Parameters:
  • net – Petri net to play-out

  • initial_marking – Initial marking of the Petri net

  • final_marking – If provided, the final marking of the Petri net

  • parameters

    Parameters of the algorithm:

    Parameters.NO_TRACES -> Number of traces of the log to generate Parameters.MAX_TRACE_LENGTH -> Maximum trace length Parameters.PETRI_SEMANTICS -> Petri net semantics to be used (default: petri_nets.semantics.ClassicSemantics()) Parameters.ADD_ONLY_IF_FM_IS_REACHED -> adds the case only if the final marking is reached Parameters.FM_LEQ_ACCEPTED -> Accepts traces ending in a marking that is a superset of the final marking