pm4py.algo.discovery.footprints.powl.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.discovery.footprints.powl.variants.bottomup 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.discovery.footprints.powl.variants.bottomup.Outputs(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum- DFG = 'dfg'#
- SEQUENCE = 'sequence'#
- PARALLEL = 'parallel'#
- START_ACTIVITIES = 'start_activities'#
- END_ACTIVITIES = 'end_activities'#
- ACTIVITIES = 'activities'#
- SKIPPABLE = 'skippable'#
- ACTIVITIES_ALWAYS_HAPPENING = 'activities_always_happening'#
- MIN_TRACE_LENGTH = 'min_trace_length'#
- TRACE = 'trace'#
- pm4py.algo.discovery.footprints.powl.variants.bottomup.fix_fp(sequence: Set[Tuple[str, str]], parallel: Set[Tuple[str, str]])[source]#
Fix footprints: - Remove parallel relations from the sequence relations - If A->B and B->A both appear in sequence, that is a conflict. Turn them into parallel.
- pm4py.algo.discovery.footprints.powl.variants.bottomup.merge_footprints(list_of_footprints)[source]#
Utility function to merge a list of footprints dictionaries in a ‘parallel/AND’ sense.
Returns a dictionary that merges all sets and booleans according to the appropriate logic. - ‘activities’ => union - ‘skippable’ => AND - ‘start_activities’ => union (will be refined later in partial order) - ‘end_activities’ => union (refined later) - ‘activities_always_happening’ => union for non-skippable children - ‘sequence’, ‘parallel’ => union, then fix_fp at the end
- pm4py.algo.discovery.footprints.powl.variants.bottomup.combine_min_trace_length_par(children_fps)[source]#
For partial order or parallel/AND: we must execute each non-skippable submodel at least once. So the min trace length = sum of the min lengths of non-skippable children.
- pm4py.algo.discovery.footprints.powl.variants.bottomup.combine_min_trace_length_xor(children_fps)[source]#
For XOR/choice: min trace length = min among children.
- pm4py.algo.discovery.footprints.powl.variants.bottomup.combine_min_trace_length_loop(do_fp, redo_fp)[source]#
For LOOP (do, redo): must do ‘do’ at least once, so min length = min_length(do).
- pm4py.algo.discovery.footprints.powl.variants.bottomup.get_footprints_of_transition(node: Transition) Dict[str, Any][source]#
Footprints for a simple Transition (labeled or silent).
- pm4py.algo.discovery.footprints.powl.variants.bottomup.get_footprints_of_xor(node: OperatorPOWL, footprints_cache: Dict[POWL, Dict[str, Any]]) Dict[str, Any][source]#
- Footprints for an XOR/choice node:
start_activities = union(children.start_activities)
end_activities = union(children.end_activities)
activities = union
skippable = OR of children.skippable
activities_always_happening = intersection of all non-skippable children’s AAH
sequence = union of children
parallel = union of children
min_trace_length = min of children
- pm4py.algo.discovery.footprints.powl.variants.bottomup.get_footprints_of_loop(node: OperatorPOWL, footprints_cache: Dict[POWL, Dict[str, Any]]) Dict[str, Any][source]#
Footprints for a LOOP node: children=[do, redo]. Similar logic as process-tree loop footprints.
- pm4py.algo.discovery.footprints.powl.variants.bottomup.transitive_reduction(node: StrictPartialOrder)[source]#
Applies transitive reduction on the partial order contained in node. If node.partial_order has edges A->B and B->C and A->C, we remove A->C. In general, if there’s an alternative path from A to C, we remove the direct edge A->C.
- pm4py.algo.discovery.footprints.powl.variants.bottomup.get_footprints_of_partial_order(node: StrictPartialOrder, footprints_cache: Dict[POWL, Dict[str, Any]]) Dict[str, Any][source]#
- Footprints for a StrictPartialOrder node:
Build original adjacency (before transitive reduction).
Compute transitive closure for concurrency + skip logic + start/end detection.
Apply transitive reduction to keep the partial order minimal.
Compute footprints for each child, merge them (AND/parallel).
Refine start_activities: child c is ‘start’ if no non-skippable p != c has c in closure[p].
Refine end_activities: child c is ‘end’ if no non-skippable q != c is in closure[c].
Build sequence links: - direct edges from partial_order - skip edges if all intermediates are skippable
Concurrency detection with the closure.
fix_fp(…) and set min_trace_length.
- pm4py.algo.discovery.footprints.powl.variants.bottomup.get_footprints_powl(node: POWL, footprints_cache: Dict[POWL, Dict[str, Any]]) Dict[str, Any][source]#
Computes the footprints of a POWL node, caching results in footprints_cache to avoid recomputation.
- pm4py.algo.discovery.footprints.powl.variants.bottomup.apply(model: POWL, parameters: Dict[Any, Any] | None = None) Dict[str, Any][source]#
Main entry point to compute footprints of a POWL model. Applies transitive reduction on any partial order, then computes standard footprints.
- The returned dictionary includes:
“start_activities”, “end_activities”, “activities”, “skippable”, “sequence”, “parallel”, “activities_always_happening”, “min_trace_length”