pm4py.visualization.ocel.ocpn.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.visualization.ocel.ocpn.variants.brachmann 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

pm4py.visualization.ocel.ocpn.variants.brachmann.ot_to_color(ot: str) str[source]#

Generates a deterministic hex color based on the object type string.

pm4py.visualization.ocel.ocpn.variants.brachmann.generate_dummy_id() str[source]#

Generates a unique ID for a dummy node.

pm4py.visualization.ocel.ocpn.variants.brachmann.generate_arc_id(source_id: str, target_id: str) str[source]#

Generates a unique ID for an arc.

pm4py.visualization.ocel.ocpn.variants.brachmann.get_neighbors(vertex_id: str, layout_data: Dict, direction: str) List[str][source]#

Gets upper (‘up’) or lower (‘down’) neighbors of a vertex.

pm4py.visualization.ocel.ocpn.variants.brachmann.get_arcs_between(u: str, v: str, layout_data: Dict) List[Dict][source]#

Gets arcs connecting vertex u and vertex v directly.

pm4py.visualization.ocel.ocpn.variants.brachmann.get_arcs_between_layers(layer_idx1: int, layer_idx2: int, layout_data: Dict) List[Dict][source]#

Gets all arcs connecting nodes between two specific layers.

pm4py.visualization.ocel.ocpn.variants.brachmann.is_incident_to_inner_segment(ocpn_layout: Dict, vertex_id: str) bool[source]#

Checks if a vertex is a dummy node connected to another dummy node above it.

class pm4py.visualization.ocel.ocpn.variants.brachmann.OCPNGraph(layout_data: Dict)[source]#

Bases: object

Helper class to represent the graph for cycle breaking and layer assignment.

get_out_degree(node: str) int[source]#
get_in_degree(node: str) int[source]#
remove_node(node: str)[source]#
remove_nodes(nodes_to_remove: List[str])[source]#
get_sink() str | None[source]#
get_source() str | None[source]#
get_max_out_degree_node() str | None[source]#
class pm4py.visualization.ocel.ocpn.variants.brachmann.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

Parameters for the Sugiyama OCPN visualization

FORMAT = 'format'#
BGCOLOR = 'bgcolor'#
RANKDIR = 'rankdir'#
ENGINE = 'engine'#
ENABLE_GRAPH_TITLE = 'enable_graph_title'#
GRAPH_TITLE = 'graph_title'#
SOURCES = 'sources'#
SINKS = 'sinks'#
VERTEX_SEP = 'vertex_sep'#
LAYER_SEP = 'layer_sep'#
EDGE_SEP = 'edge_sep'#
BORDER_PADDING = 'border_padding'#
OBJECT_CENTRALITY = 'object_centrality'#
OBJECT_ATTRACTION = 'object_attraction'#
OBJECT_ATTRACTION_RANGE_MIN = 'object_attraction_range_min'#
OBJECT_ATTRACTION_RANGE_MAX = 'object_attraction_range_max'#
MAX_BARYCENTER_ITERATIONS = 'max_barycenter_iterations'#
PLACE_RADIUS = 'place_radius'#
TRANSITION_WIDTH = 'transition_width'#
TRANSITION_HEIGHT = 'transition_height'#
SILENT_TRANSITION_WIDTH = 'silent_transition_width'#
ARC_SIZE = 'arc_size'#
ARROWHEAD_SIZE = 'arrowhead_size'#
INDICATE_ARC_WEIGHT = 'indicate_arc_weight'#
INDICATE_VARIABLE_ARCS = 'indicate_variable_arcs'#
VARIABLE_ARC_INDICATOR_COLOR = 'variable_arc_indicator_color'#
VARIABLE_ARC_INDICATOR_SIZE = 'variable_arc_indicator_size'#
TRANSITION_COLOR = 'transition_color'#
TRANSITION_FILL_COLOR = 'transition_fill_color'#
TRANSITION_TEXT_COLOR = 'transition_text_color'#
DEFAULT_PLACE_COLOR = 'default_place_color'#
ARC_DEFAULT_COLOR = 'arc_default_color'#
TYPE_COLOR_MAPPING = 'type_color_mapping'#
FONT_NAME = 'font_name'#
FONT_SIZE = 'font_size'#
pm4py.visualization.ocel.ocpn.variants.brachmann.apply(ocpn: Dict[str, Any], parameters: Dict[Any, Any] | None = None) Digraph[source]#

Obtains a visualization of the provided object-centric Petri net using a Sugiyama-based layout algorithm.

Args:

ocpn (Dict[str, Any]): Object-centric Petri net structure. parameters (Optional[Dict[Any, Any]], optional): Algorithm parameters.

Returns:

Digraph: A Graphviz digraph object representing the layout.

pm4py.visualization.ocel.ocpn.variants.wo_decoration 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.visualization.ocel.ocpn.variants.wo_decoration.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

FORMAT = 'format'#
BGCOLOR = 'bgcolor'#
RANKDIR = 'rankdir'#
ENABLE_GRAPH_TITLE = 'enable_graph_title'#
GRAPH_TITLE = 'graph_title'#
pm4py.visualization.ocel.ocpn.variants.wo_decoration.ot_to_color(ot: str) str[source]#
pm4py.visualization.ocel.ocpn.variants.wo_decoration.apply(ocpn: Dict[str, Any], parameters: Dict[Any, Any] | None = None) Digraph[source]#

Obtains a visualization of the provided object-centric Petri net (without decoration).

Reference paper: van der Aalst, Wil MP, and Alessandro Berti. “Discovering object-centric Petri nets.” Fundamenta informaticae 175.1-4 (2020): 1-40.

Parameters#

ocpn

Object-centric Petri net

variant

Variant of the algorithm to be used

parameters

Variant-specific parameters: - Parameters.FORMAT => the format of the visualization (“png”, “svg”, …) - Parameters.BGCOLOR => the background color - Parameters.RANKDIR => the rank direction (LR = left-right, TB = top-bottom)

Returns#

gviz

Graphviz digraph