Professional Documents
Culture Documents
SIMULATION
HOMEWORK 2 CHAPTER 1
BASIC CONCEPTS OF SIMULATION
1. Consider the following continuously operating job shop. Interarrival times of jobs are
distributed as follows:
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.
We start taking the random number on customer #3 because when the simulation begins, there
are already two jobs, so we assume that customer #1 and customer #2 are in the system with the
given information.
Name: Jose Alejandro Bastidas B.
Processing Time
𝜇 = 50 𝑚𝑖𝑛𝑢𝑡𝑒𝑠 ; 𝜎 = 8 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
So, using the equation: and the table of normal random numbers, we have:
Normal Random
Customer x
Number
3 -1,26 40
4 1,92 65
5 2,55 70
6 -0,21 48
7 0,6 55
8 1,76 64
9 -1,13 41
10 -1,68 37
Simulation Table
Time
Time Waiting Time
Interarrival Arrival Service Customer Idle Time
Customer(i) Service Time in Service
Time Time Time spends in of Server
begins Queue ends
the system
1 0 0 25 0 0 25 25 0
2 0 0 50 25 25 75 75 0
3 60 60 40 75 15 115 55 0
4 120 180 65 180 0 245 65 65
5 0 180 70 245 65 316 136 0
6 120 300 48 316 16 364 64 0
7 0 300 55 364 64 419 119 0
8 60 360 64 419 59 483 123 0
9 60 420 41 483 63 524 104 0
10 60 480 37 524 44 560 80 0
Sum -> 495 351 136
Maximum
Time
(a) What was the average time in the queue for the 10 new jobs?
(b) What was the average processing time of the 10 new jobs?
(c) What was the maximum time in the system for the 10 new jobs?
2. 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?
Yes, we must use the same random numbers to perform the simulation because we can compare
which is the best case or the one that give us more profit in the same conditions.
Name: Jose Alejandro Bastidas B.
Note: Red for Random Demand and Blue for Random Days
Name: Jose Alejandro Bastidas B.
60 Newspapers
Lost profit
Type Salvage from
Random Random Revenue Newspaper Excess from Daily
Day of Demand sale returned
Number Demand for sales Cost Demand excess gain
days papers
demand
Lost profit
Type Salvage from
Random Random Revenue Newspaper Excess from Daily
Day of Demand sale returned
Number Demand for sales Cost Demand excess gain
days papers
demand
Lost profit
Type Salvage from
Random Random Revenue Newspaper Excess from Daily
Day of Demand sale returned
Number Demand for sales Cost Demand excess gain
days papers
demand
As it’s shown in the different tables for each newspaper, you get more profit when you buy 60
newspapers daily.
Name: Jose Alejandro Bastidas B.
3. 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:
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.
Service
Cumulative Random
Time Probability
Probability digits
(min)
5 0,12 0,12 01-12
15 0,35 0,47 13-47
25 0,43 0,9 48-90
35 0,06 0,96 91-96
45 0,04 1 97-00
Name: Jose Alejandro Bastidas B.
Note: Red for Service Time and Blue for Interarrival Time
Name: Jose Alejandro Bastidas B.
Simulation Two-Driver
Value of C Probability
10 0.10
20 0.25
30 0.50
40 0.15
D = ( A − 25B ) / (2C )
Use a sample of size 30. Prepare a histogram of the resulting values, using class intervals
of width equal to 3
Data of A:
𝜇 = 100 ; 𝜎 = 20
Histograma de Frecuencias
25
20
15
10
0
[-0.54 , 2.46 ) [2.46 , 5.46) [5.46 , 8.46)
5. 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.
Shortage Average
Initial Final Inventory # Random Supply
Week Day Demand of Sales
Inventory Inventory Order Reposition Time
inventory Number
1 1 18 7 11 1,5
2 11 6 5 15 28 1
3 5 4 2 0
4 2 5 15 3
5 15 4 11 0
2 1 11 4 7 13 77 4 4
2 7 8 0 1 3
3 0 8 0 8 2
4 0 3 0 3 1
5 0 4 0 4 0
Name: Jose Alejandro Bastidas B.
6. 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:
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?