simulation module#
- class simulation.Simulation(building, seed=-1)#
Bases:
object
Simulates the building and the elevators
- Parameters:
building (Building) – The building to simulate
seed (int) – The seed to use for the random number generator
- run(days=0, hours=0, minutes=0, seconds=0, time_scale=-1)#
Starts the simulation
- Parameters:
days (int) – The amount of days to run the simulation for
hours (int) – The amount of hours to run the simulation for
minutes (int) – The amount of minutes to run the simulation for
seconds (int) – The amount of seconds to run the simulation for
time_scale (float) – Set the speed of the simulation, only for visualisation purposes, -1 for no delay
- set_time(days=0, hours=0, minutes=0, seconds=0)#
Sets the time of the simulation
- Parameters:
days (int) – The amount of days to set the time to
hours (int) – The amount of hours to set the time to
minutes (int) – The amount of minutes to set the time to
seconds (int) – The amount of seconds to set the time to
- step()#
Steps the simulation one time step forward