Hi there,
I want to batch arrivals based on some numeric attribute `poolId`. Here I want to give each batch a name equal to `poolId` where each batch has a predetermined size based on the arrival attribute 'poolSize'. Then, an arrival should be included in the specific batch that has name=poolId where poolId is equal to the arrivals' poolId attribute.
Then using:
batch(n, permanent = TRUE, name = "", rule = NULL)
I want to model something like this to achieve the above:
batch(function() get_attribute(env, "poolSize"), permanent = TRUE, name = function() get_attribute(env, "poolId"), rule = NULL)
Above did not work so I tried to update some global variables poolIdGlobal and poolSizeGlobal once an arrival passed through the function get_pool_parameters() as follows:
timeout(function() get_pool_parameters()) %>%
batch(poolIdGlobal , permanent = TRUE, name = poolIdGlobal , rule = NULL)
However, this did not work out as well.
What can be used to create the type of batches described above? That is, to determine if a new batch should be created (if there was no previous arrival with attribute 'poolId') or whether the current arrival should be added to a previously created batch with name 'poolId'.