Activity: A Production System
Process View Modeling Activities
We build this model together: the instructor types the code, and you type along. Before each run, write down a prediction; then run and check it.
The situation. Parts arrive at a manufacturing system as a Poisson process, one every 5 minutes on average (stream 1). Every part is first prepared, by one of 2 preparation workers, in an exponential time with a mean of 8 minutes (stream 2). Then 30% of the parts are built on line 1 and 70% on line 2 (stream 3). Line 1 has 2 workers, and builds a part in a triangular time with minimum 2, mode 6, and maximum 8 minutes (stream 4); line 2 has 3 workers, with minimum 3, mode 6, and maximum 7 minutes (stream 5). Finally, one of 2 packaging workers wraps the part, in an exponential time with a mean of 2 minutes (stream 6), and then fills a box with packing peanuts, places the part in it, and seals it, in a time uniformly distributed between 1 and 2 minutes (stream 7). At every station, a part needs one worker, and waits in line for the next free worker.
Production runs for 30 days at a time, starting with no parts in the system. Simulate 100 replications of 30 days, in minutes, and complete this table, with averages and 95% half-widths to two decimal places:
| Performance measure | Average | Half-width |
|---|---|---|
| Time in the system for parts, either line | ||
| Probability that a part’s time in the system is less than 60 minutes | ||
| Utilization of the preparation workers | ||
| Utilization of the packaging workers | ||
| Utilization of the line 1 workers | ||
| Utilization of the line 2 workers | ||
| Number of parts produced in 30 days |
Setup. Get the starter file ProductionSystem.kt from the code/ folder beside this activity, and put it in src/main/kotlin/student/activities. Run its main. It compiles and runs, with no parts yet.
1. Model it first
Identify the entities, the resources with their capacities, and the activities.
Draw the activity diagram.
Write the part’s process as pseudo-code.
2. Predict
For a station with \(c\) workers, let \(\lambda\) represent the arrival rate of parts to the station and \(E[ST]\) the mean time a part needs a worker. Its utilization is \(\rho = \lambda E[ST]/c\). Predict the utilization of all four stations. (The mean of a triangular distribution is the average of its minimum, mode, and maximum.) Which station is the bottleneck?
About how many parts will the system produce in 30 days?
3. Code along
TODO 1 and TODO 2. We construct the four stations’ workers and the responses. Which response needs an
IndicatorResponse, and why?TODO 3. We create the parts with an
EntityGenerator, as in the previous activity, and write the part’s process. Packaging is two activities done by the same worker. Why do we seize the packaging worker once, delay twice, and release once, instead of callinguse()twice?
4. Results
Run the model and complete the table. How do the utilizations compare with your predictions?
Where is the bottleneck, and why? How much of a part’s time in the system is spent waiting there?
5. Extension: palletizing
After packaging, each box goes to a pallet machine. Once 10 boxes have accumulated, the machine wraps the pallet, which takes 2 minutes, and the pallet leaves.
Predict the number of pallets completed in 30 days.
TODO 4. We model the pallet simply: a counter of boxes, and a
Palletentity that uses the pallet machine each time the count reaches 10. Run the model. How close was your prediction?In this simple model, the boxes do not wait for their pallet. What does it leave out, and how would the time in the system change if the boxes did wait?