You are on page 1of 9

Optimizing Passing Rules in Two Lane Highway

Team #32050
February 10, 2014
1 The Problem 3
2 Assumptions and Variables 3
3 Model Design 3
4 Model Testing 4
5 Pros and Cons 4
5.1 Pros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5.2 Cons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
6 Conclusion 5
7 Appendix 5
1 The Problem
In countries where driving automobiles on the right is the rule (that is, USA, China and
most other countries except for Great Britain, Australia, and some former British colonies),
multi-lane freeways often employ a rule that requires drivers to drive in the right-most lane
unless they are passing another vehicle, in which case they move one lane to the left, pass,
and return to their former travel lane.
2 Assumptions and Variables
We assume the desired speed of each driver is normally distributed around the speed limit of
the highway. We assume that this distribution has a standard deviation of 4.4 feet per second
(fps), or approximately 3 miles per hour (mph). We justify this because such as distribution
places a majority of the drivers in a 5mph range from the speed limit. Furthermore, we
assume that a driver is intelligent enough to not accelerate to a speed such that he will
collide with another vehicle. We justify this by stating that modeling collisions is outside
the scope of the problem. We assume that all vehicles are 16 ft long vehicles. We justify this
by observation and measurement one of the authors vehicle, which we take to be typical.
Furthermore, we assume ideal driving conditions in terms of weather and road condition.
We justify this by assuming that any adverse conditions proportionally scale down the eect
of speed limit. Finally, we assume that distance from other vehicles that drivers desire to be
is proportional to their speed where the constant of proportionality is the absolute value of a
normally distributed variable centered 1, with standard deviation 1. Specically, we assume
that the relation is one car length per 10mph, we we take from the BMVs recommendation.
In our model we take into account various variables. Each car has a reference to the
car in front and the car behind it. Furthermore, each car has a limit to how quickly it can
accelerate. Moreover, we use normally disturbed variables to measure deviation from from
expected speeds and safety guidelines.
3 Model Design
We chose to model trac via computer simulation, specically using Java. We justify us-
ing Java not only because of the authors familiarity, but also because the object oriented
paradigm lends itself easily to the modeling of discrete units. We created two objects, one
for the car and one for the road. The road object was responsible for transmitting messages
about the passage of time for every vehicle. The car object was responsible for tracking
speed, acceleration, and determining whether or not to pass another vehicle. By manipulat-
ing the functions of the car object that determined acceleration and passing, we hypothesized
we could simulate dierent trac scenarios. Moreover, since each car only referenced the car
in front and behind it, our model was relatively computation ecient. We chose to measure
congestion by percentage of cars moving at or less than 90% of the speed limit. By choosing
a computer simulation, we had the advantage of modifying the model parameters quickly
and easily, which allowed us, in theory, to test many dierent trac levels and passing rules.
4 Model Testing
Unfortunately, we were unable to implement methods that eectively represented the various
passing rules which we wished to test. Namely, the rule presented in the problem: cars only
venture into the left lane to pass. As well as the opportunistic rule which states that, A
driver changes lanes as necessary to attain his desired speed. However, we can qualitatively
predict the behavior of our model if we were able to implement such methods. Given a long
stretch of road with no new trac, the right lane only policy will sort the cars by desired
speed in nite predictable time. This would yield a congestion value equal to the percentage
of cars whose desire speed is less than or equal to 90% of the speed limit. Moreover, if we
allow for a right-most entry lane any cars entering will also sort be sorted by speed after a
nite amount of time.
If we consider the opportunistic rule we qualitatively predict that the cars will also
be sorted in nite time, but in general it will take a longer time since some cars may be
unable to consistently pass other vehicles due to cars traveling in both lanes. However, we
do predict that there is an amount of trac such that the opportunistic model produces
less congestion because there is considerably less trac in each lane as compared to the right
lane only rule.
This is, however, assuming human drivers. Given a system of autonomous vehicles we
assume that it is possible to design an algorithm such that vehicles could be distributed
and sorted optimally along n-many lanes of trac, which is to say we predict the human is
principally responsible for roadway congestion as we have dened it.
5 Pros and Cons
5.1 Pros
Computer simulation allows for rapid testing of dierent parameters
Object oriented paradigm allows for easy extension of the model
Computational approach makes the model easily to understand,conceptualize, and
5.2 Cons
Simple human statements can be dicult to dicult to implement in computer pro-
Lack of an analytic solution prohibits exact predictions
Model accuracy and scale grows proportionally with the amount of computation
Certain simplifying assumptions may cause the model to destabilize for long time
6 Conclusion
Based on our simulation, we predict that in a human controlled environment the right lane
only rule for passing would be more ecient for most levels of trac. Furthermore, we
predict that human error is the principle cause of roadway congestion. Finally, we provide
framework is extensible and conceptually easy to understand.
7 Appendix
package comap2014;
import java.util.Random;
public abstract class Car {
//variables for car
private double speed; //speed of car
private double accellimit; //acceleration of car
private double length; //length of car
private double distToNext; //distance to forward car
private double distToPrev; //distance to rear car
private double position; //current position of car on highway
private int lane; // lane = 0 -> left lane; lane = 1 -> right lane
private double desiredSpeed; //desired speed of driver
private double desiredSafety; // desired distance between cars
private double safetyScale; //Parameter used to determine how "cautious"
of a driver you are. Higher value -> further from cars
private Car carNext;
private Car carPrev;
public Car(double speedLimit,double startPos, Car next){
Random generator = new Random();
double speedScale = generator.nextGaussian(); //normal distribution 1
means 0 this.safetyScale = Math.abs(generator.nextGaussian())+1;
//half of a normal distribution curve
this.desiredSpeed = (speedLimit + (4.4*speedScale)); //quanitatively
accounts for drivers desired speed
this.position = startPos;
this.accellimit= 12.6; //acceleration of car in feet per second^2
this.carNext = next;
this.length = 16; //length of car in feet
this.speed = 0;
public void setPrev (Car prev){//rear car
this.carPrev = prev;
public abstract void shouldIAccelerate(int t);
public abstract void shouldIPass(int t);
public abstract void Pass(int t);
public double getPos(){//determines current position of car
return (this.position);
public void updatePos(int t) {
this.position = (this.position + (t * this.speed)); //gives current
position after time t
public double getSpeed(){//determines current speed of car
public Car getNext(){
public void accelerate( int t,double deltav) {
if ((deltav / t) <= accellimit) {
this.speed = (this.speed + deltav); //determines how much to accelerate
else {
this.desiredSafety = ((this.speed / 10) * this.length * .75
* this.safetyScale);
//determines safety value based on
public double getDesSpeed(){
package comap2014;
public class Road {
private int carnum = 10;
private double speedlimit = 88; //fps
private Car[] cars = new Car[this.carnum];
public Road(){
int i = 0;
System.out.println("Making" + carnum + "cars");
cars[0] = new Car(this.speedlimit, 0, null);
System.out.println("made the first car");
while (i < this.carnum) {[i] = new Car(this.speedlimit, (i*32),[i-1]);
System.out.println("made the next car");[i-1].setPrev([i]);
public double computeCongestion(){
int count = 0;
int i = 0;
while (i < this.carnum ){
System.out.println("Car" + i + "is going at speed"
if ([i].getSpeed() <
(this.speedlimit * .90)){
else {}
double percentage = count/this.carnum;
public void tIncrement(int t) {
int i = 0;
while (i < this.carnum){[i].updatePos(t);
i = 0;
while (i < this.carnum){[i].shouldIAccelerate(t);
public void printDesSpeed(){
int i = 0;
while (i < this.carnum){
System.out.println("Car " + i + "is wanting to go"
public static void main(String[] args) {
Road road = new Road();
System.out.println("made a new road");
int tmoves = 5;
while (tmoves >= 0){
System.out.println("moving the cars");
System.out.println("computing congestion");
System.out.println("computing congestion");