You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a few histograms would improve understanding HIVE results, and this data could be collected in-the-loop of a HIVE simulation.
handler
create a handler for these histograms. it should store the data for chargers (below) throughout the sim, and then on close, it should create all histograms. a "histogram" here is a CSV file, not an image, with the values by bin. for distances, we should pull a configuration parameter from .hive.yaml for "distance_histogram_bins" which should by default be 20. the number of bins for the charger histograms should equal the max observed number of charge events.
distances
at the end of a simulation, let's collect the distance traveled by each vehicle as a histogram. using pandas is fine. we won't need to accumulate data at each time step, we can simply compute this at the end of the sim in the Handler.close method.
chargers
we are interested in the number of times vehicles used chargers. we want 1 histogram per charger type. in order to count this, we need to catch all events when a vehicle begins charging. unfortunately, we don't capture this as an event. let's add a new ReportType.BEGIN_CHARGING_EVENT, which gets called in DispatchStation._enter_default_terminal_state, and then we can catch these in the histogram handler.
The text was updated successfully, but these errors were encountered:
a few histograms would improve understanding HIVE results, and this data could be collected in-the-loop of a HIVE simulation.
handler
create a handler for these histograms. it should store the data for chargers (below) throughout the sim, and then on close, it should create all histograms. a "histogram" here is a CSV file, not an image, with the values by bin. for distances, we should pull a configuration parameter from .hive.yaml for "distance_histogram_bins" which should by default be 20. the number of bins for the charger histograms should equal the max observed number of charge events.
distances
at the end of a simulation, let's collect the distance traveled by each vehicle as a histogram. using pandas is fine. we won't need to accumulate data at each time step, we can simply compute this at the end of the sim in the
Handler.close
method.chargers
we are interested in the number of times vehicles used chargers. we want 1 histogram per charger type. in order to count this, we need to catch all events when a vehicle begins charging. unfortunately, we don't capture this as an event. let's add a new ReportType.BEGIN_CHARGING_EVENT, which gets called in DispatchStation._enter_default_terminal_state, and then we can catch these in the histogram handler.
The text was updated successfully, but these errors were encountered: