pm4py.algo.analysis.marking_equation.variants 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
Submodules#
pm4py.algo.analysis.marking_equation.variants.classic 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.analysis.marking_equation.variants.classic.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum
- CASE_ID_KEY = 'pm4py:param:case_id_key'#
- ACTIVITY_KEY = 'pm4py:param:activity_key'#
- COSTS = 'costs'#
- INCIDENCE_MATRIX = 'incidence_matrix'#
- A = 'A_matrix'#
- FULL_BOOTSTRAP_REQUIRED = 'full_bootstrap_required'#
- class pm4py.algo.analysis.marking_equation.variants.classic.MarkingEquationSolver(net: PetriNet, im: Marking, fm: Marking, parameters: Dict[Any, Any] | None = None)[source]#
Bases:
object
- 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
- change_ini_vec(ini: Marking)[source]#
Changes the initial marking of the synchronous product net
Parameters#
- ini
Initial marking
- get_x_vector(sol_points: List[int]) List[int] [source]#
Returns the x vector of the solution
Parameters#
- sol_points
Solution of the integer problem
Returns#
- x
X vector
- get_h(sol_points: List[int]) int [source]#
Returns the value of the heuristics
Parameters#
- sol_points
Solution of the integer problem
Returns#
- h
Heuristics value
- get_activated_transitions(sol_points: List[int]) List[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#
- act_trans
Activated transitions
- solve() Tuple[int, List[int]] [source]#
Solves the marking equation, returning the heuristics and the x vector
Returns#
- h
Heuristics value
- x
X vector
- solve_given_components(c, Aub, bub, Aeq, beq)[source]#
Solves the linear problem given the components
Parameters#
- c
Objective vector
- Aub
Inequalities matrix
- bub
Inequalities vector
- Aeq
Equalities matrix
- beq
Equalities vector
Returns#
- h
Heuristics value
- x
X vector
- get_firing_sequence(x: List[int]) Tuple[List[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
- pm4py.algo.analysis.marking_equation.variants.classic.build(net: PetriNet, im: Marking, fm: Marking, parameters: Dict[Any, Any] | None = None) MarkingEquationSolver [source]#
Builds the marking equation out of a Petri net
Parameters#
- net
Petri net
- im
Initial marking
- fm
Final marking
- 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.INCIDENCE_MATRIX => (if provided) the incidence matrix of the Petri net - Parameters.A => (if provided) the A numpy matrix of the incidence matrix - Parameters.FULL_BOOTSTRAP_REQUIRED => The preset/postset of places/transitions need to be inserted
- pm4py.algo.analysis.marking_equation.variants.classic.get_h_value(solver: MarkingEquationSolver, parameters: Dict[Any, Any] | None = None) int [source]#
Gets the heuristics value from the marking equation
Parameters#
- solver
Marking equation solver (class in this file)
- parameters
Possible parameters of the algorithm