pm4py.objects.ocpn.variants.to_alternative_format 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_alternative_format.apply(ocpn: OCPetriNet, parameters=None) Dict[str, Any][source]#
Converts an OCPetriNet object to the alternative format as a Dict[str, Any] specified in pm4py.algo.discovery.ocel.ocpn.variants.classic. Only the essential components of the OCPetriNet are retained in the alternative format: activities, object_types, petri_nets, double_arcs_on_activity, start_activities, and end_activities.
- 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:
ocpn – Alternative format representation of the object-centric Petri net.
- Return type:
Dict[str, Any]
- pm4py.objects.ocpn.variants.to_alternative_format.oc_marking_to_petri(oc_marking: OCMarking, pn_places: Dict[Place, Place]) Marking[source]#
Convert an object-centric marking to a classic Petri-net Marking that contains only the places that are keys of the pn_places dictionary.
- Parameters:
oc_marking (OCMarking) – The object-centric marking to convert.
pn_places (Dict[OCPetriNet.Place, PetriNet.Place]) – A mapping from object-centric Petri net places to classic Petri net places.
- Returns:
Marking – A classic Petri net marking (place -> token count)
- Return type: