Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

histograms #33

Open
robfitzgerald opened this issue Aug 2, 2021 · 0 comments
Open

histograms #33

robfitzgerald opened this issue Aug 2, 2021 · 0 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@robfitzgerald
Copy link
Collaborator

robfitzgerald commented Aug 2, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant