introduction to simulation

9

Click here to load reader

Upload: kishanvora

Post on 19-Nov-2015

5 views

Category:

Documents


0 download

DESCRIPTION

SIMULATION

TRANSCRIPT

  • 3/4/2015

    Dr. Aneesh Chinubhai 1

    Introduction to Simulation

    Simulation of Manufacturing and Service Systems

    Why simulate?

    2

    American Airlines Flight 11 and United Airlines Flight 175, werecrashed into the North and South towers, respectively, of the WorldTrade Center complex in New York City

    The Aviation and Transportation Security Act (USA) passed inNovember, 2001 required the nation's airports to perform 100%checked baggage screening by December 31, 2002.

    Airport performance metric that 95% of all passengers in the peakhour would wait no longer than additional 10 minutes for baggagescreening.

    What should airports do?

    Dr. Aneesh Chinubhai

    Why?

    3

    The management of an airport are planning the facilities that are required in a new terminal building.

    Decisions need to be made about The number of check-in desks devoted to each airline The size of the baggage handling system The amount of security check positions The number of departure gates The number of staff to employ and the shifts they should work

    Total investment is in the hundreds of millions and it is critical that these decisions are made correctly.

    How can the management determine the number of resources that are required in each area of the airport?

    Dr. Aneesh Chinubhai

    Why is this a difficult problem?

    4

    Reality is inherently variable!

    How do we model variability?

    Dr. Aneesh Chinubhai

  • 3/4/2015

    Dr. Aneesh Chinubhai 2

    Options

    5

    Build it and hope that it works!

    Rely upon gut feel, no doubt based on some past experience

    A few paper calculations, or even a spreadsheet, may help

    Build a mathematical model(s) These are unlikely to be able to handle the full complexity of the

    situation

    Simulate!

    Dr. Aneesh Chinubhai

    What can be simulated?

    6

    Almost anything can

    and

    almost everything has...

    Dr. Aneesh Chinubhai

    Applications

    7

    Airport operations Air side Land side ATC

    Railway operations Port operations Bus transit Mining Manufacturing operations Inventory Facility layout and material

    handling

    Pricing and revenue management

    Supply chains Service operations Urban traffic Construction projects Restaurants Healthcare operations Disease epidemics Computer networks Call centers

    http://informs-sim.org/

    Dr. Aneesh Chinubhai

    Approaches to Improvement

    8

    Study the system measure, improve, design, control

    Maybe just play with the actual system Advantage unquestionably looking at the right thing

    But its often impossible to do so in reality with the actual system System doesnt exist Would be disruptive, expensive, or dangerous

    Dr. Aneesh Chinubhai

  • 3/4/2015

    Dr. Aneesh Chinubhai 3

    Build a Model

    9

    Study the model instead of the real system Usually much easier, faster, cheaper, safer

    Set of assumptions/approximations about how the system works

    Can try wide-ranging ideas with the model Make your mistakes on the computer where they dont count, rather

    than for real where they do count Often, just building the model is instructive regardless of results Model validity (any kind of model not just simulation)

    Care in building to mimic reality faithfully Level of detail Get same conclusions from the model as you would from system

    Dr. Aneesh Chinubhai

    Models

    10

    Static Represents the relationships between various components of a

    system at a specific point in time

    Dynamic Represents the relationships and changes in the system over a

    period of time.

    Dr. Aneesh Chinubhai

    Models

    11

    Physical Models Also called iconic models Exact replica of the properties of the real-life system, but in

    smaller scale E.g. models of buildings, aircraft, automobiles, etc.

    Mathematical Models Representation of a system using mathematical equations

    Often uses differential calculus, probability theory, etc.

    Often limited by restrictive assumptions

    Dr. Aneesh Chinubhai

    Models

    12

    Computer Simulation When mathematical analysis methods are not available,

    simulation may be the only viable tool When mathematical analysis methods are available, but are so

    complex that simulation may provide a simpler solution Computer representation of a system

    A computer model with random elements and an underlying timeline is called a Monte Carlo simulation model

    Dr. Aneesh Chinubhai

  • 3/4/2015

    Dr. Aneesh Chinubhai 4

    Monte Carlo Simulation

    13

    In 1946, physicists at Los Alamos Scientific Laboratory were investigating radiation shielding and the distance that neutrons would likely travel through various materials.

    Unable to solve the problem using conventional, deterministic mathematical methods

    Stanislaw Ulam had the idea of using random experiments and later described the idea to John von Neumann and Nicholas Metropolis

    Being secret, the work of von Neumann and Ulam required a code name

    Metropolis chose the name Monte Carlo The name refers to the Monte Carlo Casino in Monaco where Ulam's

    uncle would borrow money to gamble

    Dr. Aneesh Chinubhai

    Monte Carlo Simulation

    14

    Rely on repeated random sampling to obtain numerical results Typically one runs simulations many times over in order to

    obtain the distribution of an unknown probabilistic entity The name comes from the resemblance of the technique to

    the act of playing and recording results in a real gambling casino

    They are often used in physical and mathematical problems and are most useful when it is difficult or impossible to obtain a closed-form expression, or infeasible to apply a deterministic algorithm.

    Dr. Aneesh Chinubhai

    Monte Carlo Simulation General Pattern

    15

    Define a domain of possible inputs. Generate inputs randomly from a probability distribution

    over the domain. Perform a deterministic computation on the inputs. Aggregate the results.

    Dr. Aneesh Chinubhai

    Monte Carlo Experiment Estimate the Value of

    16

    Procedure Draw a square on the ground,

    then inscribe a circle within it. Uniformly scatter some

    objects of uniform size (grains of rice or sand) over the square.

    Count the number of objects inside the circle and the total number of objects.

    The ratio of the two counts is an estimate of the ratio of the two areas, which is /4. Multiply the result by 4 to estimate .

    Dr. Aneesh Chinubhai

  • 3/4/2015

    Dr. Aneesh Chinubhai 5

    Monte Carlo Simulation

    17

    In this procedure the domain of inputs is the square that circumscribes the circle.

    We generate random inputs by scattering grains over the square then perform a computation on each input (test whether it falls within the circle).

    Finally, we aggregate the results to obtain our final result, the approximation of .

    Caveats If the grains are not uniformly distributed, then our approximation will

    be poor. Secondly, there should be a large number of inputs. The approximation

    is generally poor if only a few grains are randomly dropped into the whole square.

    Dr. Aneesh Chinubhai

    Simulation

    18

    Simulation The imitation of the operation of a real-world process or system over time Develop a set of assumptions of mathematical, logical, and symbolic relationship

    between the entities of interest, of the system. Estimate the measures of performance of the system with the simulation-

    generated data

    Simulation modeling can be used As an analysis tool for predicting the effect of changes to existing systems As a design tool to predict the performance of new systems

    Real-world process concerning the behavior of a system

    A set of assumptionsModeling &

    Analysis

    Dr. Aneesh Chinubhai

    When is simulation appropriate?

    19

    Simulation enables the study of, and experimentation with, the internal interactions of a complex system, or of a subsystem within a complex system.

    Informational, organizational, and environmental changes can be simulated, and the effect of these alterations on the models behavior can be observed.

    The knowledge gained in designing a simulation model may be of great value toward suggesting improvement in the system under investigation.

    By changing simulation inputs and observing the resulting outputs, valuable insight may be obtained into which variables are most important and how variables interact.

    Simulation can be used as a pedagogical device to reinforce analytic solution methodologies.

    Dr. Aneesh Chinubhai

    When is simulation appropriate?

    20

    Simulation models designed for training allow learning without the cost and disruption of on-the-job learning.

    Animation shows a system in simulated operation so that the plan can be visualized.

    The modern system (factory, wafer fabrication plant, service organization, etc.) is so complex that the interactions can be treated only through simulation.

    Dr. Aneesh Chinubhai

  • 3/4/2015

    Dr. Aneesh Chinubhai 6

    When is simulation NOT appropriate?

    21

    When the problem can be solved using common sense.

    When the problem can be solved analytically.

    When it is easier to perform direct experiments.

    When the simulation costs exceed the savings.

    When resources or time are not available managers ask for too much too soon.

    When system behavior is too complex or cant be defined.

    When there isnt the ability to verify and validate the model.

    Dr. Aneesh Chinubhai

    Advantages of Simulation

    22

    Hypotheses about how or why certain phenomena occur can be tested for feasibility.

    Time can be compressed or expanded to allow for a speed-up or slow-down of the phenomena under investigation.

    Insight can be obtained about the interaction of variables. Insight can be obtained about the importance of variables to the

    performance of the system. Bottleneck analysis can be performed to discover where work in

    process, information, materials, and so on are being delayed excessively.

    A simulation study can help in understanding how the system operates rather than how individuals think the system operates. .

    What if questions can be answered.

    Dr. Aneesh Chinubhai

    Disadvantages of Simulation

    23

    Easy to do badly Model building requires special training. It is an art that is learned over time and through

    experience. Furthermore, if two models are constructed by different competent individuals, they might

    have similarities, but it is highly unlikely that they will be the same.

    Simulation results can be difficult to interpret. Most simulation outputs are essentially random variables (they are usually based on

    random inputs), so it can be hard to distinguish whether an observation is a result of system interrelationships. or of randomness.

    Simulation modeling and analysis can be time consuming and expensive. Skimping on resources for modeling and analysis could result in a simulation model or

    analysis that is not sufficient to the task.

    Simulation is used in some cases when an analytical solution is possible, or even preferable This might be particularly true in the simulation of some waiting lines where closed-form

    queuing models are available.

    Dr. Aneesh Chinubhai

    Disadvantages of Simulation

    24

    Random In Random Out (RIRO) Dont expect exact answers, only approximations/estimates Effects can be lessened by

    Statistical design, analysis of simulation experiments Replicability, sequential sampling, variance-reduction techniques

    Dr. Aneesh Chinubhai

  • 3/4/2015

    Dr. Aneesh Chinubhai 7

    System

    25

    A group of objects that are joined together in some regular interaction or interdependence toward the accomplishment of some purpose.

    System Environment Changes occurring outside the system.

    The decision on the boundary between the system and its environment may depend on the purpose of the study.

    Dr. Aneesh Chinubhai

    Components of a Simulation Model

    26

    Entities Players that move around, change status, affect and are

    affected by other entities Dynamic objects get created, move around, leave (maybe) Usually represent real things Can have fake entities for modeling tricks

    Simulation termination, breakdown demon, break angel

    Usually have multiple realizations floating around Can have different types of entities concurrently Usually, identifying the types of entities is the first thing to do

    in building a model

    Dr. Aneesh Chinubhai

    Components of a Simulation Model

    27

    Attributes Characteristic of all entities describe, differentiate All entities have same attribute slots but different values for

    different entities, for example: Time of arrival Due date Priority Color

    Attribute value tied to a specific entity Some automatic, some you define

    Dr. Aneesh Chinubhai

    Components of a Simulation Model

    28

    Event An instantaneous occurrence that changes the state of a system

    (such as the completion of a service, or the arrival of an entity).

    Activity A duration of time of specified length (e.g. a service time or inter-

    arrival time), which is known when it begins (although it may be defined in terms of a statistical distribution).

    Endogenous Activities and events occurring within a system.

    Exogenous Activities and events in an environment that affect the system.

    Dr. Aneesh Chinubhai

  • 3/4/2015

    Dr. Aneesh Chinubhai 8

    Components of a Simulation Model

    29

    Event notice A record of an event to occur at the current or some future time,

    along with any associated data necessary to execute the event; at a minimum the record includes the event type and the event time.

    Event list A list of event notices for future events, ordered by time of

    occurrence; also known as the Future Events List.

    Delay A duration of time of unspecified indefinite length, which is not

    known until it ends (e.g. a customers delay in a last-in-first-out waiting line which, when it begins, depends on future arrivals).

    Simulation Clock A variable representing simulated time.

    Dr. Aneesh Chinubhai

    Components of a Simulation Model

    30

    Resources What entities compete for

    People Equipment Space

    Entity seizes a resource, uses it, releases it Think of a resource being assigned to an entity, rather than an

    entity belonging to a resource A resource can have several units of capacity

    Seats at a table in a restaurant Identical ticketing agents at an airline counter

    Number of units of resource can be changed during the simulation

    Dr. Aneesh Chinubhai

    Components of a Simulation Model

    31

    Queues Place for entities to wait when they cant move on (maybe

    since the resource they want to seize is not available) Have names, often tied to a corresponding resource Can have a finite capacity to model limited space have to

    model what to do if an entity shows up to a queue thats already full

    Usually watch the length of a queue, waiting time in it

    Dr. Aneesh Chinubhai

    Components of a Simulation Model

    32

    Statistical accumulators Variables that watch whats happening Depend on output performance measures desired Passive in model dont participate, just watch Many are automatic, but some you may have to set up and

    maintain during the simulation At end of simulation, used to compute final output

    performance measures

    Dr. Aneesh Chinubhai

  • 3/4/2015

    Dr. Aneesh Chinubhai 9

    How much detail should there be?

    33

    Accuracy of the model

    Scope & level of details

    Scope & level of details

    Cost of model

    Dr. Aneesh Chinubhai

    Discrete and Continuous Systems

    34

    A dynamic system model is continuous or discrete. Many traditional dynamic systems have state variables that

    evolve continuously. An oscillating pendulum, level of water in a dam In each of these cases the motion is characterized by one or more

    differential equations which model the continuous time evolution of the system.

    In contrast, the kinds of queuing, machine repair and inventory systems are discrete because the state of the system is a piecewise-constant function (step function) of time. For example, the number of jobs in a queuing system is a natural

    state variable that only changes value at those discrete times when a job arrives (to be served) or departs (after being served).

    Dr. Aneesh Chinubhai

    Discrete and Continuous Systems

    35 Dr. Aneesh Chinubhai 36 Dr. Aneesh Chinubhai