Skip to main content
Rust4PM

bindings

process_mining::visualization::bindings

Functions in this Module(42)

dfg_layout

visualization::bindingsSource
Lay the model out, returning the positions only.
DirectlyFollowsGraphrequiredA directly-follows graph of [`Activity`]s, with its start and end activities.
DfgBuildOptionsHow a [`DirectlyFollowsGraph`] is turned into a [`Graph`].
import r4pm

dfg = {
    "activities": {"something": 1},
    "directly_follows_relations": [[['example', 'example'], 1]],
    "end_activities": {"something": 1},
    "start_activities": {"something": 1},
}
res = r4pm.bindings.dfg_layout(dfg)

process_mining/src/visualization/bindings.rs:107

dfg_layout_request

visualization::bindingsSource
The layout request of the model, with the model element behind each node and edge.
DirectlyFollowsGraphrequiredA directly-follows graph of [`Activity`]s, with its start and end activities.
DfgBuildOptionsHow a [`DirectlyFollowsGraph`] is turned into a [`Graph`].
import r4pm

dfg = {
    "activities": {"something": 1},
    "directly_follows_relations": [[['example', 'example'], 1]],
    "end_activities": {"something": 1},
    "start_activities": {"something": 1},
}
res = r4pm.bindings.dfg_layout_request(dfg)

process_mining/src/visualization/bindings.rs:107

dfg_scene_from_layout

visualization::bindingsSource
Draw the model over a layout of its graph, with per-node and per-edge style overrides.
DirectlyFollowsGraphrequiredA directly-follows graph of [`Activity`]s, with its start and end activities.
LayoutrequiredOne laid-out drawing.
DfgBuildOptionsHow a [`DirectlyFollowsGraph`] is turned into a [`Graph`].
DfgStyleColors a directly-follows graph is drawn with.
StyleOverridesPer-element style changes, keyed by the index of the node or edge in the model's graph, which
import r4pm

dfg = {
    "activities": {"something": 1},
    "directly_follows_relations": [[['example', 'example'], 1]],
    "end_activities": {"something": 1},
    "start_activities": {"something": 1},
}
layout = {
    "bounds": {"max": {"x": 0.2, "y": 0.2}, "min": {"x": 0.2, "y": 0.2}},
    "edges": [{"kind": 'direct', "points": [{"x": 0.2, "y": 0.2}]}],
    "layer_count": 1,
    "nodes": [
        {
            "center": {"x": 0.2, "y": 0.2},
            "order": 1,
            "size": {"height": 0.2, "width": 0.2},
        },
    ],
    "reversed": [1],
    "stats": {"dummy_count": 1},
}
res = r4pm.bindings.dfg_scene_from_layout(dfg, layout)

process_mining/src/visualization/bindings.rs:107

dfg_svg

visualization::bindingsSource
Draw the model as a standalone SVG document.
DirectlyFollowsGraphrequiredA directly-follows graph of [`Activity`]s, with its start and end activities.
DfgBuildOptionsHow a [`DirectlyFollowsGraph`] is turned into a [`Graph`].
DfgStyleColors a directly-follows graph is drawn with.
import r4pm

dfg = {
    "activities": {"something": 1},
    "directly_follows_relations": [[['example', 'example'], 1]],
    "end_activities": {"something": 1},
    "start_activities": {"something": 1},
}
res = r4pm.bindings.dfg_svg(dfg)

process_mining/src/visualization/bindings.rs:107

dfg_svg_from_layout

visualization::bindingsSource
Draw the model over a layout of its graph as a standalone SVG document, so no Scene
crosses the binding boundary.
DirectlyFollowsGraphrequiredA directly-follows graph of [`Activity`]s, with its start and end activities.
LayoutrequiredOne laid-out drawing.
DfgBuildOptionsHow a [`DirectlyFollowsGraph`] is turned into a [`Graph`].
DfgStyleColors a directly-follows graph is drawn with.
StyleOverridesPer-element style changes, keyed by the index of the node or edge in the model's graph, which
import r4pm

dfg = {
    "activities": {"something": 1},
    "directly_follows_relations": [[['example', 'example'], 1]],
    "end_activities": {"something": 1},
    "start_activities": {"something": 1},
}
layout = {
    "bounds": {"max": {"x": 0.2, "y": 0.2}, "min": {"x": 0.2, "y": 0.2}},
    "edges": [{"kind": 'direct', "points": [{"x": 0.2, "y": 0.2}]}],
    "layer_count": 1,
    "nodes": [
        {
            "center": {"x": 0.2, "y": 0.2},
            "order": 1,
            "size": {"height": 0.2, "width": 0.2},
        },
    ],
    "reversed": [1],
    "stats": {"dummy_count": 1},
}
res = r4pm.bindings.dfg_svg_from_layout(dfg, layout)

process_mining/src/visualization/bindings.rs:107

oc_declare_layout

visualization::bindingsSource
Lay the model out, returning the positions only.
Vec<OCDeclareArc>required
OCDeclareBuildOptionsHow a slice of [`OCDeclareArc`]s is turned into a [`Graph`]. Missing fields take the values of
import r4pm

arcs = [
    {
        "arc_type": 'AS',
        "counts": [1, 1],
        "from": 'example',
        "label": {
            "all": [{"object_type": 'order', "type": 'Simple'}],
            "any": [{"object_type": 'order', "type": 'Simple'}],
            "each": [{"object_type": 'order', "type": 'Simple'}],
        },
        "to": 'example',
    },
]
res = r4pm.bindings.oc_declare_layout(arcs)

process_mining/src/visualization/bindings.rs:119

oc_declare_layout_request

visualization::bindingsSource
The layout request of the model, with the model element behind each node and edge.
Vec<OCDeclareArc>required
OCDeclareBuildOptionsHow a slice of [`OCDeclareArc`]s is turned into a [`Graph`]. Missing fields take the values of
import r4pm

arcs = [
    {
        "arc_type": 'AS',
        "counts": [1, 1],
        "from": 'example',
        "label": {
            "all": [{"object_type": 'order', "type": 'Simple'}],
            "any": [{"object_type": 'order', "type": 'Simple'}],
            "each": [{"object_type": 'order', "type": 'Simple'}],
        },
        "to": 'example',
    },
]
res = r4pm.bindings.oc_declare_layout_request(arcs)

process_mining/src/visualization/bindings.rs:119

oc_declare_scene_from_layout

visualization::bindingsSource
Draw the model over a layout of its graph, with per-node and per-edge style overrides.
Vec<OCDeclareArc>required
LayoutrequiredOne laid-out drawing.
OCDeclareBuildOptionsHow a slice of [`OCDeclareArc`]s is turned into a [`Graph`]. Missing fields take the values of
OCDeclareStyleColors and sizes of an OC-DECLARE drawing.
StyleOverridesPer-element style changes, keyed by the index of the node or edge in the model's graph, which
import r4pm

arcs = [
    {
        "arc_type": 'AS',
        "counts": [1, 1],
        "from": 'example',
        "label": {
            "all": [{"object_type": 'order', "type": 'Simple'}],
            "any": [{"object_type": 'order', "type": 'Simple'}],
            "each": [{"object_type": 'order', "type": 'Simple'}],
        },
        "to": 'example',
    },
]
layout = {
    "bounds": {"max": {"x": 0.2, "y": 0.2}, "min": {"x": 0.2, "y": 0.2}},
    "edges": [{"kind": 'direct', "points": [{"x": 0.2, "y": 0.2}]}],
    "layer_count": 1,
    "nodes": [
        {
            "center": {"x": 0.2, "y": 0.2},
            "order": 1,
            "size": {"height": 0.2, "width": 0.2},
        },
    ],
    "reversed": [1],
    "stats": {"dummy_count": 1},
}
res = r4pm.bindings.oc_declare_scene_from_layout(arcs, layout)

process_mining/src/visualization/bindings.rs:119

oc_declare_svg

visualization::bindingsSource
Draw the model as a standalone SVG document.
Vec<OCDeclareArc>required
OCDeclareBuildOptionsHow a slice of [`OCDeclareArc`]s is turned into a [`Graph`]. Missing fields take the values of
OCDeclareStyleColors and sizes of an OC-DECLARE drawing.
import r4pm

arcs = [
    {
        "arc_type": 'AS',
        "counts": [1, 1],
        "from": 'example',
        "label": {
            "all": [{"object_type": 'order', "type": 'Simple'}],
            "any": [{"object_type": 'order', "type": 'Simple'}],
            "each": [{"object_type": 'order', "type": 'Simple'}],
        },
        "to": 'example',
    },
]
res = r4pm.bindings.oc_declare_svg(arcs)

process_mining/src/visualization/bindings.rs:119

oc_declare_svg_from_layout

visualization::bindingsSource
Draw the model over a layout of its graph as a standalone SVG document, so no Scene
crosses the binding boundary.
Vec<OCDeclareArc>required
LayoutrequiredOne laid-out drawing.
OCDeclareBuildOptionsHow a slice of [`OCDeclareArc`]s is turned into a [`Graph`]. Missing fields take the values of
OCDeclareStyleColors and sizes of an OC-DECLARE drawing.
StyleOverridesPer-element style changes, keyed by the index of the node or edge in the model's graph, which
import r4pm

arcs = [
    {
        "arc_type": 'AS',
        "counts": [1, 1],
        "from": 'example',
        "label": {
            "all": [{"object_type": 'order', "type": 'Simple'}],
            "any": [{"object_type": 'order', "type": 'Simple'}],
            "each": [{"object_type": 'order', "type": 'Simple'}],
        },
        "to": 'example',
    },
]
layout = {
    "bounds": {"max": {"x": 0.2, "y": 0.2}, "min": {"x": 0.2, "y": 0.2}},
    "edges": [{"kind": 'direct', "points": [{"x": 0.2, "y": 0.2}]}],
    "layer_count": 1,
    "nodes": [
        {
            "center": {"x": 0.2, "y": 0.2},
            "order": 1,
            "size": {"height": 0.2, "width": 0.2},
        },
    ],
    "reversed": [1],
    "stats": {"dummy_count": 1},
}
res = r4pm.bindings.oc_declare_svg_from_layout(arcs, layout)

process_mining/src/visualization/bindings.rs:119

oc_type_graph_from_ocel

visualization::bindingsSource
The type graph of an OCEL: its event and object types with their counts, and their qualified
E2O and O2O relations.
SlimLinkedOCELrequired
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.oc_type_graph_from_ocel(ocel)

process_mining/src/visualization/bindings.rs:135

oc_type_graph_layout

visualization::bindingsSource
Lay the model out, returning the positions only.
OcTypeGraphrequiredThe types of an OCEL and the relations between them.
OcTypeGraphBuildOptionsHow a [`OcTypeGraph`] is turned into a [`Graph`].
import r4pm

graph = {
    "edges": [{"source": 1, "target": 1}],
    "nodes": [{"kind": 'event', "label": 'example'}],
}
res = r4pm.bindings.oc_type_graph_layout(graph)

process_mining/src/visualization/bindings.rs:140

oc_type_graph_layout_request

visualization::bindingsSource
The layout request of the model, with the model element behind each node and edge.
OcTypeGraphrequiredThe types of an OCEL and the relations between them.
OcTypeGraphBuildOptionsHow a [`OcTypeGraph`] is turned into a [`Graph`].
import r4pm

graph = {
    "edges": [{"source": 1, "target": 1}],
    "nodes": [{"kind": 'event', "label": 'example'}],
}
res = r4pm.bindings.oc_type_graph_layout_request(graph)

process_mining/src/visualization/bindings.rs:140

oc_type_graph_scene_from_layout

visualization::bindingsSource
Draw the model over a layout of its graph, with per-node and per-edge style overrides.
OcTypeGraphrequiredThe types of an OCEL and the relations between them.
LayoutrequiredOne laid-out drawing.
OcTypeGraphBuildOptionsHow a [`OcTypeGraph`] is turned into a [`Graph`].
OcTypeGraphStyleColors and sizes a type graph is drawn with.
StyleOverridesPer-element style changes, keyed by the index of the node or edge in the model's graph, which
import r4pm

graph = {
    "edges": [{"source": 1, "target": 1}],
    "nodes": [{"kind": 'event', "label": 'example'}],
}
layout = {
    "bounds": {"max": {"x": 0.2, "y": 0.2}, "min": {"x": 0.2, "y": 0.2}},
    "edges": [{"kind": 'direct', "points": [{"x": 0.2, "y": 0.2}]}],
    "layer_count": 1,
    "nodes": [
        {
            "center": {"x": 0.2, "y": 0.2},
            "order": 1,
            "size": {"height": 0.2, "width": 0.2},
        },
    ],
    "reversed": [1],
    "stats": {"dummy_count": 1},
}
res = r4pm.bindings.oc_type_graph_scene_from_layout(graph, layout)

process_mining/src/visualization/bindings.rs:140

oc_type_graph_svg

visualization::bindingsSource
Draw the model as a standalone SVG document.
OcTypeGraphrequiredThe types of an OCEL and the relations between them.
OcTypeGraphBuildOptionsHow a [`OcTypeGraph`] is turned into a [`Graph`].
OcTypeGraphStyleColors and sizes a type graph is drawn with.
import r4pm

graph = {
    "edges": [{"source": 1, "target": 1}],
    "nodes": [{"kind": 'event', "label": 'example'}],
}
res = r4pm.bindings.oc_type_graph_svg(graph)

process_mining/src/visualization/bindings.rs:140

oc_type_graph_svg_from_layout

visualization::bindingsSource
Draw the model over a layout of its graph as a standalone SVG document, so no Scene
crosses the binding boundary.
OcTypeGraphrequiredThe types of an OCEL and the relations between them.
LayoutrequiredOne laid-out drawing.
OcTypeGraphBuildOptionsHow a [`OcTypeGraph`] is turned into a [`Graph`].
OcTypeGraphStyleColors and sizes a type graph is drawn with.
StyleOverridesPer-element style changes, keyed by the index of the node or edge in the model's graph, which
import r4pm

graph = {
    "edges": [{"source": 1, "target": 1}],
    "nodes": [{"kind": 'event', "label": 'example'}],
}
layout = {
    "bounds": {"max": {"x": 0.2, "y": 0.2}, "min": {"x": 0.2, "y": 0.2}},
    "edges": [{"kind": 'direct', "points": [{"x": 0.2, "y": 0.2}]}],
    "layer_count": 1,
    "nodes": [
        {
            "center": {"x": 0.2, "y": 0.2},
            "order": 1,
            "size": {"height": 0.2, "width": 0.2},
        },
    ],
    "reversed": [1],
    "stats": {"dummy_count": 1},
}
res = r4pm.bindings.oc_type_graph_svg_from_layout(graph, layout)

process_mining/src/visualization/bindings.rs:140

ocdfg_layout

visualization::bindingsSource
Lay the model out, returning the positions only.
OCDirectlyFollowsGraphrequiredAn object-centric directly-follows graph containing a [`DirectlyFollowsGraph`] for each object
OcdfgBuildOptionsHow an [`OCDirectlyFollowsGraph`] is turned into a [`Graph`].
import r4pm

ocdfg = {
    "object_type_to_dfg": {
        "something": {
            "activities": {"something": 1},
            "directly_follows_relations": [[['example', 'example'], 1]],
            "end_activities": {"something": 1},
            "start_activities": {"something": 1},
        },
    },
}
res = r4pm.bindings.ocdfg_layout(ocdfg)

process_mining/src/visualization/bindings.rs:113

ocdfg_layout_request

visualization::bindingsSource
The layout request of the model, with the model element behind each node and edge.
OCDirectlyFollowsGraphrequiredAn object-centric directly-follows graph containing a [`DirectlyFollowsGraph`] for each object
OcdfgBuildOptionsHow an [`OCDirectlyFollowsGraph`] is turned into a [`Graph`].
import r4pm

ocdfg = {
    "object_type_to_dfg": {
        "something": {
            "activities": {"something": 1},
            "directly_follows_relations": [[['example', 'example'], 1]],
            "end_activities": {"something": 1},
            "start_activities": {"something": 1},
        },
    },
}
res = r4pm.bindings.ocdfg_layout_request(ocdfg)

process_mining/src/visualization/bindings.rs:113

ocdfg_scene_from_layout

visualization::bindingsSource
Draw the model over a layout of its graph, with per-node and per-edge style overrides.
OCDirectlyFollowsGraphrequiredAn object-centric directly-follows graph containing a [`DirectlyFollowsGraph`] for each object
LayoutrequiredOne laid-out drawing.
OcdfgBuildOptionsHow an [`OCDirectlyFollowsGraph`] is turned into a [`Graph`].
OcdfgStyleColors an object-centric directly-follows graph is drawn with.
StyleOverridesPer-element style changes, keyed by the index of the node or edge in the model's graph, which
import r4pm

ocdfg = {
    "object_type_to_dfg": {
        "something": {
            "activities": {"something": 1},
            "directly_follows_relations": [[['example', 'example'], 1]],
            "end_activities": {"something": 1},
            "start_activities": {"something": 1},
        },
    },
}
layout = {
    "bounds": {"max": {"x": 0.2, "y": 0.2}, "min": {"x": 0.2, "y": 0.2}},
    "edges": [{"kind": 'direct', "points": [{"x": 0.2, "y": 0.2}]}],
    "layer_count": 1,
    "nodes": [
        {
            "center": {"x": 0.2, "y": 0.2},
            "order": 1,
            "size": {"height": 0.2, "width": 0.2},
        },
    ],
    "reversed": [1],
    "stats": {"dummy_count": 1},
}
res = r4pm.bindings.ocdfg_scene_from_layout(ocdfg, layout)

process_mining/src/visualization/bindings.rs:113

ocdfg_svg

visualization::bindingsSource
Draw the model as a standalone SVG document.
OCDirectlyFollowsGraphrequiredAn object-centric directly-follows graph containing a [`DirectlyFollowsGraph`] for each object
OcdfgBuildOptionsHow an [`OCDirectlyFollowsGraph`] is turned into a [`Graph`].
OcdfgStyleColors an object-centric directly-follows graph is drawn with.
import r4pm

ocdfg = {
    "object_type_to_dfg": {
        "something": {
            "activities": {"something": 1},
            "directly_follows_relations": [[['example', 'example'], 1]],
            "end_activities": {"something": 1},
            "start_activities": {"something": 1},
        },
    },
}
res = r4pm.bindings.ocdfg_svg(ocdfg)

process_mining/src/visualization/bindings.rs:113

ocdfg_svg_from_layout

visualization::bindingsSource
Draw the model over a layout of its graph as a standalone SVG document, so no Scene
crosses the binding boundary.
OCDirectlyFollowsGraphrequiredAn object-centric directly-follows graph containing a [`DirectlyFollowsGraph`] for each object
LayoutrequiredOne laid-out drawing.
OcdfgBuildOptionsHow an [`OCDirectlyFollowsGraph`] is turned into a [`Graph`].
OcdfgStyleColors an object-centric directly-follows graph is drawn with.
StyleOverridesPer-element style changes, keyed by the index of the node or edge in the model's graph, which
import r4pm

ocdfg = {
    "object_type_to_dfg": {
        "something": {
            "activities": {"something": 1},
            "directly_follows_relations": [[['example', 'example'], 1]],
            "end_activities": {"something": 1},
            "start_activities": {"something": 1},
        },
    },
}
layout = {
    "bounds": {"max": {"x": 0.2, "y": 0.2}, "min": {"x": 0.2, "y": 0.2}},
    "edges": [{"kind": 'direct', "points": [{"x": 0.2, "y": 0.2}]}],
    "layer_count": 1,
    "nodes": [
        {
            "center": {"x": 0.2, "y": 0.2},
            "order": 1,
            "size": {"height": 0.2, "width": 0.2},
        },
    ],
    "reversed": [1],
    "stats": {"dummy_count": 1},
}
res = r4pm.bindings.ocdfg_svg_from_layout(ocdfg, layout)

process_mining/src/visualization/bindings.rs:113

ocpn_layout

visualization::bindingsSource
Lay the model out, returning the positions only.
ObjectCentricPetriNetJsonrequiredAn object-centric Petri net as a flat list of places, transitions and arcs.
OcpnBuildOptionsHow an object-centric Petri net is turned into a [`Graph`].
import r4pm

ocpn = {
    "arcs": [{"source": 'example', "target": 'example'}],
    "final_marking": {"something": 1},
    "initial_marking": {"something": 1},
    "places": [{"name": 'example', "object_type": 'order'}],
    "transitions": [{"name": 'example'}],
}
res = r4pm.bindings.ocpn_layout(ocpn)

process_mining/src/visualization/bindings.rs:101

ocpn_layout_request

visualization::bindingsSource
The layout request of the model, with the model element behind each node and edge.
ObjectCentricPetriNetJsonrequiredAn object-centric Petri net as a flat list of places, transitions and arcs.
OcpnBuildOptionsHow an object-centric Petri net is turned into a [`Graph`].
import r4pm

ocpn = {
    "arcs": [{"source": 'example', "target": 'example'}],
    "final_marking": {"something": 1},
    "initial_marking": {"something": 1},
    "places": [{"name": 'example', "object_type": 'order'}],
    "transitions": [{"name": 'example'}],
}
res = r4pm.bindings.ocpn_layout_request(ocpn)

process_mining/src/visualization/bindings.rs:101

ocpn_scene_from_layout

visualization::bindingsSource
Draw the model over a layout of its graph, with per-node and per-edge style overrides.
ObjectCentricPetriNetJsonrequiredAn object-centric Petri net as a flat list of places, transitions and arcs.
LayoutrequiredOne laid-out drawing.
OcpnBuildOptionsHow an object-centric Petri net is turned into a [`Graph`].
OcpnStyleColors and sizes an object-centric Petri net drawing uses.
StyleOverridesPer-element style changes, keyed by the index of the node or edge in the model's graph, which
import r4pm

ocpn = {
    "arcs": [{"source": 'example', "target": 'example'}],
    "final_marking": {"something": 1},
    "initial_marking": {"something": 1},
    "places": [{"name": 'example', "object_type": 'order'}],
    "transitions": [{"name": 'example'}],
}
layout = {
    "bounds": {"max": {"x": 0.2, "y": 0.2}, "min": {"x": 0.2, "y": 0.2}},
    "edges": [{"kind": 'direct', "points": [{"x": 0.2, "y": 0.2}]}],
    "layer_count": 1,
    "nodes": [
        {
            "center": {"x": 0.2, "y": 0.2},
            "order": 1,
            "size": {"height": 0.2, "width": 0.2},
        },
    ],
    "reversed": [1],
    "stats": {"dummy_count": 1},
}
res = r4pm.bindings.ocpn_scene_from_layout(ocpn, layout)

process_mining/src/visualization/bindings.rs:101

ocpn_svg

visualization::bindingsSource
Draw the model as a standalone SVG document.
ObjectCentricPetriNetJsonrequiredAn object-centric Petri net as a flat list of places, transitions and arcs.
OcpnBuildOptionsHow an object-centric Petri net is turned into a [`Graph`].
OcpnStyleColors and sizes an object-centric Petri net drawing uses.
import r4pm

ocpn = {
    "arcs": [{"source": 'example', "target"