Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > University Math Help > Other Advanced Topics
Reply
 
Thread Tools Display Modes
  #1  
Old October 18th, 2009, 01:14 PM
Pim Pim is offline
Junior Member
 
Join Date: Dec 2008
Posts: 26
Country:
Thanks: 0
Thanked 11 Times in 10 Posts
Pim is on a distinguished road
Default Simulation algorithm (shortest path/decision)

I am currently working on a pedestrian simulation, in which I simulate people walking from one place to another. It is discrete and pretty basic and models every person as a single entity.

Currently, the algorithm I use to decide in which direction to walk, is a simple one: It compares 5 possibilities (North, East, West, South and staying put) and chooses whichever option is closest to the target in a straight line. (Through Pythagoras.) For empty rooms, this is a pretty decent algorithm, but for more complex areas, with walls, the people get stuck behind them quite quickly.

Now, I'd like to implent a smarter algorithm, which finds the shortest path. Dijkstra's came to mind. However, I would also like to implent crowd evasion, such that people consider other, slightly longer, routes if their shortest one is too crowded.

I'd really appreciate a couple of suggestions on the kind of algorithm to use and/or how to adapt it to this simulation, as this is nearly completely new ground for me.

I have added a picture of what the exterior looks like. Blue squares are people, red is wall, purple ones are spawn points and the pink ones are exits.
Attached Thumbnails
simulation-algorithm-shortest-path-decision-ped_sim_picture.png  
Reply With Quote
Advertisement
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 04:40 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2009 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.