CommencerCommencer gratuitement

Running the discrete-event model

Your "Farming Operation" team has finally listed the processes they want to include in this version of the discrete-event model, which you plan to continue refining in the future. The processes are provided in the table below, and the time is in days.

Table with process names and their respective duration to be used to create a dictionary.

Let's build the dictionary containing this list of processes and run the model for 365 days.

Cet exercice fait partie du cours

Discrete Event Simulation in Python

Afficher le cours

Instructions

  • Update the dictionary provided, containing the processes provided in the table.
  • Assign the appropriate value to the variable simulation_time.
  • Run the model that has been stored in a function named discrete_model_farm(), remembering that it takes process_dict and simulation_time as the input variables (in this order).

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Create dictionary
process_dict = {
    "____": ____,
    "____": ____,
    "Weeding": 4,
    "Planting": 2,
    "Watering and growing": 60,
    "Harvesting": 7,
    "Delivery": 2
}

# Simulatiom time (days)
____

# Run the model
____(____, ____)
Modifier et exécuter le code