Sunday, September 11, 2005
A case for a mathematical model of urban traffic
For sometime now, I have been obsessed with the idea that it may be possible to build a mathematical model for traffic in Bangalore that could be used to predict traffic growth and identify stress points well in advance.
The idea occurred when observing the chaos resulting from the Bannerghatta road flyover construction projects, at BTM Layout and Dairy Circle. Both projects blocked Bannerghatta road for periods spanning years without providing a reasonable alternate route for traffic. In the BTM layout case, northbound traffic coming the IIMB side could turn westwards on the Ring Road into JP Nagar to reach Jayanagar, Lalbagh, and areas in central Bangalore, but there was no road going eastwards to Hosur Road and Koramangala.
The traffic police, to their credit, set up a diversion on a mud road near Bilekhalli that leads to the BTM Layout Bus Depot, and got that road tarred barely a year later. This is a wide road that is reasonably capable of handling the diverted traffic. The surprising bit, however, was that several commuters (including trucks) rejected this road, instead using narrow lanes through BTM Layout that bypassed the construction site by only about a kilometre, instead of the three or four that the official diversion required. I was among these daily commuters.
This was when I made the first observation: traffic prefers a short, narrow and winding route to the destination over a long, wide and smooth route.
On my first trip through these lanes, trying to get to Koramangala, I didn’t know the route, so I simply followed the traffic. If there were a lot of vehicles taking this particular lane, I reasoned, there must be a main road somewhere up ahead. I was right, and from that, a second observation:
Traffic attracts traffic. Traffic will discover the best route connecting two popular areas and saturate it. If you improve a road (widen it, make it one-way, whatever), traffic will quickly grow to saturate it, arriving at a stable state that makes the route feel no better than before the improvement was undertaken.
And somewhere along the way, a third observation: impediments like traffic lights discourage taking a particular route. Ergo, traffic doesn’t necessarily prefer the shorter route. It prefers the route of least resistance.
This is pertinent when you decide to block a road to build a flyover and the traffic ignores your official diversion, instead spilling into someone’s quiet retirement neighbourhood. You should be able to predict where the traffic will go in advance, and ensure that diversion is geared up to handling it.
At this point it’s possible to have an aha! moment: “Hey, this is just like plumbing! Routing water through pipes!” Or maybe, “Electrical circuits! Flow of current is indirectly proportional to the resistance of pathways!” “We can apply these models to traffic analysis!” Right, except both models have water and electricity originating outside the model and heading to a destination outside the model. With traffic, vehicles come from within the city and go to places within the city. The traffic a road bears, therefore, is also subject to what areas it connects, not just how well it connects them. It’s like when I was riding the Delhi Metro two weeks ago, travelling Civil Lines to Central Secretariat, the train suddenly got very full at Kashmere Gate, and then emptied again at Connaught Place. (See the yellow line on the map.) Turns out both stations are crossing points for other Metro lines, accounting for disproportionately high traffic in that segment.
To build a reasonable model for Bangalore traffic, I’ll need a roadmap detailing the current traffic bearing conditions of all roads in the city, and information on residential and commercial areas (assuming most traffic goes residential to commercial in the mornings and back evenings), including the sort of vehicles popular in these areas. And then there are the oddball factors such as exactly how the ratios of the four types of vehicles affect “route resistance”: autorickshaws, with their amazing turn radius; two-wheelers, with their ability to wedge narrow gaps; cars, with their natural tendency for lane discipline; and trucks and buses, which lord above the rest, don’t have to worry about being cut off by a pipsqueak on a bike, but are seen as traffic impediments by everyone else.
This is where I’m stuck right now. One, I don’t have this data. As far as I know, nobody does. To stand at traffic junctions collecting statistics across a period of several months requires coordination abilities beyond me. The Bangalore Free Map project was supposed to be building the base road map (hence my interest in the project), but now that
shekhark has gone off to MIT for his PhD and is no longer prodding us on, the project’s stalled. Two, to calculate a numerical “resistance” score for each road segment will require some fairly ingenious math, and I’m not equipped to do this. I’m no math head. Three, I know nothing about traffic. I’m a software geek and may be wasting the prime of my career mucking around unguided in unfamiliar territory. For all I know, someone may have figured out how to predict traffic decades ago, or it may be that the contributing factors are so numerous and complicated, predicting to a reasonable level of accuracy may be well nigh impossible. I don’t know.
What I do know, though, is that Bangalore is one of the few places in the world facing accelerated growth with infrastructure struggling to keep pace. It’s one of the few places where you can literally see how traffic copes with stress and construction blockage. This is an urban planning study opportunity not to be squandered.
And yet, how?
The idea occurred when observing the chaos resulting from the Bannerghatta road flyover construction projects, at BTM Layout and Dairy Circle. Both projects blocked Bannerghatta road for periods spanning years without providing a reasonable alternate route for traffic. In the BTM layout case, northbound traffic coming the IIMB side could turn westwards on the Ring Road into JP Nagar to reach Jayanagar, Lalbagh, and areas in central Bangalore, but there was no road going eastwards to Hosur Road and Koramangala.
The traffic police, to their credit, set up a diversion on a mud road near Bilekhalli that leads to the BTM Layout Bus Depot, and got that road tarred barely a year later. This is a wide road that is reasonably capable of handling the diverted traffic. The surprising bit, however, was that several commuters (including trucks) rejected this road, instead using narrow lanes through BTM Layout that bypassed the construction site by only about a kilometre, instead of the three or four that the official diversion required. I was among these daily commuters.
This was when I made the first observation: traffic prefers a short, narrow and winding route to the destination over a long, wide and smooth route.
On my first trip through these lanes, trying to get to Koramangala, I didn’t know the route, so I simply followed the traffic. If there were a lot of vehicles taking this particular lane, I reasoned, there must be a main road somewhere up ahead. I was right, and from that, a second observation:
Traffic attracts traffic. Traffic will discover the best route connecting two popular areas and saturate it. If you improve a road (widen it, make it one-way, whatever), traffic will quickly grow to saturate it, arriving at a stable state that makes the route feel no better than before the improvement was undertaken.
And somewhere along the way, a third observation: impediments like traffic lights discourage taking a particular route. Ergo, traffic doesn’t necessarily prefer the shorter route. It prefers the route of least resistance.
This is pertinent when you decide to block a road to build a flyover and the traffic ignores your official diversion, instead spilling into someone’s quiet retirement neighbourhood. You should be able to predict where the traffic will go in advance, and ensure that diversion is geared up to handling it.
At this point it’s possible to have an aha! moment: “Hey, this is just like plumbing! Routing water through pipes!” Or maybe, “Electrical circuits! Flow of current is indirectly proportional to the resistance of pathways!” “We can apply these models to traffic analysis!” Right, except both models have water and electricity originating outside the model and heading to a destination outside the model. With traffic, vehicles come from within the city and go to places within the city. The traffic a road bears, therefore, is also subject to what areas it connects, not just how well it connects them. It’s like when I was riding the Delhi Metro two weeks ago, travelling Civil Lines to Central Secretariat, the train suddenly got very full at Kashmere Gate, and then emptied again at Connaught Place. (See the yellow line on the map.) Turns out both stations are crossing points for other Metro lines, accounting for disproportionately high traffic in that segment.
To build a reasonable model for Bangalore traffic, I’ll need a roadmap detailing the current traffic bearing conditions of all roads in the city, and information on residential and commercial areas (assuming most traffic goes residential to commercial in the mornings and back evenings), including the sort of vehicles popular in these areas. And then there are the oddball factors such as exactly how the ratios of the four types of vehicles affect “route resistance”: autorickshaws, with their amazing turn radius; two-wheelers, with their ability to wedge narrow gaps; cars, with their natural tendency for lane discipline; and trucks and buses, which lord above the rest, don’t have to worry about being cut off by a pipsqueak on a bike, but are seen as traffic impediments by everyone else.
This is where I’m stuck right now. One, I don’t have this data. As far as I know, nobody does. To stand at traffic junctions collecting statistics across a period of several months requires coordination abilities beyond me. The Bangalore Free Map project was supposed to be building the base road map (hence my interest in the project), but now that
What I do know, though, is that Bangalore is one of the few places in the world facing accelerated growth with infrastructure struggling to keep pace. It’s one of the few places where you can literally see how traffic copes with stress and construction blockage. This is an urban planning study opportunity not to be squandered.
And yet, how?
Anonymous — Sep 11, 2005 3:04:30 AM — # ↩
http://www.azdot.gov/Highways/Traffic/Trafeng.asp
vinay_ks — Sep 11, 2005 7:07:46 AM — # ↩
This might also interest you -
http://www.pacindia.org/old/old/traffic_chaos
thaths — Sep 11, 2005 8:08:14 AM — # ↩
birdonthewire — Sep 11, 2005 10:41:28 AM — # ↩
Kiran Jonnalagadda — Sep 11, 2005 10:53:35 AM — # ↩
beerbal — Sep 11, 2005 6:15:50 PM — # ↩
Kiran Jonnalagadda — Sep 12, 2005 8:01:38 AM — # ↩
plasmid — Sep 14, 2005 12:35:15 AM — # ↩
latelyontime — Sep 12, 2005 8:13:32 PM — # ↩
thaths — Sep 11, 2005 6:55:27 PM — # ↩
All around me in India I see a rush to grab opportunities. My theory is that this lemming rush has to do with being brought up to believe that it is a competitive world out there and that cutting corners is fine as long as you succeed (in this case, reaching one's destination a few minutes earlier) in the end. There is this belief that in the Real World people are not nice to each other and the only way to succeed is to rush ahead of the next guy.
I agree with you that this is not a problem for direct tackling. If the systematic competiveness is taken care of and people given enough opportunities, I believe there will be less of a rush to scramble over arms and chests of others. Oddly, people like Friedman seem to be saying that it is precisely this rush that gives India it's edge. I disagree with him. I believe that a certain dignity in life is a fundamental right. Running the maze like a mad man is not very dignified.
vinodkumarvc — Sep 12, 2005 2:40:03 PM — # ↩
correctly said! this can be attributed to the fact tht there are a billion plus of us, fighting for meagre resources! we believe tht we need to struggle 4 everything, so much so tht a day without struggle doesn't seem worthwhile ..
fus — Sep 11, 2005 9:13:30 AM — # ↩
As for the model you would not need exact numbers but approximates, since ultimately the model will be stochastic. Approximates that we can derive by common sense.
yawhatever — Sep 11, 2005 11:05:01 AM — # ↩
My town planning lecturer has a hardcopy of that research material.
Traffic Analysis is usually done by Urban planning authorities, students taking up UP as a thesis topic, Civil engineering students for road designing, and many a time, as a case study by researchers who arent even from Bangalore. I guess your best bet would be to talk to an urban planning lecturer at a good college. BDA will definitely have data on this, but youd have to pull a few strings to get to it.
Very interesting Project! Id love to help any way I can :)
Anonymous — Sep 11, 2005 11:26:21 AM — # ↩
Slightly OT. I live in Chennai, and a year or so back I began to notice that traffic on a certain road that I was very familiar with was extremely smooth whenever the traffic lights were not functioning during daytime, even during peak hours. There were too many instances of traffic light malfunctioning-smooth traffic flow combo for me to dismiss it as a a freak coincidence and even mentioned it to a couple of colleagues who just laughed away my suggestions for removing traffic lights at least from some junctions, or at least put in the orange-blinking mode it goes into after 10 pm on most roads in chennai. Then I began to research this topic on the net and found that Hans Monderman in the netherlands had been advocating similar ideas and had even managed to implement some of these ideas. Here is good writeup in wired:
http://www.wired.com/wired/archive/12.12/traffic.html?pg=2&topic=traffic&topic_set=
Googling for 'Hans Monderman' should bring up some interesting links.
Incorporating empirical observations and granting autonomy to traffic regulators to frame policies that suit them locally, maybe at the street level may be the key. Mathematical modelling is fine, but incorporating street wisdom may also be one of the possible approaches.
Rams
http://cycle-gap.blogspot.com/
deelight — Sep 11, 2005 12:48:51 PM — # ↩
Kiran Jonnalagadda — Sep 11, 2005 1:28:28 PM — # ↩
----------------------------------------------------------------------
Neither do i know a lot about traffic but the book "Turtles, Termites, and Traffic Jams" by Mitchel Resnick might be interesting to read.
http://www.amazon.com/exec/obidos/tg/detail/-/0262680939/103-2247120-5141458?v=glance
satyap — Sep 11, 2005 4:43:33 PM — # ↩
themadman — Sep 11, 2005 5:14:29 PM — # ↩
thejaszalcatraz — Sep 11, 2005 10:12:25 PM — # ↩
Kiran Jonnalagadda — Sep 12, 2005 8:06:58 AM — # ↩
fus — Sep 12, 2005 12:21:36 PM — # ↩
Traffic can hardly be called non-linear.
sriniram — Sep 13, 2005 2:30:14 PM — # ↩
That said, if Indian city traffic ever gets modelled, I'd like it to be applied to the fares on Bangalore's auto meters as well.
samsat_iit — Sep 11, 2005 11:04:26 PM — # ↩
but given a set of dfata and values of function f dependent on the data u can always train a neural network to predict f when the data changes.
fus — Sep 12, 2005 12:19:52 PM — # ↩
Which is the problem .... which Jace mentions too...
How do you get this data ?
samsat_iit — Sep 12, 2005 12:47:57 PM — # ↩
since the roads can be considered to be edges of a graph.
one part of the traffic can be assumed to be dependent on traffic of other parts.
so if u can measure traffic on sum critical roads , then tht on others can be predicted by the NN.
Kiran Jonnalagadda — Sep 12, 2005 12:52:11 PM — # ↩
Next question: how do you know how this dependency plays out unless you have data to verify with?
fus — Sep 12, 2005 2:31:14 PM — # ↩
Exactly what I was going to ask. For Neural Networks to be robust, you need lots of data. Especially if they are decision systems, even more so.
samsat_iit — Sep 12, 2005 2:51:42 PM — # ↩
the data for trnin the NN has to be collected for all the roads ,after tht just go for sum critical roads where traffic cameras n sensors record the no of cars passing every sec.
jbritto — Sep 12, 2005 12:32:20 AM — # ↩
A few points that crossed my mind:
1. It seems that origin-destination information of vehicles would be more useful than getting data on the the number of vehicles crossing a junction (because of the points you have raised: vehicles change their course if a particular junction is too congested; the roads are saturated, so the number of vehicles crossing a junction within a particular time period would be close to the maximum possible anyway)
2. Such information could be very easily obtained if everyone had a GPS unit on their vehicles.
3. Countries like Singapore actually have mandatory tracking devices on each vehicle. (This, of course, would be considered a gross violation of privacy in most countries). They probably already use this data for traffic planning.
4. But hey, many of us already carry cellphones: devices that could potentially be used to track our movements.
Phone companies may already have this information. It might not be too accurate ( might be difficult to find out which road you are in based on the cellphone tower. there could be several cellphone towers in busy areas, cellphone penetration still low, many people travelling in the same vehicle would skew the data, etc.) but it would still be interesting data. Would it be even possible to get this data without privacy concerns? I guess it sounds a bit crazy, but does anyone have good reasons why it won't work?
Anonymous — Sep 12, 2005 9:48:52 AM — # ↩
Hi, An interesting post. But I do not agree with you on one or two points. Of course, these are generalisations since I am not familiar with Bangalore traffic.
"...traffic prefers a short, narrow and winding route to the destination over a long, wide and smooth route." This may hold true for commercial vehicles, particularly the three-wheeler autos and vans. Even in Chennai those guys believe that it is better to take winding and narrow lanes (sometimes even when it is probably longer) believing it is a `shortcut.' There will a significant portion that will know a smoother flow of traffic is better and economical and that is what the authorities should ensure the rest follows.
Also, rather than predicting a route the traffic will take as a diversion, the authorities should ensure that traffic follows the ideal diversion route that has been laid out. This would help to avoid heavy traffic entering residential areas or narrow roads.
Kiran Jonnalagadda — Sep 12, 2005 10:32:48 AM — # ↩
There's not much conflict between our observations. The narrow, winding road can take significantly lesser traffic than the wide road, so traffic between these two is proportional to their capacities. However, in a colony of narrow, winding roads, you'll notice that very few of them have heavy traffic, while the rest remain virtually traffic-free. In this case, traffic on the road is not proportional to their carrying capacities -- it's proportional to the areas these roads connect.
If authorities want traffic to follow the ideal diversion route, they should ensure their ideal diversion is also the commuter's ideal diversion, which is a very difficult thing to achieve.
Anonymous — Sep 12, 2005 11:50:23 AM — # ↩
Then there is another thing, ppl will use a particular road, till the traffic reaches a particular limit. then they are off that road, they choose the wider road. So there cud possibly be that after a particular limit, ppl look for alternate roads with lower limits.
-Mahesh
plasmid — Sep 14, 2005 12:45:35 AM — # ↩
Anonymous — Sep 15, 2005 4:17:10 PM — # ↩
fascinating thoughts, jace!
can this be visualized as a 3-dimensional model, you think? that would also factor in the physical environment within which the traffic flows?
arvind/srishti
Kiran Jonnalagadda — Sep 15, 2005 5:32:01 PM — # ↩
Possibly, but a full-scale 3D model would require modelling physics that may turn out to be too complicated to get right. I think if we have snapshots of traffic quality and density at specific junctions at various times of the day, we can attempt to calculate for other areas, verify again with recorded data, and essentially refine the influences of the various known factors.
I think this will be easier to attempt with a smaller city that has a limited set of roads leading in and out, like Panjim in Goa.
shradha — Sep 20, 2005 6:59:46 AM — # ↩
on a totally different note, that is a spectacular user pic. who took it? u seem to have lost quite a lot of weight since i met u! intentional? :)
Anonymous — Sep 28, 2005 11:30:53 PM — # ↩
Interesting post. I can tell you this, resistance score for any road in bangalore is most certainly reaching infinity.
ashwin (ashwinnaik.com)
vinayakh — Oct 30, 2005 12:52:31 AM — # ↩
That is what might be happening in Bangalore.
Here is the link to it -> http://www.itconversations.com/shows/detail390.html
Anonymous — Nov 5, 2005 6:54:07 PM — # ↩
I've often thought that tracffic in Indian conditions is closer to turbulent flow a fluids particles in an enclosed space. Think of millions of water molecules flowing down a pipe. Getting slowed down by the rough edges of the pipe... (think parked cars, hutments), the ones on the side moving slower than the ones in the center.
Anonymous — Nov 11, 2005 7:37:35 PM — # ↩
Is interesting that some of the principles of transport modelling coincide with your empirical observations.
There are dozens of software packages dedicates to transport demand and traffic simulation.
Luis