a study in creating computational models of traffic
TRANSCRIPT
![Page 1: A Study in Creating Computational Models of Traffic](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/1.jpg)
A Study in Creating Computational Models of Traffic
![Page 2: A Study in Creating Computational Models of Traffic](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/2.jpg)
Background Information
![Page 3: A Study in Creating Computational Models of Traffic](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/3.jpg)
Why?
Traffic in Today's World Complicated Decision Making
![Page 4: A Study in Creating Computational Models of Traffic](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/4.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/5.jpg)
My Simulation with MASON
![Page 6: A Study in Creating Computational Models of Traffic](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/6.jpg)
Hierarchy
WorldWithUI
Car
World
Street
Intersection
![Page 7: A Study in Creating Computational Models of Traffic](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/7.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/8.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/9.jpg)
Unique Token Objects
Object
ObjectGreen
ObjectRedObjectBlue
![Page 10: A Study in Creating Computational Models of Traffic](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/10.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/11.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/12.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/13.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/14.jpg)
Actual Resultsor Phases
![Page 15: A Study in Creating Computational Models of Traffic](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/15.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/16.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/17.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/18.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/19.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/20.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/21.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/22.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/23.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/24.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/25.jpg)
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](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/26.jpg)
In Short
My project is a tool for research although not research in itself
![Page 27: A Study in Creating Computational Models of Traffic](https://reader035.vdocument.in/reader035/viewer/2022062309/56649f1e5503460f94c3621b/html5/thumbnails/27.jpg)
The END