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

Modify resources from inside a trajectory #66

Closed
Enchufa2 opened this Issue Jun 21, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@Enchufa2
Member

Enchufa2 commented Jun 21, 2016

The mechanism already exists. We only need to enable the API.

@Enchufa2 Enchufa2 added this to the v3.3.0 milestone Jun 21, 2016

@Enchufa2

This comment has been minimized.

Member

Enchufa2 commented Jun 21, 2016

I mean,

env <- simmer() %>%
  add_resource("dummy", capacity=1, queue_size=Inf)

env %>% 
  set_capacity("dummy", 4) %>%
  set_queue_size("dummy", 1)
#> simmer environment: anonymous | now: 0 | next: 
#> { Resource: dummy | monitored: 1 | server status: 0(4) | queue status: 0(1) }

which can be triggered from a custom function inside a trajectory.

@Enchufa2 Enchufa2 closed this in e6a49a0 Jun 21, 2016

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