Closed thigger closed 3 years ago
From the highlighted trace, it looks like an incorrect double dispatch of the departure routine on the counter
resource. The second departure should be on the notepad
resource instead. This is very useful, thanks, will investigate.
Shorter MCVE:
library(simmer)
t <- trajectory() %>%
renege_in(5) %>%
seize("res1") %>%
seize("res2") %>%
seize("res3") %>%
wait()
simmer(verbose=TRUE) %>%
add_resource(paste0("res", 1:3)) %>%
add_generator("dummy", t, at(0)) %>%
run()
#> 0 | source: dummy | new: dummy0 | 0
#> 0 | arrival: dummy0 | activity: RenegeIn | 5, 0, 0 paths
#> 0 | arrival: dummy0 | activity: Seize | res1, 1, 0 paths
#> 0 | resource: res1 | arrival: dummy0 | SERVE
#> 0 | arrival: dummy0 | activity: Seize | res2, 1, 0 paths
#> 0 | resource: res2 | arrival: dummy0 | SERVE
#> 0 | arrival: dummy0 | activity: Seize | res3, 1, 0 paths
#> 0 | resource: res3 | arrival: dummy0 | SERVE
#> 0 | arrival: dummy0 | activity: Wait |
#> 5 | task: Renege-Timer | : |
#> 5 | resource: res1 | arrival: dummy0 | DEPART
#> 5 | resource: res3 | arrival: dummy0 | DEPART
#> 5 | resource: res3 | arrival: dummy0 | DEPART
#> Error: 'Renege-Timer' at 5.00:
#> 'res3' not previously seized
This was a subtle one. Please, try the current master branch.
Brilliant, all fixed! Thanks.
simmer 4.4.3 on R 4.04 on Windows 64-bit
As mentioned on the list - I've now managed to create a reproducible example (from the bank) which is attached
Like my hospital example, this can be fixed by switching the order of the seize of "counter" and "notepad". I assume it has something to do with the fact we're seizing two counters on occasion.
crashattempt.R.txt