Many models require an arrival to do something if it gets rejected when trying to seize a resource. So we need something in between a seize and a branch: an ifseize activity would work similarly to the R function ifelse. For instance,
ifseize(traj, resource, amount = 1, retry = FALSE, merge = c(TRUE, TRUE),
yes = NULL,
no = NULL,
priority = 0, preemptible = 0, restart = FALSE)
Use case: a WiFi station trying to seize the wireless channel to transmit a frame:
frame <- create_trajectory() %>%
timeout(backoff) %>%
ifseize("channel", 1, retry=7, merge=c(T, T),
yes = create_trajectory() %>%
timeout(send_frame) %>%
release("channel", 1),
no = create_trajectory() %>%
timeout(backoff))
@bart6114, review this proposal, please.
Many models require an arrival to do something if it gets rejected when trying to seize a resource. So we need something in between a
seizeand abranch: anifseizeactivity would work similarly to the R functionifelse. For instance,Use case: a WiFi station trying to seize the wireless channel to transmit a frame:
@bart6114, review this proposal, please.