artificiall, agent, movement

I

Iman

hi
i'm working on some simulation project . i'm going to simulate traffic
of a city.
this simulation has cars , passengers , non-movable objects and
Traffic signals .
i've made cars as intelligent agent . it has thinking method ,
changing states agents ...
the main problem is i have problem to move my agents in world .
it would be possible to add some method to agent which move agent in
random destination .
but i'm trying to find some patterns which is designed for this
problems .
is there any sample source code in python or links, docs to help me ?
thanks for your attention .
 
G

Gerry

Many city travel surveys collect source destination trip-start data;
you might be able to find one of these studies.

I think each car in your simulation should have a destination. Then
the simulation needs a route-finder, and cars can progress along their
routes as traffic permits -- or even change routes if traffic seems
too slow.

I think if you start with a very small city -- perhaps just a 5 by 5
grid, and generate sources and destinations at intersections randomly
along the perimeter, you'll have enough to prototype all of the
building blocks.

Gerry
 
P

Paul McGuire

is there any sample source code in python or links, docs to help me ?
 thanks for your attention .

I've used SimPy in the past to implement a factory simulation. The
SimPy web site claims that it has been used for traffic simulation,
but does not give any links.

http://simpy.sourceforge.net/index.html

I found it to be a very neat discrete event simulator, making good use
of Python language features (especially generators).

HTH,
-- Paul
 
I

Iman

Many city travel surveys collect source destination trip-start data;
you might be able to find one of these studies.

I think each car in your simulation should have a destination.  Then
the simulation needs a route-finder, and cars can progress along their
routes as traffic permits -- or even change routes if traffic seems
too slow.

yes, we should have destinations for cars. but my goal is my
agents(cars) can recognize non-movable objects ( for example ) so
change it's path or stop when light is red.
i can add lots of if-then-else in my code to action in these
situations but thought maybe there are some patterns or books which is
talking about these topics...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,268
Latest member
AshliMacin

Latest Threads

Top