Skip to main content

slim_ocel_bindings

process_mining::bindings::slim_ocel_bindings

Related Examples(2)

Functions in this Module(46)

fn get_e2o_rev_ids(ocel*: SlimLinkedOCEL, ob_id*: String)Option<Vec<_>>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.get_e2o_rev_ids(ocel, 'ob-893f8ab9')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:410
fn get_event_ids_of_type(ocel*: SlimLinkedOCEL, ev_type*: String)Vec<String>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.get_event_ids_of_type(ocel, 'pay order')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:397
fn get_object_ids_of_type(ocel*: SlimLinkedOCEL, ob_type*: String)Vec<String>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.get_object_ids_of_type(ocel, 'order')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:390

locel_construct_ocel

Reconstruct a full OCEL from a SlimLinkedOCEL. Can be expensive for large logs.
Source
fn locel_construct_ocel(ocel*: SlimLinkedOCEL, output_id: Option<String>)OCEL

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_construct_ocel(ocel, 'example')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:385

locel_get_ob_attr_vals

Get the time-indexed history of an object attribute by name as (timestamp, value) pairs. Empty if absent.
Panics if the index is out of bounds.
Source
fn locel_get_ob_attr_vals(ocel*: SlimLinkedOCEL, ob*: u32, attr_name*: String)Vec<(DateTime, OCELAttributeValue)>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_ob_attr_vals(ocel, 1, 'price')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:373

locel_get_ev_attr_val

Get the value of an event attribute by name. None if the attribute does not exist.
Panics if the index is out of bounds.
Source
fn locel_get_ev_attr_val(ocel*: SlimLinkedOCEL, ev*: u32, attr_name*: String)Nullable_OCELAttributeValue

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_ev_attr_val(ocel, 1, 'price')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:361

locel_get_full_ob

Get the full OCELObject (resolved type name, named time-indexed attributes, string object IDs).
Allocates. Prefer the specific locel_get_ob_* accessors for single fields.
Panics if the index is out of bounds.
Source
fn locel_get_full_ob(ocel*: SlimLinkedOCEL, ob*: u32)OCELObject

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_full_ob(ocel, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:353

locel_get_full_ev

Get the full OCELEvent (resolved type name, named attributes, string object IDs).
Allocates. Prefer the specific locel_get_ev_* accessors for single fields.
Panics if the index is out of bounds.
Source
fn locel_get_full_ev(ocel*: SlimLinkedOCEL, ev*: u32)OCELEvent

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_full_ev(ocel, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:344

locel_get_o2o_rev

Get the reverse O2O relationships of an object (objects with an O2O to it) as (qualifier, object_index) pairs.
Source
fn locel_get_o2o_rev(ocel*: SlimLinkedOCEL, ob*: u32)Vec<(String, ObjectIndex)>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_o2o_rev(ocel, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:333

get_dfg_of_object_type

Get the directly-follows graph (DFG) for objects of the given object type.
Each entry is ((from_activity, to_activity), count), counting adjacent pairs in each
object's timestamp-ordered activity trace. Result order is unspecified.
Source
fn get_dfg_of_object_type(ocel*: SlimLinkedOCEL, ob_type*: String)Vec<((String, String), i64<uint>)>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.get_dfg_of_object_type(ocel, 'order')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:289

get_variants_of_object_type

Get all activity-trace variants for objects of the given object type, with their occurrence counts
Each entry is a tuple (activity_trace, count), where activity_trace is the sequence of event types
connected to an object (ordered by event timestamp), and count is the number of objects of the
requested type that share that exact trace.
Source
fn get_variants_of_object_type(ocel*: SlimLinkedOCEL, ob_type*: String)Vec<(Vec<String>, i64<uint>)>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.get_variants_of_object_type(ocel, 'order')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:257

get_obj_activity_trace

Get the activity trace of an object (i.e., the sequence of event types connected to the object, ordered by event timestamp)
Source
fn get_obj_activity_trace(ocel*: SlimLinkedOCEL, ob*: u32)Vec<String>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.get_obj_activity_trace(ocel, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:233

locel_get_e2o_rev

Get the reverse E2O relationships of an object (events relating to it) as (qualifier, event_index) pairs.
Source
fn locel_get_e2o_rev(ocel*: SlimLinkedOCEL, ob*: u32)Vec<(String, EventIndex)>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_e2o_rev(ocel, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:225

locel_get_ev_time

Get the timestamp of an event. Panics if the index is out of bounds.
Source
fn locel_get_ev_time(ocel*: SlimLinkedOCEL, ev*: u32)DateTime

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_ev_time(ocel, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:211

locel_get_ob_type_of

Get the object type of an object. Panics if the index is out of bounds.
Source
fn locel_get_ob_type_of(ocel*: SlimLinkedOCEL, ob*: u32)String

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_ob_type_of(ocel, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:205

locel_get_ev_type_of

Get the event type (activity) of an event. Panics if the index is out of bounds.
Source
fn locel_get_ev_type_of(ocel*: SlimLinkedOCEL, ev*: u32)String

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_ev_type_of(ocel, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:199

locel_get_ob_id

Get the ID string of an object. Panics if the index is out of bounds.
Source
fn locel_get_ob_id(ocel*: SlimLinkedOCEL, ob*: u32)String

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_ob_id(ocel, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:193

locel_get_ev_id

Get the ID string of an event. Panics if the index is out of bounds.
Source
fn locel_get_ev_id(ocel*: SlimLinkedOCEL, ev*: u32)String

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_ev_id(ocel, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:187

locel_get_ob_by_id

Look up an object by its ID string. None if not found.
Source
fn locel_get_ob_by_id(ocel*: SlimLinkedOCEL, ob_id*: String)Nullable_ObjectIndex

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_ob_by_id(ocel, 'ob-893f8ab9')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:181

locel_get_obs_of_type

Get all object indices of the given object type. Empty if unknown.
Source
fn locel_get_obs_of_type(ocel*: SlimLinkedOCEL, ob_type*: String)Vec<ObjectIndex>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_obs_of_type(ocel, 'order')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:169

locel_get_evs_of_type

Get all event indices of the given event type. Empty if unknown.
Source
fn locel_get_evs_of_type(ocel*: SlimLinkedOCEL, ev_type*: String)Vec<EventIndex>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_evs_of_type(ocel, 'pay order')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:163

locel_get_ob_type

Get the object type specification (name + attributes), or None if unknown.
Source
fn locel_get_ob_type(ocel*: SlimLinkedOCEL, ob_type*: String)Nullable_OCELType

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_ob_type(ocel, 'order')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:157

locel_add_event_type

Add an event type with the given ordered attribute declarations.
No-op if the event type already exists.
Source
fn locel_add_event_type(ocel*: SlimLinkedOCEL, event_type*: String, attributes: Vec<OCELTypeAttribute>)()

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

r4pm.bindings.locel_add_event_type(ocel, 'pay order', [{"name": 'example', "type": 'string'}])
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:32

locel_oc_perf_sojourn_per_event

Per-event sojourn time.
For each event with at least one directly-follows predecessor, the sojourn time is
event_time - latest_predecessor_time in integer microseconds. Returns one row
(event_id, sojourn_us) per qualifying event.
top_k: if Some(k), return only the k rows with the largest sojourn_us, ties broken by
ascending event id, sorted descending. None returns every qualifying event.
Source
fn locel_oc_perf_sojourn_per_event(ocel*: SlimLinkedOCEL, top_k: Option<i64>)Vec<(String, i64)>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_oc_perf_sojourn_per_event(ocel, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:641

locel_oc_perf_sync_per_event

Per-event synchronization time and the delaying object.
For each event with at least one directly-follows predecessor, the synchronization time is
max_predecessor_time - min_predecessor_time in integer microseconds (the span between its
earliest and latest directly-preceding event). The delaying object is the object linking the
latest predecessor (ties broken by ascending object id).
Returns one row (event_id, sync_us, delaying_object_id) per qualifying event.
top_k: if Some(k), return only the k rows with the largest sync_us, ties broken by
ascending event id, sorted descending. None returns every qualifying event.
Source
fn locel_oc_perf_sync_per_event(ocel*: SlimLinkedOCEL, top_k: Option<i64>)Vec<(String, i64, String)>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_oc_perf_sync_per_event(ocel, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:585

locel_conversion_rate

Conversion rate from source_type to target_type via O2O, restricted to targets touched by activity.
Returns the fraction of source_type objects that have at least one outgoing O2O edge to a
target_type object related (via E2O) to some event of the given event type.
# Errors
Returns an error if activity names no declared event type, or if either object type is not
declared, so a rate of 0.0 cannot mean a misspelled name.
Source
fn locel_conversion_rate(ocel*: SlimLinkedOCEL, activity*: String, source_type*: String, target_type*: String)f64

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_conversion_rate(ocel, 'example', 'example', 'example')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:484

locel_event_object_type_counts

Count E2O relationships per (event_type, object_type) pair.
Each entry is (event_type, object_type, count). A single (event, object) pair connected
by multiple qualifiers contributes once per qualifier. Pairs with zero relations are omitted.
Result row order is unspecified.
Source
fn locel_event_object_type_counts(ocel*: SlimLinkedOCEL)Vec<(String, String, i64)>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_event_object_type_counts(ocel)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:454
fn get_o2o_ids(ocel*: SlimLinkedOCEL, ob_id*: String)Option<Vec<_>>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.get_o2o_ids(ocel, 'ob-893f8ab9')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:428
fn get_e2o_ids(ocel*: SlimLinkedOCEL, ev_id*: String)Option<Vec<_>>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.get_e2o_ids(ocel, 'ev-893f8ab9')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:419

locel_get_ev_type

Get the event type specification (name + attributes), or None if unknown.
Source
fn locel_get_ev_type(ocel*: SlimLinkedOCEL, ev_type*: String)Nullable_OCELType

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_ev_type(ocel, 'pay order')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:151

locel_get_ob_types

Get all declared object type names, in declaration order.
Source
fn locel_get_ob_types(ocel*: SlimLinkedOCEL)Vec<String>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_ob_types(ocel)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:145

locel_get_ev_types

Get all declared event type names, in declaration order.
Source
fn locel_get_ev_types(ocel*: SlimLinkedOCEL)Vec<String>

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_get_ev_types(ocel)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:139

locel_delete_o2o

Remove all O2O relationships from from_obj to to_obj (across every qualifier).
Returns true on success, false if either index is out of bounds (with a stderr warning).
Source
fn locel_delete_o2o(ocel*: SlimLinkedOCEL, from_obj*: u32, to_obj*: u32)bool

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_delete_o2o(ocel, 1, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:133

locel_delete_e2o

Remove all E2O relationships between the given event and object (across every qualifier).
Returns true on success, false if either index is out of bounds (with a stderr warning).
Source
fn locel_delete_e2o(ocel*: SlimLinkedOCEL, event*: u32, object*: u32)bool

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_delete_e2o(ocel, 1, 1)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:125

locel_add_o2o

Add a directed O2O (object-to-object) relationship from from_obj to to_obj with the given qualifier.
Multiple qualifiers between the same (from_obj, to_obj) pair are allowed. Re-adding the exact
same (from_obj, to_obj, qualifier) triple is a no-op. Returns true on success, false if
either index is out of bounds (with a stderr warning).
Source
fn locel_add_o2o(ocel*: SlimLinkedOCEL, from_obj*: u32, to_obj*: u32, qualifier*: String)bool

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_add_o2o(ocel, 1, 1, 'places')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:112

locel_add_e2o

Add an E2O (event-to-object) relationship with the given qualifier.
Multiple qualifiers between the same (event, object) pair are allowed. Re-adding the exact
same (event, object, qualifier) triple is a no-op. Returns true on success, false if
either index is out of bounds (with a stderr warning).
Source
fn locel_add_e2o(ocel*: SlimLinkedOCEL, event*: u32, object*: u32, qualifier*: String)bool

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_add_e2o(ocel, 1, 1, 'places')
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:97

locel_add_object

Add an object and return its ObjectIndex.
The object type must have been declared via locel_add_object_type first.
Otherwise this returns None.
id: If None, a UUID is assigned. Returns None if the id is already taken.
attributes: Positional list of time-indexed attribute histories (one (timestamp, value) list per declared attribute, in order). Use 1970-01-01T00:00:00Z for constant/initial values. Padded with empty lists or truncated on length mismatch (with a warning).
relationships: Outgoing O2O relationships as (qualifier, object_index) pairs (can also be added later via locel_add_o2o).
Source
fn locel_add_object(ocel*: SlimLinkedOCEL, object_type*: String, id: Option<String>, attributes: Vec<Vec<(DateTime, OCELAttributeValue)>>, relationships: Vec<(String, ObjectIndex)>)Nullable_ObjectIndex

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_add_object(ocel, 'order', '893f8ab9', [[['2020-01-01T10:30:00Z', 1]]], [['example', 1]])
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:81

locel_add_event

Add an event and return its EventIndex.
The event type must have been declared via locel_add_event_type first.
Otherwise this returns None.
id: If None, a UUID is assigned. Returns None if the id is already taken.
attributes: Positional values in the declared attribute order. Padded with Null or truncated on length mismatch (with a warning).
relationships: E2O relationships as (qualifier, object_index) pairs (can also be added later via locel_add_e2o).
Source
fn locel_add_event(ocel*: SlimLinkedOCEL, event_type*: String, time*: DateTime, id: Option<String>, attributes: Vec<OCELAttributeValue>, relationships: Vec<(String, ObjectIndex)>)Nullable_EventIndex

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

res = r4pm.bindings.locel_add_event(ocel, 'pay order', '2020-01-01T10:30:00Z', '893f8ab9', [1], [['example', 1]])
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:61

locel_add_object_type

Add an object type with the given ordered attribute declarations.
No-op if the object type already exists.
Source
fn locel_add_object_type(ocel*: SlimLinkedOCEL, object_type*: String, attributes: Vec<OCELTypeAttribute>)()

Arguments

Returns

import r4pm
ocel = r4pm.import_item('SlimLinkedOCEL','path/to/file')

r4pm.bindings.locel_add_object_type(ocel, 'order', [{"name": 'example', "type": 'string'}])
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:44

locel_new

Create a new empty SlimLinkedOCEL.
A SlimLinkedOCEL is an object-centric event log where events and objects are referenced
by integer indices (EventIndex / ObjectIndex) returned from the add_* calls,
and each indexed event/object is an instance of an event/object type (activity / object class)
declared beforehand with an ordered list of attributes.
Source
fn locel_new(output_id: Option<String>)SlimLinkedOCEL

Arguments

Returns

import r4pm


res = r4pm.bindings.locel_new('example')