This project is an agent-based crowd simulation system designed to analyze and optimize passenger flows in large public spaces. The software models individual agents, simulates their movement using pathfinding algorithms, and generates congestion heatmaps to identify bottlenecks and problematic areas in architectural layouts.
User action flow, user experience:
-
Launching the executable file
-
Creating a new project
- Setting the name of the new project
-
Adding a model (PNG/SVG blueprint) to the program
-
Opening the simulation window
-
Entering the required parameters
-
Starting the simulation
-
End of the simulation
-
Opening a project
-
Selecting a
*.jsonfile with a simulation -
Launching the visualizer
-
Analyzing problem areas
Initially, we simulated agent behavior in the current layout of the Eastern Railway Station. The results are shown below:
After the program builds congestion heatmaps, we can manually optimize the layout using data about problem areas. On the heatmap, it is easy to identify places where passages are too narrow, rooms lacking sufficient entrances/exits, and the main trajectories of people’s movement.
After performing the analysis, we modify the layout and run the simulation again.
✅ Queues almost completely disappear, passenger flows move evenly, without getting stuck in any areas.
A* is a graph traversal and path search algorithm in computer science and mathematics that finds the least-cost path from one node to another. The algorithm was first described in 1968 by Peter Hart, Nils Nilsson, and Bertram Raphael.
During the competition, our team developed an agent behavior model that allows us to generically simulate the movement of a real person.
visualize.py — the main visualizer script. By passing arguments via the command line, you can run only the project visualization.
-pn,--PROJECT_NAME— Name of the project whose visualization you want to run-sn,--SIM_NAME— Name of the*.jsonfile containing the simulation you want to run
simulator.py
-pn,--PROJECT_NAME— Project name-sn,--SIM_NAME— Simulation name-ss,--SCREEN_SIZE— Visualizer window dimensions-gs,--GRID_SIZE— Grid dimensions-gcs,--GRID_CELL_SIZE— Grid cell size in pixels-svgs,--SVG_SCALE— Image scale-svgd,--SVG_DELTA— Image delta-mf,--MODEL_FILENAME— Image filename-fn,--FONT_NAME— Font name-aa,--AGENTS_AMOUNT— Maximum number of agents in the simulation-psr,--PASSENGERS_SPAWN_RECTS— Rectangle where agents are spawned-g,--goal— Target for all agents






