simulation opim 310-lecture #4 instructor: jose cruz

29
Simulation Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Upload: nora-lester

Post on 04-Jan-2016

226 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

SimulationSimulation

OPIM 310-Lecture #4

Instructor: Jose Cruz

Page 2: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

OutlineOutline What Is Simulation?What Is Simulation?

Advantages and Disadvantages of Advantages and Disadvantages of SimulationSimulation

Monte Carlo SimulationMonte Carlo Simulation

Simulation and Profit AnalysisSimulation and Profit Analysis

The use of Excel spreadsheets in The use of Excel spreadsheets in simulationsimulation

Page 3: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

What is Simulation?What is Simulation? An attempt to duplicate the features, An attempt to duplicate the features,

appearance, and characteristics of a appearance, and characteristics of a real systemreal system

1.1. To imitate a real-world situation To imitate a real-world situation mathematicallymathematically

2.2. To study its properties and operating To study its properties and operating characteristicscharacteristics

3.3. To draw conclusions and make action To draw conclusions and make action decisions based on the results of the decisions based on the results of the simulationsimulation

Page 4: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Simulation ApplicationsSimulation ApplicationsBus scheduling

Design of library operations

Taxi, truck, and railroad dispatching

Production facility scheduling

Plant layout

Capital investments

Production scheduling

Sales forecasting

Inventory planning and control

Ambulance location and dispatching

Assembly-line balancing

Parking lot and harbor design

Distribution system design

Scheduling aircraft

Labor-hiring decisions

Personnel scheduling

Traffic-light timing

Voting pattern prediction

Page 5: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Select best course

Examine results

Conduct simulation

Specify valuesof variables

Construct model

Introduce variables

The The Process of Process of SimulationSimulation

Define problem

Page 6: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Advantages of SimulationAdvantages of Simulation

1.1. Relatively straightforward and flexibleRelatively straightforward and flexible

2.2. Can be used to analyze large and Can be used to analyze large and complex real-world situations that complex real-world situations that cannot be solved by conventional cannot be solved by conventional modelsmodels

3.3. Real-world complications can be Real-world complications can be included that most OM models cannot included that most OM models cannot permitpermit

4.4. ““Time compression” is possibleTime compression” is possible

Page 7: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Advantages of SimulationAdvantages of Simulation

5.5. Allows “what-if” types of questionsAllows “what-if” types of questions

6.6. Does not interfere with real-world Does not interfere with real-world systemssystems

7.7. Can study the interactive effects of Can study the interactive effects of individual components or variables in individual components or variables in order to determine which ones are order to determine which ones are importantimportant

Page 8: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Disadvantages of SimulationDisadvantages of Simulation

1.1. Can be very expensive and may take Can be very expensive and may take months to developmonths to develop

2.2. It is a trial-and-error approach that may It is a trial-and-error approach that may produce different solutions in repeated produce different solutions in repeated runsruns

3.3. Managers must generate all of the Managers must generate all of the conditions and constraints for conditions and constraints for solutions they want to examinesolutions they want to examine

4.4. Each simulation model is uniqueEach simulation model is unique

Page 9: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Monte Carlo SimulationMonte Carlo Simulation

Select numbers randomly from a probability distribution

Use these values to observe how a model performs over time

Random numbers each have an equal likelihood of being selected at random

Page 10: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Distribution of DemandDistribution of Demand

LAPTOPS DEMANDED FREQUENCY OF PROBABILITY OFLAPTOPS DEMANDED FREQUENCY OF PROBABILITY OFPER WEEK, PER WEEK, DEMAND DEMAND, DEMAND DEMAND, PP((xx) CUMULATIVE) CUMULATIVE

0 200 20 0.20 0 0.20 0 11 40 40 0.40 0.20 0.40 0.20 22 20 20 0.20 0.60 0.20 0.60 33 10 10 0.10 0.80 0.10 0.80 44 10 10 0.10 0.90 0.10 0.90

100100 1.00 1.00

Page 11: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Roulette Wheel of DemandRoulette Wheel of Demand

9090

8080

6060

2020

00

x = 2

x = 0x = 4

x = 3

x = 1

Page 12: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Generating Demand from Generating Demand from Random NumbersRandom Numbers

DEMAND,DEMAND, RANGES OF RANDOM NUMBERS,RANGES OF RANDOM NUMBERS,xx rr

00 0-190-19

11 20-5920-59 rr = 39 = 39

22 60-7960-79

33 80-8980-89

44 90-9990-99

Page 13: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Random Number TableRandom Number Table

3939 6565 7676 4545 4545 1919 9090 6969 6464 6161

7373 7171 2323 7070 9090 6565 9797 6060 1212 1111

7272 1818 4747 3333 8484 5151 6767 4747 9797 1919

7575 1212 2525 6969 1717 1717 9595 2121 7878 5858

3737 1717 7979 8888 7474 6363 5252 0606 3434 3030

Page 14: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

15 Weeks of Demand15 Weeks of Demand

Average demand Average demand = 31/15 = 31/15 = 2.07 laptops/week= 2.07 laptops/week

WEEKWEEK rr DEMAND (DEMAND (xx)) REVENUE (S)REVENUE (S)

11 3939 11 4,3004,30022 7373 22 8,6008,60033 7272 22 8,6008,60044 7575 22 8,6008,60055 3737 11 4,3004,30066 0202 00 0077 8787 33 12,90012,90088 9898 44 17,20017,20099 1010 00 00

1010 4747 11 4,3004,3001111 9393 44 17,20017,2001212 2121 11 4,3004,3001313 9595 44 17,20017,2001414 9797 44 17,20017,2001515 6969 22 8,6008,600

= 31= 31 $133,300$133,300

Page 15: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Computing Expected DemandComputing Expected Demand

EE((xx) ) = (0.20)(0) + (0.40)(1) + (0.20)(2) = (0.20)(0) + (0.40)(1) + (0.20)(2)

+ (0.10)(3) + (0.10)(4)+ (0.10)(3) + (0.10)(4)

= 1.5 laptops per week= 1.5 laptops per week

Not particularly close to Not particularly close to simulated result of 2.07 laptopssimulated result of 2.07 laptops

Difference is due to small Difference is due to small number of periods analyzednumber of periods analyzed

Page 16: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Random Numbers in ExcelRandom Numbers in Excel

Page 17: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Simulation in ExcelSimulation in Excel

Enter this formula in G6 and copy to

G7:G20

Enter “=4300*G6” in H6 and copy to

H7:H20

Generate random numbers for cells F6:F20 with the

formula “=RAND()” in F6 and copying to

F7:F20

= AVERAGE (G6:G20)

Page 18: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Simulation in ExcelSimulation in Excel

Page 19: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Example of Risk AnalysisExample of Risk AnalysisPortaCom ProjectPortaCom Project

PortCom’s product design group has developed a prototype PortCom’s product design group has developed a prototype for a new high-quality portable printer. The new printer has anfor a new high-quality portable printer. The new printer has an innovative design and the potential to capture a significantinnovative design and the potential to capture a significant share of the portable printer market. Preliminary marketing share of the portable printer market. Preliminary marketing and financial analysis have provided the following and financial analysis have provided the following

information. information.

Selling price = $249 per unitSelling price = $249 per unitAdministrative cost = $400,000Administrative cost = $400,000Advertising cost = $600,000Advertising cost = $600,000

PortaCom believes that the costs and the demand range as PortaCom believes that the costs and the demand range as follows:follows:

Unit direct labor cost = $43~$47Unit direct labor cost = $43~$47Unit parts cost = $80~$100Unit parts cost = $80~$100First-year demand = 1500~28,500 unitsFirst-year demand = 1500~28,500 units

Page 20: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Simulation

• The advantage of simulation is that it allows us to The advantage of simulation is that it allows us to assess the probability of a profit and the assess the probability of a profit and the probability of a loss.probability of a loss.

Procedure of simulationProcedure of simulation 1. Check parameters1. Check parameters2. Check controllable inputs2. Check controllable inputs3. Check probabilistic inputs3. Check probabilistic inputs * Generate random numbers * Generate random numbers

4. Formulate a model4. Formulate a model5. Draw a flowchart5. Draw a flowchart

Page 21: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

SimulationSimulation1. Check parameters1. Check parametersSelling price = $249 per unitSelling price = $249 per unitAdministrative cost = $400,000Administrative cost = $400,000Advertising cost = $600,000Advertising cost = $600,000

2. Check controllable inputs2. Check controllable inputsWhether or not introduce the productWhether or not introduce the product

3. Check probabilistic inputs3. Check probabilistic inputsUnit direct labor cost range = $43~$47Unit direct labor cost range = $43~$47Unit parts cost range = $80~$100Unit parts cost range = $80~$100First-year demand range = 1500~28,500 unitsFirst-year demand range = 1500~28,500 units

Page 22: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

SimulationSimulation

4. Formulate a model4. Formulate a model

Profit=(249-c1-c2)X-1,000,000Profit=(249-c1-c2)X-1,000,000

5. Draw a flowchart5. Draw a flowchart

Page 23: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Probability Distribution of the Probability Distribution of the Direct Labor CostDirect Labor Cost

Direct labor cost Probability

$43 0.1

$44 0.2

$45 0.4

$46 0.2

$47 0.1

Page 24: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Probability Distribution of the Probability Distribution of the Parts CostsParts Costs

• The probability distribution for the parts cost per The probability distribution for the parts cost per unit is the uniform distribution as follows:unit is the uniform distribution as follows:

Page 25: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Probability Distribution of the Probability Distribution of the First-year DemandFirst-year Demand

• The first-year demand is described by the normal The first-year demand is described by the normal probability distribution with mean 15,000 units probability distribution with mean 15,000 units and the standard deviation 45000 units as and the standard deviation 45000 units as follows:follows:

Page 26: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

How to Generate Random How to Generate Random NumbersNumbers

• Computer-generated random numbersComputer-generated random numbers

* Assign ranges of random numbers to * Assign ranges of random numbers to to corresponding values of probabilistic to corresponding values of probabilistic inputs. The prob. of any input value isinputs. The prob. of any input value is identical to the prob. of its occurrence in the identical to the prob. of its occurrence in the real system. real system. * * Placing =RAND() in a cell of an Excel worksheet will result in a random number.

Page 27: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Generate Random Value for Direct Labor Cost

Interval ofInterval of

Direct labor costDirect labor cost ProbabilityProbability random numbersrandom numbers

$43 0.1 0.0~0.1$43 0.1 0.0~0.1

$44 0.2 0.1~0.3$44 0.2 0.1~0.3

$45 0.4 0.3~0.7 $45 0.4 0.3~0.7

$46 0.2 0.7~0.9$46 0.2 0.7~0.9

$47 0.1 0.9~1.0 $47 0.1 0.9~1.0

**Excell StatementExcell Statement

=Vlookup(Rand(),range, Col_index)=Vlookup(Rand(),range, Col_index)

Page 28: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Generate Random Numbers for Generate Random Numbers for Parts CostParts Cost

• With a uniform probability distribution, the following relationship between the random number and the associated value of the parts cost is used.

Parts cost=a+r(b-a) where r=random number a=smallest value for parts cost b=largest value for parts costParts cost=80+r(100-80)=80+r20

Page 29: Simulation OPIM 310-Lecture #4 Instructor: Jose Cruz

Generate Random Numbers for Generate Random Numbers for First-year DemandFirst-year Demand

• Because first-year demand is normally Because first-year demand is normally distributed, we need a procedure for generating distributed, we need a procedure for generating random values from a normal distribution. random values from a normal distribution.

• We use the following formula of ExcellWe use the following formula of Excell

=NORMINV(RAND(),mean,standard deviation)=NORMINV(RAND(),mean,standard deviation)