pm4py.objects.ocpn.variants.to_oc_causal_net module#
PM4Py – A Process Mining Library for Python Copyright (C) 2026 Process Intelligence Solutions GmbH
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
- pm4py.objects.ocpn.variants.to_oc_causal_net.apply(ocpn: OCPetriNet, parameters=None) OCCausalNet[source]#
Convets an Object-centric Petri Net to an Object-centric Causal Net.
- Parameters:
ocpn (OCPetriNet) – The Object-centric Petri Net to be converted.
parameters (dict, optional) – Additional parameters for the conversion (not used in this implementation).
- Returns:
OCCausalNet – The resulting Object-centric Causal Net.
- Return type:
- pm4py.objects.ocpn.variants.to_oc_causal_net.get_multi_object_types(ocpn: OCPetriNet) dict[source]#
Returns a dictionary mapping transition names to two dictionaries of multi-input/multi-output object types mapping object types to True if they are variable and False otherwise. A multi-input/output object type is one that has at least two incoming/outgoing arcs to/from the transition.
- Parameters:
ocpn (OCPetriNet) – The Object-centric Petri Net to analyze.
- Returns:
dict – to dictionaries of multi-input/multi-output object types to True/False.
- Return type:
Dictionary with transition names as keys a dictionary mapping “input” and “output”
- pm4py.objects.ocpn.variants.to_oc_causal_net.get_aux_place_name(transition_name, object_type, is_input_aux)[source]#
Returns the name of the auxiliary place for a given transition and object type.
- Parameters:
transition_name (str) – The name of the transition.
object_type (str) – The object type associated with the auxiliary place.
is_input_aux (bool) – Whether the auxiliary place is an input auxiliary place (True) or output auxiliary place (False).
- Returns:
str
- Return type:
The name of the auxiliary place.
- pm4py.objects.ocpn.variants.to_oc_causal_net.transition_dependencies_marker_groups(transitions, multi_ots, dependencies, input_marker_groups, output_marker_groups)[source]#
Creates dependencies and marker groups for transitions in the Object-centric Petri Net. Each transition has one input marker group featuring a marker for each input arc, and one output marker group featuring a marker for each output arc.
- Parameters:
transitions (list) – List of transitions in the Object-centric Petri Net.
multi_ots (dict) – Dictionary mapping transition names to multi-object types.
dependencies (dict) – Dictionary to store dependencies between activities.
input_marker_groups (dict) – Dictionary to store input marker groups.
output_marker_groups (dict) – Dictionary to store output marker groups.
- pm4py.objects.ocpn.variants.to_oc_causal_net.place_dependencies_marker_groups(places, multi_ots, dependencies, input_marker_groups, output_marker_groups)[source]#
Creates dependencies and marker groups for places in the Object-centric Petri Net. Each place has one input marker group per input arc having one marker each, and one output marker group per output arc having one marker each.
- Parameters:
places (list) – List of places in the Object-centric Petri Net.
multi_ots (dict) – Dictionary mapping transition names to multi-object types.
dependencies (dict) – Dictionary to store dependencies between activities.
input_marker_groups (dict) – Dictionary to store input marker groups.
output_marker_groups (dict) – Dictionary to store output marker groups.
- pm4py.objects.ocpn.variants.to_oc_causal_net.start_end_act_dependencies_marker_groups(object_types, dependencies, input_marker_groups, output_marker_groups, start_places, end_places)[source]#
Adds a START and END activity for each object type. Creates dependencies and marker groups for those new activities. Each START / END activity has one input / output marker group consisting of markers for every start / end place.
- Parameters:
object_types (list) – List of object types in the Object-centric Petri Net.
dependencies (dict) – Dictionary to store dependencies between activities.
input_marker_groups (dict) – Dictionary to store input marker groups.
output_marker_groups (dict) – Dictionary to store output marker groups.
start_places (dict) – Dictionary mapping object types to their start places.
end_places (dict) – Dictionary mapping object types to their end places.
- pm4py.objects.ocpn.variants.to_oc_causal_net.add_start_end_act_markers(object_types, input_marker_groups, output_marker_groups, start_places, end_places)[source]#
Adds markers for the START and END activities to the start / end places. These markers are the same as for any other predecessor / successor activity.
- Parameters:
object_types (list) – List of object types in the Object-centric Petri Net.
input_marker_groups (dict) – Dictionary to store input marker groups.
output_marker_groups (dict) – Dictionary to store output marker groups.
start_places (dict) – Dictionary mapping object types to their start places.
end_places (dict) – Dictionary mapping object types to their end places.
- pm4py.objects.ocpn.variants.to_oc_causal_net.add_dependency(dependencies: dict, source, target, object_type)[source]#
Adds a dependency to the dependencies dictionary. Ignores duplicate dependencies.
- Parameters:
dependencies (dict) – The dictionary to which the dependency will be added.
source (str or OCPetriNet.Place or OCPetriNet.Transition) – The source of the dependency arc.
target str or OCPetriNet.Place or OCPetriNet.Transition – The target of the dependency arc.
object_type – The object type associated with the dependency.