Self-Driving Cars May Need To Know Why I Avoid Driving Behind Moving Trucks, But Choose to Stop Behind Them

Nope! This is not because of any safety issue that one may think of initially, but only because I would like to spend less time behind traffic lights during my daily commute in St. Louis. This can buy even more time for people in New York City and Los Angeles, I believe.

This note includes a problem and the solution. I can’t go to the solution without describing the problem. Therefore, let me describe the problem and the conditions first.

The Question

Imagine a one-way road with one line of cars all going forward towards a traffic light. Let’s look at this situation in four different times:


  1. t=t0 in which the light is green and cars are moving. This is in the past time before your car arrives.
  2. t=t1 in which the light has turned to red already and your car reaches to the tail of the traffic jam.
  3. t=t2 in which your car comes to stop right behind the front car AND at exactly the same moment the light turns green in the very front of the line.
  4. t=t3 in which the light is still green and the car in front of you has just started to move and reached in distance “d” from you. Now it’s time for you to move!

Now, the question is: will you pass this green light before it turns red again?

For simplicity, let’s make a few clear assumptions.

  • Each car only sees the front car and reacts only based on this piece of information.
  • All cars have the same length [= L].
  • When a car moves, it always keeps the same distance from the car in its front [= d] AND always moves with a constant speed [= V0] (no acceleration).
  • A car moves if and only if the car in its front is moving in exactly the distance of “d”.
  • When cars stop, they stop right behind the next car in their front.
  • A car comes to stop if and only if the car in its front is in stop (or it sees the red light).

The Answer

If the traffic light is fair in time (i.e. it stays red the same amount of time as in green), in the given assumptions, you can never make this green light in this round! The light will turn red before you pass it.

In the given conditions, you have to always wait for the next green light. This is independent of the length of the vehicles in front of you. However, when you are moving, you’d better drive in a lane in which the ratio of the length of the vehicles to the distance between the vehicles (L/d) is lower. The speed of traffic jam packing up for lanes in which there are larger vehicles is higher. However, it is better standing behind a standing line of large vehicles than small ones with the same length of line, if you have a choice. You can find out why these are true by reading the rest of this note.


The final quantitative result that I obtained with respect to the above described conditions is as following. You can never pass this green light this round if and only if:


where “tGreen” and “tRed” are the green time and red time, respectively, “L” is the average length of the vehicles in the line, and “d” is the average distance between moving vehicles.

If you are curious how you can derive this, here is my step-by-step approach.

  1. Let’s define “X” as the length of the traffic jam at the moment your car arrives.
  2. Let’s define “X_prime” as the distance you can drive from the moment you are permitted, i.e. the moment in which the front car starts to move and reaches the distance “d” from you.
  3. If “X_prime” turns to be bigger than “X”, you will pass the green light; otherwise, you won’t!

Here are the values of “X” and “X_prime” in terms of other variables in this problem:


in which “LV0/d” is the speed of traffic jam! In other words, if we want to calculate the length of the line of cars from the moment the light goes red until our car arrives and stops (in which the light turns green again), we have to think with what speed the traffic jam grows. Well, the answer is very simple if you think about it. Each time one car stops behind another car, the length of the line grows by the length of that car. Therefore, the speed of traffic jam growth is equal to “L” devided by the time it takes for one stop [d/V0] which is exactly what you see in the equation above. This also describes why bigger vehicles make longer traffic jams and therefore you should reconsider driving behind moving trucks.


where has two time terms. The first term represents the whole green cycle time. The second term, however, shows the time wasted since the light turned green until you can actually move. This later time term is also very easy to quantify if you think about it. There is a delay time for each car to be able to move. This delay for each car is equal to the time it takes for the front car to travel distance “d” which is “d/V0”. Let’s assume there are “n” cars in front of us. The total wasted time will be equal to “n” times “d/V0”. But we can estimate how many cars are in front of us in terms of “X” (the length of the line), “n = X/L”. This justifies the second term inside the parentheses.

Assume the length of the traffic line is fixed (X). In this situation, according to the above relation, there will be less wasted time if “L” is larger. That’s why you should consider stopping behind trucks in a traffic jam.

“X_prime” defined above is the distance you can go forward before the light turns red! Bigger “X_prime”, bigger gain! It is interesting to see how this value is related to the other parameters. If we simply substitute “X” in the relation for “X_prime”, we obtain:


which speaks for itself. In this given simplified situation, if the red time and green time are equal, the light always turns red even before you get a chance to move. However, it doesn’t mean that you don’t move forward. You will, but the traffic light is red already. This relation also clearly shows “X_prime” is independent of the lenght of the vehicles and the distance between them. You will end up being in longer lines by driving behind large vehicles though. That’s the only difference.

As we mentioned earlier above in the third bullet, the idea is that the last car which comes to stop at the tail of the traffic jam (and don’t forget this is right at the moment the light turns green at the front of the line) can catch the same green light if and only if: “X_prime > X”. This describes the main equation in this note.

For completeness, it needs to be mentioned that this solution may or may not be a good estimate for when other parameters come to play, for example the acceleration of the cars and variable “d” and variable reaction times of the cars, to name a few. I do believe, however, that the results in this note is enough to convince you not to drive behind large vehicles in unknown roads and consider stopping behind them when you have a choice.

I also think this is a piece of information that self-driving cars should consider in their decision making. The following flowchart shows how a draft of what a self-driving car decision making algorithm should consider for changing lanes:


All the above discussion given, at the end of the day, the story is quite simple if you think about it: the traffic status change signal (stopping-signal or moving-signal) travels along a lane with a velocity equal to the length of the individual vehicle, for which the traffic status signal is passing through it at this moment, divided by the reaction time of that vehicle. This describes the logic behind the above flowchart.

This entry was posted in Efficient City, Physics and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s