0% found this document useful (0 votes)
17 views

Simulation

Uploaded by

24mba321
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Simulation

Uploaded by

24mba321
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

18‐12‐2024

Simulation

Introduction
 Mathematical models discussed in earlier in this course help
decision-makers to choose a decision alternative from the
given list of decision alternatives to reach an optimal solution
to a problem.
 Simulation that is not an optimizing technique, helps decision-
makers to perform experiment with new values of variables
and/or parameters in order to understand the changes in the
performance or effectiveness of a real system and to make
better decision.
 Such ‘experiments’ allow to answer ‘what if ’ questions relating
to the effects of changes in the value of variables and/or
parameters on the model response.

1
18‐12‐2024

Introduction
The following few examples illustrate scope of applications of
simulation.
 Aircraft designers use wind tunnels to simulate the effect of air
turbulence on various structural parts of an airplane before finalizing
its design.
 Aircraft pilots or Astronauts are trained in a simulator to expose
them with various problems that they are likely to face in the sky
while flying real aircraft.
 Hospital management may simulate alternative scheduling rules of
the ambulances, their locations, the response time to an emergency
call and, of course, the overall service quality and the costs incurred
if the ambulances were to be configured in a certain way (in types,
number, location, scheduling and staffing).

Introduction
The following few examples illustrate scope of applications of
simulation.
 Managers simulate alternative work flows and use of new
manufacturing technologies (such as Just-in-Time manufacturing,
flexible manufacturing, etc.) to design ‘new’ shop floor to get an
experience and a learning tool that would give greater confidence in
the productivity and the management of future system, at a relatively
small cost.
 A queuing system decision-makers simulate the effect of probabilistic
nature of arrival rate of customers and the service rate of the server
to serve the customer on the cost of waiting against the cost of idle
time of service facilities in the queuing system.

2
18‐12‐2024

Introduction
 Simulation is one of the most widely used quantitative analysis
tools.
 To simulate is to try to duplicate the features, appearance, and
characteristics of a real system.
 In this module, we will understand how to simulate a business or
management system by building a mathematical model that comes as
close as possible to representing the reality of the system.
 We won’t build any physical models, as might be used in airplane
wind tunnel simulation tests. But just as physical model airplanes are
tested and modified under experimental conditions, our
mathematical models are used to experiment and to estimate the
effects of various actions.

Process of Simulation

3
18‐12‐2024

Monte Carlo Simulation


 The monte Carlo simulation approach is used to incorporate
the random behaviour of variable(s) of interest in a model.

 The Monte Carlo simulation technique involves conducting repetitive


experiments on the model of the system under study, with some
known probability distribution to draw random samples
(observations) using random numbers.

Monte Carlo Simulation


 The basic idea in Monte Carlo simulation is to generate values
for the variables making up the model being studied.
 There are a lot of variables in real-world systems that are
probabilistic in nature and that we might want to simulate.
 A few examples of these variables follow:
1. Inventory demand
2. Lead time for inventory
3. Times between machine breakdowns
4. Times between arrivals
5. Service times
6. Times to complete project activities
7. Number of employees absent

4
18‐12‐2024

Monte Carlo Simulation


 Some of the variables, such as the daily demand and the
number of employees absent, are discrete and must be integer
valued.
 Other variables, such as those related to time, are continuous
and are not required to be integers because time can be any
value.
 When selecting a method to generate values for the random
variable, this characteristic of the random variable should be
considered.
 The basis of Monte Carlo simulation is experimentation on
the chance (or probabilistic) elements through random
sampling.

Steps of Monte Carlo Simulation


1. Establishing probability distributions for important input
variables.
2. Building a cumulative probability distribution for each variable
in step 1.
3. Establishing an interval of random numbers for each variable.
4. Generating random numbers.
5. Simulating a series of trials.

5
18‐12‐2024

Harry’s Auto Tire


 Harry’s Auto Tire sells all types of tires, but a popular radial
tire accounts for a large portion of Harry’s overall sales.
 Recognizing that inventory costs can be quite significant with
this product, Harry wishes to determine a policy for managing
this inventory.
 To see what the demand would look like over a period of time,
he wishes to simulate the daily demand for a number of days.

Harry’s Auto Tire


 Step 1: Establishing probability distributions
 One way to establish a probability distribution for a given variable is
to examine historical outcomes.
 Managerial estimates based on judgment and experience can also be
used.
Historical Daily Demand for Radial Tires at Harry’s Auto Tire and Probability Distribution

6
18‐12‐2024

Harry’s Auto Tire


 Step 2: Building a cumulative probability distribution for each
variable
 A cumulative probability is the probability that a variable will be less
than or equal to a particular value.
 A cumulative distribution lists all of the possible values and the
probabilities.
Cumulative Probabilities for Radial Tires

Harry’s Auto Tire


 Step 3: Setting random number intervals
 After we have established a cumulative probability distribution for
each variable included in the simulation, we must assign a set of
numbers to represent each possible value or outcome. These are
referred to as random number intervals.
 Basically, a random number is a series of digits (say, two digits from
01, 02, …, 98, 99, 00) that have been selected by a totally random
process.

7
18‐12‐2024

Harry’s Auto Tire


 Step 3: Setting random number intervals
 If there is a 5% chance that demand for a product (such as Harry’s
radial tires) is 0 units per day, we want 5% of the random numbers
available to correspond to a demand of 0 units. If a total of 100 two-
digit numbers is used in the simulation (think of them as being
numbered chips in a bowl), we could assign a demand of 0 units to
the first five random numbers: 01, 02, 03, 04, and 05.
 Then a simulated demand for 0 units would be created every time
one of the numbers 01 to 05 was drawn.
 If there is also a 10% chance that demand for the same product is 1
unit per day, we could let the next 10 random numbers (06, 07, 08,
09, 10, 11, 12, 13, 14, and 15) represent that demand—and so on for
other demand levels.

Harry’s Auto Tire


 Step 3: Setting random number intervals
 In general, using the cumulative probability distribution computed
and graphed in step 2, we can set the interval of random numbers
for each level of demand in a very simple fashion.
 You will note in Table below that the interval selected to represent
each possible daily demand is very closely related to the cumulative
probability on its left. The top end of each interval is always equal to
the cumulative probability percentage.
Assignment of Random Number Intervals for Harry’s Auto
Tire

8
18‐12‐2024

Harry’s Auto Tire


 Step 4: Generating random numbers
 Random numbers can be generated in several ways.
 Large problems will use computer program to generate the needed
random numbers.
 For small problems, random processes like roulette wheels or pulling
chips from a hat may be used.
 The most common manual method is to use a random number table.
 Everything is random in a random number table so numbers can be
selected from anywhere in the table.

Harry’s Auto Tire


Table of Random Numbers
52 06 50 88 53 30 10 47 99 37
37 63 28 02 74 35 24 03 29 60
82 57 68 28 05 94 03 11 27 79
69 02 36 49 71 99 32 10 75 21
98 94 90 36 06 78 23 67 89 85
96 52 62 87 49 56 59 23 78 71
33 69 27 21 11 60 95 89 68 48
50 33 50 95 13 44 34 62 64 39
88 32 18 50 62 57 34 56 62 31
90 30 36 24 69 82 51 74 30 35

(10 x 10 = 100 random numbers)

9
18‐12‐2024

Harry’s Auto Tire


 Step 5: Simulating the experiment
 Select random numbers from Table.
 The number we select will have a corresponding range in Table
below.
 Use the daily demand that corresponds to the probability range
aligned with the random number.

Harry’s Auto Tire First Column of the Table

Ten-Day Simulation of Demand for Radial Tires


RANDOM SIMULATED DAILY DEMAND
DAY
NUMBER
1 52 3
2 37 3
3 82 4
4 69 4
5 98 5
6 96 5
7 33 2
8 50 3
9 88 5
10 90 5
Blank Blank 39 = total 10-day demand
Blank Blank 3.9 = average daily demand for tires

10
18‐12‐2024

Simulation and Inventory Analysis


 Let’s take an inventory problem with two decision variables
and two probabilistic components.
 The owner of a hardware store would like to establish the
order quantity and reorder point for a particular product that
has probabilistic (uncertain) daily demand and reorder lead
time.

Simulation and Inventory Analysis


 Find a good, low-cost inventory policy for the Ace electric drill
 Simkin identifies two types of variables
 Controllable inputs
 Order quantity
 Reorder points
 Uncontrollable inputs
 Daily demand
 Variable lead time

 Monte Carlo simulation is used to simulate the values for both


of these uncontrollable variables.

11
18‐12‐2024

Simulation and Inventory Analysis


 Daily demand for the Ace model drill is relatively low but subject to some
variability.
 Over the past 300 days, Simkin has observed the sales shown in column 2 of Table
below.
 He converts this historical frequency data into a probability distribution for the
variable daily demand (column 3).
 A cumulative probability distribution is formed in column 4.
 Finally, Simkin establishes an interval of random numbers to represent each possible
daily demand (column 5).

Simulation and Inventory Analysis


 When Simkin places an order to replenish his inventory of Ace electric drills, there
is a delivery lag of 1 to 3 days. This means that lead time can also be considered a
probabilistic variable.
 The number of days it took to receive the past 50 orders is presented in Table
below.
 In a fashion similar to that for the demand variable, Simkin establishes a probability
distribution for the lead time variable (column 3 of Table below), computes the
cumulative distribution (column 4), and assigns random number intervals for each
possible time (column 5).

12
18‐12‐2024

Simulation and Inventory Analysis


 The third step in the simulation
process is to develop the simulation
model. A flow diagram, or flowchart,
is helpful in the logical coding
procedures for programming this
simulation process.
 In flowcharts, special symbols are
used to represent different parts of a
simulation.
 The rectangular boxes represent
actions that must be taken.
 The diamond-shaped figures
represent branching points where the
next step depends on the answer to
the question in the diamond.
 The beginning and ending points of
the simulation are represented as
ovals or rounded rectangles.

Simulation and Inventory Analysis


 The fourth step in the process is to specify the values of the
variables to be tested.
 The first inventory policy that Simkin Hardware wants to simulate is an
order quantity of 10 with a reorder point of 5.
 That is, every time the on-hand inventory level at the end of the day
is 5 or less, Simkin will call his supplier and place an order for 10
more drills. If the lead time is 1 day, by the way, the order will not
arrive the next morning but at the beginning of the following
working day.

13
18‐12‐2024

Simulation and Inventory Analysis


 The fifth step of the simulation process is to actually conduct the
simulation, and the Monte Carlo method is used for this.
 The entire process is simulated for a 10-day period.
 We can assume that the beginning inventory is 10 units on day 1. (Actually, it
makes little difference in a long simulation what the initial inventory level is.
Since we would tend in real life to simulate hundreds or thousands of days,
the beginning values would tend to be averaged out.)
 Random numbers for Simkin’s inventory problem are selected from the
second column of Table below.

Simulation and Inventory Analysis


 Table below is filled in by proceeding one day (or line) at a time, working from left
to right.
 Using the table of random numbers, the simulation is conducted using a four-step
process.
1. Begin each day by checking whether an ordered inventory has arrived (column
2). If it has, increase the current inventory (in column 3) by the quantity
ordered.

14
18‐12‐2024

Simulation and Inventory Analysis


 Table below is filled in by proceeding one day (or line) at a time, working from left
to right.
 Using the table of random numbers, the simulation is conducted using a four-step
process.
2. Generate a daily demand from the demand probability distribution in Table by
selecting a random number. This random number is recorded in column 4. The
demand simulated is recorded in column 5.

Simulation and Inventory Analysis


 Table below is filled in by proceeding one day (or line) at a time, working from left
to right.
 Using the table of random numbers, the simulation is conducted using a four-step
process.
3. Compute the ending inventory every day and record it in column 6. Ending inventory
equals beginning inventory minus demand. If on-hand inventory is insufficient to meet
the day’s demand, satisfy as much as possible and note the number of lost sales (in
column 7).

15
18‐12‐2024

Simulation and Inventory Analysis


 Table below is filled in by proceeding one day (or line) at a time, working from left
to right.
 Using the table of random numbers, the simulation is conducted using a four-step
process.
4. Determine whether the day’s ending inventory has reached the reorder point
(5 units). If it has and if there are no outstanding orders, place an order
(column 8).

Simulation and Inventory Analysis


 Table below is filled in by proceeding one day (or line) at a time, working from left
to right.
 Using the table of random numbers, the simulation is conducted using a four-step
process.
4. Lead time for a new order is simulated by first choosing a random number from Table
and recording it in column 9. (We can continue down the same string of the random
number table that we were using to generate numbers for the demand variable.)

16
18‐12‐2024

Simulation and Inventory Analysis


 Table below is filled in by proceeding one day (or line) at a time, working from left
to right.
 Using the table of random numbers, the simulation is conducted using a four-step
process.
4. Finally, we convert this random number into a lead time by using the
distribution set in Table (lead time table).

Simulation and Inventory Analysis

17
18‐12‐2024

Table of Random Numbers

Simulation and Inventory Analysis

18
18‐12‐2024

Analyzing Simkin’s Inventory Cost


 Now that the simulation results have been generated, Simkin is
ready to proceed to step 6 of this process—examining the
results.
 Since the objective is to find a low-cost solution, Simkin must
determine, given these results, what the costs would be.
 Equations for average daily ending inventory, average lost sales,
and average number of orders placed:

These data are useful in studying the inventory costs of the policy being simulated.

Analyzing Simkin’s Inventory Cost


 Simkin’s store is open 200 days a year
 Estimated ordering cost is $10 per order
 Holding cost is $6 per drill per year
 Lost sales cost $8

Daily order cost = (Cost of placing one order)


×(Number of orders placed per day)
= $10 per order×0.3 order per day = $3
Daily holding cost = (Cost of holding one unit for one day)×
(Average ending inventory)
= $0.03 per unit per day×4.1 units per day
= $0.12

19
18‐12‐2024

Analyzing Simkin’s Inventory Cost


 Simkin’s store is open 200 days a year
 Estimated ordering cost is $10 per order
 Holding cost is $6 per drill per year
 Lost sales cost $8

Daily stockout cost = (Cost per lost sale)


×(Average number of lost sales per day)

= $8 per lost sale×0.2 lost sales per day

= $1.60

Total daily inventory cost = Daily order cost + Daily holding cost
+ Daily stockout cost = $4.72

Analyzing Simkin’s Inventory Cost


 For the year, this policy would cost approximately $944
 This simulation should be extended many more days before
we draw any conclusions as to the cost of the inventory policy
being tested.
 Even after a larger simulation, the model must be verified and
validated to make sure it truly represents the situation on
which it is based
 If we are satisfied with the model, additional simulations can be
conducted using other values for the variables
 After simulating all reasonable combinations, Simkin would
select the policy that results in the lowest total cost

20
18‐12‐2024

Simulation of a Queuing Problem


Port of New Orleans
 Fully loaded barges (flatbottom boats for carrying heavy loads)
arrive at night in New Orleans following their long trips down
the Mississippi River from industrial midwestern cities.
 The number of barges docking on any given night ranges from
0 to 5.
 A study by the dock superintendent reveals that because of
the nature of their cargo, the number of barges unloaded also
tends to vary from day to day.
 Barges are unloaded on a first-in, first-out basis. Any barges
that are not unloaded the day of arrival must wait until the
following day.

Simulation of a Queuing Problem


Port of New Orleans
 Tying up a barge in dock is an expensive proposition, and the
superintendent cannot ignore the angry phone calls from
barge line owners reminding him that “Time is money!”
 He decides that before going to the Port of New Orleans’s
controller to request additional unloading crews, a simulation
study of arrivals, unloadings, and delays should be conducted.
 A 100-day simulation would be ideal, but for purposes of
illustration, the superintendent begins with a shorter 15-day
analysis.
 The dock superintendent wants to do a simulation study to enable
him to make better staffing decisions.

21
18‐12‐2024

Simulation of a Queuing Problem


Port of New Orleans

Overnight Barge Arrival Rates and Random Number Intervals

Simulation of a Queuing Problem


Port of New Orleans

Unloading Rates and Random Number Intervals

22
18‐12‐2024

Table of Random Numbers


Daily
Arrival
Daily
Unloading

Simulation of a Queuing Problem


Port of New Orleans
Queuing Simulation of Port of New Orleans Barge Unloadings
(1) (2) (3) (4) (5) (6) (7)
DAY NUMBER DELAYED RANDOM NUMBER OF TOTAL TO BE RANDOM NUMBER
FROM PREVIOUS NUMBER NIGHTLY UNLOADED NUMBER UNLOADED
DAY ARRIVALS
1 — 52 3 3 37 3
2 0 06 0 0 63 0
3 0 50 3 3 28 3
4 0 88 4 4 02 1
5 3 53 3 6 74 4
6 2 30 1 3 35 3
7 0 10 0 0 24 0
8 0 47 3 3 03 1
9 2 99 5 7 29 3
10 4 37 2 6 60 3
11 3 66 3 6 74 4
12 2 91 5 7 85 4
13 3 35 2 5 90 4
14 1 32 2 3 73 3
15 0 00 5 5 59 3
20 Blank 41 Blank Blank 39
Total delays Blank Total arrivals Blank Blank Total
unloadings

23
18‐12‐2024

Simulation of a Queuing Problem


Port of New Orleans
 Three important pieces of information

Simulation of a Queuing Problem


Port of New Orleans
 When these data are analyzed in the context of delay costs,
idle labor costs, and the cost of hiring extra unloading crews, it
will be possible for the dock superintendent and port
controller to make a better staffing decision.
 They may even elect to re-simulate the process assuming
different unloading rates that would correspond to increased
crew sizes.
 Although simulation is a tool that cannot guarantee an optimal
solution to problems such as this, it can be helpful in recreating
a process and identifying good decision alternatives.

24
18‐12‐2024

Simulation (Problem: 13-21)


 Dumoor Appliance Center sells and services several brands of
major appliances. Past sales for a particular model of
refrigerator have resulted in the following probability
distribution for demand:

 The lead time, in weeks, is described by the following


distribution:

Simulation (Problem: 13-21)


 Based on cost considerations as well as storage space, the
company has decided to order 10 of these each time an order
is placed. The holding cost is $1 per week for each unit that is
left in inventory at the end of the week. The stockout cost has
been set at $40 per stockout.
 The company has decided to place an order whenever there
are only 2 refrigerators left at the end of the week. Simulate
10 weeks of operation for Dumoor Appliance, assuming there
are currently 5 units in inventory.
 Determine what weekly stockout cost and weekly holding cost
would be for the problem.

25
18‐12‐2024

Simulation (Problem: 13-21)


INTERVAL OF
Weekly CUMULATIVE RANDOM
DEMAND PROBABILITY PROBABILITY NUMBERS
0 0.20 0.20 01 to 20
1 0.40 0.60 21 to 60
2 0.20 0.80 61 to 80
3 0.15 0.95 81 to 95
4 0.05 1.00 96 to 00

PROBABILITY RANDOM
LEAD TIME CUMULATIVE NUMBER
(Weeks) PROBABILITY INTERVAL
1 0.15 0.15 01 to 15
2 0.35 0.50 16 to 50
3 0.50 1.00 51 to 00

Simulation (Problem: 13-21)


Table of Random Numbers

Weekly Lead
Demand Time

26
18‐12‐2024

Simulation (Problem: 13-21)


ORDER QUANTITY = 10 UNITS REORDER POINT = 2 UNITS
(2) (3) (4) (6) (7) (9) (10)
(1) (5) (8)
UNITS BEGINNING RANDOM ENDING LOST RANDOM LEAD
DAY DEMAND ORDER
RECEIVED INVENTORY NUMBER INVENTORY SALES NUMBER TIME
1 --- 5 52 1 4 0 No Blank Blank
2 --- 4 37 1 3 0 No
3 --- 3 82 3 0 0 Yes 06 1
4 --- 0 69 2 0 2
5 10 10 98 4 6 0 No
6 --- 6 96 4 2 0 Yes 63 3
7 --- 2 33 1 1 0 No
8 --- 1 50 1 0 0 No
9 --- 0 88 3 0 3 No
10 10 10 90 3 7 0 No
Blank Blank Blank Blank Total 23 5 5 Blank Blank

The total stock out cost = 5($40) = $200.


The total holding cost = 23($1) = $23.
The total cost is $223 with a reorder point of 2.

Simulation (Problem: 13-22)


 Repeat the simulation in Problem 13.21, assuming that the
reorder point is 4 units rather than 2. Compare the costs for
these two situations.

27
18‐12‐2024

Simulation (Problem: 13-22)


ORDER QUANTITY = 10 UNITS REORDER POINT = 4 UNITS
(2) (3) (4) (6) (7) (9) (10)
(1) (5) (8)
UNITS BEGINNING RANDOM ENDING LOST RANDOM LEAD
DAY DEMAND ORDER
RECEIVED INVENTORY NUMBER INVENTORY SALES NUMBER TIME
1 --- 5 52 1 4 0 Yes B 06nk 11k
2 --- 4 37 1 3 0 No
3 10 13 82 3 10 0 No
4 --- 10 69 2 8 0 No
5 --- 8 98 4 4 0 Yes B 63nk 13k
6 --- 4 96 4 0 0 No
7 --- 0 33 1 0 1 No
8 --- 0 50 1 0 1 No
9 10 10 88 3 7 0 No
10 --- 7 90 3 4 0 Yes 57 3
Blank Blank Blank Blank Total 40 2 5 Blank Blank

The total stock out cost = 2($40) = $80.


The total holding cost = 40($1) = $40.
The total cost is $120 with a reorder point of 4 and $223 with a reorder point of 2.

28

You might also like