Skip to content

Commit

Permalink
update analyze section
Browse files Browse the repository at this point in the history
  • Loading branch information
gertjanssenswillen committed Jul 13, 2023
1 parent e6962de commit 9386f64
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 56 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 43 additions & 39 deletions control_flow_analysis.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@ title: Control-Flow Analysis
---


```{r}
```{r echo = F, out.width="25%", fig.align = "right"}
knitr::include_graphics("images/icons/cf.PNG")
```

```{r include = F}
library(bupaR)
```

***

# Control-flow analysis

### Variance
## Metrics

#### Activity Presence
### Activity Presence

Activity presence shows in what percentage of cases an activity is present. It has no level-argument.

Expand All @@ -20,7 +27,7 @@ patients %>% activity_presence() %>%
```


#### Activity Frequency
### Activity Frequency

The frequency of activities can be calculated using the activity_frequency function, at the levels log, trace and activity.

Expand All @@ -29,7 +36,7 @@ patients %>%
activity_frequency("activity")
```

#### Start Activities
### Start Activities

The start of cases can be described using the start_activities function. Available levels are activity, case, log, resource and resource activity.

Expand All @@ -40,7 +47,7 @@ patients %>%

This shows that in this event log, all cases are started with the Registration by resource r1.

#### End Activities
### End Activities

Conversely, the end_activities functions describes the end of cases, using the same levels: log, case, activity, resource and resource-activity.

Expand All @@ -50,7 +57,7 @@ patients %>%
```
In contract to the start of cases, the end of cases seems to differ more frequently, although it is mostly the Check-Out activity.

#### Trace Coverage
### Trace Coverage

The trace coverage metric shows the relationship between the number of different activity sequences (i.e. traces) and the number of cases they cover.

Expand All @@ -62,7 +69,7 @@ patients %>%

In the patients log, there are only 7 different traces, and 2 of them cover nearly 100% of the event log.

#### Trace Length
### Trace Length

The trace length metric describes the length of traces, i.e. the number of activity instances for each case. It can be computed at the levels case, trace and log.

Expand All @@ -76,28 +83,25 @@ It can be seen that in this simple event log, most cases have a trace length of

### Rework

Documentation coming soon


```{r echo = F, eval = F}
### Rework
#### Number of selfloops
Several metrics to measure rework (repeated work) are provided by bupaR. A distinction is made between self-loops and repetitions. A self-loop is an immediate recurrence of the same activity (i.e. no other activity in between), while a repetition is a recurrence after some other activities.

A selfloop occurs when an activity is immediatey
The metrics `number_of_repetitions` and `number_of_selfloops` can be used to analyse these occurrences at the levels of log, case, activity, resource and resource-activity. The metrics `size_of_repetitions` and `size_of_selfloops` (available at the same levels) provide further insight into the extent of the repeats within a single case (e.g. is it repeated only once, or multiple times?). Finally, all these metrics are able to distinguish between two types of rework: _repeat_ rework, where the same resource does the rework, and _redo_ rework, where the rework is done by another research. This can be specified with the `type` argument. Specifying `type = all` makes no distinction based on resources.

#### Size of selfloops
#### Referral matrix selfloops
#### Number of repetitions
#### Size of repetitions
#### Referral matrix repetitions
```{r}
sepsis %>%
number_of_repetitions()
sepsis %>%
number_of_selfloops()
sepsis %>%
size_of_repetitions()
sepsis %>%
size_of_selfloops()
```



## Introduction

## Rule-based conformance

Using the packages `processcheckr` prodecural rules can be checked in an event log. Checking rules will add a boolean case attribute, which can be used for filtering or in analysis.

Expand Down Expand Up @@ -144,7 +148,7 @@ sepsis %>%
```


## Rules
### Rules

Currently the following declarative rules can be checked:

Expand Down Expand Up @@ -174,9 +178,9 @@ Exclusiveness:

The available rules are explained in more detail below.

### Cardinality rules
#### Cardinality rules

#### contains
##### contains

Arguments:

Expand All @@ -197,7 +201,7 @@ sepsis %>%



#### contains_exactly
##### contains_exactly

Arguments:

Expand All @@ -215,7 +219,7 @@ sepsis %>%

Returns: cases where `activity` occurs `n`.

#### contains_between
##### contains_between

Arguments:

Expand All @@ -235,7 +239,7 @@ sepsis %>%
n_cases()
```

#### absent
##### absent

Arguments:

Expand All @@ -255,9 +259,9 @@ sepsis %>%
n_cases()
```

### Ordering rules
#### Ordering rules

#### starts
##### starts

Arguments:

Expand All @@ -276,7 +280,7 @@ sepsis %>%



#### ends
##### ends

Arguments:

Expand All @@ -293,7 +297,7 @@ sepsis %>%
n_cases()
```

#### succession
##### succession

Arguments:

Expand All @@ -312,7 +316,7 @@ sepsis %>%
```


#### response
##### response


Arguments:
Expand All @@ -330,7 +334,7 @@ sepsis %>%
n_cases()
```

#### precedence
##### precedence

Arguments:

Expand All @@ -350,7 +354,7 @@ sepsis %>%



#### responded_existence
##### responded_existence

Arguments:

Expand All @@ -369,9 +373,9 @@ sepsis %>%
```


### Exclusiveness rules
#### Exclusiveness rules

#### and
##### and

Arguments:

Expand All @@ -389,7 +393,7 @@ sepsis %>%
n_cases()
```

#### xor
##### xor

Arguments:

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
17 changes: 12 additions & 5 deletions organisational_analysis.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@
title: "Organisational Analysis"
---

```{r}
```{r echo = F, out.width="25%", fig.align = "right"}
knitr::include_graphics("images/icons/org.PNG")
```


```{r include = F}
library(bupaR)
```

***

# Organisational analysis

#### Resource Frequency
## Resource Frequency

The resource frequency metric allows the computation of the number/frequency of resources at the levels of log, case, activity, resource, and resource-activity.

Expand All @@ -17,7 +24,7 @@ patients %>%
resource_frequency("resource")
```

#### Resource Involvement
## Resource Involvement

Resource involvement refers to the notion of the number of cases in which a resource is involved. It can be computed at levels case, resource, and resource-activity.

Expand All @@ -28,7 +35,7 @@ patients %>%
It this example it shows that only r1 and r2 are involved in all cases, r6 and r7 are involved in most of the cases, while the others are only involved in half of the cases, more or less.


#### Resource Specialization
## Resource Specialization

The resource specalization metric shows whether resources are specialized in certain activities or not. It can be calculated at the levels log, case, resource and activity.

Expand Down Expand Up @@ -58,7 +65,7 @@ patients %>%

## Resource precedence matrix

A more compact representation of hand-over-of-work is given by the `resource_matrix` function, which works the same as the `precedence matrix` functions.
A more compact representation of hand-over-of-work is given by the `resource_matrix` function, which works the same as the `process matrix` functions.

```{r}
patients %>%
Expand Down
23 changes: 11 additions & 12 deletions performance_analysis.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
title: "Performance Analysis"
---



```{r echo = F, out.width="25%", fig.align = "right"}
knitr::include_graphics("images/icons/perf.PNG")
```

```{r include = F}
library(bupaR)
```

***

The metrics for exploring and describing event data which are available are based on literature in the field of operational excellence and are organized in the following (sub)categories

* Time perspective
* Organizational perspective
* Structuredness perspective
* Variance
* Rework

## Time perspective
# Performance analysis

Three different time metrics can be computed:

Expand All @@ -33,7 +32,7 @@ knitr::include_graphics("images/processingtime.PNG")



#### Idle Time
## Idle Time

The idle time is the time that there is no activity in a case or for a resource. It can only be calculated when there are both start and end timestamps available for activity instances. It can be computed at the levels trace, resource, case and log, and using different time units.

Expand All @@ -50,7 +49,7 @@ patients %>%
plot()
```

#### Processing Time
## Processing Time

The processing time can be computed at the levels log, trace, case, activity and resource-activity. It can only be calculated when there are both start and end timestamps available for activity instances.

Expand All @@ -60,7 +59,7 @@ patients %>%
plot
```

#### Throughput Time
## Throughput Time

The throughput time is the time form the very first event to the last event of a case. The levels at which it can be computed are log, trace, or case.

Expand Down

0 comments on commit 9386f64

Please sign in to comment.