Simulation Technique

Embed Size (px)

Citation preview

  • 8/3/2019 Simulation Technique

    1/54

    1

    SIMULATION

  • 8/3/2019 Simulation Technique

    2/54

    3

    SIMULATION vs. OPTIMIZATION

    In an optimization model, the values of the decision

    variables are outputs.

    In a simulation model, the values of the decisionvariables are inputs. The model evaluates theobjective function for a particular set of values.

    The result of the model is a set of values for thedecision variables that will maximize (or minimize)

    the value of the objective function.

    The result of the model is a measure of the qualityof a suggested solution and the variability in variousperformance measures due to randomness in the

    inputs.

  • 8/3/2019 Simulation Technique

    3/54

    4

    When should simulation be used?

    Simulation is one of the most frequently used tools of

    quantitative analysis today because:

    1. Analytical models may be difficult or impossible toobtain, depending on complicating factors.

    2. Analytical models typically predict only average orsteady-state (long-run) behavior.

    3. Simulation can be performed with a variety of

    software on a PC or workstation. The level ofcomputing and mathematical skill required todesign and run a simulator has been substantiallyreduced.

  • 8/3/2019 Simulation Technique

    4/54

    5

    8. Experimental Design

    9. Model runs and analysis

    10. More runs

    NoYes

    3. Model conceptualization 4. Data Collection

    5. Model Translation

    6. Verified

    7. Validated

    Yes

    No

    No No

    Yes

    Phase 3

    Experimentation

    1. Problem formulation

    2. Set objectives and overall project plan

    Phase 1

    Problem Definition

    Phase 2

    Model Building

    11. Documentation, reporting and

    implementation

    Phase 4

    Implementation

    Steps in simulation

  • 8/3/2019 Simulation Technique

    5/54

    6

    Verification (efficiency)

    Is the model correctly built/programmed? Is it doing what it is intended to do?

    Validation (effectiveness) Is the right model built? Does the model adequately describe the reality

    you want to model? Does the involved decision makers trust the

    model?

    Two of the most important and most challenging

    issues in performing a simulation study

    Model Verification and Validation

  • 8/3/2019 Simulation Technique

    6/54

    7

    Find alternative ways of describing/evaluating the system

    and compare the results

    Simplification enables testing of special cases with

    predictable outcomes

    Removing variability to make the model deterministic Removing multiple job types, running the model with one job type

    at a time

    Reducing labor pool sizes to one worker

    Build the model in stages/modules and incrementally test

    each module

    Uncouple interacting sub-processes and run them separately

    Test the model after each new feature that is added

    Simple animation is often a good first step to see if things are working

    as intended

    Model Verification Methods

  • 8/3/2019 Simulation Technique

    7/54

    9

    Simulation and Random Variables

    Simulation models are often used to analyze a decisionunder risk. Under risk, the behavior of one or morefactors is not known with certainty. For example:

    demand for a product during the next month

    the return on an investment

    the number of trucks that will arrive to be unloaded

    The factor that is not known with certainty is called therandom variable.

    The behavior of the random variable can be describedby a probability distribution.

    MONTE CARLO METHOD:

  • 8/3/2019 Simulation Technique

    8/54

    10

    Design of Docking Facilities. In the following model,trucks of different sizes carrying different types of loads,arrive at a warehouse to be unloaded.

    Exit Entrance

    Truck

    Truck

    Truck

    Dock3

    Dock2

    Dock1

    Truck waiting Truck waiting

  • 8/3/2019 Simulation Technique

    9/54

    11

    The uncertainties are:

    When will a truck arrive?

    What kind and size of load will it be carrying?How long will it take to unload the trucks?

    Each uncertain quantity would be a random variable

    characterized by a probability distribution.The planners must address a variety of designquestions:

    How many docks should be built?What type and quantity of material-handlingequipment are required?

    How many workers are required over what

    periods of time?

  • 8/3/2019 Simulation Technique

    10/54

    12

    The design of the unloading dock will affect its cost ofconstruction and operation. Management must balancethe cost of acquiring and using the various resourcesagainst the cost of having trucks wait to be unloaded.

  • 8/3/2019 Simulation Technique

    11/54

    13

    Determination of Inventory Control Policies. Simulationcan be used to study inventory control models.

    In this model, the factory produces goods that are sentto the warehouses to satisfy customer demand.

    The random variables are: daily demand at eachwarehouse and shipping times from factory to

    warehouse.

    Factory

    Warehouse 1 Warehouse 2 Warehouse 3

    Demand Demand Demand

  • 8/3/2019 Simulation Technique

    12/54

    14

    Simulation can be used to study inventory controlmodels.

    Some of the operational questions are:

    The main costs are:

    When should a warehouse reorder from thefactory and how much?

    How much stock should the factory maintain tosatisfy the orders of the warehouses?

    Cost of holding the inventory

    Cost of shipping goods from a factory to a

    warehouseCost of not being able to satisfy customerdemand at the warehouse

    The objective is to find a stocking and ordering policythat keeps the total cost low while meeting demand.

  • 8/3/2019 Simulation Technique

    13/54

    15

    To generate a random variable, draw a random sample

    from a given probability distribution.

    Generating Random Variables

    Two broad categories of random variables:

    Can assume only certain specific values(e.g., integers)

    Can take on any fractional value (an infinitenumber of values)

    Continuous

    Discrete

    Using a Random Number Generator in a Spreadsheet

  • 8/3/2019 Simulation Technique

    14/54

    16

    To generate a discrete random variable with the RAND()function in a spreadsheet, two things are needed:

    A GENERALIZED METHOD:

    1. The ability to generate discrete uniform randomvariables

    2. The distribution of the discrete random variable

    to be generatedTo generate a continuous random variable, two thingsare needed:

    1. The ability to generate continuous uniformrandom variables on the interval 0 to 1

    2. The distribution (in the form of the cumulativedistribution function) of the random variable to

    be generated

  • 8/3/2019 Simulation Technique

    15/54

    17

    Conversion of a Random No. to a Uniform Distribution

  • 8/3/2019 Simulation Technique

    16/54

    18

    200 Random Numbers Generated Between 0 and 100

  • 8/3/2019 Simulation Technique

    17/54

    19

    200 Uniform Discrete Random Numbers GeneratedBetween 20 and 100

    Th C l i Di ib i F i (CDF) C id

  • 8/3/2019 Simulation Technique

    18/54

    20

    The Cumulative Distribution Function (CDF). Consider arandom variable, D, the demand. The CDF for D[calledF(x)] is then defined as the probability that Dtakes on avalue < x.

    F(x) = Prob{D < x}

    Knowing the probability distribution for D, the CDF for

    key values of Dis:

    X 8 9 10 11 12 13F(x) 0.1 0.3 0.6 0.8 0.9 1.0

    H i h f h CDF T di

  • 8/3/2019 Simulation Technique

    19/54

    21

    0

    0.2

    0.4

    0.6

    0.8

    1

    1.2

    7 8 9 10 11 12 13 14

    Probability

    x

    F(x)

    Here is a graph of the CDF. To generate a discretedemand using the graph:

    Step 2: Read theparticular valueof the randomquantity, d, on

    this axis

    Step 1: Locatethe particularvalue of Uon

    this axis

    u

    d

    S t t d l di t if

  • 8/3/2019 Simulation Technique

    20/54

    22

    Suppose you want to model a discrete uniformdistribution of demand where the values of 8 through 12all have the same probability of occurring (uniform,equally likely).

    The spreadsheet has a function, =RAND(), that returns arandom number between 0 and 1. However, this willresult in a continuous uniform distribution.

    To create a discrete uniform distribution, use the INT()function. For example:

    In general, if you want a discrete, uniform distribution ofinteger values between xand y, use the formula:

    INT(x+ (yx+ 1)*RAND() )

    G ti f th E ti l Di t ib ti

  • 8/3/2019 Simulation Technique

    21/54

    24

    Generating from the Exponential Distribution.The exponential distribution is often used to model thetime between arrivals in a queuing model. Its CDF isgiven by:

    F(x) = Prob{t>T} = e-lT

    Where 1/l is the mean of the random variable T.Therefore, we want to solve the following equation for w:

    u = e-lT

    The solution is: T = -1/l ln(u)where we can get u from Random number which

    represents cumulative distribution function

    G ti f th N l Di t ib ti

  • 8/3/2019 Simulation Technique

    22/54

    25

    Generating from the Normal Distribution.The normal distribution plays an important role in manysimulation and analytic models.

    Consider drawing a random demand from a normaldistribution with a mean (m) of 1000 and a standarddeviation (s) of 100.If Z is a unit normal random variable (normallydistributed with a mean of 0 and a standard deviation of1) then m + Zs is a normal random variable with mean mand standard deviation s.So, we can draw from a unit normal distribution. Excelhas a built-in function that can do this:

    = NORMINV( RAND() , 1000, 100)

    Excel will automatically return a normally distributedrandom number with mean 1000 and std. dev. 100.

  • 8/3/2019 Simulation Technique

    23/54

    26

    CAPITAL BUDGETING

    PROBLEM

    A CAPITAL BUDGETING EXAMPLE

  • 8/3/2019 Simulation Technique

    24/54

    27

    A CAPITAL BUDGETING EXAMPLE:ADDING A NEW PRODUCT LINE

    Airbus Industry is considering adding a new jet airplane

    (model A3XX) to its product line. The following financialinformation is available:

    Startup Costs $150,000Sales Price $ 35,000Fixed Costs (per year) $ 15,000Variable Costs (per year) 75% of revenues

    Tax depreciation on the new equipment would be

    $10,000 per year over the 4 year expected product life.

    Salvage value of the equipment at the end of the 4 yearsis estimated to be 0.

    Airbus cost of capital is 10% and tax rate is 34%.

    If demand is known then a spreadsheet can be used to

  • 8/3/2019 Simulation Technique

    25/54

    28

    If demand is known, then a spreadsheet can be used tocalculate the net present value(NPV). For example,assume that the demand for A3XXs is 10 units for eachof the next 4 years:

    =C16 + C13

    =-$B$2

    =NPV($D$3,C17:F17)+B17

    THE MODEL WITH RANDOM DEMAND

    http://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xls
  • 8/3/2019 Simulation Technique

    26/54

    29

    It is unlikely that demand will be the same every year. Amore realistic model would be one in which demandeach year is a sequence of random variables.

    THE MODEL WITH RANDOM DEMAND

    This model of demand is appropriate when there is aconstant base level of demand that is subject to randomfluctuations from year to year.

    Sampling Demand with a Spreadsheet: Assume initiallythat the demand in a year will be either 8, 9, 10, 11, or 12units with each value being equally likely to occur.

    This is an example of a discrete uniform distribution.

    Now, use the formula =INT(8+ 5*RAND() ) to samplefrom a discrete uniform distribution on the integers 8, 9,10, 11, 12 .

    Multiple trials can be performed by pressing the

    recalculation key for the spreadsheet (e.g., F9).

    Using this formula results in random demands

    http://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xls
  • 8/3/2019 Simulation Technique

    27/54

    30

    =INT(8+5*RAND() )

    Using this formula results in random demands.

    Hitting the F9 key would result in a different sample ofdemands, and possibly a different NPV.

    The demands are random variables, therefore, the NPVis also a random variable.

    EVALUATING THE PROPOSAL

    http://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xls
  • 8/3/2019 Simulation Technique

    28/54

    31

    Two questions need to be answered about the NPVdistribution:

    EVALUATING THE PROPOSAL

    1. What is the meanor expected value of the NPV?

    2. What is the probability that the NPV assumes anegative value (making the proposal to add theA3XX less attractive)?

    To answer these questions, a simulation model must bebuilt. To run the simulation automatically and capture

    the resulting NPV in a separate spreadsheet, use theData Tablecommand.

    The resulting analysis gives the estimated mean NPV

  • 8/3/2019 Simulation Technique

    29/54

    39

    The resulting analysis gives the estimated mean NPVand standard deviation.

    Downside Risk and Upside Risk: To get a better ideaabout the range of possible NPVs that could occur, look

    at the minimum and maximum NPVs.

    In the resulting analysis the Frequency (column B)

    http://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xls
  • 8/3/2019 Simulation Technique

    30/54

    41

    In the resulting analysis, the Frequency(column B)indicates the number of trials that fell into the bins(categories) defined by column A.

    The cumulative % column indicates the cumulativepercentage of observations that fall into each categoryor bin.

    The histogram gives a visual representation of the

    http://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xls
  • 8/3/2019 Simulation Technique

    31/54

    42

    The histogram gives a visual representation of thedistribution of NPVs. Note that it is somewhat bellshaped.

    How Reliable is the Simulation? Now the two questions

    http://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xlshttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xls
  • 8/3/2019 Simulation Technique

    32/54

    43

    The next questions to ask are:

    How Reliable is the Simulation? Now the two questionsabout the distribution can be answered:

    1. What is the meanor expected value of the NPV?

    2. What is the probability that the NPV assumes anegative value (making the proposal to add the

    A3XX less attractive)?

    In this trial, the mean is $12,100.

    In this trial, the probability is

  • 8/3/2019 Simulation Technique

    33/54

    44

    For a 95% confidence interval, the formula is:

    estimated mean + 1.96(standard deviation)

    In this case, the standard deviation is the standard error

    (the standard deviation divided by the square root of thenumber of trials).

    Based on this trial, the upper and lower confidence

    limits are: =$E$4-1.96*$E$8/SQRT($E$16)

    =$E$4+1.96*$E$8/SQRT($E$16)

    So, we have 95% confidence that the true mean NPV is

    somewhere between $9,679 and $14,521.

    THE MODEL WITH RANDOM DEMAND

    http://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/wilson.xls
  • 8/3/2019 Simulation Technique

    34/54

    45

    It is unlikely that demand will be the same every year. Amore realistic model would be one in which demandeach year is a sequence of random variables.

    THE MODEL WITH RANDOM DEMAND

    This model of demand is appropriate when there is aconstant base level of demand that is subject to randomfluctuations from year to year.

    Sampling Demand with a Spreadsheet: Assume initiallythat the demand in a year will be either 8, 9, 10, 11, or 12units with each value being equally likely to occur.

    This is an example of a discrete

    uniform distribution.

    OTHER DISTRIBUTIONS OF DEMAND

    http://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/WILSNCB1.XLShttp://d/class%20materials/PGP/Courses%20offered%20by%20rupesh/Operations%20Research/class%20presentation%20OR/post%20mid%20term/OR/simulation/WILSNCB1.XLS
  • 8/3/2019 Simulation Technique

    35/54

    46

    Originally, we started with equal mean demands of 10 foreach period (year). Then, we allowed for randomvariation in mean demand (between 8 and 12 units) anddiscrete distribution.

    OTHER DISTRIBUTIONS OF DEMAND

    Now, assume the mean demand will stay the same over

    the next four years, somewhere between 6 and 14 units ayear, with all values being equally likely.

    This scenario can be modeled as a continuous, uniformdistribution between 6 and 14.

    In addition, we can explore the impact of differentdemand distributions on the NPV.

  • 8/3/2019 Simulation Technique

    36/54

    47

    MAINTAINANCE PROBLEM

    Corrective Maintenance versus

  • 8/3/2019 Simulation Technique

    37/54

    48

    Corrective Maintenance versusPreventive Maintenance

    The Heavy Duty Company has just purchased a large machine for anew production process.

    The machine is powered by a motor that occasionally breaks down and

    requires a major overhaul. Therefore, a second standby motor is kept,

    and the two motors are rotated in use.

    The breakdowns always occur on the fourth, fifth, or sixth day that themotor is in use. Fortunately, it takes fewer than three days to overhaul

    a motor, so a replacement is always ready.

    Cost of Replacement Cycle that Begins with Breakdown

    Replace a Motor $2,000

    Lost production during replacement 5,000

    Overhaul a motor 4,000

    Total $11,000

  • 8/3/2019 Simulation Technique

    38/54

    49

    Probability Distribution of Breakdowns

    Day

    Probability of

    a Breakdown

    Corresponding

    Random Numbers

    1, 2, 3 0

    4 0.25 0.0000 to 0.2499

    5 0.5 0.2500 to 0.7499

    6 0.25 0.7500 to 0.99997 or more

    Computer Simulation of Corrective

  • 8/3/2019 Simulation Technique

    39/54

    50

    Computer Simulation of CorrectiveMaintenance

    Random Time Since Last Cumulative Cumulative Distribution of

    Breakdown Number Breakdown Day Cost Cost Time Between Breakdowns

    1 0.1343 4 4 $11,000 $11,000 Number

    2 0.1523 4 8 $11,000 $22,000 Prob Cumu. Prob. of Days

    3 0.9091 6 14 $11,000 $33,000 0.25 0 4

    4 0.6161 5 19 $11,000 $44,000 0.5 0.25 5

    5 0.6223 5 24 $11,000 $55,000 0.25 0.75 6

    6 0.0026 4 28 $11,000 $66,000

    7 0.6920 5 33 $11,000 $77,000 $11,000

    8 0.6155 5 38 $11,000 $88,000

    9 0.7805 6 44 $11,000 $99,000

    10 0.9189 6 50 $11,000 $110,000

    26 0.6869 5 128 $11,000 $286,00027 0.6415 5 133 $11,000 $297,000

    28 0.3599 5 138 $11,000 $308,000

    29 0.1493 4 142 $11,000 $319,000 Average Cost per Day

    30 0.4700 5 147 $11,000 $330,000 $2,245

    Breakd

    own

    Cost

  • 8/3/2019 Simulation Technique

    40/54

    51

    Preventive Maintenance Options

    Preventive maintenance would involve scheduling the motor to beremoved (and replaced) for an overhaul at a certain time, even if a

    breakdown has not occurred.

    The goal is to provide maintenance early enough to prevent a

    breakdown.

    Scheduling the overhaul enables removing and replacing themotor at a convenient time when the machine is not in use, so no

    production is lost.

    Cost of Replacement Cycle that Begins without a BreakdownReplace a motor on overtime $3,000

    Lost production during replacement 0

    Overhaul a motor before a breakdown 3,000

    Total $6,000

    R l M t 4 D

  • 8/3/2019 Simulation Technique

    41/54

    52

    Replace Motor on 4 DaysRandom Time Until Scheduled Time Event That umulative Cumulative Distribution of

    Cycle Number Breakdown ntil Replacemen Concludes Cycle Day Cost Cost Time Between Breakdowns

    1 0.3926 5 4 Replacement 4 $6,000 $6,000 Number

    2 0.4904 5 4 Replacement 8 $6,000 $12,000 Probability Cumulative of Days

    3 0.8207 6 4 Replacement 12 $6,000 $18,000 0.25 0 44 0.6811 5 4 Replacement 16 $6,000 $24,000 0.5 0.25 5

    5 0.1084 4 4 Breakdown 20 $11,000 $35,000 0.25 0.75 6

    6 0.1032 4 4 Breakdown 24 $11,000 $46,000

    7 0.5737 5 4 Replacement 28 $6,000 $52,000 Breakdown Cost $11,000

    8 0.0718 4 4 Breakdown 32 $11,000 $63,000 Replacement Cost $6,000

    9 0.5408 5 4 Replacement 36 $6,000 $69,000

    10 0.9918 6 4 Replacement 40 $6,000 $75,000 Replace After 4 days

    11 0.9948 6 4 Replacement 44 $6,000 $81,000

    12 0.1657 4 4 Breakdown 48 $11,000 $92,00013 0.1035 4 4 Breakdown 52 $11,000 $103,000

    14 0.3365 5 4 Replacement 56 $6,000 $109,000

    15 0.1650 4 4 Breakdown 60 $11,000 $120,000

    16 0.4908 5 4 Replacement 64 $6,000 $126,000

    17 0.0267 4 4 Breakdown 68 $11,000 $137,000

    18 0.1388 4 4 Breakdown 72 $11,000 $148,000

    19 0.9297 6 4 Replacement 76 $6,000 $154,000

    20 0.5908 5 4 Replacement 80 $6,000 $160,00021 0.1035 4 4 Breakdown 84 $11,000 $171,000

    22 0.6132 5 4 Replacement 88 $6,000 $177,000

    23 0.5361 5 4 Replacement 92 $6,000 $183,000

    24 0.0726 4 4 Breakdown 96 $11,000 $194,000

    25 0.0593 4 4 Breakdown 100 $11,000 $205,000

    26 0.7241 5 4 Replacement 104 $6,000 $211,000

    27 0.3092 5 4 Replacement 108 $6,000 $217,000

    28 0.4092 5 4 Replacement 112 $6,000 $223,000

    29 0.2356 4 4 Breakdown 116 $11,000 $234,000 Average Cost per Day

    30 0.6483 5 4 Re lacement 120 $6 000 $240 000 $2 000

    Replace Motor After 5 Days

  • 8/3/2019 Simulation Technique

    42/54

    53

    Replace Motor After 5 DaysRandom Time Unt il Scheduled Time Event That Cumulat ive Cumulat ive Distribution of

    Cycle Number Breakdown Until Replacement Conc ludes Cycle Day Cost Cost Time Between Breakdowns

    1 0.3543 5 5 Breakdown 5 $11,000 $11,000 Number

    2 0.2204 4 5 Breakdown 9 $11,000 $22,000 Probability Cumulative of Days

    3 0.0583 4 5 Breakdown 13 $11,000 $33,000 0.25 0 44 0.8282 6 5 Replacement 18 $6,000 $39,000 0.5 0.25 5

    5 0.9815 6 5 Replacement 23 $6,000 $45,000 0.25 0.75 6

    6 0.4620 5 5 Breakdown 28 $11,000 $56,000

    7 0.7658 6 5 Replacement 33 $6,000 $62,000 Breakdown Cost $11,000

    8 0.4318 5 5 Breakdown 38 $11,000 $73,000 Replacement Cost $6,000

    9 0.8745 6 5 Replacement 43 $6,000 $79,000

    10 0.9448 6 5 Replacement 48 $6,000 $85,000 Replace After 5 days

    11 0.0987 4 5 Breakdown 52 $11,000 $96,000

    12 0.5796 5 5 Breakdown 57 $11,000 $107,000

    13 0.7489 5 5 Breakdown 62 $11,000 $118,000

    14 0.2480 4 5 Breakdown 66 $11,000 $129,000

    15 0.5809 5 5 Breakdown 71 $11,000 $140,000

    16 0.9055 6 5 Replacement 76 $6,000 $146,000

    17 0.5844 5 5 Breakdown 81 $11,000 $157,000

    18 0.0157 4 5 Breakdown 85 $11,000 $168,00019 0.0949 4 5 Breakdown 89 $11,000 $179,000

    20 0.1892 4 5 Breakdown 93 $11,000 $190,000

    21 0.9239 6 5 Replacement 98 $6,000 $196,000

    22 0.1051 4 5 Breakdown 102 $11,000 $207,000

    23 0.8739 6 5 Replacement 107 $6,000 $213,000

    24 0.5229 5 5 Breakdown 112 $11,000 $224,000

    25 0.6667 5 5 Breakdown 117 $11,000 $235,000

    26 0.3945 5 5 Breakdown 122 $11,000 $246,000

    27 0.7721 6 5 Replacement 127 $6,000 $252,000

    28 0.2253 4 5 Breakdown 131 $11,000 $263,000

    29 0.6972 5 5 Breakdown 136 $11,000 $274,000 Average Cost per Day

    30 0.5078 5 5 Breakdown 141 $11,000 $285,000 $2,021

    Inventory Problem

  • 8/3/2019 Simulation Technique

    43/54

    54

    Inventory Problem

    The daily demand of an item has the following distribution:

    Demand per day(units)

    0 1 2 3 4 5

    No. of days on whichdemand occurred

    4 10 15 39 22 10

    When an order is placed to replenish inventory there is a delivery time

    lag, which follows the following distribution:

    Lead time (days) 2 3 4

    No. of times ofoccurrence 24 12 4

    The management is of the opinion that proportion of stockouts should

    not exceed 5%.

  • 8/3/2019 Simulation Technique

    44/54

    55

    Queuing Problem

  • 8/3/2019 Simulation Technique

    45/54

    56

    Single server queue

    A small grocery store with just one

    checkout counter

    Interarrival time uniform between 1-8 mins

    Service time varies between 1-6 mins.

    Probability distribution given.

    The problem is to analyze the system bysimulating the arrival and service of 20

    customers.

  • 8/3/2019 Simulation Technique

    46/54

    57

    Given distributions

    Minimum 1Maximum 8

    Interarrival Times

    (minutes) 1 0.10 0.102 0.20 0.30

    3 0.30 0.60

    4 0.25 0.85

    5 0.10 0.95

    6 0.05 1.00

    Service

    Times

    (Minutes)

    ProbabilityCumulative

    Probability

    Uniform

    Simulating of a M/M/1 Queue

  • 8/3/2019 Simulation Technique

    47/54

    58

    Assume a small branch office of a local bank with only

    one teller. Empirical data gathering indicates that inter-arrival

    and service times are exponentially distributed.

    The average arrival rate = l = 5 customers per hour The average service rate = m = 6 customers per hour

    Using our knowledge of queuing theory we obtain

    = the server utilization = 5/6 0.83 Lq = the average number of people waiting in line

    Wq = the average time spent waiting in line

    Lq = 0.832/(1-0.83) 4.2 Wq = Lq/l 4.2/5 0.83 How do we go about simulating this system?

    How do the simulation results match the analytical ones?

    Simulating of a M/M/1 Queue

  • 8/3/2019 Simulation Technique

    48/54

    59

    NEWSPAPER BOY PROBLEM

    bl

  • 8/3/2019 Simulation Technique

    49/54

    60

    Newspaper Boy Problem

    Newsvendor sells newspapers on the street Buys forc = $0.55 each, sells forr = $1.00 each

    Each morning, buys q copies

    q is a fixed number, same every day

    Demand during a day: D = max (X, 0) X~ normal (m = 135.7, s = 27.1), from historical data X roundsX to nearest integer

    IfDq, satisfy all demand, and qD 0 left over, sell forscrap ats = $0.03 each

    IfD > q, sells out (sells all q copies), no scrap

    But missed out onDq > 0 sales

    What should q be?

    N B P bl F l i

  • 8/3/2019 Simulation Technique

    50/54

    61

    Newspaper Boy Problem Formulation

    Choose q to maximize expected profit per day

    q too smallsell out, miss $0.45 profit per paper

    q too bighave left over, scrap at a loss of $0.52 per paper

    Classic operations-research problem

    Many versions, variants, extensions, applications

    Much research on exact solution in certain cases

    But easy to simulate, even in a spreadsheet

    Profit in a day, as a function ofq:

    W(q) =r min (D, q) +s max (q

    D, 0)

    cq

    W(q) is a random variableprofit varies from day to day

    Maximize E(W(q)) over nonnegative integers q

    Sales revenue Scrap revenue Cost

    Steps: Newspaper boy Problem

  • 8/3/2019 Simulation Technique

    51/54

    62

    Steps: Newspaper boy Problem

    Simulation

    Set trial value ofq, generate demandD, compute profit for

    that day

    Then repeat this for many days independently, average

    to estimate E(W(q))

    Also get confidence interval, estimate of P(loss),

    histogram ofW(q)

    Try for a range of values ofq

    Need to generate demandD = max (X, 0) So need to generateX~ normal (m = 135.7, s = 27.1)

    Demands = MAX(ROUND(NORMINV(RAND(),, ), 0)

    Advantage of Simulation

  • 8/3/2019 Simulation Technique

    52/54

    63

    1. It is particularly well-suited for problems that are difficult or

    impossible to solve mathematically.

    2. It allows an analyst or decision maker to experiment with

    system behavior in a controlled environment instead of in a

    real-life setting that has inherent risks.

    3. It enables a decision maker to compress time in order to

    evaluate the long-term effects of various alternatives.

    4. It can serve as a mode for training decision makers by

    enabling them to observe the behavior of a system under

    different conditions.

    Advantage of Simulation

    Limitations of Simulation

  • 8/3/2019 Simulation Technique

    53/54

    64

    1. Probabilistic simulation results are approximations, rather

    than optimal solutions.

    2. Good simulations can be costly and time-consuming to

    develop properly; they also can be time-consuming to run,

    especially in cases in which a large number of trials are

    indicated.

    3. A certain amount of expertise is required in order to design a

    good simulation, and this may not be readily available.

    4. Analytical techniques may be available that can provide better

    answers to problems.

    Limitations of Simulation

  • 8/3/2019 Simulation Technique

    54/54

    65

    THANK YOU