Hi Inaki,
First of all thanks for such a great package, it has been immensly useful in the work that I do.
I am currenty building a Shiny app with an integrated simmer model. I need to be able to add a functionality in the app where the user can upload a dataframe that acts as a preloaded queue. Within the shiny framework, the uploaded data becomes a reactive dataframe. It seems add_dataframe is unable to handle Shiny reactive dataframe objects. Or am I doing something wrong?
I have been getting the desired results when I feed a locally saved dataframe into 'add_dataframe' but I have been getting an error message when I feed the same data through as a reactive dataframe uploaded within the app.
For example,
add_dataframe("Level A", trajectory1,finaldata, col_time= "time", col_priority="priority", time = "absolute", col_attributes = c("service")) ###This is okay
add_dataframe("Level A", trajectory1,finaldata(), col_time= "time", col_priority="priority", time = "absolute", col_attributes = c("service")) ### This is not okay where finaldata() is a reactive dataframe.
Am I doing something wrong? or is add_dataframe unable to handle Shiny reactive dataframe objects?
It might make sense for me to go through the old ways of add_generator to add a pre-loaded queue. It seems there are no issues to pass on reactive objects through other functions within Simmer. For example I can add finaldata()$variable as a valid object in other functions within simmer.
It seems the codes you provide in that thread for adding a dataframe through the add_generator route does not work? Can you please help me with that or am I making some silly mistake?
Have a nice day.
Thanks,
Pranay