Skip to main content

slim_ocel_bindings

process_mining::bindings::slim_ocel_bindings

Related Examples(2)

Functions in this Module(31)

locel_get_e2o

bindings::slim_ocel_bindingsSource
Get the E2O relationships of an event as (qualifier, object_index) pairs.
SlimLinkedOCELrequired
i64<uint>requiredAn Event Index
import r4pm

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

process_mining/src/bindings/slim_ocel_bindings.rs:224

locel_add_object

bindings::slim_ocel_bindingsSource
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).
SlimLinkedOCELrequired
Stringrequired
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_add_object(
    ocel,
    'order',
    attributes=[[['2020-01-01T10:30:00Z', 1]]],
    relationships=[['example', 1]],
)

process_mining/src/bindings/slim_ocel_bindings.rs:84

locel_get_ob_attr_vals

bindings::slim_ocel_bindingsSource
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.
SlimLinkedOCELrequired
i64<uint>requiredAn Object Index
Stringrequired
import r4pm

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

process_mining/src/bindings/slim_ocel_bindings.rs:288

locel_get_ev_time

bindings::slim_ocel_bindingsSource
Get the timestamp of an event. Panics if the index is out of bounds.
SlimLinkedOCELrequired
i64<uint>requiredAn Event Index
import r4pm

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

process_mining/src/bindings/slim_ocel_bindings.rs:218

locel_get_full_ev

bindings::slim_ocel_bindingsSource
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.
SlimLinkedOCELrequired
i64<uint>requiredAn Event Index
import r4pm

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

process_mining/src/bindings/slim_ocel_bindings.rs:259

locel_get_obs_of_type

bindings::slim_ocel_bindingsSource
Get all object indices of the given object type. Empty if unknown.
SlimLinkedOCELrequired
Stringrequired
import r4pm

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

process_mining/src/bindings/slim_ocel_bindings.rs:176

locel_add_event

bindings::slim_ocel_bindingsSource
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).
SlimLinkedOCELrequired
Stringrequired
DateTimerequired
import r4pm

# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
ocel = r4pm.import_item('SlimLinkedOCEL', 'ocel.xml')
res = r4pm.bindings.locel_add_event(
    ocel,
    'pay order',
    '2020-01-01T10:30:00Z',
    attributes=[1],
    relationships=[['example', 1]],
)

process_mining/src/bindings/slim_ocel_bindings.rs:64

locel_get_full_ob

bindings::slim_ocel_bindingsSource
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.
SlimLinkedOCELrequired
i64<uint>requiredAn Object Index
import r4pm

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

process_mining/src/bindings/slim_ocel_bindings.rs:268

locel_new

bindings::slim_ocel_bindingsSource
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.
import r4pm

ocel = r4pm.bindings.locel_new()
# Also: .json, .json.gz, .xml.gz, .ocel.csv, .ocel.csv.gz, ...
r4pm.export_item(ocel, 'ocel.xml')

process_mining/src/bindings/slim_ocel_bindings.rs:23

locel_delete_e2o

bindings::slim_ocel_bindingsSource
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).
SlimLinkedOCELrequired
i64<uint>requiredAn Event Index
i64<uint>requiredAn Object Index
import r4pm

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

process_mining/src/bindings/slim_ocel_bindings.rs:130

locel_get_evs_of_type

bindings::slim_ocel_bindingsSource
Get all event indices of the given event type. Empty if unknown.
SlimLinkedOCELrequired
Stringrequired
import r4pm

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

process_mining/src/bindings/slim_ocel_bindings.rs:170