New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preemption fails in non-saturated multi-server resources #114

Closed
Enchufa2 opened this Issue Nov 3, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@Enchufa2
Member

Enchufa2 commented Nov 3, 2017

Example:

library(simmer)

low_prio <- trajectory() %>%
  seize("res", 1) %>%
  timeout(10) %>%
  release("res", 1)

high_prio <- trajectory() %>%
  seize("res", 7) %>%
  timeout(10) %>%
  release("res", 7)

env <- simmer(verbose=TRUE) %>%
  add_resource("res", 10, preemptive=TRUE) %>%
  add_generator("low_prio", low_prio, at(rep(0, 5)))%>%
  add_generator("high_prio", high_prio, at(1), priority=1)%>%
  run()

get_mon_arrivals(env)
#>         name start_time end_time activity_time finished replication
#> 1  low_prio0          0       10            10     TRUE           1
#> 2  low_prio1          0       10            10     TRUE           1
#> 3  low_prio2          0       10            10     TRUE           1
#> 4  low_prio3          0       10            10     TRUE           1
#> 5  low_prio4          0       10            10     TRUE           1
#> 6 high_prio0          1       20            10     TRUE           1

@Enchufa2 Enchufa2 added the bug label Nov 3, 2017

@Enchufa2 Enchufa2 closed this in 3080fb7 Nov 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment