Get startedGet started for free

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.

This exercise is part of the course

Discrete Event Simulation in Python

View Course

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

Hands-on interactive exercise

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

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

# Simulatiom time (days)
____

# Run the model
____(____, ____)
Edit and Run Code