Top Banner
2007 Pearson Education Simulation Supplement B
26

Simulation

Nov 01, 2014

Download

Documents

engr_amir

Simulation in Project
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Simulation

© 2007 Pearson Education

Simulation

Supplement B

Page 2: Simulation

© 2007 Pearson Education

Simulation

• Simulation: The act of reproducing the behavior of a system using a model that describes the processes of the system.

• Time Compression: The feature of simulations that allows them to obtain operating characteristic estimates in much less time than is required to gather the same operating data from a real system.

• Monte Carlo simulation: A simulation process that uses random numbers to generate simulation events.

Page 3: Simulation

© 2007 Pearson Education

• Specialty Steel Products Company produces items such as machine tools, gears, automobile parts, and other specialty items in small quantities to customer order.

• Demand is measured in machine hours.– Orders are translated into required machine-hours.

• Management is concerned about capacity in the lathe department.

• Assemble the data necessary to analyze the addition of one more lathe machine and operator.

Specialty Steel Products Co.Example B.1

Page 4: Simulation

© 2007 Pearson Education

WeeklyWeeklyProductionProduction RelativeRelative

Requirements (hr)Requirements (hr) FrequencyFrequency

200200 0.050.05250250 0.060.06300300 0.170.17350350 0.050.05400400 0.300.30450450 0.150.15500500 0.060.06550550 0.140.14600600 0.020.02

TotalTotal 1.001.00

Specialty Steel Products Co. Example B.1

Historical records indicate that lathe department demand varies from week to week as follows:

Page 5: Simulation

© 2007 Pearson Education

WeeklyProduction Relative

Requirements (hr) Frequency

200 0.05250 0.06300 0.17350 0.05400 0.30450 0.15500 0.06550 0.14600 0.02

Total 1.00

Specialty Steel Products Co. Example B.1

Average weekly production is determined by multiplying each production requirement by its frequency of occurrence.

Average weekly production

requirements = 200(0.05) +

250(0.06) + 300(0.17) + … +

600(0.02) = 400 hours

Page 6: Simulation

© 2007 Pearson Education

Specialty Steel Products Co. Example B.1

WeeklyProduction Relative

Requirements (hr) Frequency

200 0.05250 0.06300 0.17350 0.05400 0.30450 0.15500 0.06550 0.14600 0.02

Total 1.00

Average weekly production requirements = 400 hours

Regular RelativeCapacity (hr) Frequency

320 (8 machines) 0.30360 (9 machines) 0.40

400 (10 machines) 0.30

The average number of operating machine-hours in a week is:

320(0.30) + 360(0.40) + 400(0.30) = 360 hours

Page 7: Simulation

© 2007 Pearson Education© 2007 Pearson Education

Specialty Steel Products Co. WeeklyWeekly

ProductionProduction RelativeRelativeRequirements (hr)Requirements (hr) FrequencyFrequency

200200 0.050.05250250 0.060.06300300 0.170.17350350 0.050.05400400 0.300.30450450 0.150.15500500 0.060.06550550 0.140.14600600 0.020.02

TotalTotal 1.001.00

Average weekly production Average weekly production requirements = 400 hoursrequirements = 400 hours

RegularRegular RelativeRelativeCapacity (hr)Capacity (hr) FrequencyFrequency

320 (8 machines)320 (8 machines) 0.300.30360 (9 machines)360 (9 machines) 0.400.40

400 (10 machines)400 (10 machines) 0.300.30

The average number of operating machine-hours in a week = 360 Hrs.

RegularRegular RelativeRelativeCapacity (hr)Capacity (hr) FrequencyFrequency

360 (9 machines)360 (9 machines) 0.300.30 400 (10 machines)400 (10 machines) 0.400.40 440 (11 machines)440 (11 machines) 0.300.30

Experience shows that with 11 machines, the distribution would be:

Example B.1

Page 8: Simulation

© 2007 Pearson Education

Specialty Steel Products Co.Assigning Random Numbers

• Random numbers must now be assigned to represent the probability of each demand event.

• Random Number: A number that has the same probability of being selected as any other number.

• Since the probabilities for all demand events add up to 100 percent, we use random numbers between (and including) 00 and 99.

• Within this range, a random number in the range of 0 to 4 has a 5% chance of selection.

• We can use this to represent our first weekly demand of 200 which has a 5% probability.

Page 9: Simulation

© 2007 Pearson Education

Event Weekly

Demand (hr) Probability

200 0.05250 0.06300 0.17350 0.05400 0.30450 0.15500 0.06550 0.14600 0.02

Random numbers in the range of 0-4 have a 5% chance of occurrence.

Random numbers in the range of 5-10 have a 6% chance of occurrence.

Random numbers in the range of 11-27 have a 17% chance of occurrence.

Random numbers in the range of 28-32 have a 5% chance of occurrence.

Specialty Steel Products Co.Assigning Random Numbers

Page 10: Simulation

© 2007 Pearson Education

Event Existing Weekly Random Weekly Random

Demand (hr) Probability Numbers Capacity (hr) Probability Numbers

200 0.05 00–04 320 0.30 00–29250 0.06 05–10 360 0.40 30–69300 0.17 11–27 400 0.30 70–99350 0.05 28–32400 0.30 33–62450 0.15 63–77500 0.06 78–83550 0.14 84–97600 0.02 98–99

If we randomly choose numbers in the range of 00-99 enough times, 5 percent of the time they will fall in the range of 00-04, 6% of the time they will fall in the range of 05-10, and so forth.

Specialty Steel Products Co.Assigning Random Numbers

Page 11: Simulation

© 2007 Pearson Education

Specialty Steel Products Co.Model Formulation

• Formulating a simulation model entails specifying the relationship among the variables.

• Simulation models consist of decision variables, uncontrollable variables and dependent variables.

• Decision variables: Variables that are controlled by the decision maker and will change from one run to the next as different events are simulated.

• Uncontrollable variables are random events that the decision maker cannot control.

Page 12: Simulation

© 2007 Pearson Education

Specialty Steel Products Co.Example B.2

1. Using the Appendix 2 random number table, draw a random number from the first two rows of the table. Start with the first number in the first row, then go to the second number in the first row.

2. Find the random-number interval for production requirements associated with the random number.

3. Record the production hours (PROD) required for the current week.

4. Draw another random number from row three or four of the table.

5. Find the random-number interval for capacity (CAP) associated with the random number.

6. Record the capacity hours available for the current week.

Simulating a particular capacity level

Page 13: Simulation

© 2007 Pearson Education

7. If CAP > PROD, then IDLE HR = CAP – PROD

8. If CAP < PROD, then SHORT = PROD – CAP

If SHORT < 100 then OVERTIME HR = SHORT

and SUBCONTRACT HR = 0

If SHORT > 100 then OVERTIME HR = 100

and SUBCONTRACT HR = SHORT – 100

9. Repeat steps 1 - 8 until you have simulated 20

weeks.

Specialty Steel Products Co.Example B.2

Simulating a particular capacity level

Page 14: Simulation

© 2007 Pearson Education© 2007 Pearson Education

Specialty Steel Products Co. 20-week simulation

10 Machines

ExistingDemand Weekly Capacity Weekly Sub-Random Production Random Capacity Idle Overtime contract

Week Number (hr) Number (hr) Hours Hours Hours

1 71 450 50 360 902 68 450 54 360 903 48 400 11 320 804 99 600 36 360 100 1405 64 450 82 400 506 13 300 87 400 1007 36 400 41 360 40. . . . . . . .. . . . . . . .. . . . . . . .

20 37 400 19 320 80

Total 490 830 360 Weekly average 24.5 41.5 18.0

Page 15: Simulation

© 2007 Pearson Education

Comparison of 1000-week Simulations

10 Machines 11 Machines

Idle hours 26.0 42.2Overtime hours 48.3 34.2Subcontract hours 18.4 8.7Cost $1,851.50 $1,159.50

Specialty Steel Products Co. 1000-week simulation

A steady state occurs when the simulation is repeated over enough time that the average results for performance measures remain constant.

Page 16: Simulation

© 2007 Pearson Education

Monte Carlo SimulationApplication B.1

Famous Chamois Car Wash Car Arrival Distribution (time between arrivals)Famous Chamois is an automated car wash that advertises that your car can be finished in just 15 minutes. The time until the next car arrival is described by the following distribution.

Minutes Probability Minutes Probability

1 0.01 8 0.12

2 0.03 9 0.10

3 0.06 10 0.07

4 0.09 11 0.05

5 0.12 12 0.04

6 0.14 13 0.03

7 0.14 1.00

Page 17: Simulation

© 2007 Pearson Education

Famous Chamois Car Wash: Random Number Assignment

Assign a range of random numbers to each event so that the demand pattern can be simulated.

Minutes Random Numbers

Minutes Random Numbers

1 00–00 8 59-70

2 01–03 9 7180

3 04–09 10 81-87

4 10–18 11 88-92

5 19–30 12 9396

6 31–44 13 9799

7 45–58

Monte Carlo SimulationApplication B.1

Page 18: Simulation

© 2007 Pearson Education

Monte Carlo Simulation

Famous Chamois Car Wash: Simulation

Simulate the operation for 3 hours, using the following random numbers, assuming that the service time is constant at 6, (:06) minutes per car.

Random Number

Time to Arrival

Arrival Time

Number in Drive

Service Begins

Departure Time

Minutes in System

50 7 0:07 0 0:07 0:13 6

63 ?

95

49

68

Page 19: Simulation

© 2007 Pearson Education© 2007 Pearson Education

Page 20: Simulation

© 2007 Pearson Education

Computer Simulation

The simulation for Specialty Steel Products demonstrated the basics of simulation. However it only involved one step in the process, with

two uncontrollable variables (weekly production requirements and three actual machine-hours available) and 20 time periods.

Simple simulation models with one or two uncontrollable variables can be developed using Excel, using its random number generator. More sophisticated simulations can become time

consuming and require a computer.

Page 21: Simulation

© 2007 Pearson Education

Page 22: Simulation

© 2007 Pearson Education

BestCar Auto Dealer Simulation Model

Below is a probability distribution for the number of cars sold weekly at BestCar (See Example B.3).

The selling price per car is $20,000. Design a simulation model that determines the probability distribution and mean of the weekly sales.

Page 23: Simulation

© 2007 Pearson Education

Page 24: Simulation

© 2007 Pearson Education

Simulation with SimQuick

Simquick is an easy-to-use package that is an Excel spreadsheet with some macros.

Let’s simulate the passenger security process at one terminal of a medium-sized airport between the hours of 8 A.M. and 10 A.M.

Passengers arrive in a single line and go through one of two inspection stations consisting of a metal detector and a carry-on baggage scanner.

After this, 10% are randomly selected for an additional inspection handled by one of two stations.

Management wants to examine the effects of increasing the number of random inspections to 15% and 20%.

They also want to consider a 3rd station for the 2nd inspection

Page 25: Simulation

© 2007 Pearson Education

Flowchart of Passenger Security Process

Entrance Arrivals

Entrance Arrivals

Buffer Buffer Sec. Line 1Sec. Line 1

Buffer Buffer Sec. Line 1Sec. Line 1

BufferBufferSec. Line 2Sec. Line 2

BufferBufferSec. Line 2Sec. Line 2

Buffer Buffer DoneDoneBuffer Buffer DoneDone

Work St. Work St. Add. Insp. 1Add. Insp. 1

Work St. Work St. Add. Insp. 1Add. Insp. 1

Work St. Work St. Add. Insp. 2Add. Insp. 2

Work St. Work St. Add. Insp. 2Add. Insp. 2

Work St. Work St. Insp. 1Insp. 1

Work St. Work St. Insp. 1Insp. 1

Work St. Work St. Insp. 2Insp. 2

Work St. Work St. Insp. 2Insp. 2

Dec. Pt. DP

Dec. Pt. DP

Information about each block is entered into Simquick. Other information needed in statistical distribution form:

(1) when people arrive, (2) inspection times, & (3) % of passengers randomly selected.

Arrivals and inspection times are acquired through observation; % randomly selected is a policy decision

Page 26: Simulation

© 2007 Pearson Education

Simulation Results of Passenger Security Process

224.57Final inventoryDone

0.53Mean cycle time

0.10Mean inventoryLine 2

3.12Mean cycle time

5.97Mean inventoryLine 1Buffer(s)

237.23Objects entering processDoorEntrance(s)

MeansNamesTypes

OverallStatisticsElementElement