simulation unit 3

Upload: sreekumar-kalarikkal

Post on 10-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Simulation Unit 3

    1/59

    1

    Statistical Models in Simulation

  • 8/8/2019 Simulation Unit 3

    2/59

    y In Modeling real-world phenomena there are few

    situations where the actions of the entities withinthe system under study can be completelypredicted in advance

    y The world the model builder sees is probabilisticrather than deterministic

    y Some statistical model might well describe thevariations.

    y An appropriate model can be developed bysampling the phenomenon of interest. Then

    through educated guesses, the model builderwould select a known distribution form, make anestimate of parameter of this distribution, andthen test to see how a good fit has been obtained

    2

  • 8/8/2019 Simulation Unit 3

    3/59

    Review of Terminology and ConceptsReview of Terminology and Concepts

    Discrete random variables :Let X be a random variable. If the no:of possible values ofX is finite, or countably infinite, X is called a discreterandom variable. The possible values of X may be listed as

    x1, x2, ..E.g:

    The no. of jobs arriving each week at a job shop isobserved; random variable X (no. of jobs arriving each

    week)The possible values of X are given by the range space ofX, which is denoted by Rx. Here Rx = {0,1,2}

    3

  • 8/8/2019 Simulation Unit 3

    4/59

    Discrete Random variable.Discrete Random variable.

    y With each possible outcome xi in Rx, a no: p(xi) = P(X=xi)

    gives the probability that the random variable equals thevalue of xi

    The numbers p(xi), i = 1,2,.. must satisfy the following2 conditions

    1. p(xi) >= 0 for all i

    2. i = 1p(xi) = 1

    The collection of pairs (xi, p(xi)), i =1,2,.. is called theprobability distribution of X, andp(xi) is called theprobability mass function (pmf) of X

    4

  • 8/8/2019 Simulation Unit 3

    5/59

    Continuous Random VariablesContinuous Random Variables

    Xis a continuous random variable if its range spaceRx is aninterval or a collection of intervals.

    y For a continuous random variable X, the probability thatX

    lies in the interval [a, b] is given by:

    P(a X b) = a b f(x) dx

    The function f(x) is called theprobability density function(pdf) of the random variable X.

    5

  • 8/8/2019 Simulation Unit 3

    6/59

    Continuous random variable..Continuous random variable..

    The pdf satisfies the following conditions:

    a) f(x) 0 for all x in Rx.b) Rx f(x) dx=1

    c) f(x) = 0 if x is not in Rx.

    For any specified value x0,P(X = x0)=0,

    since x0 x0f(x) dx = 0

    6

  • 8/8/2019 Simulation Unit 3

    7/59

    Cumulative Distribution Function

    CumulativeDistribution Function (cdf) is denotedby F(x), where it measures the probability thatthe random variable X assumes a value less thanor equal to x, i.e.

    y F(x) = P(X x)

    y If X is discrete, then

    F(x)=all xi x p(xi)y If X is continuous, theny F(x) = -x f(t) dt

    7

  • 8/8/2019 Simulation Unit 3

    8/59

    y

    Properties of cdf are,y a) F is a nondecreasing function.

    If a< b, then F(a) F(b).b) lim x F(x)=1c) lim x- F(x)=0

    Here P(a < X b ) = F(b) - F(a) for all a< b

    8

  • 8/8/2019 Simulation Unit 3

    9/59

    ExpectationExpectation

    y If X is a random variable, the expected value ofXis

    denoted byE(X)y IfXis discrete, E(X)= all i xi p(xi)

    y IfXis continuous, E(X) = - xf(x)dx

    y The Expected value E(X) of a random variable X isalso referred to as the mean,, orthe first momentof X.

    y The nth moment of X is computed asy E(Xn) = all i xin p(xi) if X is discrete.

    y

    E(X

    n

    ) = -

    xn

    f(x)dx if X is continuous. 9

  • 8/8/2019 Simulation Unit 3

    10/59

    y The variance of a random variableXis denoted by V(X) or

    var(X) or 2y V(X) = E[(X E[X])2]

    y Also, V(X) = E(X2) [E(X)]2

    y The Variance of X measures the expected value of the

    squared difference between the random variable and itsmean.

    y Thus the variance V(X) is the variation of the possiblevalues of X around the mean E(X).

    y The standard deviation ofXis denoted by , it is thesquare root ofV(X).

    y Therefore standard deviation, = V(X)

    10

    Expectation

  • 8/8/2019 Simulation Unit 3

    11/59

    Modey In the discrete case, the mode is the value of the

    random variable that occurs most frequently.

    y In the continuous case, the mode is the value of

    which the pdf is maximized.

    y The mode may not be unique.

    y If the modal value occurs at two values of therandom variable, the distribution is said to bebimodal.

    11

  • 8/8/2019 Simulation Unit 3

    12/59

    Useful Statistical ModelsUseful Statistical Modelsy Statistical models appropriate to some

    application areas :y The areas include:

    y Queueing systemsy Inventory and supply-chain systemsy Reliability and maintainability

    y Limited data

    12

  • 8/8/2019 Simulation Unit 3

    13/59

    QueueingQueueing SystemsSystems

    y In queueing systems, the time between arrivals andservice times are always probabilistic; However itis possible to have a constant interarrival time orconstant service time.

    y

    Eg: Line moving at a constant speed in theassembly of an automobile

    y The distribution of time between arrivals and the

    distribution of the number of arrivals per timeperiod are important in the simulation of waiting-line systems

    y Service times may be constant or probabilistic

    13

  • 8/8/2019 Simulation Unit 3

    14/59

    Sample statistical models for interarrival or servicetime distribution:

    y Exponential distribution: if service times arecompletely random

    y Normal distribution: fairly constant but with

    some random variability (either positive ornegative)y Truncated normal distribution: similar to normal

    distribution but with restricted value.y Gamma and Weibull distribution: more general

    than exponential (involving location of themodes of pdfs .)

    14

  • 8/8/2019 Simulation Unit 3

    15/59

    Inventory systemsInventory systems

    y There are 3 Random variables

    o The number of units demanded per order or per timeperiod

    o The time between demands

    o The Lead time (time between placing an order forstocking the inventory system and the receipt of thatorder)

    y

    In Mathematical models of Inventory systems demand isa constant over time and lead time is 0 or a constant.

    y In simulation models demand occurs randomly in time.

    15

  • 8/8/2019 Simulation Unit 3

    16/59

    Sample statistical models for lead time distribution :

    GammaSample statistical models for demand distribution:y Poisson: simple, extensively tabulated and well

    known.y Negative binomial distribution: longer tail than

    Poisson (more large demands).y Geometric: special case of negative binomial ,has

    its mode at unity ,given that at least one demandhas occurred.

    16

  • 8/8/2019 Simulation Unit 3

    17/59

    Reliability and maintainabilityReliability and maintainability

    Time to failure has been modeled with numerousdistributions, including the exponential, gammaand Weibull.

    If only random failures occur, the time-to-failure

    distribution may be modeled as exponential. Gamma: In a case where each component has an

    exponential time to failure. When there are a number of components in a

    system and failure is due to the most serious of alarge number of defects, or possible defects, theWeilbull distribution seems to do particularly wellas a model .

    17

  • 8/8/2019 Simulation Unit 3

    18/59

    Limited DataLimited Data

    y

    In many instances simulations begin before datacollection has been completed

    y 3 distributions have application to incomplete or

    limited datay Uniform, triangular and beta distributions.

    y Uniform distribution can be used when an

    interarrival or service time is known to be random,but no information is immediately available aboutthe distribution

    18

  • 8/8/2019 Simulation Unit 3

    19/59

    Limited dataLimited data

    y Triangular distribution can be used whenassumptions are made about the minimum,maximum and modal values of the random

    variable

    y Beta distribution provides a variety of

    distributional forms on the unit interval, which,with appropriate modification, can be shifted toany desired interval

    19

  • 8/8/2019 Simulation Unit 3

    20/59

    DiscreteDistributionsy Discrete random variables are used to describe

    random phenomena in which only integer valuescan occur.

    y It containsy Bernoulli trials and Bernoulli distributiony Binomial distribution

    y

    Geometric distributiony Poisson distribution

    20

  • 8/8/2019 Simulation Unit 3

    21/59

    Bernoulli Trials and Bernoulli Distribution [Discrete..]

    Bernoulli Trials:

    Consider an experiment consisting of n trials, each can bea success or a failure.

    LetXj = 1 ifthe jthexperiment is a success

    andXj = 0 ifthe jthexperiment is a failure

    p, xj = 1, j=1,2,n

    pj (xj) =p(xj) = 1-p = q, xj = 0, j=1,2,n0, otherwise

    For one trial, distribution denoted by this equation iscalled Bernoulli Distribution.

    21

  • 8/8/2019 Simulation Unit 3

    22/59

    y The Bernoulli distribution (one trial):

    y where meanE(Xj) = 0. q+ 1.p = p

    y and V(Xj) = [(o2 . q) + (12 . p)] p2 =p(1-p) = pq

    Bernoulli process:

    The n Bernoulli trials are called a Bernoulli process if

    i) the trials are independenty ii)Each trial has only two possible outcomes ie success or

    failure

    y iii)and the probability of a success remains constant from trial

    to trial.y Thus p(x1,x2,, xn) = p1(x1). p2(x2) ..pn(xn)

    22

  • 8/8/2019 Simulation Unit 3

    23/59

    Binomial Distribution [Discrete ..]

    y The random variable X denotes the no of

    success in n Bernoulli trials has a binomial distribution givenby P(x) where

    y p(x) = (n x) px qn-x, x = 0,1,2,n

    0, otherwise

    It determines the probability of a particular outcome with allthe success ,each denoted by S, occurring in the first x trialsfollowed by the n-x failures, each denoted by an F.

    y

    P( SSS..SS FFFFF ) = px

    qn-x

    y x values n-x values

    y The mean,E(x) = p + p + + p = n*p

    y The variance, V(X) = pq + pq + + pq = n*pq23

  • 8/8/2019 Simulation Unit 3

    24/59

    y GeometricDistribution [Discrete. ]

    y Related to Bernoulli distributions. The randomvariable of interest X is defined to be the number

    of trials to achieve the 1st success.

    y The distribution ofX is given by

    y p(x) = qx-1 p , x=1,2,..

    y 0, otherwise

    24

  • 8/8/2019 Simulation Unit 3

    25/59

    y The event { X=x2} occurs when there are x-1failures followed by a success.

    y Probability of failure = q = 1-py Probability of success = p

    y P(FFF...FS) = qx-1p

    y Mean = E(X) = 1/p

    y

    Variance = V(x) = q/p2

  • 8/8/2019 Simulation Unit 3

    26/59

    Poisson Distribution [DiscreteDistn] Poisson distribution describes many random

    processes quite well and is mathematically quitesimple.

    Poisson probability mass function is given by,

    p(x) = (e- x) /x ! ,x=0,1,. 0 , otherwise where > 0

    Important property of poisson distribution is , Mean E(X) = Variance V(X) = The cumulative distribution function is given by,

    F(x) = i=0x (e- i) / i ! 26

  • 8/8/2019 Simulation Unit 3

    27/59

    Poisson Distribution [DiscreteDistn]

    Example: A computer repair person is beeped each

    time there is a call for service. The number of beeps perhour ~ Poisson( = 2 per hour).Find the probability of three beeps in the next hour:

    p(3) =e-223/3! = 0.18

    The probability of two or more beeps in a 1-hourperiod:

    p(2 or more) =

    1 p(0) p(1) = 0.594

    27

  • 8/8/2019 Simulation Unit 3

    28/59

    28

    Queuing Modelsy Simulation is often used in the analysis of queuing

    models

    y In a simple typical queuing model, customers arrivefrom time to time and join a queue or waiting line,

    are eventually served and finally leave the systemy The term customer refers to any type of entity

    that can be viewed as requesting service from asystem

    y Eg: ofQueueing systemsy Production systems, repair and maintenance

    facilities, communications and computer systems,transport and material handling systems

  • 8/8/2019 Simulation Unit 3

    29/59

    29

    Queuing Models

    y Queueing models provide the analyst with a

    powerful tool for designing and evaluating theperformance ofQueueing systems

    y Queuing theory and simulation analysis are usedto predict the measures of system performance as

    a function of the input parameters.

    y System performance server utilization, length ofwaiting lines and delays of customers

    y

    Input parameters arrival rate of customers, theservice demands of customers, the rate at whichthe server works and the no. of servers

  • 8/8/2019 Simulation Unit 3

    30/59

    30

    Queuing Models

    y For relatively simple systems, these performancemeasures can be computed mathematically at greatsavings in time and expense compared to the useof a simulation model;

    y But for realistic models of a complex systems,simulation is usually required

  • 8/8/2019 Simulation Unit 3

    31/59

    31

    Characteristics ofQueuing Systemsy K

    ey elements customers and serversy Customer people, machines, trucks, mechanics, patients,

    airplanes, orders etc.

    y Server receptionists, repairpersons, automatic storages andretrieval machines,CPU in computers

    (i)Calling population

    (ii) System Capacity

    (iii)The Arrival Process

    (iv)Queue behavior and Queue discipline

    (v) Service times & Service mechanism.

  • 8/8/2019 Simulation Unit 3

    32/59

    32

    The Calling Population

    y The population of potential customers

    y Assumed to be finite or infinite

    y Eg: ofFinite calling population A bank of 5

    machines that are curing tiresy The machines are customers, who arrive at the

    instant they automatically open

    y The worker is the server , who serves an open

    machine as soon as possible

  • 8/8/2019 Simulation Unit 3

    33/59

    33

    The Calling Population

    y In systems with a large population of potentialcustomers, the calling population is usually infinite.

    y Eg.s of infinite populations include the potentialcustomers of a restaurant or a bank

    y The main difference between finite and infinitepopulation models is how the arrival rate is defined.

    y In an infinite-population model, the arrival rate isnot affected by the number of customers who have

    left the calling population and joined the queuingsystem; When the arrival process is homogenousover time, then the arrival rate will be constant

  • 8/8/2019 Simulation Unit 3

    34/59

    34

    The Calling Population

    y For Finite calling population models, the arrivalrate to the queuing system does depend on thenumber of customers being served and waiting.

    y Eg: Five tire curing machines serviced by a single

    worker.y When all five are closed and curing a tire ,the

    worker is idle and the arrival rate is at a maximum.

    y At the instant a machine opens and requires

    service the arrival rate decreases.y At those times when all five are open, the arrival

    rate is zero.

  • 8/8/2019 Simulation Unit 3

    35/59

    35

    System Capacity

    y

    In many queueing systems there is a limit to thenumber of customers that may be in the waiting

    line or system

    y An arriving customer who finds the system fulldoes not enter but returns immediately to thecalling population

    y Some systems may have an unlimited capacity

    y If the system is having a limited capacity, then adistinction is made between the arrival rate (theno of arrivals per time) and the effective arrivalrate (the no who arrive and enter the system pertime)

  • 8/8/2019 Simulation Unit 3

    36/59

    36

    The Arrival Process

    y

    The arrival process for infinite-populationmodels is usually characterized in terms ofinterarrival times of successive customers

    y Arrivals may occur at scheduled times or at

    random times;

    y when at random times, the interarrival

    times are usually characterized by a

    probability distribution

  • 8/8/2019 Simulation Unit 3

    37/59

    37

    The Arrival Process

    y Imp model for random arrivals is the Poissonarrival process

    If An represents the interarrival time betweencustomer n-1 and customer n, then for a Poissonarrival process An is exponentially distributed withmean 1/ time units. The arrival rate is

    customers per time unit.y The number of arrivals in a time interval of length

    t, say N(t) has the Poisson distribution with meant customers.

    y The Poisson arrival process has been successfullyemployed as a model of the arrival of people torestaurants, drive-in banks and other servicefacilities; arrival of demands or orders, for a service

    or product etc.

  • 8/8/2019 Simulation Unit 3

    38/59

    38

    The Arrival Process

    y

    A second important class of arrivals is thescheduled arrivals, such as patients to doctorsroom or scheduled airline flight arrivals to anairport

    y In this case, the interarrival times {An , n = 1,2,.}may be constant or constant plus or minus a smallrandom amount to represent early or late arrivals

    y A third situation occurs when at least onecustomer is assumed to always be present in thequeue so that the server is not idle because of thelack of customers

  • 8/8/2019 Simulation Unit 3

    39/59

    39

    Queue Behavior and Queue Discipline

    y Queue behavior refers to customer actions while ina queue waiting for service to begin.

    y In some situations there is a possibility that

    incoming customers may balk (leave when they seethat line is long), renege (leave after being in the linewhen they see that line is moving very slowly), or

    jockey (move from one line to another if they thinkthey have chosen a slow line)

  • 8/8/2019 Simulation Unit 3

    40/59

    40

    Queue Behavior and Queue Discipline

    y

    Queue discipline refers to the logical ordering ofcustomers in a queue and determines whichcustomer will be chosen for service when a serverbecomes free

    y Common queue disciplines include FIFO, LIFO,service in random order (SIRO), shortestprocessing time first (SPT) and service according

    to priority(PR)

  • 8/8/2019 Simulation Unit 3

    41/59

    41

    Service Times and the Service Mechanism

    y The Service times of successive arrivals aredenoted by S1,S2,S3, They may be constantor of random duration

    y

    {S

    1,S

    2,} isusually characterized as a seq

    uenceof independent and identically distributed random

    variables

    y The services may be identically distributed for all

    customers of a given type or class or priority, whilecustomers of different types may have completelydifferent service-time distributions

  • 8/8/2019 Simulation Unit 3

    42/59

    42

    Service Times and the Service Mechanism

    y In some systems, service times depend on thetime of day or the length of the waiting line

    For eg: servers may work faster than usual when

    the waiting line is long, effectively reducing theservice times

    y A queuing system consists of a number of servicecenters and interconnecting queues.

  • 8/8/2019 Simulation Unit 3

    43/59

    43

    Service Times and the Service Mechanism

    y

    Each service center consists of some number ofservers, c, working in parallel; ie upon getting tothe head of the line, a customer takes the firstavailable server.

    y Parallel service mechanisms are either single

    server (c = 1), multiple server (1 < c < ) or

    unlimited servers (c = )

  • 8/8/2019 Simulation Unit 3

    44/59

    44

    Queuing Notation :-

    Kendall [1953] proposed a notational system for parallelserver systems. It is in the format A/B/c/N/K.A : the interarrival . time distributionB : the service . time distribution

    C : the number of parallel serversN : system capacityK : the size of the calling population.Common symbols for A and B are :M : Exponential or Markov

    D : constant or deterministicEk : arbitary or generalGI : general independent.

  • 8/8/2019 Simulation Unit 3

    45/59

    45

    Pn : Steady-state probability of having n customers in system.

    Pn(t): Probability of n customers in system at time t.

    L : Arrival rate

    Le : Effective arrival rate

    U : Service rate of one server

    P : Server utilization

    An : Interarrival time between customers n-1 and n

    Sn : Service time of the nth arriving customer.Wn : Total time spent in system by the nth arriving customer.

    Wnq : Total time spent in the waiting line by customer n

    L (t) : The number of customers in system at time t.

    Lq(t) : The number of customers in queue at time t.

    L : long-run time-average number of customers in system.

    Lq : Long-run time-average number of customers in queue.

    W : Long-run average time spent in system per customer.

    Wq : Long-run average time spent in queue per customer.

  • 8/8/2019 Simulation Unit 3

    46/59

    46

    Long-run Measures of performance of Queuing system

    The primary long run measures of performance ofqueueing systems are the long-run time average numberof customers in the system(L) and in the Queue (LQ),

    the long run average time spent in the system(w) and inthe queue (wQ) per customer, and the server utilizationie busy time of server (V).

    Here the term System refers to waiting line

    +service mechanism and the term Queue refers to thewaiting line alone.

    L M f f f Q i t

  • 8/8/2019 Simulation Unit 3

    47/59

    47

    1. Time-Averagenumberin System, L :Consider, a queuing system over a period of time T. Let L(t)

    denote the number of customers in the system at time t. Let Tidenote the total time during [0,T] in which the system containedexactly i customers. In General,

    i=07gTi = TThe time-weighted-average number in the system is defined

    byL^= (1/ T) i=07g i Ti = i=07g i { Ti / T }.(1)

    i=07g i Ti = 0TL(t) dt

    L^ =

    (1/ T) 0T

    L(t) dt.(2)The expression in equations (1) and (2) are always equal for anyqueuing system, regardless of the number of servers, the queuediscipline, or any other special circumstances. This average isalso called time-integrated average.

    Long-runMeasures ofperformanceofQueuing system

  • 8/8/2019 Simulation Unit 3

    48/59

    48

    As time T gets large, the observed value L approaches a limitingvalue say L, which is called the long-run time-average number

    in the system. That is with probability 1L^ = (1/ T) 0TL(t) dt p L as T p g...... (3)

    Let LQ(t) denote the number of customers waiting in line, and

    TiQ denote the total time during [0,T] in which exactly icustomers are waiting in line thenL^Q= (1/ T) i=07g i TiQ =(1/ T) 0T LQ(t) dt p LQ as T p g...(4)Where L^Q is the observed time-average number of customers

    waiting in line from time 0 to T and LQ is the long-run time-average number of customers waiting in line.

  • 8/8/2019 Simulation Unit 3

    49/59

    49

    2.AverageTime spent in system percustomer, w;Consider, a queuing system over a period of time T.Let Wi be the time spent by customer i in the system during

    [0, T]. The average time spent in the system per customer,called the average system time, is given by = (1/ N) i=17N Wi................(1)Where N is the number of arrivals in [0, T].

    For stable systems as N p g , p wLet WiQ denote the total time customer i spends waiting inqueue. Let Q be the observed average time spent in thequeue(called delay) and wQbe the long-run average delay per

    customer. Thenq = (1/ N) i=17N WiQ.......(2)q p wQ as Np g

  • 8/8/2019 Simulation Unit 3

    50/59

    50

    3. The Conservation equation : L = wL^ = ^ w ^ This relation holds for almost all queueing

    systems.When Tp g and N p g The equation becomes L = w.It says that the average number of customers in the system atan arbitrary point in time is equal to the average number ofarrivals per time unit , times the average time spent in thesystem.

    4. The ServerUtilizationServerUtilization is defined as the proportion of time that a

    server is busy.V^ is defined over a specified time interval[0,T] .Long run server utilization is denoted byV.V^p V as N p g .

  • 8/8/2019 Simulation Unit 3

    51/59

    51

    Pn : Steady-state probability of having n customers in system.

    Pn(t): Probability of n customers in system at time t.

    L : Arrival rate

    Le : Effective arrival rate

    U : Service rate of one server

    P : Server utilization

    An : Interarrival time between customers n-1 and n

    Sn : Service time of the nth arriving customer.

    Wn : Total time spent in system by the nth arriving customer.Wnq : Total time spent in the waiting line by customer n

    L (t) : The number of customers in system at time t.

    Lq(t) : The number of customers in queue at time t.

    L : long-run time-average number of customers in system.

    Lq : Long-run time-average number of customers in queue.

    W : Long-run average time spent in system per customer.

    Wq : Long-run average time spent in queue per customer.

  • 8/8/2019 Simulation Unit 3

    52/59

    Steady State Behavior of Infinite populationMarkovian ModelsFor the infinite population models , the arrivals are assumed to

    follow a Poisson process with rate P arrivals per time unit. i.einter arrival times are assumed to be exponentially distributedwith mean 1/ P.

    Service times may be exponentially distributed.The queue discipline will be FIFO. Because of the exponential

    distributional assumptions on the arrival process ,these modelsare called Markovian Models.

    A Queueing system is said to be instatistical equilibrium or steadystate ,provided the probability thatthe system is in a state which does not depend on time.

    i.e P(L(t) = n) = Pn(t) = Pn is independent of time t.

  • 8/8/2019 Simulation Unit 3

    53/59

    The steady state parameterL ,the time average

    number of customers in the system isL = n=07g n PnWhere Pn are the steady state probabilities.The other parameters are

    w = L / PwQ = w (1 / Q)LQ = P wQ

    Where P is the arrival rate and Q is the service rateper server.

  • 8/8/2019 Simulation Unit 3

    54/59

    1. Single-server Queues with poisson arrivals and Unlimitedcapacity: M/ G / 1( i.e capacity & calling population are infinite)

    Steady state parameters areV = P/ QL =V +P2(1/ Q2 + 2 ) =V +V2 (1+ Q2 2)

    2(1- V ) 2(1- V )

    w = 1 + P(1/ Q2 + 2 )Q 2(1- V )

    wQ = P(1/ Q2 + 2 )

    2(1- V )LQ = P2(1/ Q2 + 2 ) = V2 (1+ Q2 2)

    2(1- V ) 2(1- V )P0 = 1- V

    2 M/ M / 1 Queue : Steady state parameters are

  • 8/8/2019 Simulation Unit 3

    55/59

    55

    2. M/ M / 1 Queue : Steady state parameters are

    i) V = P/ Qii) L = P = V

    Q - P (1- V )iii) w = 1 = 1

    Q - P Q(1- V )

    iv) wQ = P = VQ (Q - P ) Q (1- V )

    v)LQ = P2 = V2

    Q (Q - P ) (1- V )

    vi) Pn = (1- P/ Q) (P/ Q)n = (1- V)Vn

    2 Multiserver Queue: M/ M / c / /

  • 8/8/2019 Simulation Unit 3

    56/59

    56

    2. Multiserver Queue: M/ M / c / / Here c channels (servers) operating in parallel. These channels

    has an independent and identical exponential service timedistribution with mean 1/ Q .The arrival process is poissonwith rate P. Arrivals will join a single queue and enter thefirst available service channel. If the number in the systemis n < c , an arrival will enter an available channel .When n c, a queue is formed.

    Steady state parameters are:i)V = P /cQ

    ii)P0 = {[ n=0 c-1 ( P/ Q)n] + [ (P/ Q)c (1 / c!) (cQ) ] }-1

    n! (cQ - P)

    = {[ n=0 c-1 ( c V)n] + [ (c V)c (1 / c!) 1 ] }-1n! (1- V )

  • 8/8/2019 Simulation Unit 3

    57/59

    57

    iii) P(L(g ) c) = ( P/ Q)c P0 = ( c V)c P0c!(1 - P/c Q) c!(1 - V)

    iv)L = cV + (cV)c+1 P0

    = cV +V P(L(g ) c)c (c!)(1- V )2 (1 - V)

    v) w = L

    P

    vi) wQ = w (1/ Q)

    vii)LQ = P wQ = (cV)c+1 P0 = V P(L(g ) c)

    c (c!)(1- V )2 (1- V )

    viii) L LQ = cVix) P(w >0) = ( P/ Q)c P0

    c!(1 - V)

  • 8/8/2019 Simulation Unit 3

    58/59

    Steady State Behavior ofFinite population Models

    (M/M/c/K/K)For the finite population models with K customers,the arrivals are assumed to be exponentiallydistributed with mean 1/ P time units.

    Service times may be exponentially distributed withmean 1/ Q time units. There exist c parallel serversand system capacity is K.

  • 8/8/2019 Simulation Unit 3

    59/59

    y Steady state parameters are:i)V = Pe /cQ = (L - LQ) /cii)P0 = [ n=0 c-1 (K n)( P/ Q)n + n=c K K! ( P/ Q)n ] -1

    (K - n)! c! cn c

    iii) Pn = (K n) ( P/ Q)n P0 , n = 0,1,..c-1K! ( P/ Q)n P0 , , n = c , c+1,.K

    y (K - n)! c! cn c

    iv) L = n=0 K n Pnv) LQ = n=c+1 K (n - c )Pnvi) Pe = n=0 K(K - n) P Pnvii) w = L

    Pe

    viii) wQ = LQy Pe