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

Reset sets environment to NULL #175

Closed
Enchufa2 opened this Issue Oct 25, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@Enchufa2
Member

Enchufa2 commented Oct 25, 2018

Reprex:

library(simmer)

test <- function() get_capacity(env, "res")

env <- simmer() %>%
  add_resource("res") %>%
  add_generator("dummy", trajectory(), test)

env %>% run(10) %>% reset()
#> simmer environment: anonymous | now: 0 | next: 0
#> { Monitor: in memory }
#> { Resource: res | monitored: TRUE | server status: 0(1) | queue status: 0(Inf) }
#> { Source: dummy | monitored: 1 | n_generated: 0 }
env
#> NULL

The issue is probably in make_resetable.

@Enchufa2 Enchufa2 added the bug label Oct 25, 2018

@Enchufa2 Enchufa2 closed this in 95d6535 Oct 26, 2018

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