pm4py.algo.conformance.alignments.petri_net.variants.generator_dijkstra_no_heuristics module#

PM4Py – A Process Mining Library for Python Copyright (C) 2026 Process Intelligence Solutions GmbH

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.

Website: https://processintelligence.solutions Contact: info@processintelligence.solutions

class pm4py.algo.conformance.alignments.petri_net.variants.generator_dijkstra_no_heuristics.Parameters(*values)[source]#

Bases: Enum

PARAM_TRACE_COST_FUNCTION = 'trace_cost_function'#
PARAM_MODEL_COST_FUNCTION = 'model_cost_function'#
PARAM_SYNC_COST_FUNCTION = 'sync_cost_function'#
PARAM_ALIGNMENT_RESULT_IS_SYNC_PROD_AWARE = 'ret_tuple_as_trans_desc'#
PARAM_TRACE_NET_COSTS = 'trace_net_costs'#
TRACE_NET_CONSTR_FUNCTION = 'trace_net_constr_function'#
TRACE_NET_COST_AWARE_CONSTR_FUNCTION = 'trace_net_cost_aware_constr_function'#
PARAM_MAX_ALIGN_TIME_TRACE = 'max_align_time_trace'#
PARAM_MAX_ALIGN_TIME = 'max_align_time'#
PARAMETER_VARIANT_DELIMITER = 'variant_delimiter'#
ACTIVITY_KEY = 'pm4py:param:activity_key'#
VARIANTS_IDX = 'variants_idx'#
pm4py.algo.conformance.alignments.petri_net.variants.generator_dijkstra_no_heuristics.get_best_worst_cost(petri_net, initial_marking, final_marking, parameters=None)[source]#

Gets the best worst cost of an alignment

Parameters:
  • petri_net – Petri net

  • initial_marking – Initial marking

  • final_marking – Final marking

Returns:

Best worst cost of alignment

Return type:

best_worst_cost

pm4py.algo.conformance.alignments.petri_net.variants.generator_dijkstra_no_heuristics.apply(trace: Trace, petri_net: PetriNet, initial_marking: Marking, final_marking: Marking, parameters: Dict[str | Parameters, Any] | None = None) → Iterator[Dict[str, Any]][source]#

Performs the basic alignment search, given a trace and a net.

Parameters:
  • trace (list input trace, assumed to be a list of events (i.e. the code will use the activity key)

  • to get the attributes)

  • petri_net (pm4py.objects.petri.net.PetriNet the Petri net to use in the alignment)

  • initial_marking (pm4py.objects.petri.net.Marking initial marking in the Petri net)

  • final_marking (pm4py.objects.petri.net.Marking final marking in the Petri net)

  • parameters (dict (optional) dictionary containing one of the following:) – Parameters.PARAM_TRACE_COST_FUNCTION: list (parameter) mapping of each index of the trace to a positive cost value Parameters.PARAM_MODEL_COST_FUNCTION: dict (parameter) mapping of each transition in the model to corresponding model cost Parameters.PARAM_SYNC_COST_FUNCTION: dict (parameter) mapping of each transition in the model to corresponding synchronous costs Parameters.ACTIVITY_KEY: str (parameter) key to use to identify the activity described by the events

Returns:

dictionary

Return type:

dict with keys alignment, cost, visited_states, queued_states and traversed_arcs

pm4py.algo.conformance.alignments.petri_net.variants.generator_dijkstra_no_heuristics.apply_trace_net(petri_net, initial_marking, final_marking, trace_net, trace_im, trace_fm, parameters=None)[source]#

Performs the basic alignment search, given a trace net and a net.

Parameters:
  • trace (list input trace, assumed to be a list of events (i.e. the code will use the activity key)

  • to get the attributes)

  • petri_net (pm4py.objects.petri.net.PetriNet the Petri net to use in the alignment)

  • initial_marking (pm4py.objects.petri.net.Marking initial marking in the Petri net)

  • final_marking (pm4py.objects.petri.net.Marking final marking in the Petri net)

  • parameters (dict (optional) dictionary containing one of the following:) – Parameters.PARAM_TRACE_COST_FUNCTION: list (parameter) mapping of each index of the trace to a positive cost value Parameters.PARAM_MODEL_COST_FUNCTION: dict (parameter) mapping of each transition in the model to corresponding model cost Parameters.PARAM_SYNC_COST_FUNCTION: dict (parameter) mapping of each transition in the model to corresponding synchronous costs Parameters.ACTIVITY_KEY: str (parameter) key to use to identify the activity described by the events Parameters.PARAM_TRACE_NET_COSTS: dict (parameter) mapping between transitions and costs

Returns:

dictionary

Return type:

dict with keys alignment, cost, visited_states, queued_states and traversed_arcs

pm4py.algo.conformance.alignments.petri_net.variants.generator_dijkstra_no_heuristics.apply_sync_prod(sync_prod, initial_marking, final_marking, cost_function, skip, ret_tuple_as_trans_desc=False, max_align_time_trace=9223372036854775807)[source]#
pm4py.algo.conformance.alignments.petri_net.variants.generator_dijkstra_no_heuristics.check_cycle_in_searchtuple(st: DijkstraSearchTuple) → bool[source]#
pm4py.algo.conformance.alignments.petri_net.variants.generator_dijkstra_no_heuristics.repr_searchtuple(st: DijkstraSearchTuple) → str[source]#
pm4py.algo.conformance.alignments.petri_net.variants.generator_dijkstra_no_heuristics.rec_hub(hub, curr_m) → List[List[DijkstraSearchTuple]][source]#
pm4py.algo.conformance.alignments.petri_net.variants.generator_dijkstra_no_heuristics.reconstruct_alignment_generator(hub, state: DijkstraSearchTuple, ret_tuple_as_trans_desc=False)[source]#