# doc-cache created by Octave 11.3.0
# name: cache
# type: cell
# rows: 3
# columns: 61
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
ctmc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1596
 -- Function File: P = ctmc (Q)
 -- Function File: P = ctmc (Q, T, P0)

     Compute stationary or transient state occupancy probabilities for a
     continuous-time Markov chain.

     With a single argument, compute the stationary state occupancy
     probabilities P(1), ..., P(N) for a continuous-time Markov chain with
     finite state space {1, ..., N} and N \times N infinitesimal generator
     matrix Q.  With three arguments, compute the state occupancy probabilities
     P(1), ..., P(N) that the system is in state i at time T, given initial
     state occupancy probabilities P0(1), ..., P0(N) at time 0.

     *INPUTS*

     ‘Q(i,j)’
          Infinitesimal generator matrix.  Q is a N \times N square matrix where
          ‘Q(i,j)’ is the transition rate from state i to state j, for 1 ≤ i
          \neq j ≤ N. Q must satisfy the property that \sum_{j=1}^N Q_{i, j} = 0

     ‘T’
          Time at which to compute the transient probability (t ≥ 0).  If
          omitted, the function computes the steady state occupancy probability
          vector.

     ‘P0(i)’
          probability that the system is in state i at time 0.

     *OUTPUTS*

     ‘P(i)’
          If this function is invoked with a single argument, ‘P(i)’ is the
          steady-state probability that the system is in state i, i = 1, ..., N.
          If this function is invoked with three arguments, ‘P(i)’ is the
          probability that the system is in state i at time T, given the initial
          occupancy probabilities P0(1), ..., P0(N).

     See also: dtmc.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute stationary or transient state occupancy probabilities for a
continuou...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
ctmcbd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1203
 -- Function File: Q = ctmcbd (B, D)

     Returns the infinitesimal generator matrix Q for a continuous birth-death
     process over the finite state space {1, ..., N}.  For each i=1, ..., (N-1),
     ‘B(i)’ is the transition rate from state i to state (i+1), and ‘D(i)’ is
     the transition rate from state (i+1) to state i.

     Matrix \bf Q is therefore defined as:

           /                                                          \
           | -b(1)     b(1)                                           |
           |  d(1) -(d(1)+b(2))     b(2)                              |
           |           d(2)     -(d(2)+b(3))        b(3)              |
           |                                                          |
           |                ...           ...          ...            |
           |                                                          |
           |                       d(N-2)    -(d(N-2)+b(N-1))  b(N-1) |
           |                                       d(N-1)     -d(N-1) |
           \                                                          /

     where \lambda_i and \mu_i are the birth and death rates, respectively.

     See also: dtmcbd.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Returns the infinitesimal generator matrix Q for a continuous birth-death
pro...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
ctmcchkQ


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 268
 -- Function File: [RESULT ERR] = ctmcchkQ (Q)

     If Q is a valid infinitesimal generator matrix, return the size (number of
     rows or columns) of Q.  If Q is not an infinitesimal generator matrix, set
     RESULT to zero, and ERR to an appropriate error string.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
If Q is a valid infinitesimal generator matrix, return the size (number of ro...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
ctmcexps


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1455
 -- Function File: L = ctmcexps (Q, T, P )
 -- Function File: L = ctmcexps (Q, P)

     With three arguments, compute the expected times ‘L(i)’ spent in each state
     i during the time interval [0,t], assuming that the initial occupancy
     vector is P.  With two arguments, compute the expected time ‘L(i)’ spent in
     each transient state i until absorption.

     *Note:* In its current implementation, this function requires that an
     absorbing state is reachable from any non-absorbing state of Q.

     *INPUTS*

     ‘Q(i,j)’
          N \times N infinitesimal generator matrix.  ‘Q(i,j)’ is the transition
          rate from state i to state j, 1 ≤ i, j ≤ N, i \neq j.  The matrix Q
          must also satisfy the condition \sum_{j=1}^N Q_{i,j} = 0 for every
          i=1, ..., N.

     ‘T’
          If given, compute the expected sojourn times in [0,t]

     ‘P(i)’
          Initial occupancy probability vector; ‘P(i)’ is the probability the
          system is in state i at time 0, i = 1, ..., N

     *OUTPUTS*

     ‘L(i)’
          If this function is called with three arguments, ‘L(i)’ is the
          expected time spent in state i during the interval [0,t].  If this
          function is called with two arguments ‘L(i)’ is the expected time
          spent in transient state i until absorption; if state i is absorbing,
          ‘L(i)’ is zero.

     See also: dtmcexps.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 84
With three arguments, compute the expected times ‘L(i)’ spent in each state i...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
ctmcfpt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 870
 -- Function File: M = ctmcfpt (Q)
 -- Function File: M = ctmcfpt (Q, I, J)

     Compute mean first passage times for an irreducible continuous-time Markov
     chain.

     *INPUTS*

     ‘Q(i,j)’
          Infinitesimal generator matrix.  Q is a N \times N square matrix where
          ‘Q(i,j)’ is the transition rate from state i to state j, for 1 ≤ i, j
          ≤ N, i \neq j.  Transition rates must be nonnegative, and \sum_{j=1}^N
          Q_{i,j} = 0

     ‘I’
          Initial state.

     ‘J’
          Destination state.

     *OUTPUTS*

     ‘M(i,j)’
          average time before state J is visited for the first time, starting
          from state I.  We let ‘M(i,i) = 0’.

     ‘m’
          M is the average time before state J is visited for the first time,
          starting from state I.

     See also: ctmcmtta.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute mean first passage times for an irreducible continuous-time Markov
ch...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
ctmcisir


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 761
 -- Function File: [R S] = ctmcisir (P)

     Check if Q is irreducible, and identify Strongly Connected Components (SCC)
     in the transition graph of the DTMC with infinitesimal generator matrix Q.

     *INPUTS*

     ‘Q(i,j)’
          Infinitesimal generator matrix.  Q is a N \times N square matrix where
          ‘Q(i,j)’ is the transition rate from state i to state j, for 1 ≤ i, j
          ≤ N, i \neq j.

     *OUTPUTS*

     ‘R’
          1 if Q is irreducible, 0 otherwise.

     ‘S(i)’
          strongly connected component (SCC) that state i belongs to.  SCCs are
          numbered 1, 2, ....  If the graph is strongly connected, then there is
          a single SCC and the predicate ‘all(s == 1)’ evaluates to true.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Check if Q is irreducible, and identify Strongly Connected Components (SCC) i...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
ctmcmtta


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1065
 -- Function File: T = ctmcmtta (Q, P)

     Compute the Mean-Time to Absorption (MTTA) of the CTMC described by the
     infinitesimal generator matrix Q, starting from initial occupancy
     probabilities P.  If there are no absorbing states, this function fails
     with an error.

     *INPUTS*

     ‘Q(i,j)’
          N \times N infinitesimal generator matrix.  ‘Q(i,j)’ is the transition
          rate from state i to state j, i \neq j.  The matrix Q must satisfy the
          condition \sum_{j=1}^N Q_{i,j} = 0

     ‘P(i)’
          probability that the system is in state i at time 0, for each i=1,
          ..., N

     *OUTPUTS*

     ‘T’
          Mean time to absorption of the process represented by matrix Q.  If
          there are no absorbing states, this function fails.

     *REFERENCES*

        • G. Bolch, S. Greiner, H. de Meer and K. Trivedi, ‘Queueing Networks
          and Markov Chains: Modeling and Performance Evaluation with Computer
          Science Applications’, Wiley, 1998.

     See also: ctmcexps.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the Mean-Time to Absorption (MTTA) of the CTMC described by the
infin...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
ctmctaexps


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1270
 -- Function File: M = ctmctaexps (Q, T, P0)
 -- Function File: M = ctmctaexps (Q, P0)

     Compute the _time-averaged sojourn time_ ‘M(i)’, defined as the fraction of
     the time interval [0,t] (or until absorption) spent in state i, assuming
     that the state occupancy probabilities at time 0 are P.

     *INPUTS*

     ‘Q(i,j)’
          Infinitesimal generator matrix.  ‘Q(i,j)’ is the transition rate from
          state i to state j, 1 ≤ i,j ≤ N, i \neq j.  The matrix Q must also
          satisfy the condition \sum_{j=1}^N Q_{i,j} = 0

     ‘T’
          Time.  If omitted, the results are computed until absorption.

     ‘P0(i)’
          initial state occupancy probabilities.  ‘P0(i)’ is the probability
          that the system is in state i at time 0, i = 1, ..., N

     *OUTPUTS*

     ‘M(i)’
          When called with three arguments, ‘M(i)’ is the expected fraction of
          the interval [0,t] spent in state i assuming that the state occupancy
          probability at time zero is P.  When called with two arguments, ‘M(i)’
          is the expected fraction of time until absorption spent in state i; in
          this case the mean time to absorption is ‘sum(M)’.

     See also: ctmcexps.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 84
Compute the _time-averaged sojourn time_ ‘M(i)’, defined as the fraction of t...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
dtmc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1563
 -- Function File: P = dtmc (P)
 -- Function File: P = dtmc (P, N, P0)

     Compute stationary or transient state occupancy probabilities for a
     discrete-time Markov chain.

     With a single argument, compute the stationary state occupancy
     probabilities ‘P(1), ..., P(N)’ for a discrete-time Markov chain with
     finite state space {1, ..., N} and with N \times N transition matrix P.
     With three arguments, compute the transient state occupancy probabilities
     ‘P(1), ..., P(N)’ that the system is in state i after N steps, given
     initial occupancy probabilities P0(1), ..., P0(N).

     *INPUTS*

     ‘P(i,j)’
          transition probabilities from state i to state j.  P must be an N
          \times N irreducible stochastic matrix, meaning that the sum of each
          row must be 1 (\sum_{j=1}^N P_{i, j} = 1), and the rank of P must be
          N.

     ‘N’
          Number of transitions after which state occupancy probabilities are
          computed (scalar, n ≥ 0)

     ‘P0(i)’
          probability that at step 0 the system is in state i (vector of length
          N).

     *OUTPUTS*

     ‘P(i)’
          If this function is called with a single argument, ‘P(i)’ is the
          steady-state probability that the system is in state i.  If this
          function is called with three arguments, ‘P(i)’ is the probability
          that the system is in state i after N transitions, given the
          probabilities ‘P0(i)’ that the initial state is i.

     See also: ctmc.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute stationary or transient state occupancy probabilities for a
discrete-...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
dtmcbd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1224
 -- Function File: P = dtmcbd (B, D)

     Returns the transition probability matrix P for a discrete birth-death
     process over state space {1, ..., N}.  For each i=1, ..., (N-1), ‘B(i)’ is
     the transition probability from state i to (i+1), and ‘D(i)’ is the
     transition probability from state (i+1) to i.

     Matrix \bf P is defined as:

           /                                                             \
           | 1-b(1)     b(1)                                             |
           |  d(1)  (1-d(1)-b(2))     b(2)                               |
           |            d(2)      (1-d(2)-b(3))     b(3)                 |
           |                                                             |
           |                 ...           ...          ...              |
           |                                                             |
           |                         d(N-2)   (1-d(N-2)-b(N-1))  b(N-1)  |
           |                                        d(N-1)      1-d(N-1) |
           \                                                             /

     where \lambda_i and \mu_i are the birth and death probabilities,
     respectively.

     See also: ctmcbd.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Returns the transition probability matrix P for a discrete birth-death proces...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
dtmcchkP


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 288
 -- Function File: [R ERR] = dtmcchkP (P)

     Check whether P is a valid transition probability matrix.

     If P is valid, R is the size (number of rows or columns) of P.  If P is not
     a transition probability matrix, R is set to zero, and ERR to an
     appropriate error string.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
Check whether P is a valid transition probability matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
dtmcexps


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1283
 -- Function File: L = dtmcexps (P, N, P0)
 -- Function File: L = dtmcexps (P, P0)

     Compute the expected number of visits to each state during the first N
     transitions, or until abrosption.

     *INPUTS*

     ‘P(i,j)’
          N \times N transition matrix.  ‘P(i,j)’ is the transition probability
          from state i to state j.

     ‘N’
          Number of steps during which the expected number of visits are
          computed (N ≥ 0).  If ‘N=0’, returns P0.  If ‘N > 0’, returns the
          expected number of visits after exactly N transitions.

     ‘P0(i)’
          Initial state occupancy probabilities; ‘P0(i)’ is the probability that
          the system is in state i at step 0.

     *OUTPUTS*

     ‘L(i)’
          When called with two arguments, ‘L(i)’ is the expected number of
          visits to state i before absorption.  When called with three
          arguments, ‘L(i)’ is the expected number of visits to state i during
          the first N transitions.

     *REFERENCES*

        • Grinstead, Charles M.; Snell, J. Laurie (July 1997).  ‘Introduction to
          Probability’, Ch.  11: Markov Chains.  American Mathematical Society.
          ISBN 978-0821807491.

     See also: ctmcexps.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the expected number of visits to each state during the first N
transi...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
dtmcfpt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1035
 -- Function File: M = dtmcfpt (P)

     Compute mean first passage times and mean recurrence times for an
     irreducible discrete-time Markov chain over the state space {1, ..., N}.

     *INPUTS*

     ‘P(i,j)’
          transition probability from state i to state j.  P must be an
          irreducible stochastic matrix, which means that the sum of each row
          must be 1 (\sum_{j=1}^N P_{i j} = 1), and the rank of P must be N.

     *OUTPUTS*

     ‘M(i,j)’
          For all 1 ≤ i, j ≤ N, i \neq j, ‘M(i,j)’ is the average number of
          transitions before state J is entered for the first time, starting
          from state I.  ‘M(i,i)’ is the _mean recurrence time_ of state i, and
          represents the average time needed to return to state I.

     *REFERENCES*

        • Grinstead, Charles M.; Snell, J. Laurie (July 1997).  ‘Introduction to
          Probability’, Ch.  11: Markov Chains.  American Mathematical Society.
          ISBN 978-0821807491.

     See also: ctmcfpt.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute mean first passage times and mean recurrence times for an irreducible...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
dtmcisir


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 807
 -- Function File: [R S] = dtmcisir (P)

     Check if P is irreducible, and identify Strongly Connected Components (SCC)
     in the transition graph of the DTMC with transition matrix P.

     *INPUTS*

     ‘P(i,j)’
          transition probability from state i to state j.  P must be an N \times
          N stochastic matrix.

     *OUTPUTS*

     ‘R’
          1 if P is irreducible (i.e., the state transition graph is strongly
          connected), 0 otherwise (scalar)

     ‘S(i)’
          strongly connected component (SCC) that state i belongs to (vector of
          length N). SCCs are numbered 1, 2, ....  The number of SCCs is
          ‘max(s)’.  If the graph is strongly connected, then there is a single
          SCC and the predicate ‘all(s == 1)’ evaluates to true


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Check if P is irreducible, and identify Strongly Connected Components (SCC) i...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
dtmcmtta


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2333
 -- Function File: [T N B] = dtmcmtta (P)
 -- Function File: [T N B] = dtmcmtta (P, P0)

     Compute the expected number of steps before absorption for a DTMC with
     state space {1, ..., N} and transition probability matrix P.

     *INPUTS*

     ‘P(i,j)’
          N \times N transition probability matrix.  ‘P(i,j)’ is the transition
          probability from state i to state j.

     ‘P0(i)’
          Initial state occupancy probabilities (vector of length N).

     *OUTPUTS*

     ‘T’
     ‘T(i)’
          When called with a single argument, T is a vector of length N such
          that ‘T(i)’ is the expected number of steps before being absorbed in
          any absorbing state, starting from state i; if i is absorbing, ‘T(i) =
          0’.  When called with two arguments, T is a scalar, and represents the
          expected number of steps before absorption, starting from the initial
          state occupancy probability P0.

     ‘N(i)’
     ‘N(i,j)’
          When called with a single argument, N is the N \times N fundamental
          matrix for P.  ‘N(i,j)’ is the expected number of visits to transient
          state J before absorption, if the system started in transient state I.
          The initial state is counted if i = j.  When called with two
          arguments, N is a vector of length N such that ‘N(j)’ is the expected
          number of visits to transient state J before absorption, given initial
          state occupancy probability P0.

     ‘B(i)’
     ‘B(i,j)’
          When called with a single argument, B is a N \times N matrix where
          ‘B(i,j)’ is the probability of being absorbed in state j, starting
          from transient state i; if j is not absorbing, ‘B(i,j) = 0’; if i is
          absorbing, ‘B(i,i) = 1’ and ‘B(i,j) = 0’ for all i \neq j.  When
          called with two arguments, B is a vector of length N where ‘B(j)’ is
          the probability of being absorbed in state J, given initial state
          occupancy probabilities P0.

     *REFERENCES*

        • Grinstead, Charles M.; Snell, J. Laurie (July 1997).  ‘Introduction to
          Probability’, Ch.  11: Markov Chains.  American Mathematical Society.
          ISBN 978-0821807491.

     See also: ctmcmtta.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the expected number of steps before absorption for a DTMC with state
...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
dtmctaexps


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1137
 -- Function File: M = dtmctaexps (P, N, P0)
 -- Function File: M = dtmctaexps (P, P0)

     Compute the _time-averaged sojourn times_ ‘M(i)’, defined as the fraction
     of time spent in state i during the first n transitions (or until
     absorption), assuming that the state occupancy probabilities at time 0 are
     P0.

     *INPUTS*

     ‘P(i,j)’
          N \times N transition probability matrix.

     ‘N’
          Number of transitions during which the time-averaged expected sojourn
          times are computed (scalar, N ≥ 0).  if N = 0, returns P0.

     ‘P0(i)’
          Initial state occupancy probabilities (vector of length N).

     *OUTPUTS*

     ‘M(i)’
          If this function is called with three arguments, ‘M(i)’ is the
          expected fraction of steps {0, ..., n} spent in state i, assuming that
          the state occupancy probabilities at time zero are P0.  If this
          function is called with two arguments, ‘M(i)’ is the expected fraction
          of steps spent in state i until absorption.  M is a vector of length
          N.

     See also: dtmcexps.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 84
Compute the _time-averaged sojourn times_ ‘M(i)’, defined as the fraction of
...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
engset


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1267
 -- Function File: B = engset (A, M, N)

     Evaluate the Engset loss formula.

     The Engset formula computes the blocking probability P_b(A,m,n) for a
     system with a finite population of n users, m identical servers, no queue,
     individual service rate \mu, individual arrival rate \lambda (i.e., the
     time until a user tries to request service is exponentially distributed
     with mean 1/\lambda), and offered load A=\lambda/\mu.

     *INPUTS*

     ‘A’
          Offered load, defined as A = \lambda / \mu where \lambda is the mean
          arrival rate and \mu the mean service rate of each individual server
          (real, A > 0).

     ‘M’
          Number of identical servers (integer, m ≥ 1).  Default m = 1

     ‘N’
          Number of requests (integer, n ≥ 1).  Default n = 1

     *OUTPUTS*

     ‘B’
          The value P_b(A, m, n)

     A, M or n can be vectors, and in this case, the results will be vectors as
     well.

     *REFERENCES*

        • G. Zeng, ‘Two common properties of the Erlang-B function, Erlang-C
          function, and Engset blocking function’, Mathematical and Computer
          Modelling, Volume 37, Issues 12-13, June 2003, Pages 1287-1296

     See also: erlangb, erlangc.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Evaluate the Engset loss formula.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
erlangb


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1183
 -- Function File: B = erlangb (A, M)

     Compute the steady-state blocking probability in the Erlang loss model.

     The Erlang-B formula E_B(A, m) gives the probability that an open system
     with m identical servers, arrival rate \lambda, individual service rate \mu
     and offered load A = \lambda / \mu has all servers busy.  This corresponds
     to the rejection probability of an M/M/m/0 system with m servers and no
     queue.

     *INPUTS*

     ‘A’
          Offered load, defined as A = \lambda / \mu where \lambda is the mean
          arrival rate and \mu the mean service rate of each individual server
          (real, A > 0).

     ‘M’
          Number of identical servers (integer, m ≥ 1).  Default m = 1

     *OUTPUTS*

     ‘B’
          The value E_B(A, m)

     A or M can be vectors, and in this case, the results will be vectors as
     well.

     *REFERENCES*

        • G. Zeng, ‘Two common properties of the Erlang-B function, Erlang-C
          function, and Engset blocking function’, Mathematical and Computer
          Modelling, Volume 37, Issues 12-13, June 2003, Pages 1287-1296

     See also: erlangc,engset,qsmmm.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
Compute the steady-state blocking probability in the Erlang loss model.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
erlangc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1214
 -- Function File: C = erlangc (A, M)

     Compute the steady-state probability of delay in the Erlang delay model.

     The Erlang-C formula E_C(A, m) gives the probability that an open queueing
     system with m identical servers, infinite wating space, arrival rate
     \lambda, individual service rate \mu and offered load A = \lambda / \mu has
     all the servers busy.  This is the waiting probability in an M/M/m/\infty
     system with m servers and an infinite queue.

     *INPUTS*

     ‘A’
          Offered load.  A = \lambda / \mu where \lambda is the mean arrival
          rate and \mu the mean service rate of each individual server (real, 0
          < A < m).

     ‘M’
          Number of identical servers (integer, m ≥ 1).  Default m = 1

     *OUTPUTS*

     ‘B’
          The value E_C(A, m)

     A or M can be vectors, and in this case, the results will be vectors as
     well.

     *REFERENCES*

        • G. Zeng, ‘Two common properties of the Erlang-B function, Erlang-C
          function, and Engset blocking function’, Mathematical and Computer
          Modelling, Volume 37, Issues 12-13, June 2003, Pages 1287-1296

     See also: erlangb,engset,qsmmm.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
Compute the steady-state probability of delay in the Erlang delay model.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
qnclosed


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1303
 -- Function File: [U, R, Q, X] = qnclosed (N, S, V, ...)

     This function computes steady-state performance measures of closed queueing
     networks using the Mean Value Analysis (MVA) algorithm.  The qneneing
     network is allowed to contain fixed-capacity centers, delay centers or
     general load-dependent centers.  Multiple request classes are supported.

     This function dispatches the computation to one of ‘qncsemva’, ‘qncsmvald’
     or ‘qncmmva’.

        • If N is a scalar, the network is assumed to have a single class of
          requests; in this case, the exact MVA algorithm is used to analyze the
          network.  If S is a vector, then ‘S(k)’ is the average service time of
          center k, and this function calls ‘qncsmva’ which supports
          load-independent service centers.  If S is a matrix, ‘S(k,i)’ is the
          average service time at center k when i=1, ..., N jobs are present; in
          this case, the network is analyzed with the ‘qncmmvald’ function.

        • If N is a vector, the network is assumed to have multiple classes of
          requests, and is analyzed using the exact multiclass MVA algorithm as
          implemented in the ‘qncmmva’ function.

     See also: qncsmva, qncsmvald, qncmmva.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
This function computes steady-state performance measures of closed queueing
n...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
qncmaba


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2031
 -- Function File: [XL, XU, RL, RU] = qncmaba (N, D)
 -- Function File: [XL, XU, RL, RU] = qncmaba (N, S, V)
 -- Function File: [XL, XU, RL, RU] = qncmaba (N, S, V, M)
 -- Function File: [XL, XU, RL, RU] = qncmaba (N, S, V, M, Z)

     Compute Asymptotic Bounds for closed, multiclass networks with K service
     centers and C customer classes.  Single-server and infinite-server nodes
     are supported.  Multiple-server nodes and general load-dependent servers
     are not supported.

     *INPUTS*

     ‘N(c)’
          number of class c requests in the system (vector of length C, ‘N(c) ≥
          0’).

     ‘D(c, k)’
          class c service demand at center k (C \times K matrix, ‘D(c,k) ≥ 0’).

     ‘S(c, k)’
          mean service time of class c requests at center k (C \times K matrix,
          ‘S(c,k) ≥ 0’).

     ‘V(c,k)’
          average number of visits of class c requests to center k (C \times K
          matrix, ‘V(c,k) ≥ 0’).

     ‘M(k)’
          number of servers at center k (if M is a scalar, all centers have that
          number of servers).  If ‘M(k) < 1’, center k is a delay center (IS);
          if ‘M(k) = 1’, center k is a M/M/1-FCFS server.  This function does
          not support multiple-server nodes.  Default is 1.

     ‘Z(c)’
          class c external delay (vector of length C, ‘Z(c) ≥ 0’).  Default is
          0.

     *OUTPUTS*

     ‘XL(c)’
     ‘XU(c)’
          Lower and upper bounds for class c throughput.

     ‘RL(c)’
     ‘RU(c)’
          Lower and upper bounds for class c response time.

     *REFERENCES*

        • Edward D. Lazowska, John Zahorjan, G. Scott Graham, and Kenneth C.
          Sevcik, ‘Quantitative System Performance: Computer System Analysis
          Using Queueing Network Models’, Prentice Hall, 1984.
          <http://www.cs.washington.edu/homes/lazowska/qsp/>.  In particular,
          see section 5.2 ("Asymptotic Bounds").

     See also: qncsaba.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute Asymptotic Bounds for closed, multiclass networks with K service cent...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
qncmbsb


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1016
 -- Function File: [XL, XU, RL, RU] = qncmbsb (N, D)
 -- Function File: [XL, XU, RL, RU] = qncmbsb (N, S, V)

     Compute Balanced System Bounds for closed, multiclass networks with K
     service centers and C customer classes.  Only single-server nodes are
     supported.

     *INPUTS*

     ‘N(c)’
          number of class c requests in the system (vector of length C).

     ‘D(c, k)’
          class c service demand at center k (C \times K matrix, ‘D(c,k) ≥ 0’).

     ‘S(c, k)’
          mean service time of class c requests at center k (C \times K matrix,
          ‘S(c,k) ≥ 0’).

     ‘V(c,k)’
          average number of visits of class c requests to center k (C \times K
          matrix, ‘V(c,k) ≥ 0’).

     *OUTPUTS*

     ‘XL(c)’
     ‘XU(c)’
          Lower and upper class c throughput bounds (vector of length C).

     ‘RL(c)’
     ‘RU(c)’
          Lower and upper class c response time bounds (vector of length C).

     See also: qncsbsb.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute Balanced System Bounds for closed, multiclass networks with K service...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
qncmcb


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1343
 -- Function File: [XL, XU, RL, RU] = qncmcb (N, D)
 -- Function File: [XL, XU, RL, RU] = qncmcb (N, S, V)

     Compute Composite Bounds (CB) on system throughput and response time for
     closed multiclass networks.

     *INPUTS*

     ‘N(c)’
          number of class c requests in the system.

     ‘D(c, k)’
          class c service demand at center k (‘S(c,k) ≥ 0’).

     ‘S(c, k)’
          mean service time of class c requests at center k (‘S(c,k) ≥ 0’).

     ‘V(c,k)’
          average number of visits of class c requests to center k (‘V(c,k) ≥
          0’).

     *OUTPUTS*

     ‘XL(c)’
     ‘XU(c)’
          Lower and upper bounds on class c throughput.

     ‘RL(c)’
     ‘RU(c)’
          Lower and upper bounds on class c response time.

     *REFERENCES*

        • Teemu Kerola, ‘The Composite Bound Method (CBM) for Computing
          Throughput Bounds in Multiple Class Environments’, Performance
          Evaluation Vol.  6, Issue 1, March 1986, DOI
          10.1016/0166-5316(86)90002-7
          (http://dx.doi.org/10.1016/0166-5316(86)90002-7).  Also available as
          Technical Report CSD-TR-475 (http://docs.lib.purdue.edu/cstech/395/),
          Department of Computer Sciences, Purdue University, mar 13, 1984
          (Revised Aug 27, 1984).


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute Composite Bounds (CB) on system throughput and response time for clos...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
qncmmva


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7160
 -- Function File: [U, R, Q, X] = qncmmva (N, S )
 -- Function File: [U, R, Q, X] = qncmmva (N, S, V)
 -- Function File: [U, R, Q, X] = qncmmva (N, S, V, M)
 -- Function File: [U, R, Q, X] = qncmmva (N, S, V, M, Z)
 -- Function File: [U, R, Q, X] = qncmmva (N, S, P)
 -- Function File: [U, R, Q, X] = qncmmva (N, S, P, R)
 -- Function File: [U, R, Q, X] = qncmmva (N, S, P, R, M)

     Compute steady-state performance measures for closed, multiclass queueing
     networks using the Mean Value Analysys (MVA) algorithm.

     Queueing policies at service centers can be any of the following:

     *FCFS*
          (First-Come-First-Served) customers are served in order of arrival;
          multiple servers are allowed.  For this kind of queueing discipline,
          average service times must be class-independent.

     *PS*
          (Processor Sharing) customers are served in parallel by a single
          server, each customer receiving an equal share of the service rate.

     *LCFS-PR*
          (Last-Come-First-Served, Preemptive Resume) customers are served in
          reverse order of arrival by a single server and the last arrival
          preempts the customer in service who will later resume service at the
          point of interruption.

     *IS*
          (Infinite Server) customers are delayed independently of other
          customers at the service center (there is effectively an infinite
          number of servers).

     *INPUTS*

     ‘N(c)’
          number of class c requests; ‘N(c) ≥ 0’.  If class c has no requests
          (‘N(c) == 0’), then for all K, this function returns ‘U(c,k) = R(c,k)
          = Q(c,k) = X(c,k) = 0’

     ‘S(c,k)’
          mean service time for class c requests at center k (‘S(c,k) ≥ 0’).  If
          the service time at center k is class-dependent, then center k is
          assumed to be of type -/G/1-PS (Processor Sharing).  If center k is a
          FCFS node (‘M(k)>1’), then the service times *must* be
          class-independent, i.e., all classes *must* have the same service
          time.

     ‘V(c,k)’
          average number of visits of class c requests at center k; ‘V(c,k) ≥
          0’, default is 1.  *If you pass this argument, class switching is not
          allowed*

     ‘P(r,i,s,j)’
          probability that a class r request completing service at center i is
          routed to center j as a class s request; the reference stations for
          each class are specified with the paramter R.  *If you pass argument
          P, class switching is allowed*; however, you can not specify any
          external delay (i.e., Z must be zero) and all servers must be
          fixed-rate or infinite-server nodes (‘M(k) ≤ 1’ for all k).

     ‘R(c)’
          reference station for class c.  If omitted, station 1 is the reference
          station for all classes.  See ‘qncmvisits’.

     ‘M(k)’
          If ‘M(k)<1’, then center k is assumed to be a delay center (IS node
          -/G/\infty).  If ‘M(k)==1’, then service center k is a regular
          queueing center (M/M/1-FCFS, -/G/1-LCFS-PR or -/G/1-PS). Finally, if
          ‘M(k)>1’, center k is a M/M/m-FCFS center with ‘M(k)’ identical
          servers.  Default is ‘M(k)=1’ for each k.

     ‘Z(c)’
          class c external delay (think time); ‘Z(c) ≥ 0’.  Default is 0.  This
          parameter can not be used if you pass a routing matrix as the second
          parameter of ‘qncmmva’.

     *OUTPUTS*

     ‘U(c,k)’
          If k is a FCFS, LCFS-PR or PS node (‘M(k) ≥ 1’), then ‘U(c,k)’ is the
          class c utilization at center k, 0 ≤ U(c,k) ≤ 1.  If k is an IS node,
          then ‘U(c,k)’ is the class c _traffic intensity_ at center k, defined
          as ‘U(c,k) = X(c,k)*S(c,k)’.  In this case the value of ‘U(c,k)’ may
          be greater than one.

     ‘R(c,k)’
          class c response time at center k.  The class c _residence time_ at
          center k is ‘R(c,k) * C(c,k)’.  The total class c system response time
          is ‘dot(R, V, 2)’.

     ‘Q(c,k)’
          average number of class c requests at center k.  The total number of
          requests at center k is ‘sum(Q(:,k))’.  The total number of class c
          requests in the system is ‘sum(Q(c,:))’.

     ‘X(c,k)’
          class c throughput at center k.  The class c throughput can be
          computed as ‘X(c,1) / V(c,1)’.

     *NOTES*

     If the function call specifies the visit ratios V, then class switching is
     *not* allowed.  If the function call specifies the routing probability
     matrix P, then class switching *is* allowed; however, in this case all
     nodes are restricted to be fixed rate servers or delay centers:
     multiple-server and general load-dependent centers are not supported.

     In presence of load-dependent servers (e.g., if ‘M(i)>1’ for some i), the
     MVA algorithm is known to be numerically unstable.  Generally this problem
     shows up as negative values for the computed response times or
     utilizations.  This is not a problem with the ‘queueing’ package, but with
     the MVA algorithm; as such, there is no known workaround at the moment
     (aoart from using a different solution technique, if available).  This
     function prints a warning if it detects numerical problems; you can disable
     the warning with the command ‘warning("off", "qn:numerical-instability")’.

     Given a network with K service centers, C job classes and population vector
     {\bf N}=\left[N_1, ..., N_C\right], the MVA algorithm requires space O(C
     \prod_i (N_i + 1)).  The time complexity is O(CK\prod_i (N_i + 1)).  This
     implementation is slightly more space-efficient (see details in the code).
     While the space requirement can be mitigated by using some optimizations,
     the time complexity can not.  If you need to analyze large closed networks
     you should consider the ‘qncmmvaap’ function, which implements the
     approximate MVA algorithm.  Note however that ‘qncmmvaap’ will only provide
     approximate results.

     *REFERENCES*

        • M. Reiser and S. S. Lavenberg, ‘Mean-Value Analysis of Closed
          Multichain Queuing Networks’, Journal of the ACM, vol.  27, n.  2,
          April 1980, pp.  313-322.  10.1145/322186.322195
          (http://doi.acm.org/10.1145/322186.322195)

     This implementation is based on G. Bolch, S. Greiner, H. de Meer and K.
     Trivedi, ‘Queueing Networks and Markov Chains: Modeling and Performance
     Evaluation with Computer Science Applications’, Wiley, 1998 and Edward D.
     Lazowska, John Zahorjan, G. Scott Graham, and Kenneth C. Sevcik,
     ‘Quantitative System Performance: Computer System Analysis Using Queueing
     Network Models’, Prentice Hall, 1984.
     <http://www.cs.washington.edu/homes/lazowska/qsp/>.  In particular, see
     section 7.4.2.1 ("Exact Solution Techniques").

     See also: qnclosed, qncmmvaapprox, qncmvisits.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute steady-state performance measures for closed, multiclass queueing
net...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
qncmmvaap


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 408
 -- Function File: [U, R, Q, X] = qncmmvaap (N, S, V)
 -- Function File: [U, R, Q, X] = qncmmvaap (N, S, V, M)
 -- Function File: [U, R, Q, X] = qncmmvaap (N, S, V, M, Z)
 -- Function File: [U, R, Q, X] = qncmmvaap (N, S, V, M, Z, TOL)
 -- Function File: [U, R, Q, X] = qncmmvaap (N, S, V, M, Z, TOL, ITER_MAX)

     This function is deprecated.  Plase use ‘qncmmvabs’ instead.

     See also: qncmmvabs.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
This function is deprecated.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
qncmmvabs


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3741
 -- Function File: [U, R, Q, X] = qncmmvabs (N, S, V)
 -- Function File: [U, R, Q, X] = qncmmvabs (N, S, V, M)
 -- Function File: [U, R, Q, X] = qncmmvabs (N, S, V, M, Z)
 -- Function File: [U, R, Q, X] = qncmmvabs (N, S, V, M, Z, TOL)
 -- Function File: [U, R, Q, X] = qncmmvabs (N, S, V, M, Z, TOL, ITER_MAX)

     Approximate Mean Value Analysis (MVA) for closed, multiclass queueing
     networks with K service centers and C customer classes.

     This implementation uses Bard and Schweitzer approximation.  It is based on
     the assumption that the queue length at service center k with population
     set {\bf N}-{\bf 1}_c is approximated with

           Q_k(N-1c) ~ (n-1)/n Q_k(N)

     where \bf N is a valid population mix, {\bf N}-{\bf 1}_c is the population
     mix \bf N with one class c customer removed, and n = \sum_c N_c is the
     total number of requests.

     This implementation works for networks with infinite server (IS) and
     single-server nodes only.

     *INPUTS*

     ‘N(c)’
          number of class c requests in the system (‘N(c) ≥ 0’).

     ‘S(c,k)’
          mean service time for class c customers at center k (‘S(c,k) ≥ 0’).

     ‘V(c,k)’
          average number of visits of class c requests to center k (‘V(c,k) ≥
          0’).

     ‘M(k)’
          number of servers at center k.  If ‘M(k) < 1’, then the service center
          k is assumed to be a delay center (IS). If ‘M(k) == 1’, service center
          k is a regular queueing center (FCFS, LCFS-PR or PS) with a single
          server node.  If omitted, each service center has a single server.
          Note that multiple server nodes are not supported.

     ‘Z(c)’
          class c external delay (‘Z ≥ 0’).  Default is 0.

     ‘TOL’
          Stopping tolerance (‘TOL>0’).  The algorithm stops if the queue length
          computed on two subsequent iterations are less than TOL.  Default is
          10^{-5}.

     ‘ITER_MAX’
          Maximum number of iterations (‘ITER_MAX>0’.  The function aborts if
          convergenge is not reached within the maximum number of iterations.
          Default is 100.

     *OUTPUTS*

     ‘U(c,k)’
          If k is a FCFS, LCFS-PR or PS node, then ‘U(c,k)’ is the utilization
          of class c requests on service center k.  If k is an IS node, then
          ‘U(c,k)’ is the class c _traffic intensity_ at device k, defined as
          ‘U(c,k) = X(c)*S(c,k)’

     ‘R(c,k)’
          response time of class c requests at service center k.

     ‘Q(c,k)’
          average number of class c requests at service center k.

     ‘X(c,k)’
          class c throughput at service center k.

     *REFERENCES*

        • Y. Bard, ‘Some Extensions to Multiclass Queueing Network Analysis’,
          proc.  4th Int.  Symp.  on Modelling and Performance Evaluation of
          Computer Systems, Feb 1979, pp.  51-62.

        • P. Schweitzer, ‘Approximate Analysis of Multiclass Closed Networks of
          Queues’, Proc.  Int.  Conf.  on Stochastic Control and Optimization,
          jun 1979, pp.  25-29.

     This implementation is based on Edward D. Lazowska, John Zahorjan, G. Scott
     Graham, and Kenneth C. Sevcik, ‘Quantitative System Performance: Computer
     System Analysis Using Queueing Network Models’, Prentice Hall, 1984.
     <http://www.cs.washington.edu/homes/lazowska/qsp/>.  In particular, see
     section 7.4.2.2 ("Approximate Solution Techniques").  This implementation
     is slightly different from the one described above, as it computes the
     average response times R instead of the residence times.

     See also: qncmmva.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Approximate Mean Value Analysis (MVA) for closed, multiclass queueing network...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
qncmnpop


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 957
 -- Function File: H = qncmnpop (N)

     Given a network with C customer classes, this function computes the number
     of k-mixes ‘H(r,k)’ that can be constructed by the multiclass MVA algorithm
     by allocating k customers to the first r classes.  See doc-qncmpopmix for
     the definition of k-mix.

     *INPUTS*

     ‘N(c)’
          number of class-c requests in the system.  The total number of
          requests in the network is ‘sum(N)’.

     *OUTPUTS*

     ‘H(r,k)’
          is the number of k mixes that can be constructed allocating k
          customers to the first r classes.

     *REFERENCES*

        • Zahorjan, J. and Wong, E. ‘The solution of separable queueing network
          models using mean value analysis’.  SIGMETRICS Perform.  Eval.  Rev.
          10, 3 (Sep.  1981), 80-85.  DOI 10.1145/1010629.805477
          (http://doi.acm.org/10.1145/1010629.805477)

     See also: qncmmva,qncmpopmix.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Given a network with C customer classes, this function computes the number of...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
qncmpopmix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1839
 -- Function File: pop_mix = qncmpopmix (K, N)

     Return the set of population mixes for a closed multiclass queueing network
     with exactly K customers.  Specifically, given a closed multiclass QN with
     C customer classes, where there are ‘N(c)’ class c requests, c = 1, ..., C
     a k-mix M is a vector of length C with the following properties:

        • 0 ≤ M_c ≤ N(c) for all c = 1, ..., C;
        • \sum_{c=1}^C M_c = k

     In other words, a k-mix is an allocation of k requests to C classes such
     that the number of requests assigned to class c does not exceed the maximum
     value ‘N(c)’.

     POP_MIX is a matrix with C columns, such that each row represents a valid
     mix.

     *INPUTS*

     ‘K’
          Size of the requested mix (scalar, ‘K ≥ 0’).

     ‘N(c)’
          number of class c requests (‘K ≤ sum(N)’).

     *OUTPUTS*

     ‘POP_MIX(i,c)’
          number of class c requests in the i-th population mix.  The number of
          mixes is ‘rows(POP_MIX)’.

     If you are interested in the number of k-mixes only, you can use the
     funcion ‘qnmvapop’.

     *REFERENCES*

        • Herb Schwetman, ‘Implementing the Mean Value Algorithm for the
          Solution of Queueing Network Models’, Technical Report 80-355
          (http://docs.lib.purdue.edu/cstech/286/), Department of Computer
          Sciences, Purdue University, revised February 15, 1982.

     The slightly different problem of enumerating all tuples k_1, ..., k_N such
     that \sum_i k_i = k and k_i ≥ 0, for a given k ≥ 0 has been described in S.
     Santini, ‘Computing the Indices for a Complex Summation’, unpublished
     report, available at
     <http://arantxa.ii.uam.es/~ssantini/writing/notes/s668_summation.pdf>

     See also: qncmnpop.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the set of population mixes for a closed multiclass queueing network w...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
qncmvisits


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1299
 -- Function File: [V CH] = qncmvisits (P)
 -- Function File: [V CH] = qncmvisits (P, R)

     Compute the average number of visits for the nodes of a closed multiclass
     network with K service centers and C customer classes.

     *INPUTS*

     ‘P(r,i,s,j)’
          probability that a class r request which completed service at center i
          is routed to center j as a class s request.  Class switching is
          allowed.

     ‘R(c)’
          index of class c reference station, r(c) \in {1, ..., K}, 1 ≤ c ≤ C.
          The class c visit count to server ‘R(c)’ (‘V(c,r(c))’) is
          conventionally set to 1.  The reference station serves two purposes:
          (i) its throughput is assumed to be the system throughput, and (ii) a
          job returning to the reference station is assumed to have completed
          one cycle.  Default is to consider station 1 as the reference station
          for all classes.

     *OUTPUTS*

     ‘V(c,i)’
          number of visits of class c requests at center i.

     ‘CH(c)’
          chain number that class c belongs to.  Different classes can belong to
          the same chain.  Chains are numbered sequentially starting from 1 (1,
          2, ...).  The total number of chains is ‘max(CH)’.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the average number of visits for the nodes of a closed multiclass
net...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
qncsaba


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1460
 -- Function File: [XL, XU, RL, RU] = qncsaba (N, D)
 -- Function File: [XL, XU, RL, RU] = qncsaba (N, S, V)
 -- Function File: [XL, XU, RL, RU] = qncsaba (N, S, V, M)
 -- Function File: [XL, XU, RL, RU] = qncsaba (N, S, V, M, Z)

     Compute Asymptotic Bounds for the system throughput and response time of
     closed, single-class networks with K service centers.

     Single-server and infinite-server nodes are supported.  Multiple-server
     nodes and general load-dependent servers are not supported.

     *INPUTS*

     ‘N’
          number of requests in the system (scalar, ‘N>0’).

     ‘D(k)’
          service demand at center k (‘D(k) ≥ 0’).

     ‘S(k)’
          mean service time at center k (‘S(k) ≥ 0’).

     ‘V(k)’
          average number of visits to center k (‘V(k) ≥ 0’).

     ‘M(k)’
          number of servers at center k (if M is a scalar, all centers have that
          number of servers).  If ‘M(k) < 1’, center k is a delay center (IS);
          if ‘M(k) = 1’, center k is a M/M/1-FCFS server.  This function does
          not support multiple-server nodes.  Default is 1.

     ‘Z’
          External delay (scalar, ‘Z ≥ 0’).  Default is 0.

     *OUTPUTS*

     ‘XL’
     ‘XU’
          Lower and upper bounds on the system throughput.

     ‘RL’
     ‘RU’
          Lower and upper bounds on the system response time.

     See also: qncmaba.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute Asymptotic Bounds for the system throughput and response time of clos...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
qncsbsb


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1607
 -- Function File: [XL, XU, RL, RU] = qncsbsb (N, D)
 -- Function File: [XL, XU, RL, RU] = qncsbsb (N, S, V)
 -- Function File: [XL, XU, RL, RU] = qncsbsb (N, S, V, M)
 -- Function File: [XL, XU, RL, RU] = qncsbsb (N, S, V, M, Z)

     Compute Balanced System Bounds on system throughput and response time for
     closed, single-class networks with K service centers.

     *INPUTS*

     ‘N’
          number of requests in the system (scalar, ‘N ≥ 0’).

     ‘D(k)’
          service demand at center k (‘D(k) ≥ 0’).

     ‘S(k)’
          mean service time at center k (‘S(k) ≥ 0’).

     ‘V(k)’
          average number of visits to center k (‘V(k) ≥ 0’).  Default is 1.

     ‘M(k)’
          number of servers at center k.  This function supports ‘M(k) = 1’ only
          (single-eserver FCFS nodes); this parameter is only for compatibility
          with ‘qncsaba’.  Default is 1.

     ‘Z’
          External delay (‘Z ≥ 0’).  Default is 0.

     *OUTPUTS*

     ‘XL’
     ‘XU’
          Lower and upper bound on the system throughput.

     ‘RL’
     ‘RU’
          Lower and upper bound on the system response time.

     *REFERENCES*

        • Edward D. Lazowska, John Zahorjan, G. Scott Graham, and Kenneth C.
          Sevcik, ‘Quantitative System Performance: Computer System Analysis
          Using Queueing Network Models’, Prentice Hall, 1984.
          <http://www.cs.washington.edu/homes/lazowska/qsp/>.  In particular,
          see section 5.4 ("Balanced Systems Bounds").

     See also: qncmbsb.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute Balanced System Bounds on system throughput and response time for
clo...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
qncscmva


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1840
 -- Function File: [U, R, Q, X] = qncscmva (N, S, SLD, V)
 -- Function File: [U, R, Q, X] = qncscmva (N, S, SLD, V, Z)

     Conditional MVA (CMVA) algorithm, a numerically stable variant of MVA. This
     function supports a network of M ≥ 1 service centers and a single delay
     center.  Servers 1, ..., (M-1) are load-independent; server M is
     load-dependent.

     *INPUTS*

     ‘N’
          Number of requests in the system, ‘N ≥ 0’.  If ‘N == 0’, this function
          returns ‘U = R = Q = X = 0’

     ‘S(k)’
          mean service time on server k = 1, ..., (M-1) (‘S(k) > 0’).  If there
          are no fixed-rate servers, then ‘S = []’

     ‘SLD(n)’
          inverse service rate at server M (the load-dependent server) when
          there are n requests, n=1, ..., N. ‘SLD(n) = ’ 1 / \mu(n).

     ‘V(k)’
          average number of visits to service center k=1, ..., M, where ‘V(k) ≥
          0’.  ‘V(1:M-1)’ are the visit rates to the fixed rate servers; ‘V(M)’
          is the visit rate to the load dependent server.

     ‘Z’
          External delay for customers (‘Z ≥ 0’).  Default is 0.

     *OUTPUTS*

     ‘U(k)’
          center k utilization (k=1, ..., M)

     ‘R(k)’
          response time of center k (k=1, ..., M). The system response time RSYS
          can be computed as ‘RSYS = N/XSYS - Z’

     ‘Q(k)’
          average number of requests at center k (k=1, ..., M).

     ‘X(k)’
          center k throughput (k=1, ..., M).

     *REFERENCES*

        • G. Casale.  ‘A note on stable flow-equivalent aggregation in closed
          networks’.  Queueing Syst.  Theory Appl., 60:193–-202, December 2008,
          10.1007/s11134-008-9093-6
          (http://dx.doi.org/10.1007/s11134-008-9093-6)


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
Conditional MVA (CMVA) algorithm, a numerically stable variant of MVA.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
qncsconv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2180
 -- Function File: [U, R, Q, X, G] = qncsconv (N, S, V)
 -- Function File: [U, R, Q, X, G] = qncsconv (N, S, V, M)

     Analyze product-form, single class closed networks with K service centers
     using the convolution algorithm.

     Load-independent service centers, multiple servers (M/M/m queues) and IS
     nodes are supported.  For general load-dependent service centers, use
     ‘qncsconvld’ instead.

     *INPUTS*

     ‘N’
          Number of requests in the system (‘N>0’).

     ‘S(k)’
          average service time on center k (‘S(k) ≥ 0’).

     ‘V(k)’
          visit count of service center k (‘V(k) ≥ 0’).

     ‘M(k)’
          number of servers at center k.  If ‘M(k) < 1’, center k is a delay
          center (IS); if ‘M(k) ≥ 1’, center k it is a regular M/M/m queueing
          center with ‘M(k)’ identical servers.  Default is ‘M(k) = 1’ for all
          k.

     *OUTPUT*

     ‘U(k)’
          center k utilization.  For IS nodes, ‘U(k)’ is the _traffic intensity_
          ‘X(k) * S(k)’.

     ‘R(k)’
          average response time of center k.

     ‘Q(k)’
          average number of customers at center k.

     ‘X(k)’
          throughput of center k.

     ‘G(n)’
          Vector of normalization constants.  ‘G(n+1)’ contains the value of the
          normalization constant with n requests G(n), n=0, ..., N.

     *NOTE*

     For a network with K service centers and N requests, this implementation of
     the convolution algorithm has time and space complexity O(NK).

     *REFERENCES*

        • Jeffrey P. Buzen, ‘Computational Algorithms for Closed Queueing
          Networks with Exponential Servers’, Communications of the ACM, volume
          16, number 9, September 1973, pp.  527-531.  10.1145/362342.362345
          (http://doi.acm.org/10.1145/362342.362345)

     This implementation is based on G. Bolch, S. Greiner, H. de Meer and K.
     Trivedi, ‘Queueing Networks and Markov Chains: Modeling and Performance
     Evaluation with Computer Science Applications’, Wiley, 1998, pp.  313-317.

     See also: qncsconvld.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Analyze product-form, single class closed networks with K service centers usi...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
qncsconvld


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2816
 -- Function File: [U, R, Q, X, G] = qncsconvld (N, S, V)

     Convolution algorithm for product-form, single-class closed queueing
     networks with K general load-dependent service centers.

     This function computes steady-state performance measures for single-class,
     closed networks with load-dependent service centers using the convolution
     algorithm; the normalization constants are also computed.  The
     normalization constants are returned as vector ‘G=[G(1), ..., G(N+1)]’
     where ‘G(i+1)’ is the value of G(i).

     *INPUTS*

     ‘N’
          Number of requests in the system (‘N>0’).

     ‘S(k,n)’
          mean service time at center k where there are n requests, 1 ≤ n ≤ N.
          ‘S(k,n)’ = 1 / \mu_{k,n}, where \mu_{k,n} is the service rate of
          center k when there are n requests.

     ‘V(k)’
          visit count of service center k (‘V(k) ≥ 0’).  The length of V is the
          number of servers K in the network.

     *OUTPUT*

     ‘U(k)’
          center k utilization.

     ‘R(k)’
          average response time at center k.

     ‘Q(k)’
          average number of requests in center k.

     ‘X(k)’
          center k throughput.

     ‘G(n)’
          Normalization constants (vector).  ‘G(n+1)’ corresponds to G(n), as
          array indexes in Octave start from 1.

     *REFERENCES*

        • Herb Schwetman, ‘Some Computational Aspects of Queueing Network
          Models’, Technical Report CSD-TR-354
          (http://docs.lib.purdue.edu/cstech/285/), Department of Computer
          Sciences, Purdue University, February 1981 (revised).

        • M. Reiser, H. Kobayashi, ‘On The Convolution Algorithm for Separable
          Queueing Networks’, In Proceedings of the 1976 ACM SIGMETRICS
          Conference on Computer Performance Modeling Measurement and Evaluation
          (Cambridge, Massachusetts, United States, March 29-31, 1976).
          SIGMETRICS '76.  ACM, New York, NY, pp.  109-117.
          10.1145/800200.806187 (http://doi.acm.org/10.1145/800200.806187)

     This implementation is based on G. Bolch, S. Greiner, H. de Meer and K.
     Trivedi, ‘Queueing Networks and Markov Chains: Modeling and Performance
     Evaluation with Computer Science Applications’, Wiley, 1998, pp.  313-317.
     Function ‘qncsconvld’ is slightly different from the version described in
     Bolch et al.  because it supports general load-dependent centers (while the
     version in the book does not).  The modification is in the definition of
     function ‘F()’ in ‘qncsconvld’ which has been made similar to function f_i
     defined in Schwetman, ‘Some Computational Aspects of Queueing Network
     Models’.

     See also: qncsconv.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Convolution algorithm for product-form, single-class closed queueing networks...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
qncsgb


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2132
 -- Function File: [XL, XU, RL, RU, QL, QU] = qncsgb (N, D)
 -- Function File: [XL, XU, RL, RU, QL, QU] = qncsgb (N, S, V)
 -- Function File: [XL, XU, RL, RU, QL, QU] = qncsgb (N, S, V, M)
 -- Function File: [XL, XU, RL, RU, QL, QU] = qncsgb (N, S, V, M, Z)

     Compute Geometric Bounds (GB) on system throughput, system response time
     and server queue lenghts for closed, single-class networks with K service
     centers and N requests.

     *INPUTS*

     ‘N’
          number of requests in the system (scalar, ‘N > 0’).

     ‘D(k)’
          service demand of service center k (vector of length K, ‘D(k) ≥ 0’).

     ‘S(k)’
          mean service time at center k (vector of length K, ‘S(k) ≥ 0’).

     ‘V(k)’
          visit ratio to center k (vector of length K, ‘V(k) ≥ 0’).

     ‘M(k)’
          number of servers at center k.  This function only supports M/M/1
          queues, therefore M must be ‘ones(size(S))’.

     ‘Z’
          external delay (think time, ‘Z ≥ 0’, scalar).  Default is 0.

     *OUTPUTS*

     ‘XL’
     ‘XU’
          Lower and upper bound on the system throughput.  If ‘Z>0’, these
          bounds are computed using _Geometric Square-root Bounds_ (GSB). If
          ‘Z==0’, these bounds are computed using _Geometric Bounds_ (GB)

     ‘RL’
     ‘RU’
          Lower and upper bound on the system response time.  These bounds are
          derived from XL and XU using Little's Law: ‘RL = N / XU - Z’, ‘RU = N
          / XL - Z’

     ‘QL(k)’
     ‘QU(k)’
          lower and upper bounds of center K queue length.

     *REFERENCES*

        • G. Casale, R. R. Muntz, G. Serazzi, ‘Geometric Bounds: a Non-Iterative
          Analysis Technique for Closed Queueing Networks’, IEEE Transactions on
          Computers, 57(6):780-794, June 2008.  10.1109/TC.2008.37
          (http://doi.ieeecomputersociety.org/10.1109/TC.2008.37)

     In this implementation we set X^+ and X^- as the upper and lower Asymptotic
     Bounds as computed by the ‘qncsab’ function, respectively.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute Geometric Bounds (GB) on system throughput, system response time and
...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
qncsmva


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4095
 -- Function File: [U, R, Q, X, G] = qncsmva (N, S, V)
 -- Function File: [U, R, Q, X, G] = qncsmva (N, S, V, M)
 -- Function File: [U, R, Q, X, G] = qncsmva (N, S, V, M, Z)

     Analyze closed, single class queueing networks using the exact Mean Value
     Analysis (MVA) algorithm.

     The following queueing disciplines are supported: FCFS, LCFS-PR, PS and IS
     (Infinite Server).  This function supports fixed-rate service centers or
     multiple server nodes.  For general load-dependent service centers, use the
     function ‘qncsmvald’ instead.

     Additionally, the normalization constant G(n), n=0, ..., N is computed;
     G(n) can be used in conjunction with the BCMP theorem to compute
     steady-state probabilities.

     *INPUTS*

     ‘N’
          Population size (number of requests in the system, ‘N ≥ 0’).  If ‘N ==
          0’, this function returns ‘U = R = Q = X = 0’

     ‘S(k)’
          mean service time at center k (‘S(k) ≥ 0’).

     ‘V(k)’
          average number of visits to service center k (‘V(k) ≥ 0’).

     ‘Z’
          External delay for customers (‘Z ≥ 0’).  Default is 0.

     ‘M(k)’
          number of servers at center k (if M is a scalar, all centers have that
          number of servers).  If ‘M(k) < 1’, center k is a delay center (IS);
          otherwise it is a regular queueing center (FCFS, LCFS-PR or PS) with
          ‘M(k)’ servers.  Default is ‘M(k) = 1’ for all k (each service center
          has a single server).

     *OUTPUTS*

     ‘U(k)’
          If k is a FCFS, LCFS-PR or PS node (‘M(k) ≥ 1’), then ‘U(k)’ is the
          utilization of center k, 0 ≤ U(k) ≤ 1.  If k is an IS node (‘M(k) <
          1’), then ‘U(k)’ is the _traffic intensity_ defined as ‘X(k)*S(k)’.
          In this case the value of ‘U(k)’ may be greater than one.

     ‘R(k)’
          center k response time.  The _Residence Time_ at center k is ‘R(k) *
          V(k)’.  The system response time RSYS can be computed either as ‘RSYS
          = N/XSYS - Z’ or as ‘RSYS = dot(R,V)’

     ‘Q(k)’
          average number of requests at center k.  The number of requests in the
          system can be computed either as ‘sum(Q)’, or using the formula
          ‘N-XSYS*Z’.

     ‘X(k)’
          center K throughput.  The system throughput XSYS can be computed as
          ‘XSYS = X(1) / V(1)’

     ‘G(n)’
          Normalization constants.  ‘G(n+1)’ contains the value of the
          normalization constant G(n), n=0, ..., N as array indexes in Octave
          start from 1.  G(n) can be used in conjunction with the BCMP theorem
          to compute steady-state probabilities.

     *NOTES*

     In presence of load-dependent servers (i.e., if ‘M(k)>1’ for some k), the
     MVA algorithm is known to be numerically unstable.  Generally, this issue
     manifests itself as negative values for the response times or utilizations.
     This is not a problem of the ‘queueing’ toolbox, but of the MVA algorithm,
     and has currently no known solution.  This function prints a warning if
     numerical problems are detected; the warning can be disabled with the
     command ‘warning("off", "qn:numerical-instability")’.

     *REFERENCES*

        • M. Reiser and S. S. Lavenberg, ‘Mean-Value Analysis of Closed
          Multichain Queuing Networks’, Journal of the ACM, vol.  27, n.  2,
          April 1980, pp.  313-322.  10.1145/322186.322195
          (http://doi.acm.org/10.1145/322186.322195)

     This implementation is described in R. Jain , ‘The Art of Computer Systems
     Performance Analysis’, Wiley, 1991, p.  577.  Multi-server nodes are
     treated according to G. Bolch, S. Greiner, H. de Meer and K. Trivedi,
     ‘Queueing Networks and Markov Chains: Modeling and Performance Evaluation
     with Computer Science Applications’, Wiley, 1998, Section 8.2.1, "Single
     Class Queueing Networks".

     See also: qncsmvald,qncscmva.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Analyze closed, single class queueing networks using the exact Mean Value
Ana...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
qncsmvaap


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3103
 -- Function File: [U, R, Q, X] = qncsmvaap (N, S, V)
 -- Function File: [U, R, Q, X] = qncsmvaap (N, S, V, M)
 -- Function File: [U, R, Q, X] = qncsmvaap (N, S, V, M, Z)
 -- Function File: [U, R, Q, X] = qncsmvaap (N, S, V, M, Z, TOL)
 -- Function File: [U, R, Q, X] = qncsmvaap (N, S, V, M, Z, TOL, ITER_MAX)

     Analyze closed, single class queueing networks using the Approximate Mean
     Value Analysis (MVA) algorithm.  This function is based on approximating
     the number of customers seen at center k when a new request arrives as
     Q_k(N) \times (N-1)/N. This function only handles single-server and delay
     centers; if your network contains general load-dependent service centers,
     use the function ‘qncsmvald’ instead.

     *INPUTS*

     ‘N’
          Population size (number of requests in the system, ‘N > 0’).

     ‘S(k)’
          mean service time on server k (‘S(k)>0’).

     ‘V(k)’
          average number of visits to service center k (‘V(k) ≥ 0’).

     ‘M(k)’
          number of servers at center k (if M is a scalar, all centers have that
          number of servers).  If ‘M(k) < 1’, center k is a delay center (IS);
          if ‘M(k) == 1’, center k is a regular queueing center (FCFS, LCFS-PR
          or PS) with one server (default).  This function does not support
          multiple server nodes (‘M(k) > 1’).

     ‘Z’
          External delay for customers (‘Z ≥ 0’).  Default is 0.

     ‘TOL’
          Stopping tolerance.  The algorithm stops when the maximum relative
          difference between the new and old value of the queue lengths Q
          becomes less than the tolerance.  Default is 10^{-5}.

     ‘ITER_MAX’
          Maximum number of iterations (‘ITER_MAX>0’.  The function aborts if
          convergenge is not reached within the maximum number of iterations.
          Default is 100.

     *OUTPUTS*

     ‘U(k)’
          If k is a FCFS, LCFS-PR or PS node (‘M(k) == 1’), then ‘U(k)’ is the
          utilization of center k.  If k is an IS node (‘M(k) < 1’), then ‘U(k)’
          is the _traffic intensity_ defined as ‘X(k)*S(k)’.

     ‘R(k)’
          response time at center k.  The system response time RSYS can be
          computed as ‘RSYS = N/XSYS - Z’

     ‘Q(k)’
          average number of requests at center k.  The number of requests in the
          system can be computed either as ‘sum(Q)’, or using the formula
          ‘N-XSYS*Z’.

     ‘X(k)’
          center k throughput.  The system throughput XSYS can be computed as
          ‘XSYS = X(1) / V(1)’

     *REFERENCES*

     This implementation is based on Edward D. Lazowska, John Zahorjan, G. Scott
     Graham, and Kenneth C. Sevcik, ‘Quantitative System Performance: Computer
     System Analysis Using Queueing Network Models’, Prentice Hall, 1984.
     <http://www.cs.washington.edu/homes/lazowska/qsp/>.  In particular, see
     section 6.4.2.2 ("Approximate Solution Techniques").

     See also: qncsmva,qncsmvald.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Analyze closed, single class queueing networks using the Approximate Mean Val...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
qncsmvablo


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1329
 -- Function File: [U, R, Q, X] = qncsmvablo (N, S, M, P )

     Approximate MVA algorithm for closed queueing networks with blocking.

     *INPUTS*

     ‘N’
          number of requests in the system.  N must be strictly greater than
          zero, and less than the overall network capacity: ‘0 < N < sum(M)’.

     ‘S(k)’
          average service time on server k (‘S(k) > 0’).

     ‘M(k)’
          capacity of center k.  The capacity is the maximum number of requests
          in a service center, including the request in service (‘M(k) ≥ 1’).

     ‘P(i,j)’
          probability that a request which completes service at server i will be
          transferred to server j.

     *OUTPUTS*

     ‘U(k)’
          center k utilization.

     ‘R(k)’
          average response time of service center k.

     ‘Q(k)’
          average number of requests in service center k (including the request
          in service).

     ‘X(k)’
          center k throughput.

     *REFERENCES*

        • Ian F. Akyildiz, ‘Mean Value Analysis for Blocking Queueing Networks’,
          IEEE Transactions on Software Engineering, vol.  14, n.  2, april
          1988, pp.  418-428.  10.1109/32.4663
          (http://dx.doi.org/10.1109/32.4663)

     See also: qnopen, qnclosed.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
Approximate MVA algorithm for closed queueing networks with blocking.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
qncsmvald


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2349
 -- Function File: [U, R, Q, X] = qncsmvald (N, S, V)
 -- Function File: [U, R, Q, X] = qncsmvald (N, S, V, Z)

     Mean Value Analysis algorithm for closed, single class queueing networks
     with K service centers and load-dependent service times.  This function
     supports FCFS, LCFS-PR, PS and IS nodes.  For networks with only fixed-rate
     centers and multiple-server nodes, the function ‘qncsmva’ is more
     efficient.

     *INPUTS*

     ‘N’
          Population size (number of requests in the system, ‘N ≥ 0’).  If ‘N ==
          0’, this function returns ‘U = R = Q = X = 0’

     ‘S(k,n)’
          mean service time at center k where there are n requests, 1 ≤ n ≤ N.
          ‘S(k,n)’ = 1 / \mu_{k}(n), where \mu_{k}(n) is the service rate of
          center k when there are n requests.

     ‘V(k)’
          average number of visits to service center k (‘V(k) ≥ 0’).

     ‘Z’
          external delay ("think time", ‘Z ≥ 0’); default 0.

     *OUTPUTS*

     ‘U(k)’
          utilization of service center k.  The utilization is defined as the
          probability that service center k is not empty, that is, U_k =
          1-\pi_k(0) where \pi_k(0) is the steady-state probability that there
          are 0 jobs at service center k.

     ‘R(k)’
          response time on service center k.

     ‘Q(k)’
          average number of requests in service center k.

     ‘X(k)’
          throughput of service center k.

     *NOTES*

     In presence of load-dependent servers, the MVA algorithm is known to be
     numerically unstable.  Generally this problem manifests itself as negative
     response times or utilization.

     *REFERENCES*

        • M. Reiser and S. S. Lavenberg, ‘Mean-Value Analysis of Closed
          Multichain Queuing Networks’, Journal of the ACM, vol.  27, n.  2,
          April 1980, pp.  313-322.  10.1145/322186.322195
          (http://doi.acm.org/10.1145/322186.322195)

     This implementation is described in G. Bolch, S. Greiner, H. de Meer and K.
     Trivedi, ‘Queueing Networks and Markov Chains: Modeling and Performance
     Evaluation with Computer Science Applications’, Wiley, 1998, Section
     8.2.4.1, "Networks with Load-Dependent Service: Closed Networks".

     See also: qncsmva.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Mean Value Analysis algorithm for closed, single class queueing networks with...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
qncspb


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1917
 -- Function File: [XL, XU, RL, RU] = qncspb (N, D )
 -- Function File: [XL, XU, RL, RU] = qncspb (N, S, V )
 -- Function File: [XL, XU, RL, RU] = qncspb (N, S, V, M )
 -- Function File: [XL, XU, RL, RU] = qncspb (N, S, V, M, Z )

     Compute PB Bounds (C. H. Hsieh and S. Lam, 1987) for single-class, closed
     networks with K service centers.

     *INPUTS*

     ‘’
          number of requests in the system (scalar, ‘N > 0’).

     ‘D(k)’
          service demand of service center k (‘D(k) ≥ 0’).

     ‘S(k)’
          mean service time at center k (‘S(k) ≥ 0’).

     ‘V(k)’
          visit ratio to center k (‘V(k) ≥ 0’).

     ‘M(k)’
          number of servers at center k.  This function only supports M/M/1
          queues, therefore M must be ‘ones(size(S))’.

     ‘Z’
          external delay (think time, ‘Z ≥ 0’).  Default 0.

     *OUTPUTS*

     ‘XL’
     ‘XU’
          Lower and upper bounds on the system throughput.

     ‘RL’
     ‘RU’
          Lower and upper bounds on the system response time.

     *REFERENCES*

        • C. H. Hsieh and S. Lam, ‘Two classes of performance bounds for closed
          queueing networks’, Performance Evaluation, Vol.  7 Issue 1, pp.
          3-30, February 1987, DOI 10.1016/0166-5316(87)90054-X
          (http://dx.doi.org/10.1016/0166-5316(87)90054-X).  Also available as
          Technical Report TR-85-09
          (ftp://ftp.cs.utexas.edu/pub/techreports/tr85-09.pdf), Department of
          Computer Science, University of Texas at Austin, June 1985

     This function implements the non-iterative variant described in G. Casale,
     R.  R. Muntz, G. Serazzi, ‘Geometric Bounds: a Non-Iterative Analysis
     Technique for Closed Queueing Networks’, IEEE Transactions on Computers,
     57(6):780-794, June 2008.

     See also: qncsaba, qbcsbsb, qncsgb.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
Compute PB Bounds (C.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
qncsvisits


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 975
 -- Function File: V = qncsvisits (P)
 -- Function File: V = qncsvisits (P, R)

     Compute the mean number of visits to the service centers of a single class,
     closed network with K service centers.

     *INPUTS*

     ‘P(i,j)’
          probability that a request which completed service at center i is
          routed to center j (K \times K matrix).  For closed networks it must
          hold that ‘sum(P,2)==1’.  The routing graph must be strongly
          connected, meaning that each node must be reachable from every other
          node.

     ‘R’
          Index of the reference station, r \in {1, ..., K}; Default ‘R=1’.  The
          traffic equations are solved by imposing the condition ‘V(r) = 1’.  A
          request returning to the reference station completes its activity
          cycle.

     *OUTPUTS*

     ‘V(k)’
          average number of visits to service center k, assuming r as the
          reference station.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the mean number of visits to the service centers of a single class,
c...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
qnmarkov


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3699
 -- Function File: [U, R, Q, X] = qnmarkov (LAMBDA, S, C, P)
 -- Function File: [U, R, Q, X] = qnmarkov (LAMBDA, S, C, P, M)
 -- Function File: [U, R, Q, X] = qnmarkov (N, S, C, P)
 -- Function File: [U, R, Q, X] = qnmarkov (N, S, C, P, M)

     Compute utilization, response time, average queue length and throughput for
     open or closed queueing networks with finite capacity and a single class of
     requests.  Blocking type is Repetitive-Service (RS). This function
     explicitly generates and solve the underlying Markov chain, and thus might
     require a large amount of memory.

     More specifically, networks which can me analyzed by this function have the
     following properties:

        • There exists only a single class of customers.

        • The network has K service centers.  Center k \in {1, ..., K} has m_k >
          0 servers, and has a total (finite) capacity of C_k \geq m_k which
          includes both buffer space and servers.  The buffer space at service
          center k is therefore C_k - m_k.

        • The network can be open, with external arrival rate to center k equal
          to \lambda_k, or closed with fixed population size N. For closed
          networks, the population size N must be strictly less than the network
          capacity: N < \sum_{k=1}^K C_k.

        • Average service times are load-independent.

        • P_{i, j} is the probability that requests completing execution at
          center i are transferred to center j, i \neq j.  For open networks, a
          request may leave the system from any node i with probability
          1-\sum_{j=1}^K P_{i, j}.

        • Blocking type is Repetitive-Service (RS). Service center j is
          _saturated_ if the number of requests is equal to its capacity C_j.
          Under the RS blocking discipline, a request completing service at
          center i which is being transferred to a saturated server j is put
          back at the end of the queue of i and will receive service again.
          Center i then processes the next request in queue.  External arrivals
          to a saturated servers are dropped.

     *INPUTS*

     ‘LAMBDA(k)’
     ‘N’
          If the first argument is a vector LAMBDA, it is considered to be the
          external arrival rate ‘LAMBDA(k) ≥ 0’ to service center k of an open
          network.  If the first argument is a scalar, it is considered as the
          population size N of a closed network; in this case N must be strictly
          less than the network capacity: ‘N < sum(C)’.

     ‘S(k)’
          average service time at service center k

     ‘C(k)’
          capacity of service center k.  The capacity includes both the buffer
          and server space ‘M(k)’.  Thus the buffer space is ‘C(k)-M(k)’.

     ‘P(i,j)’
          transition probability from service center i to service center j.

     ‘M(k)’
          number of servers at service center k.  Note that ‘M(k) ≥ C(k)’ for
          each K.  If M is omitted, all service centers are assumed to have a
          single server (‘M(k) = 1’ for all k).

     *OUTPUTS*

     ‘U(k)’
          center k utilization.

     ‘R(k)’
          response time on service center k.

     ‘Q(k)’
          average number of customers in the service center k, _including_ the
          request in service.

     ‘X(k)’
          throughput of service center k.

     *NOTES*

     The space complexity of this implementation is O(\prod_{k=1}^K (C_k +
     1)^2).  The time complexity is dominated by the time needed to solve a
     linear system with \prod_{k=1}^K (C_k + 1) unknowns.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute utilization, response time, average queue length and throughput for o...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
qnmix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2913
 -- Function File: [U, R, Q, X] = qnmix (LAMBDA, N, S, V, M)

     Mean Value Analysis for mixed queueing networks.  The network consists of K
     service centers (single-server or delay centers) and C independent customer
     chains.  Both open and closed chains are possible.  LAMBDA is the vector of
     per-chain arrival rates (open classes); N is the vector of populations for
     closed chains.

     Class switching is *not* allowed.  Each customer class _must_ correspond to
     an independent chain.

     If the network is made of open or closed classes only, then this function
     calls ‘qnom’ or ‘qncmmva’ respectively, and prints a warning message.

     *INPUTS*

     ‘LAMBDA(c)’
     ‘N(c)’
          For each customer chain c:

             • if c is a closed chain, then ‘N(c)>0’ is the number of class c
               requests and ‘LAMBDA(c)’ must be zero;

             • If c is an open chain, ‘LAMBDA(c)>0’ is the arrival rate of class
               c requests and ‘N(c)’ must be zero;

          In other words, for each class c the following must hold:

                (LAMBDA(c)>0 && N(c)==0) || (LAMBDA(c)==0 && N(c)>0)

     ‘S(c,k)’
          mean class c service time at center k, ‘S(c,k) ≥ 0’.  For FCFS nodes,
          service times must be class-independent.

     ‘V(c,k)’
          average number of visits of class c customers to center k (‘V(c,k) ≥
          0’).

     ‘M(k)’
          number of servers at center k.  Only single-server (‘M(k)==1’) or IS
          (Infinite Server) nodes (‘M(k)<1’) are supported.  If omitted, each
          center is assumed to be of type M/M/1-FCFS. Queueing discipline for
          single-server nodes can be FCFS, PS or LCFS-PR.

     *OUTPUTS*

     ‘U(c,k)’
          class c utilization at center k.

     ‘R(c,k)’
          class c response time at center k.

     ‘Q(c,k)’
          average number of class c requests at center k.

     ‘X(c,k)’
          class c throughput at center k.

     *REFERENCES*

        • Edward D. Lazowska, John Zahorjan, G. Scott Graham, and Kenneth C.
          Sevcik, ‘Quantitative System Performance: Computer System Analysis
          Using Queueing Network Models’, Prentice Hall, 1984.
          <http://www.cs.washington.edu/homes/lazowska/qsp/>.  In particular,
          see section 7.4.3 ("Mixed Model Solution Techniques").  Note that in
          this function we compute the mean response time R instead of the mean
          residence time as in the reference.

        • Herb Schwetman, ‘Implementing the Mean Value Algorithm for the
          Solution of Queueing Network Models’, Technical Report CSD-TR-355
          (http://docs.lib.purdue.edu/cstech/286/), Department of Computer
          Sciences, Purdue University, revised Feb 15, 1982.

     See also: qncmmva, qncm.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Mean Value Analysis for mixed queueing networks.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
qnmknode


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1786
 -- Function File: Q = qnmknode ("M/M/M-FCFS", S)
 -- Function File: Q = qnmknode ("M/M/M-FCFS", S, M)
 -- Function File: Q = qnmknode ("M/M/1-LCFS-PR", S)
 -- Function File: Q = qnmknode ("-/G/1-PS", S)
 -- Function File: Q = qnmknode ("-/G/1-PS", S, S2)
 -- Function File: Q = qnmknode ("-/G/INF", S)
 -- Function File: Q = qnmknode ("-/G/INF", S, S2)

     Creates a node; this function can be used together with ‘qnsolve’.  It is
     possible to create either single-class nodes (where there is only one
     customer class), or multiple-class nodes (where the service time is given
     per-class).  Furthermore, it is possible to specify load-dependent service
     times.  String literals are case-insensitive, so for example "-/G/INF",
     "-/G/INF" and "-/G/INF" are all equivalent.

     *INPUTS*

     ‘S’
          Mean service time.

             • If S is a scalar, it is assumed to be a load-independent,
               class-independent service time.

             • If S is a column vector, then ‘S(c)’ is assumed to the the
               load-independent service time for class c customers.

             • If S is a row vector, then ‘S(n)’ is assumed to be the
               class-independent service time at the node, when there are n
               requests.

             • Finally, if S is a two-dimensional matrix, then ‘S(c,n)’ is
               assumed to be the class c service time when there are n requests
               at the node.

     ‘M’
          Number of identical servers at the node.  Default is ‘M=1’.

     ‘S2’
          Squared coefficient of variation for the service time.  Default is
          1.0.

     The returned struct Q should be considered opaque to the client.

     See also: qnsolve.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74
Creates a node; this function can be used together with ‘qnsolve’.  It



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
qnom


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3379
 -- Function File: [U, R, Q, X] = qnom (LAMBDA, S, V)
 -- Function File: [U, R, Q, X] = qnom (LAMBDA, S, V, M)
 -- Function File: [U, R, Q, X] = qnom (LAMBDA, S, P)
 -- Function File: [U, R, Q, X] = qnom (LAMBDA, S, P, M)

     Exact analysis of open, multiple-class BCMP networks.  The network can be
     made of _single-server_ queueing centers (FCFS, LCFS-PR or PS) or delay
     centers (IS). This function assumes a network with K service centers and C
     customer classes.

     *INPUTS*

     ‘LAMBDA(c)’
          If this function is invoked as ‘qnom(lambda, S, V, ...)’, then
          ‘LAMBDA(c)’ is the external arrival rate of class c customers
          (‘LAMBDA(c) ≥ 0’).  If this function is invoked as ‘qnom(lambda, S, P,
          ...)’, then ‘LAMBDA(c,k)’ is the external arrival rate of class c
          customers at center k (‘LAMBDA(c,k) ≥ 0’).

     ‘S(c,k)’
          mean service time of class c customers on the service center k
          (‘S(c,k)>0’).  For FCFS nodes, mean service times must be
          class-independent.

     ‘V(c,k)’
          visit ratio of class c customers to service center k (‘V(c,k) ≥ 0 ’).
          *If you pass this argument, class switching is not allowed*

     ‘P(r,i,s,j)’
          probability that a class r job completing service at center i is
          routed to center j as a class s job.  *If you pass argument P, class
          switching is allowed*; however, all servers must be fixed-rate or
          infinite-server nodes (‘M(k) ≤ 1’ for all k).

     ‘M(k)’
          number of servers at center k.  If ‘M(k) < 1’, enter k is a delay
          center (IS); otherwise it is a regular queueing center with ‘M(k)’
          servers.  Default is ‘M(k) = 1’ for all k.

     *OUTPUTS*

     ‘U(c,k)’
          If k is a queueing center, then ‘U(c,k)’ is the class c utilization of
          center k.  If k is an IS node, then ‘U(c,k)’ is the class c _traffic
          intensity_ defined as ‘X(c,k)*S(c,k)’.

     ‘R(c,k)’
          class c response time at center k.  The system response time for class
          c requests can be computed as ‘dot(R, V, 2)’.

     ‘Q(c,k)’
          average number of class c requests at center k.  The average number of
          class c requests in the system QC can be computed as ‘Qc = sum(Q, 2)’

     ‘X(c,k)’
          class c throughput at center k.

     *NOTES*

     If the function call specifies the visit ratios V, class switching is *not*
     allowed.  If the function call specifies the routing probability matrix P,
     then class switching *is* allowed; however, all nodes are restricted to be
     fixed rate servers or delay centers: multiple-server and general
     load-dependent centers are not supported.  Note that the meaning of
     parameter LAMBDA is different from one case to the other (see below).

     *REFERENCES*

        • Edward D. Lazowska, John Zahorjan, G. Scott Graham, and Kenneth C.
          Sevcik, ‘Quantitative System Performance: Computer System Analysis
          Using Queueing Network Models’, Prentice Hall, 1984.
          <http://www.cs.washington.edu/homes/lazowska/qsp/>.  In particular,
          see section 7.4.1 ("Open Model Solution Techniques").

     See also: qnopen,qnos,qnomvisits.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Exact analysis of open, multiple-class BCMP networks.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
qnomaba


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1227
 -- Function File: [XL, XU, RL, RU] = qnomaba (LAMBDA, D)
 -- Function File: [XL, XU, RL, RL] = qnomaba (LAMBDA, S, V)

     Compute Asymptotic Bounds for open, multiclass networks with K service
     centers and C customer classes.

     *INPUTS*

     ‘LAMBDA(c)’
          class c arrival rate to the system (vector of length C, ‘LAMBDA(c) >
          0’).

     ‘D(c, k)’
          class c service demand at center k (C \times K matrix, ‘D(c, k) ≥ 0’).

     ‘S(c, k)’
          mean service time of class c requests at center k (C \times K matrix,
          ‘S(c, k) ≥ 0’).

     ‘V(c, k)’
          mean number of visits of class c requests at center k (C \times K
          matrix, ‘V(c, k) ≥ 0’).

     *OUTPUTS*

     ‘XL(c)’
     ‘XU(c)’
          lower and upper bounds of class c throughput.  ‘XL(c)’ is always 0
          since there can be no lower bound on the throughput of open networks
          (vector of length C).

     ‘RL(c)’
     ‘RU(c)’
          lower and upper bounds of class c response time.  ‘RU(c)’ is always
          ‘+inf’ since there can be no upper bound on the response time of open
          networks (vector of length C).


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute Asymptotic Bounds for open, multiclass networks with K service center...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
qnomvisits


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 574
 -- Function File: V = qnomvisits (P, LAMBDA)

     Compute the visit ratios to the service centers of an open multiclass
     network with K service centers and C customer classes.

     *INPUTS*

     ‘P(r,i,s,j)’
          probability that a class r request which completed service at center i
          is routed to center j as a class s request.  Class switching is
          supported.

     ‘LAMBDA(r,i)’
          external arrival rate of class r requests to center i.

     *OUTPUTS*

     ‘V(r,i)’
          visit ratio of class r requests at center i.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the visit ratios to the service centers of an open multiclass network...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
qnopen


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 448
 -- Function File: [U, R, Q, X] = qnopen (LAMBDA, S, V, ...)

     Compute utilization, response time, average number of requests in the
     system, and throughput for open queueing networks.  If LAMBDA is a scalar,
     the network is considered a single-class QN and is solved using
     ‘qnopensingle’.  If LAMBDA is a vector, the network is considered as a
     multiclass QN and solved using ‘qnopenmulti’.

     See also: qnos, qnom.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute utilization, response time, average number of requests in the system,...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
qnos


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1775
 -- Function File: [U, R, Q, X] = qnos (LAMBDA, S, V)
 -- Function File: [U, R, Q, X] = qnos (LAMBDA, S, V, M)

     Analyze open, single class BCMP queueing networks with K service centers.

     This function works for a subset of BCMP single-class open networks
     satisfying the following properties:

        • The allowed service disciplines at network nodes are: FCFS, PS,
          LCFS-PR, IS (infinite server);

        • Service times are exponentially distributed and load-independent;

        • Center k can consist of ‘M(k) ≥ 1’ identical servers.

        • Routing is load-independent

     *INPUTS*

     ‘LAMBDA’
          Overall external arrival rate (‘LAMBDA>0’).

     ‘S(k)’
          average service time at center k (‘S(k)>0’).

     ‘V(k)’
          average number of visits to center k (‘V(k) ≥ 0’).

     ‘M(k)’
          number of servers at center i.  If ‘M(k) < 1’, enter k is a delay
          center (IS); otherwise it is a regular queueing center with ‘M(k)’
          servers.  Default is ‘M(k) = 1’ for all k.

     *OUTPUTS*

     ‘U(k)’
          If k is a queueing center, ‘U(k)’ is the utilization of center k.  If
          k is an IS node, then ‘U(k)’ is the _traffic intensity_ defined as
          ‘X(k)*S(k)’.

     ‘R(k)’
          center k average response time.

     ‘Q(k)’
          average number of requests at center k.

     ‘X(k)’
          center k throughput.

     *REFERENCES*

        • G. Bolch, S. Greiner, H. de Meer and K. Trivedi, ‘Queueing Networks
          and Markov Chains: Modeling and Performance Evaluation with Computer
          Science Applications’, Wiley, 1998

     See also: qnopen,qnclosed,qnosvisits.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 73
Analyze open, single class BCMP queueing networks with K service centers.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
qnosaba


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1297
 -- Function File: [XL, XU, RL, RU] = qnosaba (LAMBDA, D)
 -- Function File: [XL, XU, RL, RU] = qnosaba (LAMBDA, S, V)
 -- Function File: [XL, XU, RL, RU] = qnosaba (LAMBDA, S, V, M)

     Compute Asymptotic Bounds for open, single-class networks with K service
     centers.

     *INPUTS*

     ‘LAMBDA’
          Arrival rate of requests (scalar, ‘LAMBDA ≥ 0’).

     ‘D(k)’
          service demand at center k.  (vector of length K, ‘D(k) ≥ 0’).

     ‘S(k)’
          mean service time at center k.  (vector of length K, ‘S(k) ≥ 0’).

     ‘V(k)’
          mean number of visits to center k.  (vector of length K, ‘V(k) ≥ 0’).

     ‘M(k)’
          number of servers at center k.  This function only supports M/M/1
          queues, therefore M must be ‘ones(size(S))’.

     *OUTPUTS*

     ‘XL’
     ‘XU’
          Lower and upper bounds on the system throughput.  XL is always set to
          0 since there can be no lower bound on the throughput of open networks
          (scalar).

     ‘RL’
     ‘RU’
          Lower and upper bounds on the system response time.  RU is always set
          to ‘+inf’ since there can be no upper bound on the throughput of open
          networks (scalar).

     See also: qnomaba.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute Asymptotic Bounds for open, single-class networks with K service
cent...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
qnosbsb


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1021
 -- Function File: [XL, XU, RL, RU] = qnosbsb (LAMBDA, D)
 -- Function File: [XL, XU, RL, RU] = qnosbsb (LAMBDA, S, V)

     Compute Balanced System Bounds for single-class, open networks with K
     service centers.

     *INPUTS*

     ‘LAMBDA’
          overall arrival rate to the system (scalar, ‘LAMBDA ≥ 0’).

     ‘D(k)’
          service demand at center k (‘D(k) ≥ 0’).

     ‘S(k)’
          service time at center k (‘S(k) ≥ 0’).

     ‘V(k)’
          mean number of visits at center k (‘V(k) ≥ 0’).

     ‘M(k)’
          number of servers at center k.  This function only supports M/M/1
          queues, therefore M must be ‘ones(size(S))’.

     *OUTPUTS*

     ‘XL’
     ‘XU’
          Lower and upper bounds on the system throughput.  XL is always set to
          0, since there can be no lower bound on open networks throughput.

     ‘RL’
     ‘RU’
          Lower and upper bounds on the system response time.

     See also: qnosaba.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute Balanced System Bounds for single-class, open networks with K service...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
qnosvisits


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 495
 -- Function File: V = qnosvisits (P, LAMBDA)

     Compute the average number of visits to the service centers of a single
     class open Queueing Network with K service centers.

     *INPUTS*

     ‘P(i,j)’
          is the probability that a request which completed service at center i
          is routed to center j (K \times K matrix).

     ‘LAMBDA(k)’
          external arrival rate to center k.

     *OUTPUTS*

     ‘V(k)’
          average number of visits to server k.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the average number of visits to the service centers of a single class...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
qnsolve


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2512
 -- Function File: [U, R, Q, X] = qnsolve ("CLOSED", N, QQ, V)
 -- Function File: [U, R, Q, X] = qnsolve ("CLOSED", N, QQ, V, Z)
 -- Function File: [U, R, Q, X] = qnsolve ("OPEN", LAMBDA, QQ, V)
 -- Function File: [U, R, Q, X] = qnsolve ("MIXED", LAMBDA, N, QQ, V)

     High-level function for analyzing QN models.

        • For *closed* networks, the following server types are supported:
          M/M/m-FCFS, -/G/\infty, -/G/1-LCFS-PR, -/G/1-PS and load-dependent
          variants.

        • For *open* networks, the following server types are supported:
          M/M/m-FCFS, -/G/\infty and -/G/1-PS. General load-dependent nodes are
          _not_ supported.  Multiclass open networks do not support multiple
          server M/M/m nodes, but only single server M/M/1-FCFS.

        • For *mixed* networks, the following server types are supported:
          M/M/1-FCFS, -/G/\infty and -/G/1-PS. General load-dependent nodes are
          _not_ supported.

     *INPUTS*

     ‘N’
     ‘N(c)’
          Number of requests in the system for closed networks.  For
          single-class networks, N must be a scalar.  For multiclass networks,
          ‘N(c)’ is the population size of closed class c.

     ‘LAMBDA’
     ‘LAMBDA(c)’
          External arrival rate (scalar) for open networks.  For single-class
          networks, LAMBDA must be a scalar.  For multiclass networks,
          ‘LAMBDA(c)’ is the class c overall arrival rate.

     ‘QQ{i}’
          List of queues in the network.  This must be a cell array with N
          elements, such that ‘QQ{i}’ is a struct produced by the ‘qnmknode’
          function.

     ‘Z’
          External delay ("think time") for closed networks.  Default 0.

     *OUTPUTS*

     ‘U(k)’
          If k is a FCFS node, then ‘U(k)’ is the utilization of service center
          k.  If k is an IS node, then ‘U(k)’ is the _traffic intensity_ defined
          as ‘X(k)*S(k)’.

     ‘R(k)’
          average response time of service center k.

     ‘Q(k)’
          average number of customers in service center k.

     ‘X(k)’
          throughput of service center k.

     Note that for multiclass networks, the computed results are per-class
     utilization, response time, number of customers and throughput: ‘U(c,k)’,
     ‘R(c,k)’, ‘Q(c,k)’, ‘X(c,k)’.

     String literals are case-insensitive, so "CLOSED", "CLOSED" and "CLOSED"
     are all equivalent.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
High-level function for analyzing QN models.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
qsammm


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1286
 -- Function File: [U, R, Q, X] = qsammm (LAMBDA, MU)

     Compute _approximate_ utilization, response time, average number of
     requests in service and throughput for an asymmetric M/M/m queue.  In this
     type of system there are m different servers connected to a single queue.
     Each server has its own (possibly different) service rate.  If there is
     more than one server available, requests are routed to a randomly-chosen
     one.

     *INPUTS*

     ‘LAMBDA’
          Arrival rate (‘LAMBDA>0’)

     ‘MU’
          ‘MU(i)’ is the service rate of server i, 1 ≤ i ≤ m.  The system must
          be ergodic (‘LAMBDA < sum(MU)’).

     *OUTPUTS*

     ‘U’
          Approximate service center utilization, U = \lambda / ( \sum_{i=1}^m
          \mu_i ).

     ‘R’
          Approximate service center response time

     ‘Q’
          Approximate number of requests in the system

     ‘X’
          Approximate system throughput.  If the system is ergodic, ‘X = LAMBDA’

     *REFERENCES*

        • G. Bolch, S. Greiner, H. de Meer and K. Trivedi, ‘Queueing Networks
          and Markov Chains: Modeling and Performance Evaluation with Computer
          Science Applications’, Wiley, 1998

     See also: qsmmm.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute _approximate_ utilization, response time, average number of requests ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
qsmg1


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1034
 -- Function File: [U, R, Q, X, P0] = qsmg1 (LAMBDA, XAVG, X2ND)

     Compute utilization, response time, average number of requests and
     throughput for a M/G/1 system.  The service time distribution is described
     by its mean XAVG, and by its second moment X2ND.  The computations are
     based on results from L. Kleinrock, ‘Queuing Systems’, Wiley, Vol 2, and
     Pollaczek-Khinchine formula.

     *INPUTS*

     ‘LAMBDA’
          Arrival rate

     ‘XAVG’
          Average service time

     ‘X2ND’
          Second moment of service time distribution

     *OUTPUTS*

     ‘U’
          Service center utilization

     ‘R’
          Service center response time

     ‘Q’
          Average number of requests in the system

     ‘X’
          Service center throughput

     ‘P0’
          Probability that there is not any request at system

     LAMBDA, XAVG, T2ND can be vectors of the same size.  In this case, the
     results will be vectors as well.

     See also: qsmh1.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute utilization, response time, average number of requests and throughput...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
qsmh1


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1193
 -- Function File: [U, R, Q, X, P0] = qsmh1 (LAMBDA, MU, ALPHA)

     Compute utilization, response time, average number of requests and
     throughput for a M/H_m/1 system.  In this system, the customer service
     times have hyper-exponential distribution:

                  ___ m
                  \
           B(x) =  >  alpha(j) * (1-exp(-mu(j)*x))   x>0
                  /__
                      j=1

     where \alpha_j is the probability that the request is served at phase j, in
     which case the average service rate is \mu_j.  After completing service at
     phase j, for some j, the request exits the system.

     *INPUTS*

     ‘LAMBDA’
          Arrival rate

     ‘MU’
          ‘MU(j)’ is the phase j service rate.  The total number of phases m is
          ‘length(MU)’.

     ‘ALPHA’
          ‘ALPHA(j)’ is the probability that a request is served at phase j.
          ALPHA must have the same size as MU.

     *OUTPUTS*

     ‘U’
          Service center utilization

     ‘R’
          Service center response time

     ‘Q’
          Average number of requests in the system

     ‘X’
          Service center throughput


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute utilization, response time, average number of requests and throughput...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
qsmm1


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1412
 -- Function File: [U, R, Q, X, P0] = qsmm1 (LAMBDA, MU)
 -- Function File: PK = qsmm1 (LAMBDA, MU, K)

     Compute utilization, response time, average number of requests and
     throughput for a M/M/1 queue.

     *INPUTS*

     ‘LAMBDA’
          Arrival rate (‘LAMBDA ≥ 0’).

     ‘MU’
          Service rate (‘MU > LAMBDA’).

     ‘K’
          Number of requests in the system (‘K ≥ 0’).

     *OUTPUTS*

     ‘U’
          Server utilization

     ‘R’
          Server response time

     ‘Q’
          Average number of requests in the system

     ‘X’
          Server throughput.  If the system is ergodic (‘MU > LAMBDA’), we
          always have ‘X = LAMBDA’

     ‘P0’
          Steady-state probability that there are no requests in the system.

     ‘PK’
          Steady-state probability that there are K requests in the system.
          (including the one being served).

     If this function is called with less than three input parameters, LAMBDA
     and MU can be vectors of the same size.  In this case, the results will be
     vectors as well.

     *REFERENCES*

        • G. Bolch, S. Greiner, H. de Meer and K. Trivedi, ‘Queueing Networks
          and Markov Chains: Modeling and Performance Evaluation with Computer
          Science Applications’, Wiley, 1998, Section 6.3

     See also: qsmmm, qsmminf, qsmmmk.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute utilization, response time, average number of requests and throughput...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
qsmm1k


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1601
 -- Function File: [U, R, Q, X, P0, PK] = qsmm1k (LAMBDA, MU, K)
 -- Function File: PN = qsmm1k (LAMBDA, MU, K, N)

     Compute utilization, response time, average number of requests and
     throughput for a M/M/1/K finite capacity system.

     In a M/M/1/K queue there is a single server and a queue with finite
     capacity: the maximum number of requests in the system (including the
     request being served) is K, and the maximum queue length is therefore K-1.

     *INPUTS*

     ‘LAMBDA’
          Arrival rate (‘LAMBDA>0’).

     ‘MU’
          Service rate (‘MU>0’).

     ‘K’
          Maximum number of requests allowed in the system (‘K ≥ 1’).

     ‘N’
          Number of requests in the (‘0 ≤ N ≤ K’).

     *OUTPUTS*

     ‘U’
          Service center utilization, which is defined as ‘U = 1-P0’

     ‘R’
          Service center response time

     ‘Q’
          Average number of requests in the system

     ‘X’
          Service center throughput

     ‘P0’
          Steady-state probability that there are no requests in the system

     ‘PK’
          Steady-state probability that there are K requests in the system
          (i.e., that the system is full)

     ‘PN’
          Steady-state probability that there are n requests in the system
          (including the one being served).

     If this function is called with less than four arguments, LAMBDA, MU and K
     can be vectors of the same size.  In this case, the results will be vectors
     as well.

     See also: qsmm1,qsmminf,qsmmm.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute utilization, response time, average number of requests and throughput...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
qsmminf


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1774
 -- Function File: [U, R, Q, X, P0] = qsmminf (LAMBDA, MU)
 -- Function File: PK = qsmminf (LAMBDA, MU, K)

     Compute utilization, response time, average number of requests and
     throughput for an infinite-server queue.

     The M/M/\infty system has an infinite number of identical servers.  Such a
     system is always stable (i.e., the mean queue length is always finite) for
     any arrival and service rates.

     *INPUTS*

     ‘LAMBDA’
          Arrival rate (‘LAMBDA>0’).

     ‘MU’
          Service rate (‘MU>0’).

     ‘K’
          Number of requests in the system (‘K ≥ 0’).

     *OUTPUTS*

     ‘U’
          Traffic intensity (defined as \lambda/\mu).  Note that this is
          different from the utilization, which in the case of M/M/\infty
          centers is always zero.

     ‘R’
          Service center response time.

     ‘Q’
          Average number of requests in the system (which is equal to the
          traffic intensity \lambda/\mu).

     ‘X’
          Throughput (which is always equal to ‘X = LAMBDA’).

     ‘P0’
          Steady-state probability that there are no requests in the system

     ‘PK’
          Steady-state probability that there are K requests in the system
          (including the one being served).

     If this function is called with less than three arguments, LAMBDA and MU
     can be vectors of the same size.  In this case, the results will be vectors
     as well.

     *REFERENCES*

        • G. Bolch, S. Greiner, H. de Meer and K. Trivedi, ‘Queueing Networks
          and Markov Chains: Modeling and Performance Evaluation with Computer
          Science Applications’, Wiley, 1998, Section 6.4

     See also: qsmm1,qsmmm,qsmmmk.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute utilization, response time, average number of requests and throughput...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
qsmmm


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1799
 -- Function File: [U, R, Q, X, P0, PM] = qsmmm (LAMBDA, MU)
 -- Function File: [U, R, Q, X, P0, PM] = qsmmm (LAMBDA, MU, M)
 -- Function File: PK = qsmmm (LAMBDA, MU, M, K)

     Compute utilization, response time, average number of requests in service
     and throughput for a M/M/m queue, a queueing system with m identical
     servers connected to a single FCFS queue.

     *INPUTS*

     ‘LAMBDA’
          Arrival rate (‘LAMBDA>0’).

     ‘MU’
          Service rate (‘MU>LAMBDA’).

     ‘M’
          Number of servers (‘M ≥ 1’).  Default is ‘M=1’.

     ‘K’
          Number of requests in the system (‘K ≥ 0’).

     *OUTPUTS*

     ‘U’
          Service center utilization, U = \lambda / (m \mu).

     ‘R’
          Service center mean response time

     ‘Q’
          Average number of requests in the system

     ‘X’
          Service center throughput.  If the system is ergodic, we will always
          have ‘X = LAMBDA’

     ‘P0’
          Steady-state probability that there are 0 requests in the system

     ‘PM’
          Steady-state probability that an arriving request has to wait in the
          queue

     ‘PK’
          Steady-state probability that there are K requests in the system
          (including the one being served).

     If this function is called with less than four parameters, LAMBDA, MU and M
     can be vectors of the same size.  In this case, the results will be vectors
     as well.

     *REFERENCES*

        • G. Bolch, S. Greiner, H. de Meer and K. Trivedi, ‘Queueing Networks
          and Markov Chains: Modeling and Performance Evaluation with Computer
          Science Applications’, Wiley, 1998, Section 6.5

     See also: erlangc,qsmm1,qsmminf,qsmmmk.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute utilization, response time, average number of requests in service and...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
qsmmmk


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2012
 -- Function File: [U, R, Q, X, P0, PK] = qsmmmk (LAMBDA, MU, M, K)
 -- Function File: PN = qsmmmk (LAMBDA, MU, M, K, N)

     Compute utilization, response time, average number of requests and
     throughput for a M/M/m/K finite capacity system.  In a M/M/m/K system there
     are m \geq 1 identical service centers sharing a fixed-capacity queue.  At
     any time, at most K ≥ m requests can be in the system, including those
     being served.  The maximum queue length is K-m.  This function generates
     and solves the underlying CTMC.

     *INPUTS*

     ‘LAMBDA’
          Arrival rate (‘LAMBDA>0’)

     ‘MU’
          Service rate (‘MU>0’)

     ‘M’
          Number of servers (‘M ≥ 1’)

     ‘K’
          Maximum number of requests allowed in the system, including those
          being served (‘K ≥ M’)

     ‘N’
          Number of requests in the (‘0 ≤ N ≤ K’).

     *OUTPUTS*

     ‘U’
          Service center utilization

     ‘R’
          Service center response time

     ‘Q’
          Average number of requests in the system

     ‘X’
          Service center throughput

     ‘P0’
          Steady-state probability that there are no requests in the system.

     ‘PK’
          Steady-state probability that there are K requests in the system
          (i.e., probability that the system is full).

     ‘PN’
          Steady-state probability that there are N requests in the system
          (including those being served).

     If this function is called with less than five arguments, LAMBDA, MU, M and
     K can be either scalars, or vectors of the same size.  In this case, the
     results will be vectors as well.

     *REFERENCES*

        • G. Bolch, S. Greiner, H. de Meer and K. Trivedi, ‘Queueing Networks
          and Markov Chains: Modeling and Performance Evaluation with Computer
          Science Applications’, Wiley, 1998, Section 6.6

     See also: qsmm1,qsmminf,qsmmm.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute utilization, response time, average number of requests and throughput...





