pm4py.algo.conformance.alignments.dfg.variants package

Submodules

pm4py.algo.conformance.alignments.dfg.variants.classic module

class pm4py.algo.conformance.alignments.dfg.variants.classic.Outputs(value)[source]

Bases: enum.Enum

An enumeration.

ALIGNMENT = 'alignment'
CLOSED = 'closed'
COST = 'cost'
INTERNAL_COST = 'internal_cost'
VISITED = 'visited_states'
class pm4py.algo.conformance.alignments.dfg.variants.classic.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
INTERNAL_LOG_MOVE_COST_FUNCTION = 'internal_log_move_cost_function'
LOG_MOVE_COST_FUNCTION = 'log_move_cost_function'
MODEL_MOVE_COST_FUNCTION = 'model_move_cost_function'
PARAMETER_VARIANT_DELIMITER = 'variant_delimiter'
SYNC_COST_FUNCTION = 'sync_cost_function'
pm4py.algo.conformance.alignments.dfg.variants.classic.apply(obj, dfg, sa, ea, parameters=None)[source]

Applies the alignment algorithm provided a log/trace object, and a connected DFG

Parameters
  • obj – Event log / Trace

  • dfgConnected directly-Follows Graph

  • sa – Start activities

  • ea – End activities

  • parameters – Parameters of the algorithm: - Parameters.SYNC_COST_FUNCTION: for each activity that is in both the trace and the model, provide the non-negative cost of a sync move - Parameters.MODEL_MOVE_COST_FUNCTION: for each activity that is in the model, provide the non-negative cost of a model move - Parameters.LOG_MOVE_COST_FUNCTION: for each activity that is in the trace, provide the cost of a log move that is returned in the alignment to the user (but not used internally for ordering the states) - Parameters.INTERNAL_LOG_MOVE_COST_FUNCTION: for each activity that is in the trace, provide the cost of a log move that is used internally for ordering the states in the search algorithm. - Parameters.ACTIVITY_KEY: the attribute of the log that is the activity

Returns

Result of the alignment

Return type

ali

pm4py.algo.conformance.alignments.dfg.variants.classic.apply_from_variant(variant, dfg, sa, ea, parameters=None)[source]
pm4py.algo.conformance.alignments.dfg.variants.classic.apply_from_variants_list(var_list, dfg, sa, ea, parameters=None)[source]
pm4py.algo.conformance.alignments.dfg.variants.classic.apply_from_variants_list_dfg_string(var_list, dfg_serialization, parameters=None)[source]
pm4py.algo.conformance.alignments.dfg.variants.classic.apply_log(log, dfg, sa, ea, parameters=None)[source]

Applies the alignment algorithm provided a log object, and a connected DFG

Parameters
  • log – Event log

  • dfgConnected DFG

  • sa – Start activities

  • ea – End activities

  • parameters – Parameters of the algorithm: - Parameters.SYNC_COST_FUNCTION: for each activity that is in both the trace and the model, provide the non-negative cost of a sync move - Parameters.MODEL_MOVE_COST_FUNCTION: for each activity that is in the model, provide the non-negative cost of a model move - Parameters.LOG_MOVE_COST_FUNCTION: for each activity that is in the trace, provide the cost of a log move that is returned in the alignment to the user (but not used internally for ordering the states) - Parameters.INTERNAL_LOG_MOVE_COST_FUNCTION: for each activity that is in the trace, provide the cost of a log move that is used internally for ordering the states in the search algorithm. - Parameters.ACTIVITY_KEY: the attribute of the log that is the activity

Returns

For each trace, contains a dictionary describing the alignment

Return type

aligned_traces

pm4py.algo.conformance.alignments.dfg.variants.classic.apply_trace(trace, dfg, sa, ea, parameters=None)[source]

Applies the alignment algorithm provided a trace of a log, and a connected DFG

Parameters
  • trace – Trace

  • dfgConnected DFG

  • sa – Start activities

  • ea – End activities

  • parameters – Parameters of the algorithm: - Parameters.SYNC_COST_FUNCTION: for each activity that is in both the trace and the model, provide the non-negative cost of a sync move - Parameters.MODEL_MOVE_COST_FUNCTION: for each activity that is in the model, provide the non-negative cost of a model move - Parameters.LOG_MOVE_COST_FUNCTION: for each activity that is in the trace, provide the cost of a log move that is returned in the alignment to the user (but not used internally for ordering the states) - Parameters.INTERNAL_LOG_MOVE_COST_FUNCTION: for each activity that is in the trace, provide the cost of a log move that is used internally for ordering the states in the search algorithm. - Parameters.ACTIVITY_KEY: the attribute of the log that is the activity

Returns

Dictionary describing the alignment

Return type

ali

pm4py.algo.conformance.alignments.dfg.variants.classic.dijkstra_to_end_node(dfg, sa, ea, start_node, end_node, activities_model, sync_cost_function, model_move_cost_function)[source]

Gets the cost of the minimum path from a node to the end node

Parameters
  • dfgConnected DFG

  • sa – Start activities

  • ea – End activities

  • start_node – Start node of the graph (connected to all the start activities)

  • end_node – End node of the graph (connected to all the end activities)

  • activities_model – Set of the activities contained in the DFG

  • sync_cost_function – Given an activity, provides the cost when the activity is executed in a sync way

  • model_move_cost_function – Given an activity, provides the cost when the activity is executed as a move-on-model

Returns

Dictionary associating to each node the cost to the end node

Return type

cost_to_end_node

Module contents