Commit 015aad52 authored by Stanislav's avatar Stanislav
Browse files

now uses the proper object type variable

parent 08621c49
......@@ -23,7 +23,7 @@ p_ocel_file = './data/ocel.jsonocel'
p_mode = 'all'
# object-type-name
p_object_type = 'items'
p_object_type = 'customers'
# example data for attribute weighting in distance measurements
p_attr_weights = {}
......@@ -60,23 +60,21 @@ f.print_w_ts('ocel data read.')
# res = f.ocel_get_object_distances(ocel, p_object_type, p_attr_weights)
##### CALCULATING DISTANCE MATRIX #####
# Setting object type
obj_type = "items"
# List of all weights
weights = [1]
# Save unique activies to a list
unique_activities = f.get_unique_activities(sorted(pm4py.ocel_object_type_activities(ocel)[obj_type], reverse=False))
unique_activities = f.get_unique_activities(sorted(pm4py.ocel_object_type_activities(ocel)[p_object_type], reverse=False))
# Create hash-table of activities to represent each one as a UNICODE-character
activity_dict = f.map_activities_to_letter(unique_activities)
# Create data frame with desired object type
oid_filtered = f.get_df("objects", obj_type, ocel)
oid_filtered = f.get_df("objects", p_object_type, ocel)
# Create data frame with all relations
relations_df = f.get_df("relations", obj_type, ocel)
relations_df = f.get_df("relations", p_object_type, ocel)
# Store control flow of every object to a list
cflow_list = f.find_cflow(relations_df, activity_dict)
......@@ -111,7 +109,7 @@ f.print_w_ts('distance matrix calculated:')
f.print_w_ts(res)
f.print_w_ts('duration: ' + str(datetime.datetime.now() - start_ts))
print('oid list:')
print(list_oid)
# print('oid list:')
# print(list_oid)
quit()
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment