I am trying to write an algorithm for finding best path for an electric vehicle to navigate through network of chargers.
- A graph with Vertices representing charges and Edges representing distances among them is provided
- Assume that car drives at constant speed (ex. 80 mph) and has a fixed maximum mile Range when its fully charged (ex. 300 miles)
- Each charger has a rate associated with it given in miles/minute (how many miles are added for a minute of charging)
- Goal is to go from charger A to charger B in minimum amount of time. Assume car is fully charged when you start.
- You can stop at multiple chargers on the way and charge the car. You don't have to fully-charge the car at all chargers. You can decide how much time to spend at these chargers
- At any point of time remaining range of the car must stay above 0
- Find minimum time path between A and B
- List of chargers you will visit starting from A and ending at B.
- Time spent charging at each of these chargers
- Total travel time in minutes
I tried a solution using Dijsktra's shortest path algorithm, but does not fully solve the problem. I don't need help with coding. I don't need help with coding. I want some insights on how to design the algorithm.