Get startedGet started for free

Lift: discrete-event model

Consider a hotel with five floors (number_hotel_floors) and a lift with a capacity for 15 people (lift_people_capacity). The lift takes three seconds (=3/60 minutes) to travel between any two floors (travel_time_between_floors) and stops for 6 seconds (=6/60 minutes) to let people in or out (stop_time_open_doors).

The time units are "minutes" and the results are stored in df_results.

A model named lift_discrete_event_model()has been created to simulate this dynamic lift system. Note that while aspects of this system can be well characterized, such as the time of travel between floors, others are unknown, such as when and on which floor people will call the lift. You will learn how to deal with such unknowns in this course.

Let's run the model for five minutes (sim_time).

This exercise is part of the course

Discrete Event Simulation in Python

View Course

Exercise instructions

  • Assign the appropriate values to variables sim_time, number_hotel_floors, lift_people_capacity, travel_time_between_floors, and stop_time_open_doors.
  • Call the function containing the discrete-event model.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Floor and lift parameters
number_hotel_floors = ____
lift_people_capacity = ____
travel_time_between_floors = ____
stop_time_open_doors = ____
sim_time = ____

# Run the model
df_results = ____(sim_time, number_hotel_floors, lift_people_capacity, travel_time_between_floors, stop_time_open_doors)
Edit and Run Code