It is a wrong approach to place an entire map o Nairobi or sorts. Now better map data can be gotten from a few sources like map source (garmin), the google mapmaker data is now available for kenya.. these are much lighter… or even better, simply plot a small scale map for the relevant roads for the simulation in OpenGL using at most 2 colors for the surface plane. This approach will get you huge surfaces for something like 10kb or much lesssince this will be a vector map. Unless the simulation will be rendered into an mpeg4 video clip.

 

This first step will enable us to have a 2D areal map plane of just the relevant seciton to be used to test purposes.

 

Another way could be to go with the entire city but only render certain vectors that are relevant to the simulation.

 

Using a 3D Graphics Engine like Ogre and implementing it with bullet physics libraries which I have had some time experimenting with, its only a couple days work at most to come up with a simulation that supports collision detection and some AI (bullet physics libraries has algorithms that handle collision detection and other natural body behaviours with remarkable realistic behaviour.

 

Why AI? Well because of the task of simulating the driving habits on our roads. The system has to ignore scenerios like drivers totally ignoring red lights and obeying traffic cop (to some extent), switching lanes on round abouts (r braking other road rules), partial driving on the curb,  cops must be placed on some round abouts etc.  

 

If you are ambitious enough accidents as well as human crossing of roads, mkokoteni blah blah can be factored in.

 

The Ai logic isnt as complex as it souds.

 

Then finally the generation and destruction of instances or model cars when they enter and leave the plane of view. Why destroy cars after they leave the plane?

 

This is just a push in the right direction so this thing can get started otherwise it will be discussed for eternity

 

 

 

 


From: skunkworks-bounces@lists.my.co.ke [mailto:skunkworks-bounces@lists.my.co.ke] On Behalf Of ndungu stephen
Sent: Thursday, April 16, 2009 12:51 PM
To: Skunkworks forum
Subject: Re: [Skunkworks] traffic congestion: solutions to hepa trafficmakeit real

 

I worked with some GIS maps a few years ago on a pet project,, it was a way to project them on a website...It looked something like that, except there were no cars zooming past,, just rivers and roads.

One can draw maps using GIS [a heinous task considering the fact that the GIS software works on zoom which can affect the scale once you host it on a webpage]
Secondly, the heavy graphics were abit slow even when hosted locally,, so refreshing them is another hurdle to jump...

However,, with animations and GIFs, i believe this can be pulled off ??