Moved scripts for plots to thesis folder

This commit is contained in:
Nora Wickelmaier 2024-03-08 18:07:04 +01:00
parent 29ac6c15d4
commit 5cc2135c4a
2 changed files with 0 additions and 138 deletions

View File

@ -1,99 +0,0 @@
%reset
import pm4py
from pm4py.objects.petri_net.obj import PetriNet, Marking
net_con, initial_marking, final_marking = pm4py.read_pnml("results/conformative_petrinet_con.pnml")
pm4py.view_petri_net(net_con, initial_marking, final_marking)
net_con.places
net_con.transitions
net_con.arcs
final_marking = Marking()
# Add tokens for traces
# ('flipCard', 'openTopic', 'openPopup', 'openTopic', 'move'): 14
#pm4py.view_petri_net(net_con, initial_marking)
pm4py.vis.save_vis_petri_net(net_con, initial_marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_01.png")
marking = pm4py.generate_marking(net_con, {'p_1': 1, 'p_2' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_02.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'p_1': 1, 'p_6' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_03.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'p_1': 1, 'p_7' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_04.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'p_1': 1, 'p_8' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_05.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'p_1': 1, 'p_9' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_06.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'p_1': 1, 'p_10' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_07.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'p_1': 1, 'p_11' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_08.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'p_1': 1, 'p_7' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_09.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'p_1': 1, 'p_8' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_10.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'p_3': 1, 'p_8' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_11.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'p_4': 1, 'p_8' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_12.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'p_5': 1, 'p_8' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_13.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'p_5': 1, 'p_11' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_14.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'p_5': 1, 'p_12' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_15.png")
#pm4py.view_petri_net(net_con, marking)
marking = pm4py.generate_marking(net_con, {'sink': 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_1_16.png")
#pm4py.view_petri_net(net_con, final_marking)
# ('move', 'move', 'flipCard', 'move', 'openTopic', 'openPopup'): 14
pm4py.vis.save_vis_petri_net(net_con, initial_marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_01.png")
marking = pm4py.generate_marking(net_con, {'p_1': 1, 'p_2' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_02.png")
marking = pm4py.generate_marking(net_con, {'p_3': 1, 'p_2' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_03.png")
marking = pm4py.generate_marking(net_con, {'p_4': 1, 'p_2' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_04.png")
marking = pm4py.generate_marking(net_con, {'p_3': 1, 'p_2' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_05.png")
marking = pm4py.generate_marking(net_con, {'p_4': 1, 'p_2' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_06.png")
marking = pm4py.generate_marking(net_con, {'p_4': 1, 'p_6' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_07.png")
marking = pm4py.generate_marking(net_con, {'p_3': 1, 'p_6' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_08.png")
marking = pm4py.generate_marking(net_con, {'p_4': 1, 'p_6' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_09.png")
marking = pm4py.generate_marking(net_con, {'p_4': 1, 'p_7' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_10.png")
marking = pm4py.generate_marking(net_con, {'p_4': 1, 'p_8' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_11.png")
marking = pm4py.generate_marking(net_con, {'p_4': 1, 'p_9' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_12.png")
marking = pm4py.generate_marking(net_con, {'p_4': 1, 'p_10' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_13.png")
marking = pm4py.generate_marking(net_con, {'p_4': 1, 'p_11' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_14.png")
marking = pm4py.generate_marking(net_con, {'p_4': 1, 'p_12' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_15.png")
marking = pm4py.generate_marking(net_con, {'p_5': 1, 'p_12' : 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_16.png")
marking = pm4py.generate_marking(net_con, {'sink': 1})
pm4py.vis.save_vis_petri_net(net_con, marking, final_marking, file_path="../figures/processmaps/conformative_net_con_markings_2_17.png")

View File

@ -1,39 +0,0 @@
# setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/analysis/code")
library(bupaverse)
dat0 <- read.table("results/haum/event_logfiles_2024-01-18_09-58-52.csv",
colClasses = c("character", "character", "POSIXct",
"POSIXct", "character", "integer",
"numeric", "character", "character",
rep("numeric", 3), "character",
"character", rep("numeric", 11),
"character", "character"),
sep = ";", header = TRUE)
dat0$event <- factor(dat0$event, levels = c("move", "flipCard", "openTopic",
"openPopup"))
# Select data pre Corona
dat <- dat0[as.Date(dat0$date.start) < "2020-03-13", ]
dat <- dat[dat$path != 106098, ]
dat$start <- dat$date.start
dat$complete <- dat$date.stop
alog <- activitylog(dat,
case_id = "path",
activity_id = "event",
resource_id = "item",
timestamps = c("start", "complete"))
dfg_complete <- process_map(alog,
type_nodes = frequency("absolute", color_scale = "Greys"),
sec_nodes = frequency("relative"),
type_edges = frequency("absolute", color_edges = "#FF6900"),
sec_edges = frequency("relative"),
#rankdir = "TB",
render = FALSE)
export_map(dfg_complete,
file_name = "results/processmaps/dfg_complete_R.png",
file_type = "png")