Skip to content

🚶‍♀️ A real-time simulation of crowd dynamics using the Helbing-Molnár Social Force Model. Watch as virtual agents navigate through space, responding to social and physical forces just like real pedestrians! Built with FastAPI + React.

License

Notifications You must be signed in to change notification settings

Navxihziq/social-force-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Force Model Simulation

simulation demo

This is an [extremely] simple yet interesting implementation of the original social force model proposed by Helbing and Molnar in 1998.

The project is live at: https://social-force-sim.onrender.com/. The server is hosted on a free tier Render instance, so you should expect to experience some (or dramatic) lag.

After setting parameters and clicking "Start", the simulation begins. The obstacles' sizes/locations and agents' initial positions are randomly generated. Please note that crash detection between agents and obstacles has not been implemented yet, so you can see some ranbunctious agents are roaming into the obstacles [and each others].

The project is built with FastAPI and React + Vite.

Run it locally

git clone https://github.com/Navxihziq/social-force-sim.git
cd social-force-sim/backend
# create and activate virtual environment
python -m venv .venv
source venv/bin/activate  # On Windows, use: venv\Scripts\activate

# install dependencies
pip install -r requirements.txt

# run the server
uvicorn main:app --reload --port 8000 --host 0.0.0.0

The project should be running on http://0.0.0.0:8000/.

About

🚶‍♀️ A real-time simulation of crowd dynamics using the Helbing-Molnár Social Force Model. Watch as virtual agents navigate through space, responding to social and physical forces just like real pedestrians! Built with FastAPI + React.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published