Skip to content
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

Delayed_release_selected issue #18

Open
rwhitt221 opened this issue Mar 28, 2023 · 1 comment
Open

Delayed_release_selected issue #18

rwhitt221 opened this issue Mar 28, 2023 · 1 comment
Labels

Comments

@rwhitt221
Copy link

This is a fantastic package but I seem to be running into an issue with delayed_release_selected. As there are no code examples that I can find, it's quite probable that I'm just this using this incorrectly. If so please can you direct me to an example of its correct use.

arrive <- c(1:5) 

traj <- trajectory("traj") %>%
simmer::select(resource = c("dedicated_resource","pooled_resource"), policy = "first-available") %>%
seize_selected(amount = 1) %>%
timeout(1) %>%
delayed_release_selected(task = 1)

plot(traj)

sim <- simmer("sim") %>%
add_generator("cust",traj, at(arrive), mon = 2) %>%
add_resource("dedicated_resource", 2) %>%
add_resource("pooled_resource", 2)

sim %>%
run(until = 800)

This gives the below error...

Error: 'cust0' at 2.00 in [Timeout]->SetCapacity->[Synchronize]:

no resource selected

Any help greatly appreciated. Also have a stackoverflow question here.

Many thanks

@Enchufa2 Enchufa2 added the bug label Mar 28, 2023
@Enchufa2
Copy link
Member

Thanks for the report. This is indeed a bug. The selected resource is not propagated to the clone (related to r-simmer/simmer#207). So the current approach here doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants