Now that I’m seeing queues everywhere, I’m getting curious about both the underlying math and the underlying pragmatics. Take a highway, for example: say you want to get the most use out of one. What does that mean? I guess it means maximizing total throughput, or more specifically the car miles driven on the road in some time period. Take the limit as time goes to zero, and the instantaneous version is the sum of the speeds of the cars. Or: the number of cars times the average speed of the cars.

Question 1: Have I missed anything yet? I’m probably near the edge of missing something by doing a measurement at one instant in time: apparently a lot of the fun has to do with the distribution of entry times into queues. Let’s put that in the back of our head for now and continue.

So we’re worried about the number of cars times the average speed of the cars. The second factor sounds easy to deal with: floor it! What about the first factor? We have a fixed amount of road space (another simplification, but one I’m happy with for now); and the number of cars is the road space divided by the distance between (fronts of) cars. (We could separate “distance between fronts of cars” into “length of cars” plus “following distance”; for now, let’s not worry about the length of the cars themselves.) So now we want to floor it while tailgating! (In our Mini Coopers, if we’re worrying about lengths of cars.)

Which I would, actually, rather not do. Nor would all of my fellow drivers, though some don’t seem to mind. In general, the faster we go, the larger a following distance we like to maintain. So the two components are fighting against each other. (Good thing, otherwise this problem would be pretty boring.)

Question 2: What’s the relationship between driving speed and following distance for your average driver?

If your average driver’s brain is concerned with being able to react to events in a fixed amount of time, then following distance would vary linearly with speed. (So the throughput wouldn’t vary with the average speed, once you get dense enough!) If your average driver’s brain is concerned with being able to come to a complete stop, then the following distance actually varies quadratically with speed, so the slower the highway, the higher throughput. (I don’t really believe that, though, and here we do start having to worry about the lengths of the cars themselves.) In either case, I’m sure there are boundary effects. And brains are complicated things and developed in an environment where people normally travel at single-digit miles per hour, so probably neither model is particularly accurate.

Now I really do want to start worrying about variations in the instantaneous behavior: now that my commute has me driving home on 101 at 5:45 pm, I can assure you that the speed of traffic varies from second to second. (Those annoying other people who also want to get onto the highway have something to do with this.) This raises so many questions that I don’t even know where to start:

Question 3: Where should I start when thinking about differences in traffic speed?

Let’s try: what affects variations in traffic speed? When traffic speed varies a lot, is there some sort of pattern in the chaos that ensues, or is every traffic mess different? What effects do variations in traffic speed have on throughput? In particular, what can we do to maximize throughput? What happens when we get close to maximum throughput?

And now we turn to my own behavior. I confess that there are times when I don’t maximize my speed, even when I could do so safely and legally. For example, if I see a slowdown ahead of me, I tend to take my foot off the gas and coast, rather than, say, first maintaining speed until I get nervous and then braking more sharply.

Question 4: Compared to a leadfoot, am I hurting, helping, or neither?

Not clear. I’m not affecting my average velocity: I’m decelerating more gradually than our hypothetical leadfoot, but you get the same total deceleration in either situation. Having said that, my position on the road is never ahead of where the leadfoot would be, so maybe I’m delaying not only myself but an entire column of cars behind me. That would be unfortunate.

On the other hand, while I don’t know what the causes and effects of variation in velocity are, I have a hard time believing that yo-yoing speeds really maximize throughput, or even don’t have a negative effect. So maybe, by providing some modest dampening effect on the system, I’m actually helping throughput? It would be nice, but I wish I could point to a concrete mechanism here, could present a model where my behavior helps instead of hurts.

Lots of questions I don’t understand.

Question 5: Any good books on the subject?

Question 6: Is this traffic situation a good analogy for any aspect of software development, or are the behavior of queues that I run into at work different from the behavior of queues that I run into on the way home from work? (Encounter on my way home, I should say – I try hard to not actually run into the queues on the road, because I’m quite sure that exchanging insurance information would not help throughput in any way.)

Post Revisions:

There are no revisions for this post.