Algorithms
Greedy / Dijkstra
Dynamic Programming
Python
CIS 505

Charge-Aware EV Trip Planner

Battery-constrained shortest path using greedy selection (Dijkstra's) and a dynamic programming battery state table. Plans real EV trips across a 10-city road network, inserting recharge stops only when the next road segment cannot be completed.

Group members: Nabonita Das, Ali Hamza, Akash Patel · CIS 505

10

Cities in network

11

Road segments

1,120 mi

Longest feasible trip

0.05 ms

Execution time

Sample Trip: UM-Dearborn → Univ of Florida

Battery capacity

500 miles

Starting charge

50% = 250 mi

Total distance

1,120 miles

Recharge stops

3 (Ohio St, TN, GA)

Best route:

UM-DearbornU-M Ann ArborOhio StateKentuckyTennesseeGeorgiaUniv of Florida

Battery state table (DP output):

StepFromToDistance (mi)Battery Before (mi)Battery After (mi)Recharged?Total Charges
1UM-DearbornU-M Ann Arbor35250215No0
2U-M Ann ArborOhio State18521530No0
3Ohio StateKentucky190500310Yes1
4KentuckyTennessee170310140No1
5TennesseeGeorgia230500270Yes2
6GeorgiaUniv of Florida310500190Yes3
Battery Level Over the Trip

Spikes show recharge events at Ohio State, Tennessee, and Georgia. The red dashed line marks the 310-mile minimum needed for the longest road segment.