pm4py.algo.conformance.alignments.petri_net.variants package¶
Submodules¶
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_less_memory module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
class
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_less_memory.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
ACTIVITY_KEY= 'pm4py:param:activity_key'¶
-
PARAMETER_VARIANT_DELIMITER= 'variant_delimiter'¶
-
PARAM_ALIGNMENT_RESULT_IS_SYNC_PROD_AWARE= 'ret_tuple_as_trans_desc'¶
-
PARAM_MAX_ALIGN_TIME= 'max_align_time'¶
-
PARAM_MAX_ALIGN_TIME_TRACE= 'max_align_time_trace'¶
-
PARAM_MODEL_COST_FUNCTION= 'model_cost_function'¶
-
PARAM_STD_SYNC_COST= 'std_sync_cost'¶
-
PARAM_TRACE_COST_FUNCTION= 'trace_cost_function'¶
-
-
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_less_memory.apply(trace: pm4py.objects.log.obj.Trace, net: pm4py.objects.petri_net.obj.PetriNet, im: pm4py.objects.petri_net.obj.Marking, fm: pm4py.objects.petri_net.obj.Marking, parameters: Optional[Dict[Union[str, pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_less_memory.Parameters], Any]] = None) → Dict[str, Any][source]¶ Performs the basic alignment search, given a trace and a net.
Parameters: - trace (
listinput 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.PetriNetthe Petri net to use in the alignment) - initial_marking (
pm4py.objects.petri.net.Markinginitial marking in the Petri net) - final_marking (
pm4py.objects.petri.net.Markingfinal 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.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
- trace (
-
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_less_memory.apply_from_variant(variant, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Apply the alignments from the specification of a single variant
Parameters: - variant – Variant (as string delimited by the “variant_delimiter” parameter)
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters of the algorithm (same as ‘apply’ method, plus ‘variant_delimiter’ that is , by default)
Returns: dictionary
Return type: dict with keys alignment, cost, visited_states, queued_states
-
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_less_memory.apply_from_variants_list(var_list, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Apply the alignments from the specification of a list of variants in the log
Parameters: - var_list – List of variants (for each item, the first entry is the variant itself, the second entry may be the number of cases)
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters of the algorithm (same as ‘apply’ method, plus ‘variant_delimiter’ that is , by default)
Returns: Dictionary that assigns to each variant its alignment
Return type: dictio_alignments
-
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_less_memory.apply_from_variants_list_petri_string(var_list, petri_net_string, parameters=None)[source]¶
-
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_less_memory.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.dijkstra_no_heuristics module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
class
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_no_heuristics.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
ACTIVITY_KEY= 'pm4py:param:activity_key'¶
-
PARAMETER_VARIANT_DELIMITER= 'variant_delimiter'¶
-
PARAM_ALIGNMENT_RESULT_IS_SYNC_PROD_AWARE= 'ret_tuple_as_trans_desc'¶
-
PARAM_MAX_ALIGN_TIME= 'max_align_time'¶
-
PARAM_MAX_ALIGN_TIME_TRACE= 'max_align_time_trace'¶
-
PARAM_MODEL_COST_FUNCTION= 'model_cost_function'¶
-
PARAM_SYNC_COST_FUNCTION= 'sync_cost_function'¶
-
PARAM_TRACE_COST_FUNCTION= 'trace_cost_function'¶
-
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'¶
-
VARIANTS_IDX= 'variants_idx'¶
-
-
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_no_heuristics.apply(trace: pm4py.objects.log.obj.Trace, petri_net: pm4py.objects.petri_net.obj.PetriNet, initial_marking: pm4py.objects.petri_net.obj.Marking, final_marking: pm4py.objects.petri_net.obj.Marking, parameters: Optional[Dict[Union[str, pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_no_heuristics.Parameters], Any]] = None) → Dict[str, Any][source]¶ Performs the basic alignment search, given a trace and a net.
Parameters: - trace (
listinput 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.PetriNetthe Petri net to use in the alignment) - initial_marking (
pm4py.objects.petri.net.Markinginitial marking in the Petri net) - final_marking (
pm4py.objects.petri.net.Markingfinal 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
- trace (
-
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_no_heuristics.apply_from_variant(variant, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Apply the alignments from the specification of a single variant
Parameters: - variant – Variant (as string delimited by the “variant_delimiter” parameter)
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters of the algorithm (same as ‘apply’ method, plus ‘variant_delimiter’ that is , by default)
Returns: dictionary
Return type: dict with keys alignment, cost, visited_states, queued_states and traversed_arcs
-
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_no_heuristics.apply_from_variants_dictionary(var_dictio, petri_net, initial_marking, final_marking, parameters=None)[source]¶
-
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_no_heuristics.apply_from_variants_list(var_list, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Apply the alignments from the specification of a list of variants in the log
Parameters: - var_list – List of variants (for each item, the first entry is the variant itself, the second entry may be the number of cases)
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters of the algorithm (same as ‘apply’ method, plus ‘variant_delimiter’ that is , by default)
Returns: Dictionary that assigns to each variant its alignment
Return type: dictio_alignments
-
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_no_heuristics.apply_from_variants_list_petri_string(var_list, petri_net_string, parameters=None)[source]¶
-
pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_no_heuristics.apply_from_variants_list_petri_string_mprocessing(mp_output, var_list, petri_net_string, parameters=None)[source]¶
-
pm4py.algo.conformance.alignments.petri_net.variants.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.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 (
listinput 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.PetriNetthe Petri net to use in the alignment) - initial_marking (
pm4py.objects.petri.net.Markinginitial marking in the Petri net) - final_marking (
pm4py.objects.petri.net.Markingfinal 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
- trace (
-
pm4py.algo.conformance.alignments.petri_net.variants.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.discounted_a_star module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
class
pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
ACTIVITY_KEY= 'pm4py:param:activity_key'¶
-
EXPONENT= 'exponent'¶
-
PARAMETER_VARIANT_DELIMITER= 'variant_delimiter'¶
-
PARAM_ALIGNMENT_RESULT_IS_SYNC_PROD_AWARE= 'ret_tuple_as_trans_desc'¶
-
PARAM_MAX_ALIGN_TIME= 'max_align_time'¶
-
PARAM_MAX_ALIGN_TIME_TRACE= 'max_align_time_trace'¶
-
PARAM_MODEL_COST_FUNCTION= 'model_cost_function'¶
-
PARAM_SYNC_COST_FUNCTION= 'sync_cost_function'¶
-
PARAM_TRACE_COST_FUNCTION= 'trace_cost_function'¶
-
PARAM_TRACE_NET_COSTS= 'trace_net_costs'¶
-
SYNCHRONOUS= 'synchronous_dijkstra'¶
-
TRACE_NET_CONSTR_FUNCTION= 'trace_net_constr_function'¶
-
TRACE_NET_COST_AWARE_CONSTR_FUNCTION= 'trace_net_cost_aware_constr_function'¶
-
VARIANTS_IDX= 'variants_idx'¶
-
-
pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star.apply(trace, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Performs the basic alignment search, given a trace and a net.
Parameters: - trace (
listinput 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.PetriNetthe Petri net to use in the alignment) - initial_marking (
pm4py.objects.petri.net.Markinginitial marking in the Petri net) - final_marking (
pm4py.objects.petri.net.Markingfinal 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
- trace (
-
pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star.apply_from_variant(variant, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Apply the alignments from the specification of a single variant
Parameters: - variant – Variant (as string delimited by the “variant_delimiter” parameter)
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters of the algorithm (same as ‘apply’ method, plus ‘variant_delimiter’ that is , by default)
Returns: dictionary
Return type: dict with keys alignment, cost, visited_states, queued_states and traversed_arcs
-
pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star.apply_from_variants_dictionary(var_dictio, petri_net, initial_marking, final_marking, parameters=None)[source]¶
-
pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star.apply_from_variants_list(var_list, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Apply the alignments from the specification of a list of variants in the log
Parameters: - var_list – List of variants (for each item, the first entry is the variant itself, the second entry may be the number of cases)
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters of the algorithm (same as ‘apply’ method, plus ‘variant_delimiter’ that is , by default)
Returns: Dictionary that assigns to each variant its alignment
Return type: dictio_alignments
-
pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star.apply_from_variants_list_petri_string(var_list, petri_net_string, parameters=None)[source]¶
-
pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star.apply_from_variants_list_petri_string_mprocessing(mp_output, var_list, petri_net_string, parameters=None)[source]¶
-
pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star.apply_sync_prod(sync_prod, initial_marking, final_marking, skip, ret_tuple_as_trans_desc=False, max_align_time_trace=9223372036854775807, expo=2)[source]¶
-
pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star.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 (
listinput 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.PetriNetthe Petri net to use in the alignment) - initial_marking (
pm4py.objects.petri.net.Markinginitial marking in the Petri net) - final_marking (
pm4py.objects.petri.net.Markingfinal 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
- trace (
-
pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star.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.state_equation_a_star module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
class
pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
ACTIVITY_KEY= 'pm4py:param:activity_key'¶
-
PARAMETER_VARIANT_DELIMITER= 'variant_delimiter'¶
-
PARAM_ALIGNMENT_RESULT_IS_SYNC_PROD_AWARE= 'ret_tuple_as_trans_desc'¶
-
PARAM_MAX_ALIGN_TIME= 'max_align_time'¶
-
PARAM_MAX_ALIGN_TIME_TRACE= 'max_align_time_trace'¶
-
PARAM_MODEL_COST_FUNCTION= 'model_cost_function'¶
-
PARAM_SYNC_COST_FUNCTION= 'sync_cost_function'¶
-
PARAM_TRACE_COST_FUNCTION= 'trace_cost_function'¶
-
PARAM_TRACE_NET_COSTS= 'trace_net_costs'¶
-
RETURN_SYNC_COST_FUNCTION= 'return_sync_cost_function'¶
-
TRACE_NET_CONSTR_FUNCTION= 'trace_net_constr_function'¶
-
TRACE_NET_COST_AWARE_CONSTR_FUNCTION= 'trace_net_cost_aware_constr_function'¶
-
VARIANTS_IDX= 'variants_idx'¶
-
-
pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star.apply(trace: pm4py.objects.log.obj.Trace, petri_net: pm4py.objects.petri_net.obj.PetriNet, initial_marking: pm4py.objects.petri_net.obj.Marking, final_marking: pm4py.objects.petri_net.obj.Marking, parameters: Optional[Dict[Union[str, pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star.Parameters], Any]] = None) → Dict[str, Any][source]¶ Performs the basic alignment search, given a trace and a net.
Parameters: - trace (
listinput 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.PetriNetthe Petri net to use in the alignment) - initial_marking (
pm4py.objects.petri.net.Markinginitial marking in the Petri net) - final_marking (
pm4py.objects.petri.net.Markingfinal 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
- trace (
-
pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star.apply_from_variant(variant, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Apply the alignments from the specification of a single variant
Parameters: - variant – Variant (as string delimited by the “variant_delimiter” parameter)
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters of the algorithm (same as ‘apply’ method, plus ‘variant_delimiter’ that is , by default)
Returns: dictionary
Return type: dict with keys alignment, cost, visited_states, queued_states and traversed_arcs
-
pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star.apply_from_variants_dictionary(var_dictio, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Apply the alignments from the specification of a variants dictionary
Parameters: - var_dictio – Dictionary of variants (along possibly with their count, or the list of indexes, or the list of involved cases)
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters of the algorithm (same as ‘apply’ method, plus ‘variant_delimiter’ that is , by default)
Returns: Dictionary that assigns to each variant its alignment
Return type: dictio_alignments
-
pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star.apply_from_variants_list(var_list, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Apply the alignments from the specification of a list of variants in the log
Parameters: - var_list – List of variants (for each item, the first entry is the variant itself, the second entry may be the number of cases)
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters of the algorithm (same as ‘apply’ method, plus ‘variant_delimiter’ that is , by default)
Returns: Dictionary that assigns to each variant its alignment
Return type: dictio_alignments
-
pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star.apply_from_variants_list_petri_string(var_list, petri_net_string, parameters=None)[source]¶ Apply the alignments from the specification of a list of variants in the log
Parameters: - var_list – List of variants (for each item, the first entry is the variant itself, the second entry may be the number of cases)
- petri_net_string – String representing the accepting Petri net
Returns: Dictionary that assigns to each variant its alignment
Return type: dictio_alignments
-
pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star.apply_from_variants_list_petri_string_mprocessing(mp_output, var_list, petri_net_string, parameters=None)[source]¶ Apply the alignments from the specification of a list of variants in the log
Parameters: - mp_output – Multiprocessing output
- var_list – List of variants (for each item, the first entry is the variant itself, the second entry may be the number of cases)
- petri_net_string – String representing the accepting Petri net
Returns: Dictionary that assigns to each variant its alignment
Return type: dictio_alignments
-
pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star.apply_sync_prod(sync_prod, initial_marking, final_marking, cost_function, skip, ret_tuple_as_trans_desc=False, max_align_time_trace=9223372036854775807)[source]¶ Performs the basic alignment search on top of the synchronous product net, given a cost function and skip-symbol
Parameters: - sync_prod (
pm4py.objects.petri.net.PetriNetsynchronous product net) - initial_marking (
pm4py.objects.petri.net.Markinginitial marking in the synchronous product net) - final_marking (
pm4py.objects.petri.net.Markingfinal marking in the synchronous product net) - cost_function (
dictcost function mapping transitions to the synchronous product net) - skip (
Anysymbol to use for skips in the alignment)
Returns: - dictionary (
dictwith keys alignment, cost, visited_states, queued_states) - and **traversed_arcs**
- sync_prod (
-
pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star.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 (
listinput 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.PetriNetthe Petri net to use in the alignment) - initial_marking (
pm4py.objects.petri.net.Markinginitial marking in the Petri net) - final_marking (
pm4py.objects.petri.net.Markingfinal 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
- trace (
-
pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star.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.tweaked_state_equation_a_star module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
class
pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
ACTIVITY_KEY= 'pm4py:param:activity_key'¶
-
PARAMETER_VARIANT_DELIMITER= 'variant_delimiter'¶
-
PARAM_ALIGNMENT_RESULT_IS_SYNC_PROD_AWARE= 'ret_tuple_as_trans_desc'¶
-
PARAM_MAX_ALIGN_TIME= 'max_align_time'¶
-
PARAM_MAX_ALIGN_TIME_TRACE= 'max_align_time_trace'¶
-
PARAM_MODEL_COST_FUNCTION= 'model_cost_function'¶
-
PARAM_SYNC_COST_FUNCTION= 'sync_cost_function'¶
-
PARAM_TRACE_COST_FUNCTION= 'trace_cost_function'¶
-
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'¶
-
VARIANTS_IDX= 'variants_idx'¶
-
-
pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star.apply(trace: pm4py.objects.log.obj.Trace, petri_net: pm4py.objects.petri_net.obj.PetriNet, initial_marking: pm4py.objects.petri_net.obj.Marking, final_marking: pm4py.objects.petri_net.obj.Marking, parameters: Optional[Dict[Union[str, pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star.Parameters], Any]] = None) → Dict[str, Any][source]¶ Performs the basic alignment search, given a trace and a net.
Parameters: - trace (
listinput 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.PetriNetthe Petri net to use in the alignment) - initial_marking (
pm4py.objects.petri.net.Markinginitial marking in the Petri net) - final_marking (
pm4py.objects.petri.net.Markingfinal 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
- trace (
-
pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star.apply_from_variant(variant, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Apply the alignments from the specification of a single variant
Parameters: - variant – Variant (as string delimited by the “variant_delimiter” parameter)
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters of the algorithm (same as ‘apply’ method, plus ‘variant_delimiter’ that is , by default)
Returns: dictionary
Return type: dict with keys alignment, cost, visited_states, queued_states and traversed_arcs
-
pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star.apply_from_variants_dictionary(var_dictio, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Apply the alignments from the specification of a variants dictionary
Parameters: - var_dictio – Dictionary of variants (along possibly with their count, or the list of indexes, or the list of involved cases)
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters of the algorithm (same as ‘apply’ method, plus ‘variant_delimiter’ that is , by default)
Returns: Dictionary that assigns to each variant its alignment
Return type: dictio_alignments
-
pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star.apply_from_variants_list(var_list, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Apply the alignments from the specification of a list of variants in the log
Parameters: - var_list – List of variants (for each item, the first entry is the variant itself, the second entry may be the number of cases)
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters of the algorithm (same as ‘apply’ method, plus ‘variant_delimiter’ that is , by default)
Returns: Dictionary that assigns to each variant its alignment
Return type: dictio_alignments
-
pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star.apply_from_variants_list_petri_string(var_list, petri_net_string, parameters=None)[source]¶ Apply the alignments from the specification of a list of variants in the log
Parameters: - var_list – List of variants (for each item, the first entry is the variant itself, the second entry may be the number of cases)
- petri_net_string – String representing the accepting Petri net
Returns: Dictionary that assigns to each variant its alignment
Return type: dictio_alignments
-
pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star.apply_from_variants_list_petri_string_mprocessing(mp_output, var_list, petri_net_string, parameters=None)[source]¶ Apply the alignments from the specification of a list of variants in the log
Parameters: - mp_output – Multiprocessing output
- var_list – List of variants (for each item, the first entry is the variant itself, the second entry may be the number of cases)
- petri_net_string – String representing the accepting Petri net
Returns: Dictionary that assigns to each variant its alignment
Return type: dictio_alignments
-
pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star.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.tweaked_state_equation_a_star.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 (
listinput 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.PetriNetthe Petri net to use in the alignment) - initial_marking (
pm4py.objects.petri.net.Markinginitial marking in the Petri net) - final_marking (
pm4py.objects.petri.net.Markingfinal 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
- trace (
-
pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star.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
Module contents¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.