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).

Arguments
Import from .json, .json.gz, .xml, .xml.gz, .ocel.csv, .ocel.csv.gz, .ocel.zip, .ocel-parquet.zip, .sqlite, .duckdb, .xes, .xes.gz, or pass OCEL or IndexLinkedOCEL (converted automatically)

Options 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)

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.

Arguments

Mode 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')

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.

Arguments
bool
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)