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, 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.

Demonstration 1

The following code

 N = [2 3];
 mix = qncmpopmix(3, N)

Produces the following output

mix =

   2   1
   1   2
   0   3

Package: queueing