A new verb is needed (for instance, include) so the following:
t.common <- create_trajectory("common") %>%
seize("receptionist", 1) %>% #Both dogs and cats go to the receptionist
timeout(function() max(0,rnorm(1,5,2))) %>%
release("receptionist", 1)
t.cat <- create_trajectory("cat") %>%
include(t.common) %>%
seize("catDoc", 1) %>%
timeout(function() max(0,rnorm(1,30,10))) %>%
release("catDoc", 1)
t.dog <- create_trajectory("dog") %>%
include(t.common) %>%
seize("dogDoc", 1) %>%
timeout(function() max(0,rnorm(1,30,10))) %>%
release("dogDoc", 1)
should be equivalent to this:
t.cat <- create_trajectory("cat") %>%
seize("receptionist", 1) %>% #Both dogs and cats go to the receptionist
timeout(function() max(0,rnorm(1,5,2))) %>%
release("receptionist", 1) %>%
seize("catDoc", 1) %>%
timeout(function() max(0,rnorm(1,30,10))) %>%
release("catDoc", 1)
t.dog <- create_trajectory("dog") %>%
seize("receptionist", 1) %>% #Both dogs and cats go to the receptionist
timeout(function() max(0,rnorm(1,5,2))) %>%
release("receptionist", 1) %>%
seize("dogDoc", 1) %>%
timeout(function() max(0,rnorm(1,30,10))) %>%
release("dogDoc", 1)
A new verb is needed (for instance,
include) so the following:should be equivalent to this: