top of page
Writer's pictureVu Vincent

1st and foremost: system of differential equations for 2 traffic lanes

Updated: Jun 2, 2019

Hello!

So this will be my first blogpost ever 😄 Hope you're stoked reading the intention of this blog in the About page.

In there, I wrote about the motivation that sparked this blog: a system of differential equation used to model a 2-lane traffic flow. I want to share that as an initiative for many more interesting blogs to come.

The story is this. 12am at night. Was rushing through my Internal Assessment for Math HL and came across a chapter in the Differential Equation 1 course in Brilliant.org. There was quiz in there that talked about mixing 2 differential equations together, or as they said coupled. The idea is that if you take 2 bodies to interact with each others, with one cancelling out or one adding to another i.e some interaction, then in each equation you add a coupled term which has both the function describing body 1 and body 2 in each equation.

This is what I'm talking about:





In the DE on top, there's a term of the DE on bottom ( I(t) ). This is so that, S has an effect on I and vice versa. If this term in red is not there, S and I acts independent from each's other. I won't go into details about the content. You can check it out by clicking on the image leading you to the website.


So what was the inspiration?


Well, I was trying to model the same interaction between 2 lanes of traffic. Look at 2 lanes of traffic like below, and imagine you're a driver of a car at any one lane of these twos.

Now imagine it's kind of tight on your lane, and you and the rest of the drivers are getting a little annoyed because you are all moving too slow, and will get late to work, to school, or wherever. But you see that there are less amount of cars on the other one. By supply and demand, pretty much everyone (including you) on your current lane will try to switch to the other lane so that they get the best hope of not being told off by their bosses or teachers for being late. Your lane then loses some cars, of pretty much the same amount who switched. The other lane then increases in amount. With this in mind, there's then an interaction between the two lanes because you and other drivers on your lane don't act independently to whatever the amount of cars in the lane next to you is. You will always want to switch over if there are less, stay indifferent if there are about the same or if there are more. This is where it started.


Let the number of cars in lane


Here, we assumed constant change in average of all cars over time, being negative. It depends upon the situation, but I will take it as if from 7AM, going to school, and at 8AM, it's rush hour so density will increase as there will be more cars, and so speed (of the entire lane) decreases assuming constant flow rate being the product of density and speed.

From this, I followed the Underwood's model relating between the density, the optimal density, the average speed and the max speed:

I'm interested in getting the change in density per time, hence the time derivative of density. By rearranging the Underwood's model:

To get the time derivative of density, we can use the chain rule, and use the fact that the change in average speed of all cars is presumed constant:

This is our change in density for the independent case of one lane. Particularly, you expect this rate of change when there's no interaction between the two lanes i.e cars don't switch between one another.


For cars to interact, we introduce a kind of "coupled" term I described. It's this (and the time derivative of the rhos are now different as they are conditioned by lane-to-lane interactions, which is different from the previous one I derived above):

Get an intuition of the density 2 minus density 1 on the top equation there. In the most basic case of equal densities, drivers will be indifferent to either being on lane 1 or lane 2, because they don't get more benefits switching if they're the same thing. If there are more cars on lane 2 than on lane 1, then lane 2 is going to have cars switching to lane 1, hence the change in density in lane 1 is going to increase as the number of cars in lane 1 increases. The time derivative of rho 1 increases from it's independent state, until rho 1 = rho 2 again, to which drivers will be then indifferent and there will be no change in time derivatives for both then.

The "r" term is in reciprocal time unit i.e time-1(sorry Wix doesn't have inline latex, or that I can't figure it out), representing the magnifying time factor of the difference of the densities (so that the units match with the rest being density unit per time). They might be different, but it's possible to say that they're the same, assuming behaviors of drivers are the same, and drivers on one lane don't switch faster than drivers in another.

Now, all there's left is to solve this system of differential equations!

Until next time...

8 views0 comments

Comments


bottom of page