HW 1 - Mora Carrillo John

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

John Mora Carrillo

SIMULATION

HOMEWORK 1 CHAPTER 1
BASIC CONCEPTS OF SIMULATION

1. Name several entities, attributes, activities, events, and state variables for the following
systems:

System Entities Attributes Activities Events State Variables

A cafeteria Customer Payment Method Buy coffee and A previous Number of customers
snacks customer claims waiting orders
cashier system Number of customers at
failure queue
A grocery Housewife Payment methods Buy groceries Breaks Cashier Number of customers at
store With or without machine cashier queue
children Machine does not Number of cashiers
read barcode working
There is not enough Time a client spent at
change the store
Children start cry
A Laundromat Client Kind and quantity Wash clothes Breakout of a Number of clients in the
Number of of clothes that can Dry clothes machine laundromat
machines wash Exchange bills for Number of machines
Exchange coins operating
machine Number of machines
being used
A fast-food Cashier Service level Prepare orders Arrival of a new Number of clients
restaurant Supervisor Variety of Supervise process customer waiting for their order
Customer products Take orders Customers leave Number of clients in the
Payment methods Buy food & the store queue
drinks Order canceled
A hospital Doctor Specialization Heal patients Unexpected Number of medical
emergency Nurse Kind of disease Medicine demand consultants being used
room Patient prescription Arrival of a critical Number of
Claim medicine patient doctors/nurses in service
A taxicab Radio operator Payment method Make a ride Mechanical failure Number of taxis
company with Taxi driver Comfort Traffic jam operating
10 taxis User Company app Number of taxis
occupied
An automobile Operator Capacity Assemble Breakdown Number of vehicles in
assembly line Machines Automatization automobile parts Stockout queue
Bin of parts Number of vehicles
ready
John Mora Carrillo
2. A simulation is to be conducted of cooking a spaghetti dinner, to discover at what time a
person should start in order to have the meal on the table by 7.00 P.M. Download a recipe
from the web for preparing a spaghetti dinner (or ask a friend or relative for the recipe). As
best you can, trace what you understand to be needed, in the data-collection phase of the
simulation process of Figure 1.3, in order to perform a simulation in which the model includes
each step in the recipe. What are the events, activities, and state variables in this system?
Ingredients:
• 200 g of spaghetti
• 1 onion
• 4 tomatoes
• 1 teaspoon oregano
• salt
• olive oil
Preparation:
1. Bring three liters of water to a boil, when the water is boiling add the noodles, add
salt, and cook for 10 minutes or until soft.
2. While the noodles are cooking cut the onion and tomatoes in half, add salt and
250 ml of water in the blender to form a sauce
3. When the noodles are ready, drain the water, add the sauce from step 2 and a
teaspoon of olive oil and cook for 7 minutes.
4. Finally add the oregano, mix, and let stand.
5. Serve
Events:
• A kitchen's accident
• Empty gas
• Bad state ingredients
Activities:
• Buy ingredients
• Serve the dinner
• Wash dishes
• Prepare ingredients (clean, cut, etc)
State variables:
• Number of portions obtained
• Number of persons to serve
• Preparation time

3. In the current WSC Proceedings available at http://informs-sim.org/ read an article on the


application of simulation related to your mayor area of study or interest, and prepare a report
on how the author accomplishes the steps given in Figure 1.3.

EFFICIENTLY MODELING WAREHOUSE SYSTEMS

1. Formulation problem: The companies need a tool for validating automated warehouse
designs, predict resource requirements, and determine operational throughput capacities
for their operations.
John Mora Carrillo
2. Setting of objectives and overall Project plan: Its main objective is to provide a simulation
model to see the performance of the designs, a 3D presentation, and a statistical output
data from the simulation model.

3. Model conceptualization: The model design implements a customized Excel user


interface providing the data sheets used to define each simulation scenario.

4. Data collection: The Excel workbook logically groups data input parameters into five
different worksheets. Then, Special customized procedures were written, using visual basic
for applications to link the simulation model with the Excel workbook.

5. Model translation: A full 3-D animation of the warehouse scenario is shown and illustrates
the data set as it is running.

6. Verified: The simulation provides graphical and statistical output.

7. Validated: The model is verified by the interested companies using their own data banks
as inputs, the required results are approximated to the actual output data.

8. Experimental design: The model design is flexible about inputs, it is not only defined by
the model, in fact, it is possible to define new parameters and establish into the model for
different scenarios.

9. Production runs and analysis: Model flexibility allows for simulation iterations to be run to
demonstrate an understanding of the potential client’s business using the order volumes
associated with the client’s warehouse activities.

10.More runs: There can be as many runs as "What if?" scenarios arise for the company
operations.

11.Documentation and reporting: All runs made with their respective analysis are detailed

12. Implementation: The model is implemented and distributed commercially

4. Go to the Winter Simulation Conference website at www.wintersim.org and address the


following:
a. Where and when will the next WSC be held?
It will be held in Orlando World Center Marriott. Orlando, Florida on December 13-16
of this year.

5. Consider the following continuously operating job shop. Interarrival times of jobs are
distributed as follows:

Interarrival time Probability


0 0.23
1 0.37
2 0.28
3 0.12
John Mora Carrillo

Processing times for jobs are normally distributed, with mean 50 minutes and standard
deviation 8 minutes. Construct a simulation table and perform a simulation for 10 new
customers. Assume that, when the simulation begins, there is one job being processed
(scheduled to be completed in 25 minutes) and there is one job with a 50-minute processing
time in the queue.

Distribution of Interarrival Time


Interarrival time Probability Cumulative Random
probability digits
0 0.23 0.23 01-23
1 0.37 0.60 24-60
2 0.28 0.88 61-88
3 0.12 1.00 89-00

To obtain the interarrival time of jobs we take numbers vertically from the next table:

To obtain the processing time for jobs:


𝑋−𝜇
𝑍=
𝜎
𝑋 = 𝜇 + 𝜎𝑍
𝑋 = 50 + 8𝑍

Where x is a normal random variable for processing time and Z is a random normal
number obtained taking numbers vertically from the next table:
John Mora Carrillo

The distributions of interarrival and processing time are:

Distribution of Interarrival Time Distribution of Processing Time


Random Number Interarrival Time (H) Random Number Processing Time (X) (min) Processing Time (X) (H)
1 7 0 -0,21 48,32 0,81
2 93 3 0,60 54,8 0,91
3 40 1 1,76 64,08 1,07
4 34 1 -1,13 40,96 0,68
5 6 0 -1,68 36,56 0,61
6 76 2 -0,66 44,72 0,75
7 97 3 -2,05 33,6 0,56
8 48 1 0,00 50 0,83
9 34 1 0,14 51,12 0,85
10 42 1 -1,16 40,72 0,68

Then, the simulation table for 10 new customers. The first client must wait 75 minutes to
complete the two jobs before arrival, 25 minutes from the first job and 50 minutes from the
queued job.

Interarrival Arrival Time Processing Processing Time Waiting Time Processing Time Time Customer Spends
Customer
Time (H) (H) Time (H) Begins(H) in Queue(H) Ends (H) in system
1 ---- 0 0,81 1,25 1,25 2,06 2,06
2 3 3 0,91 3,00 0,00 3,91 0,91
3 1 4 1,07 4,00 0,00 5,07 1,07
4 1 5 0,68 5,07 0,07 5,75 0,75
5 0 5 0,61 5,75 0,75 6,36 1,36
6 2 7 0,75 7,00 0,00 7,75 0,75
7 3 10 0,56 10,00 0,00 10,56 0,56
8 1 11 0,83 11,00 0,00 11,83 0,83
9 1 12 0,85 12,00 0,00 12,85 0,85
10 1 13 0,68 13,00 0,00 13,68 0,68
Total 7,75 2,07 9,82
John Mora Carrillo

(a) What was the average time in the queue for the 10 new jobs?

𝑇𝑜𝑡𝑎𝑙 𝑤𝑎𝑖𝑡𝑖𝑛𝑔 𝑡𝑖𝑚𝑒 𝑖𝑛 𝑞𝑢𝑒𝑢𝑒 2,07


𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑞𝑢𝑒𝑢𝑒 𝑡𝑖𝑚𝑒 = = = 0,207 𝐻𝑜𝑢𝑟𝑠 = 12,42 𝑚𝑖𝑛
𝑇𝑜𝑡𝑎𝑙 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠 10

(b) What was the average processing time of the 10 new jobs?

𝑇𝑜𝑡𝑎𝑙 𝑝𝑟𝑜𝑐𝑒𝑠𝑠𝑖𝑛𝑔 𝑡𝑖𝑚𝑒 7,75


𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑝𝑟𝑜𝑐𝑒𝑠𝑠𝑖𝑛𝑔 𝑡𝑖𝑚𝑒 = = = 0,775 𝐻𝑜𝑢𝑟𝑠 = 46,5 𝑚𝑖𝑛
𝑇𝑜𝑡𝑎𝑙 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠 10

(c) What was the maximum time in the system for the 10 new jobs?

𝑚𝑎𝑥𝑖𝑚𝑢𝑛 𝑡𝑖𝑚𝑒 𝑖𝑛 𝑠𝑦𝑠𝑡𝑒𝑚 = 2,06 𝐻𝑜𝑢𝑟𝑠

6. Determine the best policy for ordering newspapers form Example 3 in the class material.
Make the simulation table for purchase of 60, 70, and 80 newspapers. ¿Must you use the
same random numbers for each experiment (60, 70, and 80 newspapers)? ¿Why YES or
why NOT?

Random digits for the types of days


Day Probability Cumulative probability Random digits
Good 0,35 0,35 01 - 35
Fair 0,45 0,80 36 - 80
Poor 0,20 1,00 81 - 00

Random digits for the demand of newspaper


Cumulative Distribution Random Digits
Demand Good Fair Poor Good Fair Poor Good Fair Poor
40 0,03 0,10 0,44 0,03 0,10 0,44 01 - 03 01 - 10 01 - 44
50 0,05 0,18 0,22 0,08 0,28 0,66 04 - 08 11 - 28 45 - 66
60 0,15 0,40 0,16 0,23 0,68 0,82 09 - 23 29 - 68 67 - 82
70 0,20 0,20 0,12 0,43 0,88 0,94 24 - 43 69 - 88 83 - 94
80 0,35 0,08 0,06 0,78 0,96 1,00 44 - 78 89 - 96 95 - 00
90 0,15 0,04 0,00 0,93 1,00 1,00 79 - 93 97 -00
100 0,07 0,00 0,00 1,00 1,00 1,00 94 - 00

Then, the simulation tables for the next 20 days ordering 60, 70 and 80 newspapers and
taking random numbers from the random numbers table in annexes. We use the same
random numbers for the three scenarios to compare only the variable "number of
newspapers ordered".
John Mora Carrillo
Table of Simulation of purchase and sale of 60 newspaper
Lost profit Salvage from
Random # Type of Random # Revenue
Days Demand from excess sale returned Daily Gain
days Days demand from sales
demand papers
1 20 Good 97 100 30,00 6,80 0,00 3,40
2 74 Fair 12 50 25,00 0,00 0,50 5,70
3 13 Good 54 80 30,00 3,40 0,00 6,80
4 99 Poor 3 40 20,00 0,00 1,00 1,20
5 31 Good 48 60 30,00 0,00 0,00 10,20
6 7 Good 87 70 30,00 1,70 0,00 8,50
7 93 Poor 8 40 20,00 0,00 1,00 1,20
8 40 Fair 33 60 30,00 0,00 0,00 10,20
9 34 Good 14 60 30,00 0,00 0,00 10,20
10 6 Good 17 60 30,00 0,00 0,00 10,20
11 76 Fair 21 50 25,00 0,00 0,50 5,70
12 97 Poor 81 60 30,00 0,00 0,00 10,20
13 48 Fair 53 60 30,00 0,00 0,00 10,20
14 34 Good 92 90 30,00 5,10 0,00 5,10
15 42 Fair 50 60 30,00 0,00 0,00 10,20
16 29 Good 75 80 30,00 3,40 0,00 6,80
17 41 Fair 23 50 25,00 0,00 0,50 5,70
18 55 Fair 76 70 30,00 1,70 0,00 8,50
19 46 Fair 20 50 25,00 0,00 0,50 5,70
20 52 Fair 47 60 30,00 0,00 0,00 10,20
Total $560,00 $22,10 $4,00 $145,90
John Mora Carrillo
Table of Simulation of purchase and sale of 70 newspaper
Lost profit Salvage from
Random # Type of Random # Revenue
Days Demand from excess sale returned Daily Gain
days Days demand from sales
demand papers
1 20 Good 97 100 35,00 5,10 0,00 6,80
2 74 Fair 12 50 25,00 0,00 1,00 2,90
3 13 Good 54 80 35,00 1,70 0,00 10,20
4 99 Poor 3 40 20,00 0,00 1,50 -1,60
5 31 Good 48 60 30,00 0,00 0,50 7,40
6 7 Good 87 70 35,00 0,00 0,00 11,90
7 93 Poor 8 40 20,00 0,00 1,50 -1,60
8 40 Fair 33 60 30,00 0,00 0,50 7,40
9 34 Good 14 60 30,00 0,00 0,50 7,40
10 6 Good 17 60 30,00 0,00 0,50 7,40
11 76 Fair 21 50 25,00 0,00 1,00 2,90
12 97 Poor 81 60 30,00 0,00 0,50 7,40
13 48 Fair 53 60 30,00 0,00 0,50 7,40
14 34 Good 92 90 35,00 3,40 0,00 8,50
15 42 Fair 50 60 30,00 0,00 0,50 7,40
16 29 Good 75 80 35,00 1,70 0,00 10,20
17 41 Fair 23 50 25,00 0,00 1,00 2,90
18 55 Fair 76 70 35,00 0,00 0,00 11,90
19 46 Fair 20 50 25,00 0,00 1,00 2,90
20 52 Fair 47 60 30,00 0,00 0,50 7,40
Total $590,00 $11,90 $11,00 $127,10
John Mora Carrillo
Table of Simulation of purchase and sale of 80 newspaper
Lost profit Salvage from
Random # Type of Random # Revenue
Days Demand from excess sale returned Daily Gain
days Days demand from sales
demand papers
1 20 Good 97 100 40,00 3,40 0,00 10,20
2 74 Fair 12 50 25,00 0,00 1,50 0,10
3 13 Good 54 80 40,00 0,00 0,00 13,60
4 99 Poor 3 40 20,00 0,00 2,00 -4,40
5 31 Good 48 60 30,00 0,00 1,00 4,60
6 7 Good 87 70 35,00 0,00 0,50 9,10
7 93 Poor 8 40 20,00 0,00 2,00 -4,40
8 40 Fair 33 60 30,00 0,00 1,00 4,60
9 34 Good 14 60 30,00 0,00 1,00 4,60
10 6 Good 17 60 30,00 0,00 1,00 4,60
11 76 Fair 21 50 25,00 0,00 1,50 0,10
12 97 Poor 81 60 30,00 0,00 1,00 4,60
13 48 Fair 53 60 30,00 0,00 1,00 4,60
14 34 Good 92 90 40,00 1,70 0,00 11,90
15 42 Fair 50 60 30,00 0,00 1,00 4,60
16 29 Good 75 80 40,00 0,00 0,00 13,60
17 41 Fair 23 50 25,00 0,00 1,50 0,10
18 55 Fair 76 70 35,00 0,00 0,50 9,10
19 46 Fair 20 50 25,00 0,00 1,50 0,10
20 52 Fair 47 60 30,00 0,00 1,00 4,60
Total $610,00 $5,10 $19,00 $95,90

Analyzing the simulation tables, we decide that the best order policy is 60 newspapers per
day, this number give the best profit for 20 days.

¿Must you use the same random numbers for each experiment (60, 70, and 80
newspapers)? ¿Why YES or why NOT?
Yes. Using the technique of Common random numbers, we take the same random numbers
for simulated the alternative systems to compare the profit using only the variable "Number
of Newspapers Ordered"

7. Smalltown Taxi operates one vehicle during the 9:00 A.M. to 5:00 P.M. period. Currently,
consideration is being given to the addition of a second vehicle to the fleet. The demand for
taxis follows the distribution shown:

Time Between Calls (Minutes) 15 20 25 30 35


Probability 0.14 0.22 0.43 0.17 0.04

The distribution of time to complete a service is as follows:

Service Time (Minutes) 5 15 25 35 45


Probability 0.12 0.35 0.43 0.06 0.04
John Mora Carrillo

Simulate 1 individual days of operation of the current system and of the system with an
additional taxicab. Compare the two systems with respect to the waiting times of the
customers and any other measures that might help on the situation.

First, we construct the distribution table for time between calls and service time:

Distribution of time between calls


Time Between Calls Cumulative Random
Probability
(Minutes) Probability Digits
15 0,14 0,14 01 - 14
20 0,22 0,36 15 - 36
25 0,43 0,79 37 - 79
30 0,17 0,96 80 - 96
35 0,04 1,00 96 - 00

Distribution of time to complete a service


Service Time (Minutes) Probability Cumulative Probability Random Digits
5 0,12 0,12 01 - 12
15 0,35 0,47 13 - 47
25 0,43 0,90 48 - 90
35 0,06 0,96 91 - 96
45 0,04 1,00 97 - 00

We must simulate a day work with 8 hours, it means 480 minutes. We take random numbers
from the random numbers table in the annexes to generate the arrival and service time for
calls and taking care of not exceeding the 480 minutes.
John Mora Carrillo
Simulation Table for one Taxi
Random # Time Between Arrival Call Random # Service time Time Service Time Service Waiting Idle Time
Time
Calls Calls (H) Time (H) Service (H) Begins (H) Ends (H) Time (H) (H)
1 ---- ----- 0 10 5 0 5 0 0
2 86 30 30 85 25 30 55 0 25
3 69 25 55 6 5 55 60 0 0
4 93 30 85 27 15 85 100 0 25
5 68 25 110 46 15 110 125 0 10
6 62 25 135 99 45 135 180 0 10
7 93 30 165 59 25 180 205 15 0
8 11 15 180 91 35 205 240 25 0
9 44 25 205 5 5 240 245 35 0
10 17 20 225 7 5 245 250 20 0
11 87 30 255 13 15 255 270 0 5
12 81 30 285 49 25 285 310 0 15
13 1 15 300 90 25 310 335 10 0
14 87 30 330 63 25 335 360 5 0
15 47 25 355 19 15 360 375 5 0
16 95 30 385 53 25 385 410 0 10
17 3 15 400 7 5 410 415 10 0
18 7 15 415 57 25 415 440 0 0
19 6 15 430 18 15 440 455 10 0
20 99 35 465 39 15 465 480 0 10
21 43 25 490
TOTAL 135 110
AVERAGE 6,75 5,5

When we added a taxi, we are going to consider the same random numbers to simulate the
same workday. The simulation table is:
Simulation Table for Two Taxis
Random # Time Between Arrival Call Random # Service Time Service Time Service Time Service Time Service Waiting Idle Time Idle Time S2
Time
Calls Calls (H) Time (H) Service time time (H) Begins S1(H) Ends S1(H) Begins S2(H) Ends S2(H) Time (H) S1 (H) (H)
1 ---- ----- 0 10 5 0 5 0 0
2 86 30 30 85 25 30 55 0 25
3 69 25 55 6 5 55 60 0 0
4 93 30 85 27 15 85 100 0 25
5 68 25 110 46 15 110 125 0 10
6 62 25 135 99 45 135 180 0 10
7 93 30 165 59 25 165 190 0 165
8 11 15 180 91 35 180 215 0 0
9 44 25 205 5 5 205 210 0 15
10 17 20 225 7 5 225 230 0 10
11 87 30 255 13 15 255 270 0 25
12 81 30 285 49 25 285 310 0 15
13 1 15 300 90 25 300 325 0 90
14 87 30 330 63 25 330 355 0 20
15 47 25 355 19 15 355 370 0 0
16 95 30 385 53 25 385 410 0 15
17 3 15 400 7 5 400 405 0 75
18 7 15 415 57 25 415 440 0 5
19 6 15 430 18 15 430 445 0 25
20 99 35 465 39 15 465 480 0 25
21 43 25 490
TOTAL 0,00 185,00 370,00
AVERAGE 0,00 12,33 74,00

Analyzing the simulation tables, we can conclude that adding a new taxi in the fleet is not
necessary, the average waiting time for calls it's not the only factor to consider, in fact, it's
only 6,75 minutes. If we add a taxi the waiting time falls to 0 but the average idle time for
John Mora Carrillo
the first taxi is almost the double and the average idle time for the other cab is extremely
large (74 min).

8. Given A, B, and C, which are uncorrelated random variables, Variable A is normally


distributed with  = 100 and ² = 400. Variable B is discrete uniformly distributed with a
probability distribution given by p(b)=1/5 with b = 0, 1, 2, 3, and 4. Variable C is distributed
in accordance with the following table:

Value of C Probability
10 0.10
20 0.25
30 0.50
40 0.15

Use simulation to estimate the mean of a new variable D, that is defined as

D = ( A − 25B ) / (2C )
To obtain the A distribution:
𝑋−𝜇
𝑍=
𝜎
𝑋 = 𝜇 + 𝜎𝑍
𝑋 = 100 + 20𝑍

Where x is a normal random variable for processing time and Z is a normal random number
obtained taking numbers from the random normal numbers table in the annexes.

Now, we construct the distribution of B:

Cumulative Random
b Probability
Probability Digits for B
0 0,20 0,20 01 - 20
1 0,20 0,40 21 - 40
2 0,20 0,60 41 - 60
3 0,20 0,80 61 - 80
4 0,20 1,00 81 - 00

Now, we construct the distribution of C:

Cumulative Random
Value of C Probability
Probability Digits for B
10 0,10 0,10 01 - 10
20 0,25 0,35 11 - 35
30 0,50 0,85 36 - 85
40 0,15 1,00 86 - 00

Finally, we take random numbers for B and C from the random numbers table in the
annexes and construct the simulation table.
John Mora Carrillo

Distribution of A Distribution of B Distribution of C


Random Random # Random #
Sample Value of A Value of B Value of C Value of D
Number for B for C
1 0,23 104,6 21 1 77 30 1,33
2 0,24 104,8 82 4 19 20 0,12
3 -1,16 76,8 4 0 21 20 1,92
4 -0,02 99,6 11 0 51 30 1,66
5 0,39 107,8 34 1 99 40 1,04
6 -0,36 92,8 47 2 33 20 1,07
7 0,48 109,6 14 0 85 30 1,83
8 -0,70 86 33 1 84 30 1,02
9 0,11 102,2 40 1 56 30 1,29
10 1,77 135,4 72 3 65 30 1,01
11 1,76 135,2 64 3 38 30 1,00
12 0,83 116,6 63 3 37 30 0,69
13 1,20 124 88 4 97 40 0,30
14 -1,50 70 59 2 21 20 0,50
15 0,15 103 2 0 73 30 1,72
16 1,37 127,4 49 2 7 10 3,87
17 1,83 136,6 13 0 60 30 2,28
18 -0,88 82,4 90 4 83 30 -0,29
19 -0,04 99,2 64 3 10 10 1,21
20 -1,12 77,6 41 3 39 30 0,04
21 -1,13 77,4 3 0 82 30 1,29
22 -0,84 83,2 85 4 9 10 -0,84
23 -0,78 84,4 67 3 89 40 0,12
24 0,97 119,4 12 0 52 30 1,99
25 0,18 103,6 52 2 43 30 0,89
26 -0,60 88 78 2 62 30 0,63
27 -2,99 40,2 38 1 26 20 0,38
28 0,21 104,2 98 4 31 20 0,11
29 1,00 120 77 3 47 30 0,75
30 0,18 103,6 80 3 64 30 0,48

Use a sample of size 30. Prepare a histogram of the resulting values, using class intervals
of width equal to 3

Class Intervall Class Brand Absolute Frequency


[-1 - 2) 0,5 28
[2 - 5) 3 2
John Mora Carrillo

The mean for D:


∑𝐷 29,38
̅=
𝐷 = = 0,98
#𝑠𝑎𝑚𝑝𝑙𝑒𝑠 30

9. Estimate, by simulation, the average number of lost sales per week for an inventory system
that functions as follows:

(a) Whenever the inventory level falls to or below 10 units, an order is placed. Only one
order can be outstanding at a time.
(b) The size of each order is equal to 20 – I, where I is the inventory level when the order is
placed
(c) If a demand occurs during a period when the inventory level is zero, the sale is lost.
(d) Daily demand is normally distributed, with a mean of 5 units and a standard deviation of
1.5 units. (Round off demands to the closest integer during the simulation and, if a
negative value results, give it a demand of zero.)
(e) Lead time is distributed uniformly between zero and 5 days—integers only.
(f) The simulation will start with 18 units in inventory.
(g) For simplicity, assume that orders are placed at the close of the business day and
received after the lead time has occurred. Thus, if lead time is one day, the order is
available for distribution on the morning of the second day of business following the
placement of the order.
(h) Let the simulation run for 2 weeks.

To obtain the daily demand:


𝑋−𝜇
𝑍=
𝜎
𝑋 = 𝜇 + 𝜎𝑍
𝑋 = 5 + 1.5 𝑍

Where x is a normal random variable for processing time and Z is a normal random number
obtained taking numbers from the random normal numbers table in the annexes.

To obtain the lead time distribution:


John Mora Carrillo

Lead Cumulative Random


Probability
Time Probability Digits
0 0,17 0,17 01 - 17
1 0,17 0,33 18 - 33
2 0,17 0,50 34 - 50
3 0,17 0,67 51 - 67
4 0,17 0,83 68 - 83
5 0,17 1,00 84 - 00

Finally, we construct the simulation table for two weeks taking random normal number and
random numbers from the tables in the annexes:

Simulation table for Inventory


Beginning Normal Random Ending Random # Lead Days until Arrival
Week Day Demand Order Lost Sales
Inventory # Demand Inventory Lead Time Time Arrive Units
1 18 2,13 8 10 91 5 10 5
2 10 -0,59 4 6 47 2 4
3 6 0,91 6 0 33 1 3
1 4 0 0,71 6 0 33 1 2 6
5 0 -0,33 5 0 90 5 1 5
6 0 -0,52 4 0 11 0 0 10 4
7 10 -0,35 4 6 41 2 14 2
8 6 0,47 6 0 89 5 1
9 0 0,07 5 0 91 5 0 14 5
10 14 -2,60 1 13 26 1
2 11 13 0,18 5 8 31 1 12 1
12 8 1 7 1 47 2 0 12
13 13 0,21 5 8 64 3 12 3
14 8 -2,9 1 7 42 2 2
TOTAL 20

𝑇𝑜𝑡𝑎𝑙 𝑙𝑜𝑠𝑡 𝑠𝑎𝑙𝑒𝑠 20


𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑙𝑜𝑠𝑡 𝑠𝑎𝑙𝑒𝑠 /𝑤𝑒𝑒𝑘 = = = 10 𝑢𝑛𝑖𝑡𝑠
# 𝑤𝑒𝑒𝑘𝑠 2

The total of lost sales for the two weeks is 20 units, the average lost sales per week is 10
units.

10. A bank has one drive-in teller and room for one additional customer to wait. Customers,
arriving when the queue is full, park and go inside the bank to transact business. The
between arrivals and the service- time distribution follow:

Time Between Service Time


Probability Probability
Arrivals (Minutes) (minutes)
0 0.09 1 0.20
1 0.17 2 0.40
2 0.27 3 0.28
3 0.20 4 0.12
4 0.15
5 0.12
John Mora Carrillo
Simulate the operation of the drive-in teller for 10 new customers. The first of the 10 new
customers arrive at a time determined at random. Start the simulation with one customer
being served, leaving at time 3, and one in the queue. How many customers went into the
bank to transact business?

First, we construct the distribution table for the Time Between Arrivals and Service time.

Distribution for Time Between Arrivals


Time Between Cumulative Random
Probability
Arrivals (Minutes) Probability Digits
0 0,09 0,09 01 - 09
1 0,17 0,26 10 - 26
2 0,27 0,53 11 - 53
3 0,20 0,73 54 - 73
4 0,15 0,88 74 - 88
5 0,12 1,00 89 - 00

Distribution for Service Time


Service Time Cumulative Random
Probability
(minutes) Probability Digits
1 0,2 0,2 01 - 20
2 0,4 0,6 21 - 60
3 0,28 0,88 61 - 88
4 0,12 1 89 - 00

Random # Interarrival Arrival Random # Service Time Service Time Service Customer Went
Client
Arrival Time Time Service Time Time Begins Ends into the bank
0 ----- ----- 0 ---- 3 0 3
0 ----- ----- 0 2 1 3 4
1 75 4 4 67 3 4 7
2 10 1 5 99 4 7 11
3 40 2 7 71 3 11 14
4 26 1 8 66 3 1
5 20 1 9 43 2 1
6 64 3 12 27 2 14 16
7 81 4 16 39 2 16 18
8 95 5 21 36 2 21 23
9 21 1 22 29 2 23 25
10 37 2 24 11 1 25 26
Total 2

Analyzing the simulation table, we realize that only 2 customers went into the bank to
transact business.
John Mora Carrillo
We can say that the drive-in teller is enough for the demand in this exercise, but it cannot
be generalized for a whole day because in a banking environment there is a greater influx
of customers for different hour bands.

Annexes

You might also like