1. Learn
  2. /
  3. Courses
  4. /
  5. Discrete Event Simulation in Python

Exercise

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).

Instructions

100 XP
  • 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.