bupaverse / processanimateR

Token replay animation for process maps created with processmapR by using SVG animations (SMIL) and the htmlwidget package.
https://bupaverse.github.io/processanimateR/
Other
66 stars 11 forks source link

Animate queue length on activities #31

Open lindeloev opened 4 years ago

lindeloev commented 4 years ago

I would like to show queue lengths during playback and perhaps change the text of the activities or edges accordingly. For example, in the animate_process(patients, mode = "relative") example, it can be hard to see how many patients are actually started on an activity or between any two activities at a given time. I can think of two approaches to this:

We visualize an assembly lines where there are physical constraints on the number of tokens that can reside at a given edge. This feature would be great at visualizing bottlenecks and their causes.

fmannhardt commented 4 years ago

How would you want to show them? In theory you can change the shape parameters of a token at any time using the following approach: https://bupaverse.github.io/processanimateR/articles/use-external-data-to-change-tokens.html Maybe cases stuck in a queue could be shown as larger tokens?

Of course, this still has the overplotting issue which can be mitigated a bit by using the jitter parameter, but in the best case we would have something like merging tokens together such as in Fluxicon Disco or Fuzzy Miner in ProM.

Token merging is unfortunately not so trivial with the current rendering engine where each token is a separate SVG element and everything is precomputed as declarative SMIL animation.

lindeloev commented 4 years ago

I was thinking something like the Inductive Visual Miner from the ProM package. Here's a short recording using the patients dataset: https://youtu.be/4Czi4HguC4Q.

Mapping to token size is definitely a possible visualization. But I think animating it on the activities/edges makes more sense in two ways:

  1. The queue length is a property of an ensemble of cases at a particular time and place in the model - not the individual case. So it may be better to visualize at the activity/edge than on the token.
  2. Numerical info would be much easier to read. Some of our edges are capacity-limited and it matters whether they are full (bottleneck) or almost-full. It's hard to discriminate 50 from 60 cases. I think the tokens do not currently have a text aesthetic? (would be hard to read anyway)

In any case, thanks Felix for your great work on process mining in ProM and in R!

fmannhardt commented 3 years ago

This is being worked on in this pull request: https://github.com/bupaverse/processanimateR/pull/33

Thanks to @lindeloev for making this possible.

fmannhardt commented 3 years ago

New PR: https://github.com/bupaverse/processanimateR/pull/35