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:

trafficLight.001

  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.

trucks.002

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:

Equation

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:

X

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.

X_prime

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:

GR

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:

selfdrivingcar.001

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.

Posted in Physics | Tagged , , , , , , , , | Leave a comment

Hafez Nazeri – Existence Life

 

I received a request at simbi to translate the lyrics of the above song from Persian to English. Following is what I sent back to that person as the result. It was a nice experience.

نامدگان و رفتگان ازدو کرانه ی زمان
سوی تو می دوند هان ای تو همیشه درمیان

Hey you, who have always been around! All including those who have already passed away and those who have not yet come to existence (not born yet) are both rushing to you from two horizons of time [i.e. past and future].

پیش وجودت از عدم زنده و مرده را چه غم ؟
کز نفس تو دم به دم می شنویم بوی جان

With your existence, what would cause the living and the dead to be worried about inexistence at all?
We smell the scent of life from your breath every moment…

پیش تو جامه در برم نعره زند که بر درم
آمدمت که بنگرم گریه نمی دهد امان

In your presence, the clothes on my body yell that “tear me!”…
I came to gaze at you, but tears don’t let me…

آه که می زند برون ، از سر و سینه موج خون
من چه کنم که از درون دست تو می کشد کمان

Alas, the wave of blood is jumping out of the head and the chest…
What can I do? Since this is because a bow is pulled back by your own hands inside me…

Poet: Hooshang Ebtehaj

Posted in Links | Tagged , , , , | Leave a comment

An Interview

 

Video | Posted on by | Tagged , , | Leave a comment

I can hear my breathing

Video | Posted on by | Leave a comment

The Beard Sings Again

https://www.radiojavan.com/videos/video/moein-z-darse-eshgh

Video | Posted on by | Tagged , | Leave a comment