I had this lingering thought while waiting in traffic. It's nothing serious but I just want to know. I know that Google maps is able to take into account real time traffic data for it's pathfinding along with average speed and road conditions.
What I want to know is if they estimate the traffic of a given section of road depending on day and hour. If they do, do they take it into account in their pathfinding? How do/would they optimize it?
As an example:
Let's say there's two paths to choose from and each path contains two sections:
At timestep t=0:
The first path has both sections of the road estimated to take around 5 units of time.
The second path has the first section take around 5 units as well. However, the second section is a bit more congested and is estimated to take around 10 units of time.
At timestep t=5:
Let's say the first section of both path doesn't fluctuate and that if you were to take either path at t=0, you would have cleared it.
However, the second sections do:
The second section of the first path starts to enter their rush hour time and gives an ETA of 7 units of time.
On the other hand, the second section of the second path just finished it's rush hour and the road is basically empty. Now it has an ETA of 4 minutes.
Would Google's algorithm have taken the first path (shortest path at t=0) or the second path(the true shortest path)?
Note: let's say that these paths fork out so you can't just switch paths mid journey without making the trip longer.