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.
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/
.