pm4py.algo.conformance.alignments.petri_net package#
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)
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
Subpackages#
- pm4py.algo.conformance.alignments.petri_net.utils package
- pm4py.algo.conformance.alignments.petri_net.variants package
- Submodules
- pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_less_memory module
- pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_no_heuristics module
Parameters
Parameters.PARAM_TRACE_COST_FUNCTION
Parameters.PARAM_MODEL_COST_FUNCTION
Parameters.PARAM_SYNC_COST_FUNCTION
Parameters.PARAM_ALIGNMENT_RESULT_IS_SYNC_PROD_AWARE
Parameters.PARAM_TRACE_NET_COSTS
Parameters.TRACE_NET_CONSTR_FUNCTION
Parameters.TRACE_NET_COST_AWARE_CONSTR_FUNCTION
Parameters.PARAM_MAX_ALIGN_TIME_TRACE
Parameters.PARAM_MAX_ALIGN_TIME
Parameters.PARAMETER_VARIANT_DELIMITER
Parameters.ACTIVITY_KEY
Parameters.VARIANTS_IDX
get_best_worst_cost()
apply()
apply_from_variant()
apply_from_variants_dictionary()
apply_from_variants_list()
apply_from_variants_list_petri_string()
apply_from_variants_list_petri_string_mprocessing()
apply_trace_net()
apply_sync_prod()
- pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star module
Parameters
Parameters.PARAM_TRACE_COST_FUNCTION
Parameters.PARAM_MODEL_COST_FUNCTION
Parameters.PARAM_SYNC_COST_FUNCTION
Parameters.PARAM_ALIGNMENT_RESULT_IS_SYNC_PROD_AWARE
Parameters.PARAM_TRACE_NET_COSTS
Parameters.TRACE_NET_CONSTR_FUNCTION
Parameters.TRACE_NET_COST_AWARE_CONSTR_FUNCTION
Parameters.PARAM_MAX_ALIGN_TIME_TRACE
Parameters.PARAM_MAX_ALIGN_TIME
Parameters.PARAMETER_VARIANT_DELIMITER
Parameters.ACTIVITY_KEY
Parameters.VARIANTS_IDX
Parameters.SYNCHRONOUS
Parameters.EXPONENT
get_best_worst_cost()
apply()
apply_from_variant()
apply_from_variants_dictionary()
apply_from_variants_list()
apply_from_variants_list_petri_string()
apply_from_variants_list_petri_string_mprocessing()
apply_trace_net()
apply_sync_prod()
- pm4py.algo.conformance.alignments.petri_net.variants.generator_dijkstra_less_memory module
- pm4py.algo.conformance.alignments.petri_net.variants.generator_dijkstra_no_heuristics module
Parameters
Parameters.PARAM_TRACE_COST_FUNCTION
Parameters.PARAM_MODEL_COST_FUNCTION
Parameters.PARAM_SYNC_COST_FUNCTION
Parameters.PARAM_ALIGNMENT_RESULT_IS_SYNC_PROD_AWARE
Parameters.PARAM_TRACE_NET_COSTS
Parameters.TRACE_NET_CONSTR_FUNCTION
Parameters.TRACE_NET_COST_AWARE_CONSTR_FUNCTION
Parameters.PARAM_MAX_ALIGN_TIME_TRACE
Parameters.PARAM_MAX_ALIGN_TIME
Parameters.PARAMETER_VARIANT_DELIMITER
Parameters.ACTIVITY_KEY
Parameters.VARIANTS_IDX
get_best_worst_cost()
apply()
apply_trace_net()
apply_sync_prod()
check_cycle_in_searchtuple()
repr_searchtuple()
rec_hub()
reconstruct_alignment_generator()
- pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star module
Parameters
Parameters.PARAM_TRACE_COST_FUNCTION
Parameters.PARAM_MODEL_COST_FUNCTION
Parameters.PARAM_SYNC_COST_FUNCTION
Parameters.PARAM_ALIGNMENT_RESULT_IS_SYNC_PROD_AWARE
Parameters.PARAM_TRACE_NET_COSTS
Parameters.TRACE_NET_CONSTR_FUNCTION
Parameters.TRACE_NET_COST_AWARE_CONSTR_FUNCTION
Parameters.PARAM_MAX_ALIGN_TIME_TRACE
Parameters.PARAM_MAX_ALIGN_TIME
Parameters.PARAMETER_VARIANT_DELIMITER
Parameters.ACTIVITY_KEY
Parameters.VARIANTS_IDX
Parameters.RETURN_SYNC_COST_FUNCTION
get_best_worst_cost()
apply()
apply_from_variant()
apply_from_variants_dictionary()
apply_from_variants_list()
apply_from_variants_list_petri_string()
apply_from_variants_list_petri_string_mprocessing()
apply_trace_net()
apply_sync_prod()
- pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star module
Parameters
Parameters.PARAM_TRACE_COST_FUNCTION
Parameters.PARAM_MODEL_COST_FUNCTION
Parameters.PARAM_SYNC_COST_FUNCTION
Parameters.PARAM_ALIGNMENT_RESULT_IS_SYNC_PROD_AWARE
Parameters.PARAM_TRACE_NET_COSTS
Parameters.TRACE_NET_CONSTR_FUNCTION
Parameters.TRACE_NET_COST_AWARE_CONSTR_FUNCTION
Parameters.PARAM_MAX_ALIGN_TIME_TRACE
Parameters.PARAM_MAX_ALIGN_TIME
Parameters.PARAMETER_VARIANT_DELIMITER
Parameters.ACTIVITY_KEY
Parameters.VARIANTS_IDX
get_best_worst_cost()
apply()
apply_from_variant()
apply_from_variants_dictionary()
apply_from_variants_list()
apply_from_variants_list_petri_string()
apply_from_variants_list_petri_string_mprocessing()
apply_trace_net()
apply_sync_prod()
Submodules#
pm4py.algo.conformance.alignments.petri_net.algorithm module#
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)
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.algorithm.Variants(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum
- VERSION_STATE_EQUATION_A_STAR = <module 'pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\conformance\\alignments\\petri_net\\variants\\state_equation_a_star.py'>#
- VERSION_TWEAKED_STATE_EQUATION_A_STAR = <module 'pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\conformance\\alignments\\petri_net\\variants\\tweaked_state_equation_a_star.py'>#
- VERSION_DIJKSTRA_NO_HEURISTICS = <module 'pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_no_heuristics' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\conformance\\alignments\\petri_net\\variants\\dijkstra_no_heuristics.py'>#
- VERSION_DIJKSTRA_LESS_MEMORY = <module 'pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_less_memory' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\conformance\\alignments\\petri_net\\variants\\dijkstra_less_memory.py'>#
- VERSION_DISCOUNTED_A_STAR = <module 'pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\conformance\\alignments\\petri_net\\variants\\discounted_a_star.py'>#
- class pm4py.algo.conformance.alignments.petri_net.algorithm.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[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'#
- CASE_ID_KEY = 'pm4py:param:case_id_key'#
- ACTIVITY_KEY = 'pm4py:param:activity_key'#
- VARIANTS_IDX = 'variants_idx'#
- SHOW_PROGRESS_BAR = 'show_progress_bar'#
- CORES = 'cores'#
- BEST_WORST_COST_INTERNAL = 'best_worst_cost_internal'#
- FITNESS_ROUND_DIGITS = 'fitness_round_digits'#
- SYNCHRONOUS = 'synchronous_dijkstra'#
- EXPONENT = 'theta'#
- ENABLE_BEST_WORST_COST = 'enable_best_worst_cost'#
- pm4py.algo.conformance.alignments.petri_net.algorithm.apply(obj: EventLog | EventStream | DataFrame | Trace, petri_net: PetriNet, initial_marking: Marking, final_marking: Marking, parameters: Dict[Any, Any] | None = None, variant=Variants.VERSION_STATE_EQUATION_A_STAR) Dict[str, Any] | List[Dict[str, Any]] [source]#
- pm4py.algo.conformance.alignments.petri_net.algorithm.apply_trace(trace, petri_net, initial_marking, final_marking, parameters=None, variant=Variants.VERSION_STATE_EQUATION_A_STAR)[source]#
apply alignments to a trace Parameters ———– trace
pm4py.log.log.Trace
trace of events- petri_net
pm4py.objects.petri.petrinet.PetriNet
the model to use for the alignment- initial_marking
pm4py.objects.petri.petrinet.Marking
initial marking of the net- final_marking
pm4py.objects.petri.petrinet.Marking
final marking of the net- variant
selected variant of the algorithm, possible values: {‘Variants.VERSION_STATE_EQUATION_A_STAR, Variants.VERSION_DIJKSTRA_NO_HEURISTICS ‘}
- parameters
dict
parameters of the algorithm, for key ‘state_equation_a_star’:Parameters.ACTIVITY_KEY -> Attribute in the log that contains the activity Parameters.PARAM_MODEL_COST_FUNCTION -> mapping of each transition in the model to corresponding synchronous costs Parameters.PARAM_SYNC_COST_FUNCTION -> mapping of each transition in the model to corresponding model cost Parameters.PARAM_TRACE_COST_FUNCTION -> mapping of each index of the trace to a positive cost value
Returns#
- alignment
dict
with keys alignment, cost, visited_states, queued_states and traversed_arcs The alignment is a sequence of labels of the form (a,t), (a,>>), or (>>,t) representing synchronous/log/model-moves.
- pm4py.algo.conformance.alignments.petri_net.algorithm.apply_log(log, petri_net, initial_marking, final_marking, parameters=None, variant=Variants.VERSION_STATE_EQUATION_A_STAR)[source]#
apply alignments to a log Parameters ———– log
object of the form
pm4py.log.log.EventLog
event log- petri_net
pm4py.objects.petri.petrinet.PetriNet
the model to use for the alignment- initial_marking
pm4py.objects.petri.petrinet.Marking
initial marking of the net- final_marking
pm4py.objects.petri.petrinet.Marking
final marking of the net- variant
selected variant of the algorithm, possible values: {‘Variants.VERSION_STATE_EQUATION_A_STAR, Variants.VERSION_DIJKSTRA_NO_HEURISTICS ‘}
- parameters
dict
parameters of the algorithm,
Returns#
- alignment
list
ofdict
with keys alignment, cost, visited_states, queued_states and traversed_arcs The alignment is a sequence of labels of the form (a,t), (a,>>), or (>>,t) representing synchronous/log/model-moves.
- pm4py.algo.conformance.alignments.petri_net.algorithm.apply_multiprocessing(log, petri_net, initial_marking, final_marking, parameters=None, variant=Variants.VERSION_STATE_EQUATION_A_STAR)[source]#
Applies the alignments using a process pool (multiprocessing)
Parameters#
- log
Event log
- petri_net
Petri net
- initial_marking
Initial marking
- final_marking
Final marking
- parameters
Parameters of the algorithm
Returns#
- aligned_traces
Alignments