Assignment 9 β Simulation (Monte Carlo)
Two production-and-dispatch simulations with the backlog carried forward, a bakery profit simulation with salvage and goodwill, and a single-bay car-wash queue β every table filled day by day.
- Cumulate the probabilities and allocate random numbers 00β99: each outcome's range runs from the previous cumulative Γ 100 to its own cumulative Γ 100 β 1 (0.10 β 00β09, next 0.15 β 10β24, β¦).
- Convert each random number, in the order given, to a value using the ranges.
- Apply the rule for each day or customer in a table β production vs vehicle capacity (with any shortfall carried to the next day), demand vs stock, or arrival vs server-free time.
- Total and average exactly the quantities the question asks for, and state them with units.
Method and the two exam versions: Unit 6 Β· Simulation.
- Ranges in five seconds: write the cumulatives as 10, 25, 60, 80, 90, 100 β each range ends one below its cumulative and starts at the previous one.
- Carry the backlog: units that miss today's vehicle are still there tomorrow, so tomorrow's available stock = waiting + production. On a day that only just fills the vehicle, yesterday's backlog is still waiting.
- Queue simulation: service starts = MAX(arrival time, previous service end); everything else is addition.
- Profit simulation: write the one-line profit equation first, then each day is a substitution.
Q1 β Solar panel assemblies and a 305-unit container
| Production / day | 301 | 302 | 303 | 304 | 305 | 306 |
|---|---|---|---|---|---|---|
| Probability | 0.10 | 0.15 | 0.35 | 0.20 | 0.10 | 0.10 |
The container takes exactly 305; excess assemblies wait for the next day's transport; unused container space is recorded as empty spaces. Random numbers: 42, 85, 12, 94, 38, 71, 04, 63, 29, 50, 77, 18, 89, 55, 09. Find the average number waiting per day and the average number of empty spaces per day.
Assignment 9 p. 1 β the handout says "fewer than 303"; any production below the container's 305 leaves empty space, so 305 is used
- Step 1 β Random-number ranges
Production Probability Cumulative Random-number range 301 0.1 0.1 00 β 09 302 0.15 0.25 10 β 24 303 0.35 0.6 25 β 59 304 0.2 0.8 60 β 79 305 0.1 0.9 80 β 89 306 0.1 1 90 β 99 - Step 2 β Simulate 15 days
Day RN Production Waiting from yesterday Available Shipped Left waiting Empty spaces 1 42 303 0 303 303 0 2 2 85 305 0 305 305 0 0 3 12 302 0 302 302 0 3 4 94 306 0 306 305 1 0 5 38 303 1 304 304 0 1 6 71 304 0 304 304 0 1 7 04 301 0 301 301 0 4 8 63 304 0 304 304 0 1 9 29 303 0 303 303 0 2 10 50 303 0 303 303 0 2 11 77 304 0 304 304 0 1 12 18 302 0 302 302 0 3 13 89 305 0 305 305 0 0 14 55 303 0 303 303 0 2 15 09 301 0 301 301 0 4 Day 4 makes 306: one assembly is left for day 5, where 1 + 303 = 304 fills all but one space.
- Step 3 β Averages Average assemblies waiting = 1 Γ· 15 = 0.067 per day Average empty spaces = 26 Γ· 15 = 1.733 per day
Q2 β Vitamin crates and a 55-crate van
| Crates / day | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
|---|---|---|---|---|---|---|---|---|---|
| Probability | 0.06 | 0.09 | 0.11 | 0.14 | 0.22 | 0.18 | 0.08 | 0.07 | 0.05 |
The van holds exactly 55; crates over capacity remain for the next shipment. Random numbers: 17, 63, 05, 88, 49, 92, 31, 74, 26, 58, 81, 10, 39, 96, 44. Find the average crates waiting and the average empty spaces per day.
Assignment 9 p. 1
- Step 1 β Random-number ranges
Crates Probability Cumulative Random-number range 51 0.06 0.06 00 β 05 52 0.09 0.15 06 β 14 53 0.11 0.26 15 β 25 54 0.14 0.4 26 β 39 55 0.22 0.62 40 β 61 56 0.18 0.8 62 β 79 57 0.08 0.88 80 β 87 58 0.07 0.95 88 β 94 59 0.05 1 95 β 99 - Step 2 β Simulate 15 days
Day RN Production Waiting from yesterday Available Shipped Left waiting Empty spaces 1 17 53 0 53 53 0 2 2 63 56 0 56 55 1 0 3 05 51 1 52 52 0 3 4 88 58 0 58 55 3 0 5 49 55 3 58 55 3 0 6 92 58 3 61 55 6 0 7 31 54 6 60 55 5 0 8 74 56 5 61 55 6 0 9 26 54 6 60 55 5 0 10 58 55 5 60 55 5 0 11 81 57 5 62 55 7 0 12 10 52 7 59 55 4 0 13 39 54 4 58 55 3 0 14 96 59 3 62 55 7 0 15 44 55 7 62 55 7 0 Here average production (about 54.96) is almost exactly the van's capacity, so once a backlog builds on days 4 and 6 it never fully clears β the waiting column stays above zero from day 4 on.
- Step 3 β Averages
Average crates waiting = 62 Γ· 15 = 4.133 per day
Average empty spaces = 5 Γ· 15 = 0.333 per day
Business reading: a 55-crate van is too small for this line on busy days β a backlog of 3β7 crates is normal. (Treating each day separately, as some textbooks do, would give 0.933 waiting and 0.8 empty; the carry-forward figures are the realistic ones and match the assignment's wording.)
Q3 β Gourmet doughnuts β bake 30 boxes a day
| Demand (boxes) | 10 | 20 | 30 | 40 | 50 |
|---|---|---|---|---|---|
| Probability | 0.10 | 0.25 | 0.35 | 0.20 | 0.10 |
Price $15, cost $8 per box; unsold boxes go to a shelter for $3; each box of unmet demand costs $2 of goodwill. The bakery bakes 30 boxes every morning. Random numbers: 24, 78, 05, 62, 39, 91, 53, 17, 84, 46. Find the average daily profit and the total revenue lost to shortages over 10 days.
Assignment 9 p. 1
- Step 1 β Ranges
Demand Probability Cumulative Random-number range 10 0.1 0.1 00 β 09 20 0.25 0.35 10 β 34 30 0.35 0.7 35 β 69 40 0.2 0.9 70 β 89 50 0.1 1 90 β 99 - Step 2 β Profit equation Profit = 15 Γ sold + 3 Γ unsold β 8 Γ 30 β 2 Γ shortage Cost of baking 30 boxes = $240 every day
- Step 3 β Simulate 10 days
Day RN Demand Sold Unsold Short Sales $ Salvage $ Goodwill $ Profit $ 1 24 20 20 10 0 300 30 0 90 2 78 40 30 0 10 450 0 20 190 3 05 10 10 20 0 150 60 0 -30 4 62 30 30 0 0 450 0 0 210 5 39 30 30 0 0 450 0 0 210 6 91 50 30 0 20 450 0 40 170 7 53 30 30 0 0 450 0 0 210 8 17 20 20 10 0 300 30 0 90 9 84 40 30 0 10 450 0 20 190 10 46 30 30 0 0 450 0 0 210 - Step 4 β Answers
Total profit = $1540; average daily profit = $154
Boxes short over 10 days = 40 βΉ revenue lost = 40 Γ $15 = $600
The goodwill charge ($80) is already inside the profit figures. If the question means profit forgone rather than sales revenue, it is 40 Γ ($15 β $8) = $280. Day 3 (demand 10) is the only loss-making day: 20 boxes are sold off at $3.
Q4 β Express car wash β simulate 6 customers
| Inter-arrival (min) | 2 | 4 | 6 | 8 |
|---|---|---|---|---|
| Probability | 0.2 | 0.4 | 0.3 | 0.1 |
| Service (min) | 3 | 5 | 7 |
|---|---|---|---|
| Probability | 0.3 | 0.5 | 0.2 |
Opens 08:00 (time 0); customer 1 arrives at 08:02 (inter-arrival 2); FCFS. Arrival RNs: 15, 68, 42, 89, 05, 93. Service RNs: 45, 82, 12, 70, 31, 64. Find the average wait in the queue, the total idle time of the facility, and the average time in the system.
Assignment 9 p. 2
- Step 1 β Ranges
Inter-arrival Probability Cumulative Random-number range 2 0.2 0.2 00 β 19 4 0.4 0.6 20 β 59 6 0.3 0.9 60 β 89 8 0.1 1 90 β 99 Service Probability Cumulative Random-number range 3 0.3 0.3 00 β 29 5 0.5 0.8 30 β 79 7 0.2 1 80 β 99 - Step 2 β Simulation table (minutes after 08:00)
Cust RN (arrival) Inter-arrival Arrival time RN (service) Service time Service starts Waiting Service ends Time in system Server idle 1 15 2 2 45 5 2 0 7 5 2 2 68 6 8 82 7 8 0 15 7 1 3 42 4 12 12 3 15 3 18 6 0 4 89 6 18 70 5 18 0 23 5 0 5 05 2 20 31 5 23 3 28 8 0 6 93 8 28 64 5 28 0 33 5 0 RN 15 β inter-arrival 2 for customer 1, which agrees with the stated 08:02 first arrival.
- Step 3 β Answers Average waiting time = 6 Γ· 6 = 1 minute Total idle time = 3 minutes (08:00β08:02 before the first car, and 1 minute between cars 1 and 2) Average time in the system = 36 Γ· 6 = 6 minutes