Aan de slagGa gratis aan de slag

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.

Deze oefening maakt deel uit van de cursus

Discrete Event Simulation in Python

Cursus bekijken

Oefeninstructies

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

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

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

# Simulatiom time (days)
____

# Run the model
____(____, ____)
Code bewerken en uitvoeren