1. 学习
  2. /
  3. 课程
  4. /
  5. Discrete Event Simulation in Python

Connected

练习

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.

说明

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.