pm4py.algo.analysis.extended_marking_equation.variants package
Submodules
pm4py.algo.analysis.extended_marking_equation.variants.classic 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.analysis.extended_marking_equation.variants.classic.ExtendedMarkingEquationSolver(trace: pm4py.objects.log.obj.Trace, sync_net: pm4py.objects.petri_net.obj.PetriNet, sync_im: pm4py.objects.petri_net.obj.Marking, sync_fm: pm4py.objects.petri_net.obj.Marking, parameters: Optional[Dict[Any, Any]] = None)[source]
Bases:
object
- change_ini_vec(ini: pm4py.objects.petri_net.obj.Marking)[source]
Changes the initial marking of the synchronous product net
- Parameters
ini – Initial marking
- get_activated_transitions(sol_points: List[int]) List[pm4py.objects.petri_net.obj.PetriNet.Transition] [source]
Gets the transitions of the synchronous product net that are non-zero in the solution of the marking equation
- Parameters
sol_points – Solution of the integer problem
- Returns
Activated transitions
- Return type
act_trans
- get_components() Tuple[Any, Any, Any, Any, Any] [source]
Retrieve the components (Numpy matrixes) of the problem
- Returns
c – objective function
Aub – Inequalities matrix
bub – Inequalities vector
Aeq – Equalities matrix
beq – Equalities vector
- get_firing_sequence(x: List[int]) Tuple[List[pm4py.objects.petri_net.obj.PetriNet.Transition], bool, int] [source]
Gets a firing sequence from the X vector
- Parameters
x – X vector
- Returns
firing_sequence – Firing sequence
reach_fm – Boolean value that is true whether the firing sequence reaches the final marking
explained_events – Number of explaned events by the firing sequence
- get_h(sol_points: List[int]) int [source]
Returns the value of the heuristics
- Parameters
sol_points – Solution of the integer problem
- Returns
Heuristics value
- Return type
h
- class pm4py.algo.analysis.extended_marking_equation.variants.classic.Parameters(value)[source]
Bases:
enum.Enum
An enumeration.
- A = 'A_matrix'
- ACTIVITY_KEY = 'pm4py:param:activity_key'
- C = 'C_matrix'
- CASE_ID_KEY = 'pm4py:param:case_id_key'
- CONSUMPTION_MATRIX = 'consumption_matrix'
- COSTS = 'costs'
- FULL_BOOTSTRAP_REQUIRED = 'full_bootstrap_required'
- INCIDENCE_MATRIX = 'incidence_matrix'
- MAX_K_VALUE = 'max_k_value'
- SPLIT_IDX = 'split_idx'
- pm4py.algo.analysis.extended_marking_equation.variants.classic.build(trace: pm4py.objects.log.obj.Trace, sync_net: pm4py.objects.petri_net.obj.PetriNet, sync_im: pm4py.objects.petri_net.obj.Marking, sync_fm: pm4py.objects.petri_net.obj.Marking, parameters: Optional[Dict[Any, Any]] = None) pm4py.algo.analysis.extended_marking_equation.variants.classic.ExtendedMarkingEquationSolver [source]
Builds the extended marking equation out of a trace and a synchronous product net
- Parameters
trace – Trace
sync_net – Synchronous product net
sync_im – Initial marking (of sync net)
sync_fm – Final marking (of sync net)
parameters – Parameters of the algorithm, including: - Parameters.CASE_ID_KEY => attribute to use as case identifier - Parameters.ACTIVITY_KEY => attribute to use as activity - Parameters.COSTS => (if provided) the cost function (otherwise the default cost function is applied) - Parameters.SPLIT_IDX => (if provided) the split points as indices of elements of the trace
(e.g. for [“A”, “B”, “C”, “D”, “E”], specifying [1,3] as split points means splitting at “B” and “D”). If not provided, some split points at uniform distances are found.
- Parameters.MAX_K_VALUE => the maximum number of split points that is allowed (trim the specified indexes
if necessary).
Parameters.INCIDENCE_MATRIX => (if provided) the incidence matrix associated to the sync product net
Parameters.A => (if provided) the A numpy matrix of the incidence matrix
Parameters.CONSUMPTION_MATRIX => (if provided) the consumption matrix associated to the sync product net
Parameters.C => (if provided) the C numpy matrix of the consumption matrix
Parameters.FULL_BOOTSTRAP_REQUIRED => The preset/postset of places/transitions need to be inserted
- pm4py.algo.analysis.extended_marking_equation.variants.classic.get_h_value(solver: pm4py.algo.analysis.extended_marking_equation.variants.classic.ExtendedMarkingEquationSolver, parameters: Optional[Dict[Any, Any]] = None) int [source]
Gets the heuristics value from the extended marking equation
- Parameters
solver – Extended marking equation solver (class in this file)
parameters – Possible parameters of the algorithm
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/>.