Is is possible to plot resource usage by attribute in simmer? So for example in this simulation:
library(simmer)
library(simmer.plot)
workerCount <- 2
actualData <- data.frame(
time = c(1:10,1:5), priority = 1:3, service = rnorm(150, 50, 5)) %>%
dplyr::arrange(time)
actualData$gender<-floor(runif(150, min=1, max=3))
actualData
activityTraj <- trajectory() %>%
seize('worker') %>%
timeout_from_attribute("service") %>%
release('worker')
env <- simmer() %>%
add_resource('worker', workerCount, Inf, preemptive = TRUE) %>%
add_dataframe('worker_', activityTraj, actualData, mon=2, col_time="time", time="absolute", col_attributes=c("gender","service")) %>%
run()
plot(get_mon_attributes(env), keys="gender", metric="usage")
The plot generated shows gender over time but not resource usage. The documentation for plot.attributes says:
The S3 method for 'attributes' does not support any metric. It simply shows a stairstep graph of the values throughout the simulation for the keys provided (or all the collected attributes if no key is provided).
Is there any way currently to plot resource usage by attributes?
Thanks for any suggestions.