Skip to main content
Rust4PM

oc_declare

process_mining::discovery::object_centric::oc_declare

Related Examples(1)

Functions in this Module(3)

discover_oc_declare

discovery::object_centric::oc_declareSource
Discover behavioral OC-DECLARE constraints from the given OCEL
Reports progress to a Control in the stages "Preparing",
"Finding candidates" (one unit per activity pair), and, if enabled,
"Reducing constraints" (one unit per arc) and "Refining constraints" (one unit per
activity pair with arcs).
SlimLinkedOCELrequired
OCDeclareDiscoveryOptionsOptions for the automatic discovery of OC-DECLARE constraints
import r4pm

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

process_mining/src/discovery/object_centric/oc_declare/mod.rs:109

project_oc_arcs

discovery::object_centric::oc_declareSource
Project OC-DECLARE arcs onto a subset of activities, preserving constraints
that reach a target via a chain through transitive activities.
BFSs from every target activity through non-target intermediaries, composing
arc types and labels along the way.
Vec<OCDeclareArc>required
Vec<String>required
OCDeclareReductionModerequiredMode for reducing OC-DECLARE constraints
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.project_oc_arcs(arcs, ['example'], 'None')

process_mining/src/discovery/object_centric/oc_declare/mod.rs:843

reduce_oc_arcs

discovery::object_centric::oc_declareSource
Reduce OC-DECLARE arcs based on lossless/lossy transitive reduction
considering paths of arbitrary length.
Uses sequential processing to prevent mutual elimination in cycles.
Reports progress to a Control with stage "Reducing constraints", one unit per arc.
Vec<OCDeclareArc>required
boolrequired
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.reduce_oc_arcs(arcs, False)

process_mining/src/discovery/object_centric/oc_declare/mod.rs:687