Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building an Electric Vehicle Route Planner

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →
Avatar for James James
March 22, 2019

Building an Electric Vehicle Route Planner

Avatar for James

James

March 22, 2019

Other Decks in Programming

Transcript

  1. BUILDING AN ELECTRIC VEHICLE ROUTE PLANNER AGENDA ▸ Why a

    route planner? ▸ Primer on Electric Vehicles (EV) ▸ Charging infrastructure ▸ Routing ▸ Challenges
  2. BUILDING AN ELECTRIC VEHICLE ROUTE PLANNER WHY A ROUTE PLANNER?

    ▸ Long distance trips ▸ Lack of charging infrastructure ▸ Lack of access to charging ▸ Charging times ▸ Fun problem to solve
  3. ELECTRIC VEHICLES PROS ▸ Performance ▸ Safety ▸ Lower cost

    of maintenance* ▸ Regenerative braking ▸ No exhaust fumes * https://qz.com/1571956/new-york-city-says-electric-cars-cheapest-option-for-its-fleet/ * https://www1.nyc.gov/assets/dcas/downloads/pdf/fleet/NYC-Fleet-Newsletter-255-March-8-2019- Reducing-Maintenance-Costs-With-Electric-Vehicles.pdf
  4. ELECTRIC VEHICLES CONS ▸ Batteries are expensive ▸ Typically less

    range ▸ Charging times ▸ Charging infrastructure
  5. CHARGING INFRASTRUCTURE WHERE TO CHARGE? ▸ Home ▸ Built into

    places people go: ▸ Shopping areas ▸ Parking garages ▸ Rest stops ▸ Anywhere with electricity!
  6. ELECTRIC VEHICLES TERMINOLOGY Internal Combustion Engine Electric Capacity gallons, liters

    (volume) watt-hour (Wh) (energy) Economy/Efficiency MPG, km/L m/kWh, km/kWh Consumption gallons/100 miles, liters/100 kilometers, Wh/m, Wh/km
  7. ROUTING PLANNING THE ROUTE PLANNER ▸ Similar to navigation apps

    (Google maps, etc.) ▸ Start & end ▸ Charging stops as waypoints ▸ Naive, probably not the best approach ▸ Identify base and recursive cases ▸ Find as many edge cases as possible ▸ Continuous work in progress…
  8. ROUTING ROUTING GLOSSARY ▸ Itinerary - start, end, routes, charging

    stops ▸ Start - beginning of itinerary, first input as Source ▸ End - end of itinerary, first input as Destination ▸ Source - beginning of a route, input into recursive function ▸ Destination - end of a route, input into recursive function ▸ Route - coordinates, navigable course from Source to Destination ▸ Charging Stop - coordinate
  9. ROUTING ROUTING PARAMETERS ▸ Departure Charge - The charge level

    at the start of your trip ▸ Minimum Charge - The charge level before looking for chargers ▸ Maximum Charge - The charge level to charge to before continuing the trip ▸ Arrival Charge - The minimum level remaining when arriving at your destination
  10. ROUTING ROUTING PARAMETERS ▸ Capacity: 74 kWh ▸ Range: 310

    miles ▸ Consumption = Capacity / Range ▸ Consumption: 238 Wh/m ▸ More realistic Consumption: 260 Wh/m ▸ More realistic Range: 284 miles ▸ Let’s call this usableRange
  11. ROUTING RANGES ▸ usableRange: 284 miles ▸ usableRangeAfterDeparture ▸ 100

    - 15 = 85% of usableRange ▸ usableRangeBetweenCharges ▸ 90 - 15 = 75% of usableRange ▸ usableRangeBeforeArrival ▸ 90 - 40 = 50% of usableRange
  12. 1. DEPARTURE 100% 2. MINIMUM 15% 3. MAXIMUM 90% 4.

    MINIMUM 15% 5. MAXIMUM 90% 6. MINIMUM 15% 7. MAXIMUM 90% 8. ARRIVAL 40%
  13. 1. DEPARTURE 100% 2. MINIMUM 15% 3. MAXIMUM 90% 4.

    MINIMUM 15% 5. MAXIMUM 90% 6. MINIMUM 15% 7. MAXIMUM 90% 8. ARRIVAL 40% usableRangeAfterDeparture usableRangeBetweenCharges usableRangeBetweenCharges usableRangeBeforeArrival
  14. ROUTING ITINERARY ▸ Initial function ▸ Inputs: Source, Destination ▸

    Outputs: [Route], [ChargingStop] ▸ Recursive function ▸ Inputs: Accumulator, Source ▸ Outputs: New Accumulator, Next Source ▸ Accumulator holds Routes and ChargingStops taken thus far, along with flags useful for determining whether to continue
  15. CHALLENGES MANY EDGE CASES ▸ This is a happy path,

    average case ▸ Using the wrong usableRange in various cases, such as: ▸ No charging required, but we must maintain arrival charge? ▸ Can reach destination, but still want to maintain arrival charge? ▸ Probably many more…
  16. CHALLENGES ROUTING IMPROVEMENTS ▸ Round-trip ▸ Charging times at each

    stop ▸ Account for things that may affect consumption: ▸ Weather ▸ Elevation ▸ Towing
  17. END THANK YOU ▸ Download Replug from the App Store

    ▸ https://apps.apple.com/us/app/ replug/id1279136790 ▸ Q&A