building module#

class building.Building(elevators, floor_amount, distribution)#

Bases: object

Manages the building and the elevators

Parameters:
  • elevators (list[Elevator]) – The elevators in the building

  • floor_amount (int) – The amount of floors in the building

  • distribution (Distribution) – The distribution to use for spawning passengers

spawn_passenger(time, spawn, target)#

Spawns a new passenger at the given floor

Parameters:
  • time (int) – The current time

  • spawn (int) – The floor the passenger spawns at

  • target (int) – The floor the passenger wants to go to

step(time)#

Steps the building one time step forward

Parameters:

time (int) – The current time