Skip to main content

slim_ocel_bindings

process_mining::bindings::slim_ocel_bindings

Related Examples(2)

Functions in this Module(31)

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:84

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*: i64<uint>, 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:288

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*: i64<uint>)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:218

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*: i64<uint>)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:259

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:176

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:64

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*: i64<uint>)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:268

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()SlimLinkedOCEL

Returns

import r4pm


res = r4pm.bindings.locel_new()
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:23

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*: i64<uint>, object*: i64<uint>)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:130

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:170

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*: i64<uint>)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:212

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:45

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*: i64<uint>)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:232

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*: i64<uint>, object*: i64<uint>, 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:102

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*: i64<uint>, to_obj*: i64<uint>)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:138

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*: i64<uint>)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:248

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:188

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*: i64<uint>, to_obj*: i64<uint>, 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:117

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:158

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*: i64<uint>)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:194

locel_construct_ocel

Reconstruct a full OCEL from a SlimLinkedOCEL. Can be expensive for large logs.
Source
fn locel_construct_ocel(ocel*: SlimLinkedOCEL)OCEL

Arguments

Returns

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

res = r4pm.bindings.locel_construct_ocel(ocel)
Defined inprocess_mining/src/bindings/slim_ocel_bindings.rs:300

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:33

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:146

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:152

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:164

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*: i64<uint>, 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:276

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*: i64<uint>)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:200

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*: i64<uint>)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:206