20
Team # 29222 Page 1 of 20 When analyzing the performace of the Right-Lane rule, we approached this problem using both statistics and systems of differential equations. We modeled each driver as a particle, assumed each driver was only affected by desire for safety, the fear of the law, and personal desire, and assumed an infinitely long road to let the system adequately develop in time. Statistically, two main factors go into a traffic system: safety and flux. We considered the flux and safety as functions of speed and spatial densities, which we quantified by discretizing the area around a driver. We created Gaussian functions to model the speed and spatial densities over a stretch of roadway. Once we had these distributions, created simulations that model how each driver reacts to what happens around him. We considered factors such as the speed limit, desired speed, safety, and passing options. We used differential equations to describe the flow of traffic relative to nearby cars and wrote an algorithm that mimics the thought process involved in passing and merging. We ran simulations for both One Lane and Two Lane roads, showing how the capabilities of passing greatly increase the speed density and thus the flux score. Using both the spatial and speed densities, we came up with a statistically stable method for scoring the flux and safety, making sure to prioritize safety over speed. We came up with a final evaluation function that combines the two to give a general effect of the Right- Lane rule. Upon applying this method to urban and rural areas, we determined that the Right-Lane rule is beneficial to urban areas but harmful to rural areas.

taffic

Embed Size (px)

Citation preview

Page 1: taffic

Team # 29222 Page 1 of 20

When analyzing the performace of the Right-Lane rule, we approached this problemusing both statistics and systems of differential equations. We modeled each driver as aparticle, assumed each driver was only affected by desire for safety, the fear of the law, andpersonal desire, and assumed an infinitely long road to let the system adequately developin time.

Statistically, two main factors go into a traffic system: safety and flux. We consideredthe flux and safety as functions of speed and spatial densities, which we quantified bydiscretizing the area around a driver. We created Gaussian functions to model the speedand spatial densities over a stretch of roadway.

Once we had these distributions, created simulations that model how each driver reactsto what happens around him. We considered factors such as the speed limit, desired speed,safety, and passing options. We used differential equations to describe the flow of trafficrelative to nearby cars and wrote an algorithm that mimics the thought process involved inpassing and merging. We ran simulations for both One Lane and Two Lane roads, showinghow the capabilities of passing greatly increase the speed density and thus the flux score.

Using both the spatial and speed densities, we came up with a statistically stable methodfor scoring the flux and safety, making sure to prioritize safety over speed. We came upwith a final evaluation function that combines the two to give a general effect of the Right-Lane rule. Upon applying this method to urban and rural areas, we determined that theRight-Lane rule is beneficial to urban areas but harmful to rural areas.

Page 2: taffic

Right-Lane Rule in a Left-Wing WorldUsing statistical scoring and differential simulations to model traffic flow

Team # 29222

February 10, 2014

Abstract

When describing a large system with many parameters and facets, diving into themicroscopic details without a general idea about the system is sure to cause frustration.Trying to understand an overall behavior from the combination of each event or actionrequires a strong imagination and intesnsive computational power. Thus we first turnto a smoother, more general description of the system. We will apply statistical andprobabalistic methods in the modelling of traffic flow.

Inspired by the success of using such method to predict the fate of a particle or awhole system in quantum mechanics and thermodynamics, this paper presents an anal-ogous treatment to the evaluation of traffic flow. We use the ideas of speed expecationand density expectation to predict how the Right-Lane rule affects traffic dynamics.Through calculating a safety score and flux score, we are able to evaluate the affectsthe Right-Lane rule has on traffic.

Futhermore, we apply our general model to a microscopic simulation, wherein weconsider each driver as a particle in our system and model the movements in a largesystem of differential equations. Through interative simulations, we can see the dy-namics of each particle, and given enough time, how the the whole system behaves asa whole.

2

Page 3: taffic

Team # 29222 Page 3 of 20

Contents

1 Introduction 41.1 Prompt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 Summary of Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Optimization Models 52.1 Analysis of the Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 General Approach: Gaussian Distribution . . . . . . . . . . . . . . . . . . . . 52.3 Speed and Spacial Density from Gaussians . . . . . . . . . . . . . . . . . . . . 6

2.3.1 Density Normal Distributions . . . . . . . . . . . . . . . . . . . . . . . 62.3.2 Speed Normal Distribution . . . . . . . . . . . . . . . . . . . . . . . . 8

3 Simulations and Microscopic Modelling 103.1 One Lane Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.1.1 Lone Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.1.2 Multiple Drivers in One Lane . . . . . . . . . . . . . . . . . . . . . . . 11

3.2 Traffic Flow in Two Lanes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.2.1 Passing and Merging Algorithms . . . . . . . . . . . . . . . . . . . . . 133.2.2 Simulation: Six Cars in Two Lanes . . . . . . . . . . . . . . . . . . . . 14

4 Evaluation: Traffic Systems with Speed and Density Expectations 154.1 Flux Score . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.2 Safety Score . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.3 Overall Evaluation Score . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5 Conclusion: Considering the Scores of Different Systems 18

Page 4: taffic

Team # 29222 Page 4 of 20

1 Introduction

1.1 Prompt

In countries where driving automobiles on the right is the rule, multi-lane freeways oftenemploy a rule that requires drivers to drive in the right-most lane unless they are passinganother vehicle, in which case they move one lane to the left, pass, and return to theirformer travel lane. Build and analyze a mathematical model to analyze the performance ofthis rule in light and heavy traffic.

1.2 Assumptions

To account for all the physical limitations and uncertainties involved in traffic flow, we makeseveral assumptions as follows:

(A1) Every vehicle is a particle(A2) The road vehicles are driving on is infinitely long(A3) Each individual driver is only affected by three things: safety, the speed limit, and

personal feelings

1.3 Summary of Notation

u spacial density(or density)u spacial density expectationv speedv speed expectationv∗ stable speedn number densityvm, L speed limit in an areaΦ(u) distribution of spacial densityφ(u) normalized distribution of spacial densityΨ(v) distribution of speedψ(v) normalized distribution of speedF (u, v) flux scoreS(u, v) safety scoreE(u, v) final evaluation scoreV ar(∗) varianceH(x) Heaviside functionx positiona fear of the lawb intensity of feelingss safety reaction coefficient

Page 5: taffic

Team # 29222 Page 5 of 20

2 Optimization Models

2.1 Analysis of the Problem

The two main factors that go into a traffic system are speed and safety. These can beanalyzed and compared by assigning them a flux score and a safety score, where flux scoredescribes how many vechicles pass through an area in time, and safety score describes thelikelihood of accidents and fatalities. Let us begin with the flux score.

Following the Right Lane rule, a group of drivers will reorder themselves so that givenenough time on an infinitely long road, the fastest vehicle will be first, followed by the secondand third, and so on. In this case, the speed expectation of the system is maximized.

Considering a traffic flow where the Right Lane rule is not follwed, not everyone can driveat their maximum speeds (or stable speeds) since slower drivers can block faster drivers.However, the density expectation wil be in this case. Since both speed density and fluxdensity affect the traffic flow, we must turn to quanitative calculations in order to come upwith a flux score.

We are, however, able to gain some intuition about the safety score by looking at thefollowing data:

Figure 1: Motor Vehicle Traffic Fatalities, by Year and Location, 2002-2011

Note that only 19 percent of U.S. population lived in rural areas, but rural fatalitiesaccounted for 55 percent of all traffic fatalities in 2011. Intuitively, people tend to obey tothe drive to the right rule in urban areas and drive spread out in rural areas. The advantageof the Right-Lane rule is to maximize speed and decrease density. But the rural areas witha smaller spatial density suffer a higher traffic fatalities! It seems that speeding is morelikely to play a larger role in traffic accidents. If so, then maximizing speed adversly affectssafety

2.2 General Approach: Gaussian Distribution

We will form a macroscopic model of our system using a Gaussian functions of the form:

F (x) = Ce−λ(x−x0)2 , (1)

where C, λ and x0 are positive constants that affect the shape of the Gauassian funtion, asshown in Figure 2.

Page 6: taffic

Team # 29222 Page 6 of 20

Figure 2: Different Shapes of Gaussian functions

To determine the values of the parameters, we will use a Gaussian function normalized onour domain from 0 to ∞. To calculate the normalized Gaussian function, use the followingformula:

f(x) =F (x)∫∞

0F (x)dx

(2)

and for the expectation of x on the domain we are interested in, we use the statisticaldefinition:

x =

∫ ∞0

xf(x)dx (3)

Because we are also interested in the stability of our model, we will use the statisticalvariance defined as:

V ar(x) = −x2 +

∫ ∞0

x2f(x)dx (4)

2.3 Speed and Spacial Density from Gaussians

2.3.1 Density Normal Distributions

Before going any further, we will specify the definition of ”density.” Let density mean thespacial density a vehicle encounters while driving on a road, and let us denote it with theletter u. To gain a quantitative understanding, we will partition each single lane into blocksof the same size. Each block can fit one and only one vehicle. It is not possible to describethe spacial density by the number of vehicles occupying a set of neighboring blocks. Figure3 shows two examples of calculating such density, where the crossed green block is ourreference vehicle and the red blocks are neighboring vehicles.

By observation, the minimum density is u = 0 and the maximum is umax = 2, 5, 8 forone-lane, two-lane, and three-or-more-lane cases. Let us now describe the distribution of uby Gaussian function

Φ(u) = Cde−λd(u−u0)2 (5)

Page 7: taffic

Team # 29222 Page 7 of 20

Figure 3: Quantized Spacial Density u

Cd will canceled during normalization, so we set it to 1. After a series of tests, λd = 10is found to be reasonable with FWHM≈ 1. To find the center of distribution u0, we wantto introduce the concept of ”number density” n. The number density of a certain area iscalculated by dividing the number of vehicles with the total number of blocks:

n =number of vehicles

number of blocks in the area(6)

For example, in a certain two-lane case shown below:

Figure 4: Number Density n

the result is simply n = 3/10 = 0.3. In reality, the number of vehicles will be the numberof vehicles running in the area at a certain time, and the total number of blocks will dependon how fine the lanes are partitioned.

Notice the value of n will never be larger than 1. We can use it as probability referenceof encountering the maximum density. In other words, we multiply n with umax to get thecenter of density distribution. With u0 = numax the sample numerical expression of thedensity distribution becomes:

Φ(u) = e−10(u−numax)2 (7)

When n = 0.1, and for the two-lane case umax = 5, it takes the form shown in Figure 5.

Figure 5: Density Distribution Φ(u)

Page 8: taffic

Team # 29222 Page 8 of 20

To normalize the density distribution, we use a formula with same form as (2):

φ(u) =Φ(u)∫∞

0Φ(u)du

(8)

Refering to (3) and (4), the expectation and variance of density is described by:

u =

∫ ∞0

uφ(u)du (9)

and

V ar(u) = −u2 +

∫ ∞0

u2φ(u)du (10)

2.3.2 Speed Normal Distribution

A larger speed limit usually means drivers will drive faster. However, not all will drive thesame speed, as they are affected by both the speed limit and how they feel like driving. Wedivide the drivers into two classes: those with a lower comfortable speed and those with ahigher comfortable speed. If we consider the center of speed distributions for these two typesof driver, when the speed limit increases, we find that the center of the second class is goingto shift faster than the first class. Therefore we need two terms in the speed distributionformula, denoted as Ψ(v):

Ψ(v) = Cse−λs(v−vs0(vm))2 + Cfe

−λf (v−vf0 (vm))2 (11)

Cs and Cf describe the population ratio of two types of drivers and λs and λf describe the

width of Gaussian functions. vm is the speed limit and vs0 and vf0 are functions of vm thatlimit the shift rate of the center of the corresponding distributions (slower drivers and fasterdrivers), as seen in Figure 6.

Figure 6: Separation of Gaussians

So far, we have not considered the affects of spacial density. When surrounded by othervehicles, a driver tends to driver slower. We account for this phenomenon with a third termin our speed distribution:

Ψ(v, u) = Cse−λs(v−vs0(vm))2 + Cfe

−λf (v−vf0 (vm))2 + Cue−λu(v−vu0 (u))2 (12)

The third term smooths out the separation between faster and slower drivers and dragsdown the overall speed expectation.

Page 9: taffic

Team # 29222 Page 9 of 20

Now we want to figure out the constants. First we concentrate on the first two terms,for simplicity, assume λs = λf = 0.01, vs0 = v0.9

m , and vf0 = vm. We will, however, use realdata to determine the population ratio. According to NHTSA[2]

Age 16-20 21-24 25-34 35-44 45-64 65+ TotalPercentage 57% 50% 42% 27% 24% 13% 30%

Figure 7: Percentage of Drivers Who Tend to Drive Above Speed Limit

From Figure 7, we can roughly estimate Cs = 0.7 and Cf = 0.3. Thus, the samplenumerical speed distribution without the spacial density term will be

Ψ(v) = 0.7e−0.01(v−v0.9m )2 + 0.3e−0.01(v−vm)2 (13)

Let us now consider the spacial density. Because we consider it is a general effect onall drivers, we set Cu = 1. Because the slower drivers have a more dominant effect on thesystem, the center of the third term distribution will be set with the reference to the centerof slower drivers. Thus we define the following relation

vu0 = (1− u

10)vs0(vm) = (1− u

10)v0.9m (14)

where u never exceeds 8 by its definition. An increase in density expectation will results 10%decrease in the center of the density weight on the speed distribution. This is reasonable ifwe consider the density on a road hardly exceeds 2 except during traffic jams.

Finally the λu term is treated with statistical method while considering it to be the totalvariation of both faster and slower drivers:

1

λu=

√(

1

λs)2 + (

1

λs)2 (15)

With the previous assumption λs = λf = 0.01, we obtain λu ≈ 0.007. Combining theresult we get from the speed densities and spacial densiites, we obtain a sample numericalspeed distribution formula:

Ψ(v) = 0.7e−0.01(v−v0.9m )2 + 0.3e−0.01(v−vm)2 + e−0.007(v−(1−u)v0.9m )2 (16)

With speed limit vm = 80 units and density expectation u = 0.5. We normalize thefunction according to the following formula:

ψ(v) =Ψ(v, u)∫∞

0Ψ(v, u)dv

, (17)

which yields the result we see in Figure 8.

With these distributions defined, we can calculate the expectation of speed by

v =

∫ ∞0

vψ(v, u)dv (18)

and the speed variation by

V ar(v) = −v2 +

∫ vm

0

v2ψ(v, u)dv. (19)

Page 10: taffic

Team # 29222 Page 10 of 20

Figure 8: Change from Ψ(v) to Ψ(v, u)

3 Simulations and Microscopic Modelling

Now that we have equations describing the overall behavior of our system, let us turn tomicroscopic models and simulations. We will use our statisticaly conclusions to determinethe desired speed of each individual driver compared to the speed limit.

3.1 One Lane Simulations

3.1.1 Lone Driver

We will first analyze how we drive when we are the only ones on the road. While driving, weare aware of several factors, such as road conditions and construction, personal safety andfeelings, pedestrians, speed limits and posted signage, etc. For simplicity, let us assume thatwe are driving on a well paved open highway. This allows us to rule out road conditions,construction, and pedestrians. Thus, we are only considering safety, the speed limit, andour own feelings (that is, how fast or slow we want to drive).

Since there are no other drivers on the road, personal saftey is not a concern here–thereare no other drivers to collide with. Thus our driving will be controlled entirely by the speedlimit, our personal feelings, and the awareness or weight we give to each of them.

Every driver can be modeled as a combination between the two forces: a fear of the lawthat pulls us towards the speed limit and the intensity of our feelings which pulls us towardour desired speed. We will resolve in some middle ground between the two that dependson the weights we give to each attracting force. We can model this phenomenon with thedifferential equation

v = a(L− v) + b(V − v) (20)

where L is the posted speed limit, V is how fast we feel like driving, a is our attention orfear of the law, and b is the intensity of our feelings.

This equation produces a direction field shown in Figure 9. As we can see, no matterour initial speed, we will always converge to a stable speed. The stable point for (20) canbe deteremined by the following equation:

v∗ =aL+ bV

a+ b. (21)

Using the parameters from Figure 9, we see

Page 11: taffic

Team # 29222 Page 11 of 20

Figure 9: Direction field for (1) with parameters L = 35, V = 45, a = 0.4218, and b = 0.7922,where a and b are randomly determined using a Gaussian generator.

v∗ =0.4218(35) + 0.7922(45)

0.4218 + 0.7922= 41.5255, (22)

which corresponds with the stability we see in the direction field.

3.1.2 Multiple Drivers in One Lane

Deriving System of EquationsLet us now add another driver to our open road. Upon encountering this new driver,

we are suddenly plauged with a new concern: personal safety. Having two drivers on thesame road allows for possible collisions. The best way to avoid collisions is to maintain asafe distance, so we will slow down. Mathematically, this acts as a reaction force that pullsus away from our stable speed. If the driver in front of us applies his brakes, we will reactaccording to some minimal safe distance between us. That is, if the distance between usfalls below some fixed minimum distance, we will slow down. The intensity or weight of thereaction will depend on each individual driver. This adds a new element to our differentialequation, namely

xi = a(L− xi) + b(V − xi)− s(xi−1 − xi −D), (23)

where x (distance) is the time integral of velocity, s is the intensity of our reaction, and Dis some minimum safe distance. Here we have indexed x to indicate the relation betweencars that are next to each other. (Note: the minimum safe distance is commonly said to be1 car length per every ten miles per hour you are travelling. Thus, D = (carlength)/10∗ xi.We can select units such that this simplifies to D = xi.)

This new safety term acts as a balancing force, maintaining the distance D between usand the driver in front of us. However, this has the adverse effect of also pulling us forward

Page 12: taffic

Team # 29222 Page 12 of 20

when the driver speeds up. Since we only want this function to work one way, we willmultiply it by another function to “turn it off” when we don’t need it. Thus, our differentialequation becomes

xi = a(L− xi) + b(V − xi)− s(xi−1 − xi − xi) ∗H(xi + xi − xi−1), (24)

where H is the Heaviside or unit step function defined as

H(x) =

{1 x ≥ 00 x < 0

(25)

Remember that the lead car is not affected by this term. There is no psychologicalpressure from cars behind to driver faster; thus the lead car still behaves according to (20).

We will generalize this model first by converting (23) into a system of differential equa-tions. If we let vi = xi, then vi = xi = a(L−vi)+b(V −vi)−s(xi−1−xi−vi)∗H(vi+xi−xi−1).Thus, a system of N cars can be written as a 2N × 2N matrix

x1

v1

x2

v2

...˙xN˙vN

=

0 1 0 0 · · · 00 −a1 − b1 0 0 · · · 00 0 0 1 · · · 0

s2H 0 −s2H −a2 − b2 − s2H · · · 0...

......

.... . .

...0 0 0 0 · · · 10 0 0 0 · · · −an − bn

x1

v1

x2

v2

...xNvN

+

0a1L+ b1V1

0a2L+ b2V2

...0

anL+ bNVN

,

(26)where we have indexed a, b, s, and V , but there is no need to index L because the speedlimit does not change per each driver. We have only written H for the heaviside functionto avoid redundancy. While this matrix may look overwhelming, the patterns along eachdiagonal allow it to be easily built.

Simulation: Starting From a StoplightOur initial assumptions about driving led us to only consider three ideas: the speed limit,

personal feelings, and concern for safety. Using these assumptions, we derived a system ofdifferential equations to describe how each driver’s position and velocity change in time. Letus now use this system to simulate traffic flow in one lane.

Imagine that six cars are stopped at a stoplight; their velocities are zero and each caris within some small distance from the car in front (10 units in this example). The postedspeed limit is 80, and each driver feels like driving within some Gaussian distribution ofthe speed limit, according to the previous section. The parameters a, b, and s were createdusing a Gaussian generator, where extra weight was applied to the safety coefficient in orderto prioritize safety and avoid collisions. The system is integrated with a time step of 0.01through 2400 interations with a custom built 4th Order Runge-Kutta algorithm.

So the light turns green and within the first five hundred iterations, we observe veryinterseting behavior. As we see in Figure 10a, most drivers quickly accelerate as they aredrawn towards their stable speed but then forced to decelerate and perhas brake uponapproaching the driver in front of them. Red breaks away and quickly arrives at his stablespeed. Magenta starts off very fast and approaches farily close to Blue before backing off,indicating that his attraction to speed is higher than his caution. Eventually, The last five

Page 13: taffic

Team # 29222 Page 13 of 20

(a) Drivers’ velocities in time (b) Drivers’ distances in time

Figure 10: Six cars in one lane starting from a stop light.

cars reach the same stable speed. This indicates that Blue, Magenta, Black, and Cyanwant to drive faster but are stuck in ”traffic” behind Green. Notice in the last few hundrediterations of Figure 10b that each driver in traffic maintains a consistent distance betweenhimself and the car in front of him, indicating that they are stuck in a spacially dense”clump.”

3.2 Traffic Flow in Two Lanes

3.2.1 Passing and Merging Algorithms

As we just saw, a one lane scenario is very prone to traffic. If any driver’s stable speed is lessthan that of the drivers behind him, he will cause all of them to slow down and match hisspeed while maintaining minimum distance. These drivers are sitting in their car wishingthey could simply drive around him and be done with it. That can be accomplished withthe addition of a left lane and the simple rule guiding this entire paper: drive on the rightexcept to pass.

In a one lane system, the driver is only concerned with himself and the driver directlyin front of him. His level of awareness rises with the introduction of a new lane and passingopportunity. He begins by asking himself the question: ”Is the driver in front of me withinmy ’range’?” A driver does not consider cars that are too far in front of him; he waitsuntil they are within some ”sight distance” before asking the next question: ”Is his stablespeed less than mine?” If both of these answers are true, then the driver’s ”passing gate”has opened. (Note that this algorithm analyzes the stable speed of the driver rather thanhis current speed. This allows us to avoid unnecessary lane changes that may occur asdrivers are speeding up or slowing down. While this is not technically accurate, it has theaffect of causing the second car in the clump to pass first, followed by the third, and so on.Effectively, within a very short number of iterations, each car will change lanes and makethe pass, similar to what we see in real life.)

When a driver’s passing gate opens, he becomes constantly aware of what is happeningin the left lane. With each iteration, he checks within some safe distance around him to

Page 14: taffic

Team # 29222 Page 14 of 20

ensure there are no cars hiding. He compares the speed of the car in the front left to thespeed of the car directly in front of him. If both of these tests pass, he changes lanes andbegins passing. However, if one of them fails, we immediately close the loop and wait untilthe next iteration before asking the questions again. This method prioritizes safety so nocollisions can occur during a lane change.

Once in the left lane, a driver’s ”merging gate” is always open. That is, he is alwayslooking for a way back into the right lane. He asks a similar set of questions, and can evenpass multiple cars in one trip if all of their stable speeds are lower than his. The combinationof these two algorithms allows for fluid lane changes and optimal speed densities, as we willsee in the next simulation.

3.2.2 Simulation: Six Cars in Two Lanes

Figure 11: Initial positions of each driver on a two lane road

Figure 11 presents us with an image of a two lane road, with drivers placed in randompositions. They are given characteristics that result in varying stable speeds. Those speedsin order from largets to smallest are Magenta, Red, Cyan, Green, Black, and Blue. Weexpect that enough passing will occur over a certain number of iterations to allow the carsto reorder themselves according to their stable speeds. In order to graphically see eachdriver’s initial position, we keep the passing and merging gates closed for the first 100iterations.

Figure 12: Full simulation of six drivers over two lanes. Right Lane drivers are plotted with solidlines. Left Lane drivers are plotted with dashed lines.

Page 15: taffic

Team # 29222 Page 15 of 20

Figure 12 leads us to the following observations. As soon as the passing gate opens, Blackmerges into the right lane in front of Red and Magenta pulls into the left. Red’s passing gateis open, so rather than slowing down, he merges left and begins passing Black. Between 100and 750 iterations, Magenta follows close behind Cyan, stuck in ”left lane traffic”. As soonas Cyan overtakes Green, he merges into the right lane, activating Green’s safety reactionwhile allowing Magenta to accelerate to stable speed and continue. At 1300 iterations, Redhas passed Black, so he merges back into the right lane, activating Black’s safety reaction.This puts him within Green’s sight. Although Green’s stable speed is higher than Black’s,he cannot change lanes because Magenta is driving in his blindspot. Magenta actually hasthe highest stable speed of all the drivers, so he will continue to drive in the left lane untilhe passes everyone.

This simulation shows that the Right-Lane-Rule allows for faster drivers to overtakeslower drivers, thus increasing the flux density as described before. It is imperative thatdrivers merge back into the right lane upon a successful pass. Otherwise, slower drivers willcause traffic in the left lane, lowering the speed density and increasing the spacial density.

4 Evaluation: Traffic Systems with Speed and DensityExpectations

4.1 Flux Score

This score measures the transportation ability of a traffic system. It estimates the numberof vehicles passing a reference point per unit of time. We call this value flux.

The relation between flux and speed expectation v and density expectation u are intu-itively defined by

F (u, v) = g · uv, (27)

where g is a positive constant for scaling purpose.The plot takes the form of Figure 13.If we imagine water flowing through a pipe, the flux of water is just the speed of flow

multiplied by the density of water. In the water case, the flux has unit of weight (lb, kgand so on), however, since we u is unitless (remember we quantized the road that vehiclespassing by), the flux has unit of speed(mph, m/s and so on). In other words, u is a numericalfactor of speed expectation. If we set g = 0.01, a sample numerical formula of the flux scoreis obtained:

F (u, v) = 0.01uv (28)

We can also calculate the variance from the error propagation of u and v:

V ar(F ) = (V ar(u)

u2+V ar(v)

v2)F (u, v) (29)

4.2 Safety Score

In this section we are going to come up the a safety score for a traffic system with onlyspeed and density expectation v and u. Instead of deducting a formula, we claim the safetyscore to be:

Page 16: taffic

Team # 29222 Page 16 of 20

Figure 13: Flux F (u, v) with Respect to u and v

S(u, v) = (1

1 + h · uv)2 (30)

With a plot according to Figure 14.

Figure 14: Safety Score S(u, v) with respect to u and v

We justify this formula according to the following reasoning. First, the value of thisfunction ranges from 0 to 1, and it has the form of the inverse of the product of v and uwith a positive constant h for scaling. If either v or u is 0, the safety score is at its maximum(either all vehicles are stopped in bumper-to-bumper traffic, or there is no one else on the

Page 17: taffic

Team # 29222 Page 17 of 20

road). Second, when u and v are none-zero, the increase of either of them will decrease thesafety score. If there’re more vehicles concentrated in a certain area who drive with higherspeed, the area will certainly be less safe. Lastly, without the square, we’ll find that thefunction S(u, v) will have the inverse grow rate as flux score F (u, v), and this is not what wedesired. Since we want to emphasize human safety, we want to make the change of safetyfunction plays a more dominant role, so we square the function.

Setting factor h = 0.01, yields the sample numerical formula for safety score:

S(u, v) = (1

1 + 0.01uv)2 (31)

and its variance:

V ar(S) = 2(V ar(u)

u2+V ar(v)

v2)S(u, v) (32)

4.3 Overall Evaluation Score

As mentioned before, the evaluation is simply based on the product of flux score F (u, v)and safety score S(u, v):

E(u, v) = S(u, v) · F (u, v) (33)

Notice, the decreasing rate of safety is a squared product while the increasing rate of fluxis the product of two linear functions. This indicates when n and v are large, the system isdominated by the decreasing safety, which makes the score drop significantly. However atlow speed or low spacial density, the flux will weigh as the more important factor becausethe scaling factor h (0.01 in the sample) makes huv small compared to 1.

Figure 15: Final Evaluation Score E(u, v) with Respect to u and v

Page 18: taffic

Team # 29222 Page 18 of 20

Lastly, we consider the robustness of the system, we calculate the variance of the finalscore by the statistical propagation from the variance of u and v:

V ar(E) = 3(V ar(u)

u2+V ar(v)

v2)E(u, v) (34)

This is the error propagation from the variance of u and v. There is a constant factor of 3since both u and v is equivalent to being risen to the power of 3 during the calculation ofE(u, v).

5 Conclusion: Considering the Scores of Different Sys-tems

Let’s start with assumed data from an urban and rural area:

Place Number Density n Speed Limit vm Number of LanesUrban 0.3134 25 km/h 2Rural 0.0293 80 km/h 3

Figure 16: Data for a Certain Urban Area and a Certain Rural Area

First we work out density and speed expectations and variances:

Urban uu = 1.567 V ar(uu) = 0.0500 vu = 19.1518 V ar(vu) = 62.8006Rural ur = 0.2948 V ar(ur) = 0.0322 vr = 54.0594 V ar(vr) = 192.87

Figure 17: Expectation and Variance of Density and Speed

Then we can calculate the safety score, flux score, and the final evaluation score for bothsystems:

Urban Fu = 0.159± 0.005 Su = 0.929± 0.055 Eu = 0.147± 0.013Rural Fr = 15.947± 2.258 Sr = 0.004± 0.001 Er = 0.064± 0.027

Figure 18: Safety Score and Flux Score and Final Evaluation Score

As we see, the rural area actually gets a lower evaluation score than the urban area. It’shigh flux score makes it suffer a much lower safety score, consistent with the data providedin the introduction section. We can improve the safety factor of rural areas by decreasing theflux. Because the Right-Lane rule actually increases the flux, it results in a lower evaluationscore.

Page 19: taffic

Team # 29222 Page 19 of 20

On the other hand, in urban areas, the flux suffers a really low score. It is possibleto increase the flux by promoting the keep-right-except-to-pass rule. This will, however,undermine the safety score and cause a lower evlaution score. Thus, a balance need to befound between flux and safety. If we fix u which relates to city population and vary v, wecan obtain a plot of E(v) with fixed u:

Figure 19: Plot of E(v) with fixed u

By observation, the maximum value is above the speed limit, thus an increase in speedexpectation will increase the evaluation score. Hence in urban areas, the Right-Lane ruleactually benefits the overall evaluation score.

Page 20: taffic

Team # 29222 Page 20 of 20

References

[1] US Department of Transportation. Traffic Safety Facts, 2011 Data.

[2] US Department of Transportation. National Survey of Drinking and Driving Attitudesand Behaviors 2008