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

Connected

Exercise

Transportation model: defining process methods

Now that you have defined the model inputs, you are ready to create the model engine, which consists of the methods that will characterize your processes.

Two processes affect the time a given driver takes to travel a certain distance, which are: (1) actual driving time to travel the desired distance respecting the speed limit and the (2) waiting time at traffic lights.

Instructions

100 XP
  • Use the Gaussian distribution to pseudo-randomly generate values for random_generated["Distance"].
  • Update distance_total by adding the new distance calculated.
  • Generate integer random values for random_generated["WaitTime"].