Skip to content

Matrix-based modeling of passenger flows for building layout optimization

Notifications You must be signed in to change notification settings

eteriall/Skill-Up

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Contents:


Program Interaction

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 *.json file with a simulation

  • Launching the visualizer

  • Analyzing problem areas


Results

Initially, we simulated agent behavior in the current layout of the Eastern Railway Station. The results are shown below:

Heatmap generation – unoptimized layout

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.

image

image

After performing the analysis, we modify the layout and run the simulation again.

image

Queues almost completely disappear, passenger flows move evenly, without getting stuck in any areas.


Algorithms

Pathfinding, A* (A-star) algorithm

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.

Alt Text

Agent behavior

During the competition, our team developed an agent behavior model that allows us to generically simulate the movement of a real person.

image

Main Files

visualize.py — the main visualizer script. By passing arguments via the command line, you can run only the project visualization.

Arguments

  • -pn, --PROJECT_NAME — Name of the project whose visualization you want to run
  • -sn, --SIM_NAME — Name of the *.json file containing the simulation you want to run

simulator.py

Arguments

  • -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

About

Matrix-based modeling of passenger flows for building layout optimization

Topics

Resources

Stars

Watchers

Forks

Languages