Sunday, April 3, 2011

I figured out how to push code!

The code that I have pushed today is a framework of how my model will work.  Unless I can figure out a better way compatible with ROSS, I will probably end up using the huge set of switches that you see in the event handler.

Another added item that was not discussed in my previous blog posts is lanes.  As you can see I have included data for relative directions (left turning land, right turning land, and straight) and cardinal directions for the roads adjacent to a particular intersection (north, south, east, and west).  This allows for a few things that improve the accuracy of my model.  The first improvement is more traffic through intersections, most intersections and roads have more than one lane, especially in a large city.  In addition, this allows for a sort of one step pre-calculation of direction meaning that by the time the car gets to the center of the intersection, the cardinal direction it will move in is already determined and it just needs to select which lane it will enter (left, straight, or right), which is more realistic than one lane intersections.  The introduction of lanes makes u turns a little harder though because it is unclear which lane a car would go into when it turns around (left, right, or straight), I think the car will go into the lane that would lead to the intersection it came from, however this may be hard to calculate.

Hopefully by the end of this week my model will be done (if I don't run into any major problems) and I will have some test results to post.

--J

No comments:

Post a Comment