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

Exercise

Transportation model: defining the generator

Well done; you have defined your model inputs and outputs and the model processes you characterized using Python methods. Now, it's time to put a generator together that will sequence all your model processes.

Instructions

100 XP
  • Call the function road_travel() created before, which calculates the road travel time, and clock in the time it takes to complete it.
  • Call the function wait_traffic_light() created before, which calculates the waiting time at traffic lights, and clock in the time it takes to complete it.