nickolasclarke / dispatch

A discrete-event simulation (DES) model for simulating deployment of EV bus fleets, using GTFS data
2 stars 0 forks source link

implement walk_route() #12

Closed nickolasclarke closed 4 years ago

nickolasclarke commented 5 years ago
  1. pre-processing (outside of walk_route())
    • calculate the cumulative distance for each of shape_ids
    • use geopandas to sum the distance of the shapefile
    • append this distance to each trip as trip_dist
  2. Walk a trip
    • for a trip passed to walk_route, pull trip.trip_dist, convert to an energy_req, and subtract from bus['energy']
    • if the destination termini has a nearby_charger than check if the time before the next required departure (trip index + 1 in trips) is less than some threshold. If so, than charge at some given rate self.charge_rate and append that energy value back to bus['energy']. If there is no nearby charger, than return and the loop will continue, attempting to serve the next trip.
nickolasclarke commented 4 years ago

resolved by c38a186