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

Exercise

Car Assembly line: adding non-deterministic events

This exercise focuses on non-deterministic processes without using SimPy. In the next exercise, we will focus on SimPy.

You have been asked to account for variability in the duration of processes in the previous discrete-event model of a car production line. The groups of processes identified before are (1) "Welding and painting" and (2) "Assembly of parts and testing". Recall that each of these groups of processes involves many sub-processes and tasks, but for now, you are focused on coding the first version of your model at a high level.

Previously, you had determined that welding and painting took an average of 15 hours complete, while the assembly of parts and testing took an average of 24 hours to finish.

Now, you did additional research and monitoring to study the variability in the duration of these processes. You concluded that welding and painting could vary by five hours (up or down), and the duration of the assembly of parts could vary by six hours (up or down).

Update your discrete-event model to account for variations in the duration of these events. The random package has been loaded for you.

Instructions

100 XP
  • Clock-in the duration of the process "Welding and painting", taking into account the new information about variability using a method from the random package that generates random integer numbers.
  • Clock-in the duration of the process "Assembly of parts and testing", taking into account the new information about variability using a method from the random package that generates random integer numbers.