pm4py.algo.simulation.playout.dfg.variants.performance module#

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

Bases: Enum

NUM_TRACES = 'num_traces'#
ACTIVITY_KEY = 'pm4py:param:activity_key'#
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
CASE_ID_KEY = 'pm4py:param:case_id_key'#
CASE_ARRIVAL_RATE = 'case_arrival_rate'#
PERFORMANCE_DFG = 'performance_dfg'#
PARAM_ARTIFICIAL_START_ACTIVITY = 'pm4py:param:art_start_act'#
PARAM_ARTIFICIAL_END_ACTIVITY = 'pm4py:param:art_end_act'#
pm4py.algo.simulation.playout.dfg.variants.performance.dict_based_choice(dct: Dict[str, float]) str[source]#

Performs a weighted choice, given a dictionary associating a weight to each possible choice

Parameters:

dct – Dictionary associating a weight to each choice

Returns:

Choice

Return type:

choice

pm4py.algo.simulation.playout.dfg.variants.performance.apply(frequency_dfg: Dict[Tuple[str, str], int], start_activities: Dict[str, int], end_activities: Dict[str, int], parameters: Dict[Any, Any] | None = None) EventLog[source]#

Simulates a log out with the transition probabilities provided by the frequency DFG, and the time deltas provided by the performance DFG

Parameters:
  • frequency_dfg – Frequency DFG

  • start_activities – Start activities

  • end_activities – End activities

  • parameters – Parameters of the algorithm, including: - Parameters.NUM_TRACES: the number of traces of the simulated log - Parameters.ACTIVITY_KEY: the activity key to be used in the simulated log - Parameters.TIMESTAMP_KEY: the timestamp key to be used in the simulated log - Parameters.CASE_ID_KEY: the case identifier key to be used in the simulated log - Parameters.CASE_ARRIVAL_RATE: the average distance (in seconds) between the start of two cases (default: 1) - Parameters.PERFORMANCE_DFG: (mandatory) the performance DFG that is used for the time deltas.

Returns:

Simulated log

Return type:

simulated_log