CommencerCommencer gratuitement

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

Cet exercice fait partie du cours

Discrete Event Simulation in Python

Afficher le cours

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.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de 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)
Modifier et exécuter le code