/Crowd-Behavior.-Fire

A simple imitation of crowd behavior in case of fire. Practice at Altai State Technical University Summer 2019.

Primary LanguageC++

Crowd behavior. Fire

Simple imitation of crowd behavior in case of fire.

How it looks:

image

Symbols:

  • image - Human
  • image - Dead human
  • image - Fire extinguisher
  • image - Evacuation button
  • image - “Exit” pointer
  • image - Smoke
  • image - Fire
  • image - Wall
  • image - Exit

What's going on here:

The model simulates the behavior of a crowd in a confined space in the event of a fire. Fire extinguishers, evacuation buttons and “Exit” pointers are randomly placed in the room. Pointers and buttons are placed only against walls. People come into the room who randomly move around it and after a while go out. After a random period of time, a fire occurs in the room, fire and smoke appear, or only smoke. Fire and smoke begin to spread throughout the room. A person has a radius of visibility. If he sees fire or smoke, he begins to leave the room. If at the same time he sees the evacuation button, then he goes to it and presses it. After clicking, all the people in the room go to the exit. If a person sees the “Exit” pointer, he approaches him and looks at him, after which he knows how to get to the exit and will easily leave the building in cases of falling into a smoky space. If a person sees a fire extinguisher and has sufficient courage, he takes a fire extinguisher, moves to the source of ignition. If he sees a fire, he begins to extinguish it; if he does not see it, he goes to the exit. In the immediate vicinity of the fire, a person receives burns from which he may die. If a person enters the smoke, and he does not see the pointer, then he is lost and begins to move into random neighboring cells, also in the smoke he suffocates and after some time can die.

Requirements:

  • QtCreator 4.9.1 installed.

How to use:

  • Just download all files.
  • Run /build-Qt_Practice_2019-Desktop_Release/release/Qt_Pracrice_2019.exe or make your build with copy walls.dat in your build directory
  • Click start button and watch
  • When all people die or are successfully evacuated, close window.
  • You can change the location of the walls in the room. Use walls.dat file and update room button