r-simmer / simmer

Discrete-Event Simulation for R
https://r-simmer.org
GNU General Public License v2.0
222 stars 42 forks source link

Ability to remove embeded attribute dataframes from simmer environment #299

Closed FilipZmuda closed 1 month ago

FilipZmuda commented 1 year ago

As far as I am able to see, there is no way to remove attribute (e.g. inter arrival times, etc) dataframes from the R simmer environment once they have been embeded into pre-defined trajectories using the add_dataframe() function. This would be useful when wrapping simmer replicates, where currently the simmer environment is reset between each replicate and embeded attributes remain fixed, whereas it would be optimal to be able to remove the attributes from the environemnt (either pre- or post-reset) and add new attribute dataframes before the next simulation replicate is initiated.

Enchufa2 commented 1 year ago

This is the purpose and the expected behavior of the add_dataframe() function. If you need different values for each simulation after reset(), then the best option would be to set them at the beginning of the trajectory via set_attribute(). And yet another option would be to create a new simulation environment instead of resetting it. Did you find any use case that cannot be implemented with either of these techniques?

Enchufa2 commented 1 month ago

Closing here. Feel free to reopen if you can provide a compelling use case. Thanks for the report.