27
A Study in Creating Computational Models of Traffic

A Study in Creating Computational Models of Traffic

Embed Size (px)

Citation preview

Page 1: A Study in Creating Computational Models of Traffic

A Study in Creating Computational Models of Traffic

Page 2: A Study in Creating Computational Models of Traffic

Background Information

Page 3: A Study in Creating Computational Models of Traffic

Why?

Traffic in Today's World Complicated Decision Making

Page 4: A Study in Creating Computational Models of Traffic

Types of Traffic Simulation

Microscopic vs. Macroscopic Event based vs Time based Random Data vs Actual Data

Page 5: A Study in Creating Computational Models of Traffic

My Simulation with MASON

Page 6: A Study in Creating Computational Models of Traffic

Hierarchy

WorldWithUI

Car

World

Street

Intersection

Page 7: A Study in Creating Computational Models of Traffic

World jobs

Using wrapper file worldwithUI creates animation

Creates all Cars, Streets, and layouts world Schedules Timer

Page 8: A Study in Creating Computational Models of Traffic

World's Data Members

Land actual representation of the environment used when actually moving the Cars

World the double matrix layout of how the streets intersect

Page 9: A Study in Creating Computational Models of Traffic

Unique Token Objects

Object

ObjectGreen

ObjectRedObjectBlue

Page 10: A Study in Creating Computational Models of Traffic

Street Jobs

Checks through entire area of street Finds cars starting at the end of the street

and working back Removes all the Cars from myArea that

have been moved to a new street

Page 11: A Study in Creating Computational Models of Traffic

Street's Data Members

My Area The actual layout of where the actual cars are myWidth – length of road myHeight – number of lanes the road is

Page 12: A Study in Creating Computational Models of Traffic

Car Jobs

Where Cars interact with each other Determine if they should change their speed or

their lane according to the orientation of the cars around

Finds out location both on street and in world from parent classes

Page 13: A Study in Creating Computational Models of Traffic

Car Data Members

myAttitude – number 0 -40 whether aggressive or not

myXdir – actual speed of the car Loco – location of street Location – location on street Locax – actual location in world Newloc – new location after moving xdir

Page 14: A Study in Creating Computational Models of Traffic

Actual Resultsor Phases

Page 15: A Study in Creating Computational Models of Traffic

One Dimensional Movement

Just as it sounds, the original step of making the cars move down a street at a constant speed to the end of the track and then off.

Page 16: A Study in Creating Computational Models of Traffic

Speed Changes as Reactions to the Environment

The phase was based on the original creation of the cars abilities to orientate themselves to their environment and use that data to decide whether to speed up or slow down

Page 17: A Study in Creating Computational Models of Traffic

Changing Lanes

Changing lanes seemed to be an easy task mainly because each street had a number of lanes set its height of its data member myArea.

Page 18: A Study in Creating Computational Models of Traffic

Cars Stopping at the End of Roads

This method seemed out of place but it was the creation of an algorithm that would have the cars stop at the end of the road.

Page 19: A Study in Creating Computational Models of Traffic

Continuous Flow of Traffic

This phase was perhaps one my first real triumphs which was creating a method that enabled the program for many turns and have cars continuously flow.

Page 20: A Study in Creating Computational Models of Traffic

Flow Changing by Turns

This phase was based on the idea of having turns which were kept track of and during certain periods of time the volume of traffic would increase and decrease like normal days.

Early on

Around turn 300

Page 21: A Study in Creating Computational Models of Traffic

Two Directions of Traffic

This phase resulted in having traffic flow in both the east to west direction and the west to east direction.

Page 22: A Study in Creating Computational Models of Traffic

Lane to Lane Interaction

This phase dealt with how to change cars to different streets while accounting for where the cars were and moving their tokens accordingly.

Page 23: A Study in Creating Computational Models of Traffic

Creating Unique Tokens

This phase was more about making the animation easier to understand then making the program more exact. Thus I had to create three extensions of the Object class: ObjectRed, ObjectBlue, and ObjectGreen.

Page 24: A Study in Creating Computational Models of Traffic

Creating the Intersection Class

I decided to create an intersection class that along with having to move cars across its area, it has to keep track of the lights of 8 different joining streets.

Page 25: A Study in Creating Computational Models of Traffic

Four Way Traffic

This phase allowed the flow of traffic to go in the North to South direction as well as the South to North direction.

Page 26: A Study in Creating Computational Models of Traffic

In Short

My project is a tool for research although not research in itself

Page 27: A Study in Creating Computational Models of Traffic

The END