Reputation: 118
There are several functions in the R simmer package that have the argument id = 0
. Usually the functions are associated with selecting a certain resource (e.g. seize_selected
). I haven't been able to find any documentation on what this parameter does other than selection identifier for nested usage
. Does anyone know what this means or have a use case for setting this to something other than its default value of 0?
I'm trying to see if it will help me select a coupled resource. For example, if I select "Bar1" resource, then I have to select "Server1" as a related resource. The wording of the reference makes me think this might help, but I'm not sure.
Upvotes: 2
Views: 116
Reputation: 975
Yes, that's exactly what it is for. If you select a second resource, you lose your previous selection... unless you give it a different id
. So, in your case:
... %>%
select("Bar1", id=0) %>%
...
select("Server1", id=1) %>%
...
and then you can use those ids in other activities to refer to those selections.
Upvotes: 1