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

Topic 04

Simulation Modeling
IIMT3636
2022/23 Semester I
The University of Hong Kong
Instructor: Dr. Liao WANG
2

Introduction
• In practice, we often make decisions under risk for very
complicated problems.
▫ Too many random variables involved
▫ Too many or even infinitely many possible states
▫ Objective functions are highly nonlinear
▫ Cannot be explicitly solved

• Use computer to duplicate the features, appearance, and


characteristics of a real system, and learn the outcome of
a decision.
3

Physical vs. Computer Simulation


4

Monte Carlo Simulation


• Monte Carlo methods rely on repeated random sampling
to obtain numerical results.
What is the probability of
hitting the shaded area?
5

Monte Carlo Simulation


• Mathematically, if the objective function 𝑉 𝑋, 𝐷
depends on the value of a random variable 𝑋 and a
decision 𝐷, then the expected objective value given 𝐷 can
be approximated by drawing a value of 𝑋 independently
𝑁 times and computing the average:
𝑁
1
෍ 𝑉 𝑋𝑖 , 𝐷
𝑁
𝑖=1
• Then we can try different 𝐷 to maximize or minimize the
objective.
6

Harry’s Auto Tire


• Harry’s Auto Tire sells a popular radial tire and replenish
its inventory every 10 days. If the daily demand
independently follows the distribution shown in the
table below and the initial inventory level is 40 units,
what is the expected sales in a 10-day period?

Daily Demand 0 1 2 3 4 5
Probability 0.05 0.10 0.20 0.30 0.20 0.15
7

Harry’s Auto Tire


• Generate 10 random numbers for the daily demand
▫ 3, 1, 4, 0, 4, 2, 3, 2, 5, 3
• Compute the total demand and sales
▫ 10-day total demand = 27
▫ Sales = min(total demand, 40) = 27
• Repeat this procedure 50 times and get 50 sales
numbers
▫ 27, 35, 20, 40, 32, 15, 28, 35, 40, 33, 38, 25, 19, 26, 31, 36, 20, 40,
34, 33, 38, 25, 19, 26, 35, 20, 40, 32, 15, 33, 38, 25, 19, 26, 31, 36,
20, 40, 26, 35, 20, 32, 15, 28, 35, 25, 19, 26, 35, 20.
• Compute the average sales
8

Generating a Random Number

• The cumulative probability distribution 𝐹 𝑋

1
𝐹 𝑋𝑖

Follows
uniform 𝐹 𝑋
distribution
on [0, 1] 𝑋
0
𝑋𝑖

• We can generate a random 𝑋 by generating an 𝐹 𝑋 from a uniform


distribution on [0, 1] and mapping it to 𝑋.
9

Generating a Random Number


• Solve the following equation:
𝐹 ? =𝑈
• Equivalently,
? = 𝐹 −1 (𝑈)
• F is the distribution function of the random variable to be
generated.
• F is known. For some distributions (e.g. Uniform,
Exponential, etc.), the expression of F is known. For others
(e.g. Normal), its values are stored in a table.
• U ~ Uniform(0,1), and a realization can be obtained by
calling RAND() in Excel (or by hand by picking from a table of
random numbers).
• With this realization of U, we find the ? above by
(i) mathematical derivation, if F has nice expression which
makes the derivation of 𝐹 −1 simple. Or,
(ii) look up for ? in the table of F.
10

Generating a Random Number


• For continuous random variables
▫ Step 1: derive the inverse function of 𝑌 = 𝐹 𝑋
▫ E.g., for exponential distribution with parameter 𝜆, the
cumulative distribution function (CDF) is 𝑌 = 𝐹 𝑋 = 1 − 𝑒 −𝜆𝑋
and the inverse CDF is 𝑋 = 𝐹 −1 𝑌 = −𝜆−1 ∙ ln 1 − 𝑌 .
▫ Step 2: generate a random probability (i.e., a random number
uniformly from [0,1]) and assign it to 𝑌 to get 𝑋.

• Generating a continuous random number in Excel:


▫ Normal distribution: NORM.INV(probability, mean, st_dev)
▫ Standard Normal distribution: NORM.S.INV(probability)
▫ Uniform distribution on [0, 1]: RAND()
11

Generating a Random Number


• For discrete random variables
▫ Step 1: Build a cumulative distribution table with 𝑋𝑖 < 𝑋𝑖+1 .
▫ Step 2: Assign the interval (0, 𝐹 𝑋1 ] to 𝑋1 and (𝐹 𝑋𝑖−1 , 𝐹 𝑋𝑖 ] to
𝑋𝑖 from 𝑖 = 2.
▫ Step 3: generate a random probability and find the corresponding
𝑋 value.

• Generating a discrete random number in Excel:


▫ Binomial distribution: BINOM.INV(n, p_s, probability)
▫ An arbitrary distribution: VLOOKUP(probability, distribution
table, column index for the return value)
12

Harry’s Auto Tire


13

Harry’s Auto Tire


The VLOOKUP function
looks up the random
number in the leftmost
column of the defined
lookup table. It moves
downward through this
column until it finds a
cell that is equal to or
bigger than the random
number. It then goes to
the previous row and
gets the value from the
specified column.
14

Using the 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
15

In-Class Exercise
• If we only have a table of random numbers and a z-table, how to
simulate the price of a stock, for which the daily return rate follows a
normal distribution with a mean of 10% and a standard deviation of
5%?

• Suppose the number of patient arrivals at an emergency department


in every 30 minutes follows the distribution: Pr{N=0} = 0.25;
Pr{N=1}=0.5; Pr{N=2}=0.25. How to simulate the number of
patient arrivals in an hour using one fair coin?
16

A Digital Option
• A digital option works on some stock (e.g. AAPL, IBM,
etc.) or some stock index (e.g. S&P500)
• Suppose its life time is 1 year: one year from now, it
expires.
• On the expiry date, we look at the stock price. If it
exceeds a pre-determined level, $280, called “strike”, the
option pays out $1; otherwise, it pays nothing (and
expires worthless).
• Today, we buy this option for $0.37. The current stock
price is $267, and its annual return follows
𝑁 10%, 15% .
• What is the expected net payoff from this investment?
17

A Digital Option
Strike = $280, option price = $0.37, current stock price =
$267. Stock return follows Normal distribution with mean
10% and std 15%.

• S1 = $267*(1 + r), r ~ N(10%, 15%)


• Option payoff: if S1 > $280, payoff is $1; otherwise
payoff is $0.
• Net investment payoff: if S1 > $280, net payoff is $(1-
0.37); otherwise, net payoff is $(0-0.37).

• The only random number is the return, which we need


to generate.
• Generate U by calling RAND() first; then call
NORM.INV(U, 10%, 15%).
18

A Digital Option
19

Simulation and Inventory Analysis


• In many real-world situations, demand and inventory
replenishment lead time are random variables.
• The two often-made decisions in inventory management
are order quantity and reorder point for a product.
20

Simkin’s Hardware Store


• The owner of a hardware store wants to find a good, low
cost inventory policy for an electric drill (Ace Model).
• Simkin identifies two types of variables, controllable and
uncontrollable inputs.
• The controllable inputs are the order quantity and
reorder points.
• The uncontrollable inputs are daily demand and reorder
lead time.
21

Simkin’s Hardware Store


DEMAND FOR FREQUENCY CUMULATIVE INTERVAL OF
ACE DRILL (DAYS) PROBABILITY PROBABILITY RANDOM NUMBERS
0 15 0.05 0.05 01 to 05
1 30 0.10 0.15 06 to 15
2 60 0.20 0.35 16 to 35
3 120 0.40 0.75 36 to 75
4 45 0.15 0.90 76 to 90
5 30 0.10 1.00 91 to 00
300 1.00

LEAD TIME FREQUENCY CUMULATIVE RANDOM NUMBER


(DAYS) (ORDERS) PROBABILITY PROBABILITY INTERVAL
1 10 0.20 0.20 01 to 20
2 25 0.50 0.70 21 to 70
3 15 0.30 1.00 71 to 00
50 1.00
22

Simkin’s Hardware Store


Inventory Level

𝐷1
𝐷2
𝐷3 Order
Quantity ROP

𝐷4 Order
Quantity
𝐷5
𝐷6 Time
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (Day)

Lead Lead
Time Time
23

Start

Begin day
of simulation

Simkin’s Hardware Has


order
arrived?
Yes Increase beginning
inventory by
quantity ordered
No
• When developing a Select random number
to generate today’s

simulation model, a flow demand

diagram, or flowchart, is Is
demand greater Yes Record
number of
helpful in the logical than beginning
inventory lost sales
?
coding procedures. No
Compute ending inventory Record ending
= Beginning inventory inventory = 0
– Demand

Is Has
ending inventory Yes order been No Place
less than reorder placed that hasn’t order
point? arrived yet
No Have Yes ? Select random
No enough days number to
of this order policy generate lead
been simulated time
?
Yes
Compute average ending inventory,
average lost sales, average number of End
orders placed, and corresponding costs
24

Simkin’s Hardware Store


• The policy Simkin wants to test is an order quantity of 10 with a
reorder point of 5.
For details, please refer to
• The process is simulated for a 10-day period. Topic04_Simulation.xlsx

UNITS BEGINNING RANDOM ENDING LOST RANDOM LEAD


DAY RECEIVED INVENTORY NUMBER DEMAND INVENTORY SALES ORDER NUMBER TIME
1 … 10 06 1 9 0 No
2 0 9 63 3 6 0 No
3 0 6 57 3 3 0 Yes 02 1
4 0 3 94 5 0 2 No 0
5 10 10 52 3 7 0 No
6 0 7 69 3 4 0 Yes 33 2
7 0 4 32 2 2 0 No 1
8 0 2 30 2 0 0 No 0
9 10 10 48 3 7 0 No
10 0 7 88 4 3 0 Yes 14 1
Total 41 2
25

Simkin’s Hardware Store


• The objective is to find a low-cost solution so Simkin must
determine the costs associated with carrying inventory, lost sales,
and ordering cost.
• Equations for average daily ending inventory, average lost sales, and
average number of orders placed:
Average 41 total units
ending = = 4.1 units per day
inventory 10 days

Average lost = 2 sales lost = 0.2 unit per day


sales 10 days

Average number of = 3 orders = 0.3 order per day


orders placed 10 days
26

Simkin’s Hardware Store


• 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 = $10 per order x 0.3 order per day = $3
Daily holding cost = $0.03 per unit per day x 4.1 units per day = $0.12

Daily stockout cost = $8 per lost sale x 0.2 lost sales per day = $1.60
Total daily
inventory cost = Daily order cost + Daily holding cost
+ Daily stockout cost = $4.72
27

Simkin’s Hardware Store


• For a year, this policy would cost approximately $944.
• Simulation should really be extended for many more days.
• 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. It is EASY to make mistakes!
• If we are satisfied with the model, additional simulations can
be conducted using other values for the decision variables.
• After simulating all reasonable combinations, Simkin would
select the policy that results in the lowest total cost.
28

Café du Donut
• The Cafébuys donuts each day for $40 per carton of 20 dozen
donuts. Any cartons not sold are thrown away at the end of
the day. If a carton is sold, the total revenue is $60.

DAILY SALES PROBABILITY CUMULATIVE


(CARTONS) PROBABILITY
• The original plan 4 0.05 0.05
is to order 6 5 0.15 0.2
cartons per day. 6 0.15 0.35

Should the Café 7 0.20 0.55


8 0.25 0.8
increase the
9 0.10 0.9
order size to 7?
10 0.10 1.0
Total 1.00
29

Café du Donut
• What are the average profits of ordering 6 and 7 cartons per day,
respectively?
6 Cartons Per Day 7 Cartons Per Day
DAILY SALES PROBABILITY CUMULATIVE
Day R.N. Demand Sales Volume Profit Sales Volume Profit
(CARTONS) PROBABILITY
1 0.29 6 6 $120 6 $80
4 0.05 0.05
2 0.32 6 6 $120 6 $80
5 0.15 0.2
3 0.56 8 6 $120 7 $140
4 0.72 8 6 6 0.15 $120 0.35 7 $140
5 0.82 9 7 6 0.20 $120 0.55 7 $140
… … … 8 … 0.25 … 0.8 … …
97 0.10 5 9 5 0.10 $60 0.9 5 $20
98 0.04 4 10 4 0.10 $0 1.0 4 $(40)
99 0.36 7 6
Total 1.00 $120 7 $140
100 0.64 8 6 $120 7 $140
Average: 5.75 $105 6.41 $104.6
30

Simulation of Queuing Problems


• Modeling waiting lines is an important application of
simulation.
• The assumptions of queuing models are restrictive.
• Sometimes simulation is the only approach that fits.
31

Port of New Orleans


• Fully loaded barges arrive at night for unloading
• The number of barges each night varies from 0 - 5
• The number of barges vary from day to day
• Barges are unloaded first-in, first-out
• The unloading rate also varies from day to day
• Barges must wait for unloading, which is expensive
• The dock manager wants to do a simulation study to enable him to
make better staffing decisions
32

Port of New Orleans


NUMBER OF CUMULATIVE RANDOM
ARRIVALS PROBABILITY PROBABILITY NUMBER INTERVAL
0 0.13 0.13 01 to 13
1 0.17 0.30 14 to 30
2 0.15 0.45 31 to 45
3 0.25 0.70 46 to 70
4 0.20 0.90 71 to 90
5 0.10 1.00 91 to 00

DAILY UNLOADING CUMULATIVE RANDOM


RATE PROBABILITY PROBABILITY NUMBER INTERVAL
1 0.05 0.05 01 to 05
2 0.15 0.20 06 to 20
3 0.50 0.70 21 to 70
4 0.20 0.90 71 to 90
5 0.10 1.00 91 to 00
33

Port of New Orleans


NUMBER DELAYED RANDOM NUMBER OF TOTAL TO BE RANDOM NUMBER
DAY FROM PREVIOUS DAY NUMBER NIGHTLY ARRIVALS UNLOADED NUMBER UNLOADED
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 41 39
Total delays Total arrivals Total unloadings
34

Port of New Orleans


• What if there are another unloading team working in parallel?

NUMBER OF TOTAL TO RANDOM RANDOM TOTAL CAN


NUMBER DELAYED RANDOM NIGHTLY BE NUMBER NUMBER BE NUMBER
DAY FROM PREVIOUS DAY NUMBER ARRIVALS UNLOADED FOR TEAM 1 FOR TEAM 2 UNLOADED UNLOADED
1 — … … … … … … …
35

Port of New Orleans


• What if all the barges have to be loaded again by a loading team
before leaving the port?

NUMBER NUMBER
DELAYED RANDOM DELAYED RANDOM
FROM NUMBER OF TOTAL TO NUMBER FROM TOTAL TO NUMBER
PREVIOUS RANDOM NIGHTLY BE FOR TEAM NUMBER PREVIOUS BE FOR TEAM NUMBER
DAY DAY NUMBER ARRIVALS UNLOADED 1 UNLOADED DAY RELOADED 2 RELOADED
1 — … … … … … … … …
36

Arnold’s Muffler Shop


• Arnold’s mechanic, Reid Blank, can install mufflers at an
average rate of around 3 cars per hour. His hourly salary
is $15.
• Customers arrive at an average rate of around 2 per
hour.
• The cost of a customer’s waiting time is $50 per hour.
• Arnold is thinking about improving the service by
replacing Reid with another more efficient mechanic.
• One candidate is Jimmy Smith. He can install the
mufflers at an average rate of around 4 cars per hour.
But he demands an hourly salary at $20.

• Should Arnold replace Reid by Jimmy?


37

Arnold’s Muffler Shop


NUMBER OF CAR ARRIVALS PROBABILITY CUMULATIVE PROBABILITY RANDOM NUMBER INTERVAL
0 0.14 0.14 01 to 14
1 0.27 0.41 15 to 41
2 0.27 0.68 41 to 68
3 0.18 0.86 69 to 86
4 0.1 0.96 87 to 96
5 0.03 0.99 97 to 99
6 0.01 1 99 to 00
REID BLANK'S SERVICE RATE PROBABILITY CUMULATIVE PROBABILITY RANDOM NUMBER INTERVAL
0 0.05 0.05 01 to 5
1 0.15 0.2 6 to 20
2 0.2 0.4 21 to 40
3 0.26 0.66 41 to 66
4 0.17 0.83 67 to 83
5 0.12 0.95 84 to 95
6 0.05 1 96 to 00

JIMMY SMITH'S SERVICE RATE PROBABILITY CUMULATIVE PROBABILITY RANDOM NUMBER INTERVAL
0 0.02 0.02 01 to 2
1 0.05 0.1 3 to 10
2 0.1 0.2 11 to 20
3 0.2 0.4 21 to 40
4 0.26 0.66 41 to 66
5 0.2 0.89 67 to 89
6 0.17 1 90 to 00
38

Arnold’s Muffler Shop


Simulation for Reid
HOURLY TOTAL TO BE
HOUR WAITING CUSTOMERS RANDOM NUMBER ARRIVALS SERVED RANDOM NUMBER NUMBER SERVED

1 0 20 1 1 88 1
2 0 98 5 5 80 4
3 1 41 2 3 1 0
4 3 25 1 4 56 3
5 1 60 2 3 36 2
6 1 45 2 3 42 3
7 0 61 2 2 25 2
8 0 55 2 2 21 2
9 0 40 1 1 37 1
10 0 19 1 1 27 1
11 0 11 0 0 26 0
12 0 74 3 3 85 3
13 0 12 0 0 35 0
14 0 37 1 1 82 1
15 0 31 1 1 21 1
16 0 22 1 1 46 1
Average 0.375
Reid's Average 0.375*50 + 15
Cost =33.75
39

Arnold’s Muffler Shop


Simulation for
Jimmy
RANDOM RANDOM
HOUR WAITING CUSTOMERS NUMBER HOURLY ARRIVALS TOTAL TO BE SERVED NUMBER NUMBER SERVED
1 0 15 1 1 86 1
2 0 92 4 4 89 4
3 0 55 2 2 34 2
4 0 43 2 2 43 2
5 0 97 5 5 52 4
6 1 42 2 3 74 3
7 0 37 1 1 39 1
8 0 76 3 3 51 3
9 0 88 4 4 43 4
10 0 17 1 1 48 1
11 0 61 2 2 61 2
12 0 5 0 0 72 0
13 0 78 3 3 63 3
14 0 57 2 2 26 2
15 0 35 1 1 35 1
16 0 69 3 3 60 3
Average 0.0625
Jimmy's 0.0625*50
Average Cost +20=23.125
40

Simulating a Maintenance Policy


• A maintenance system is equivalent to a queuing system
with limited queue size and time-varying arrival rate.

Failed Machines
Server

Failure Repaired

Working Machines
41

Three Hills Power Company


• Three Hills provides power to a large city through a
series of almost 200 electric generators
• The company is concerned about generator failures
because a breakdown costs about $75 per generator per
hour
• There is repairperson onsite at any time and the hourly
wage is $30
• Management wants to evaluate the
▫ Service maintenance cost
▫ Simulated machine breakdown cost
▫ Total cost
42

Three Hills Power Company


• There are two important maintenance system
components.
• Time between successive generator breakdowns which
varies from 30 minutes to three hours.
▫ This variable depends on the number of working generators.
▫ It is recorded for a varying number of working generators. In the
long run, it approximates the time between breakdowns for the
average number of working generators.
▫ In a long-run simulation, we can use it independently.
• The time it takes to repair the generators which ranges
from one to three hours in one hour blocks.
43

Three Hills Power Company


TIME BETWEEN CUMULATIVE R.N.
FAILURES (HRS) FREQUENCY PROBABILITY PROBABILITY INTERVAL
0.5 5 0.05 0.05 01 to 05
1.0 6 0.06 0.11 06 to 11
1.5 16 0.16 0.27 12 to 27
2.0 33 0.33 0.60 28 to 60
2.5 21 0.21 0.81 61 to 81
3.0 19 0.19 1.00 82 to 00
Total 100 1.00

REPAIR TIME CUMULATIVE


REQUIRED (HRS) FREQUENCY PROBABILITY PROBABILITY R.N. INTERVAL
1 28 0.28 0.28 01 to 28
2 52 0.52 0.80 29 to 80
3 20 0.20 1.00 81 to 00
Total 100 1.00
44
Start

Generate random number for “Time


Between Breakdowns”

Record actual clock time of breakdown

Examine time previous repair ends

• This approach focuses


Is
repairperson free No Wait until previous on the critical time
repair is completed
to begin repair?
points of each
Yes breakdown (or arrival).
Generate random number for repair
time required
• Recall that for the Port
Compute time repair completed of New Orleans, the
simulation focuses on
Compute hours of machine downtime
= Time repair completed – Clock time
the events in each time
of breakdown period.

No Enough
breakdowns
simulated?

Yes
Compute downtime and comparative End
costs data
45

The estimated
breakdown cost of
the system is
Three Hills Power Company $75*44/(10+24)=$97
per hour
TIME REPAIR- NUMBER OF
TIME PERSON IS FREE R.N. FOR REPAIR TIME HOURS
BREAKDOWN R.N. FOR BETWEEN TIME OF TO BEGIN THIS REPAIR TIME REPAIR MACHINE
NUMBER BREAKDOWNS BREAKDOWNS BREAKDOWN REPAIR TIME REQUIRED ENDS DOWN
1 57 2 02:00 02:00 07 1 03:00 1
2 17 1.5 03:30 03:30 60 2 05:30 2
3 36 2 05:30 05:30 77 2 07:30 2
4 72 2.5 08:00 08:00 49 2 10:00 2
5 85 3 11:00 11:00 76 2 13:00 2
6 31 2 13:00 13:00 95 3 16:00 3
7 44 2 15:00 16:00 51 2 18:00 3
8 30 2 17:00 18:00 16 1 19:00 2
9 26 1.5 18:30 19:00 14 1 20:00 1.5
10 09 1 19:30 20:00 85 3 23:00 3.5
11 49 2 21:30 23:00 59 2 01:00 3.5
12 13 1.5 23:00 01:00 85 3 04:00 5
13 33 2 01:00 04:00 40 2 06:00 5
14 89 3 04:00 06:00 42 2 08:00 4
15 13 1.5 05:30 08:00 52 2 10:00 4.5
Total 44
46

Simulating Contract Bidding


• Companies do not know what their competitors will bid
• Use simulation to determine the optimal bid
47

Simulate Triangular Distribution


• How to use the rand() function in Excel to simulate a
triangular distribution with three parameters a, b, and c?
• CDF:
𝑥−𝑎 2 𝑏−𝑎
• F 𝑥 = ∈ [0, ], for a≤𝑥≤𝑏
(𝑏−𝑎)(𝑐−𝑎) 𝑐−𝑎
𝑐−𝑥 2 𝑏−𝑎
• F 𝑥 = 1− ∈ ,0 , for 𝑏 ≤ 𝑥 ≤ 𝑐
𝑐−𝑎 𝑐−𝑏 𝑐−𝑎
• Step 1: generate a uniform random variable U
• Step 2: solve F(?) = U; output ?

• Easier way: (accept as a fact)


• Step 1: generate two independent uniform random variables,
U,V
• Step 2: output:
𝑎 + 𝑐 − 𝑎 ∗ 1 − 𝑏−𝑎 𝑐−𝑎 ∗ min 𝑈, 𝑉 + 𝑏−𝑎
𝑐−𝑎 ∗ max 𝑈, 𝑉
48

Miller Construction Company


• The Miller Construction Company must decide whether to make a
bid on a construction project. Miller believes it will cost the
company $10,000 to complete the project (if it wins the contract),
and it will cost $350 to prepare a bid.
• However, there is uncertainty about each of these.
• Upon further reflection, Miller assesses that the cost to complete the
project has a triangular distribution with minimum, most likely, and
maximum values $9,000, $10,000, and $15,000.
• Similarly, Miller assesses that the cost to prepare a bid has a
triangular distribution with parameters $300, $350, and $500.
49

Miller Construction Company


• Four potential competitors are going to bid against Miller. The
lowest bid wins the contract, and the winner is then given the
winning bid amount to complete the project.
• Based on past history, Miller believes that each potential competitor
will bid, independently, with probability 0.5.
• In addition, each competitor’s bid will be a multiple of its own most
likely cost to complete the project, where this multiple has a
triangular distribution with parameters 0.9, 1.3, and 1.8,
respectively.
• If Miller decides to prepare a bid, its bid will be a multiple of $500
in the range from $10,500 to $15,000.
50

Miller Construction Company


Simulate Bidding Cost & Simulate the Bidding
Project Cost Decisions for Competitors

Calculate the Lowest Bid


Simulate the Bid Value for
from Participating
Each Competitor
Competitors

Profit = 0 – Bidding Cost


Check If No
Bidding
Wins Yes Profit = Bid Value – Project Cost –
Bidding Cost
51

Miller Construction Company


• Simulating bidding cost
▫ Let U and V be two independent uniform RV on [0,1]
▫ 𝐶𝑏𝑖𝑑 = 300 + 500 − 300 ∗ 1 − 350−300
500−300
∗ min 𝑈, 𝑉 + 350−300
500−300
∗ max 𝑈, 𝑉
• Simulating competitor i’s bid
▫ Let U and V be two independent uniform RV on [0,1]
1.3−0.9
▫ 𝐵𝑖 = 10000 ∗ ቄ0.9 + 1.8 − 0.9 ∗ ቂ 1 − 1.3−0.9
1.8−0.9
∗ min 𝑈, 𝑉 + 1.8−0.9 ∗
max 𝑈, 𝑉 ቃቅ
• Simulating project cost
▫ Let U and V be two independent uniform RV on [0,1]
▫ 𝐶𝑝𝑟𝑜𝑗𝑒𝑐𝑡 = 9000 + 15000 − 9000 ∗ ൣ 1 − 10000−9000
15000−9000
∗ min 𝑈, 𝑉 +
10000−9000
15000−9000
∗ max 𝑈, 𝑉 ൧
52

Miller Construction Company


• Use Excel data table to check the expected profit for
different bidding values.

Expected Profit Histogram of Profit with $13,500 Bid


400 400

200 350
300
0

Frequency
250
10000 11000 12000 13000 14000 15000
-200 200
-400 150
100
-600
50
-800
0
-1000 -500 0 500 1000 1500 2000 2500 More
Profit ($)
-1200
53

More Applications …
• Simulation and Financial Planning
▫ Cash flows, stock prices, etc.
• Simulation and Marketing
▫ Customer retention, market share evolution, etc.
• Simulation and Sports
▫ Basketball, baseball, etc.
• Simulation and Artificial Intelligence
▫ AlphaGo (Monte Carlo Tree Search)
54

Verification and Validation


• It is important that a simulation model be checked to see
that it is working properly and providing good
representation of the real world situation
• Verification process involves determining that the
computer model is internally consistent and following
the logic of the conceptual model
▫ Verification answers the question “Did we build the model right?”
• Validation is the process of comparing a simulation
model to the real system it represents to make sure it is
accurate
▫ Validation answers the question “Did we build the right model?”

You might also like