1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023
|
@c This file has been automatically generated from singlestation.txi
@c by proc.m. Do not edit this file, all changes will be lost
@c -*- texinfo -*-
@c Copyright (C) 2008, 2009, 2010, 2011, 2012, 2014, 2016, 2018 Moreno Marzolla
@c
@c This file is part of the queueing package.
@c
@c The queueing package is free software; you can redistribute it
@c and/or modify it under the terms of the GNU General Public License
@c as published by the Free Software Foundation; either version 3 of
@c the License, or (at your option) any later version.
@c
@c The queueing package is distributed in the hope that it will be
@c useful, but WITHOUT ANY WARRANTY; without even the implied warranty
@c of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@c GNU General Public License for more details.
@c
@c You should have received a copy of the GNU General Public License
@c along with the queueing package; see the file COPYING. If not, see
@c <http://www.gnu.org/licenses/>.
@node Single Station Queueing Systems
@chapter Single Station Queueing Systems
Single Station Queueing Systems contain a single station, and can
usually be analyzed easily. The @code{queueing} package contains
functions for handling the following types of queues:
@ifnottex
@menu
* The M/M/1 System:: Single-server queueing station.
* The M/M/m System:: Multiple-server queueing station.
* The Erlang-B Formula::
* The Erlang-C Formula::
* The Engset Formula::
* The M/M/inf System:: Infinite-server (delay center) station.
* The M/M/1/K System:: Single-server, finite-capacity queueing station.
* The M/M/m/K System:: Multiple-server, finite-capacity queueing station.
* The Asymmetric M/M/m System:: Asymmetric multiple-server queueing station.
* The M/G/1 System:: Single-server with general service time distribution.
* The M/Hm/1 System:: Single-server with hyperexponential service time distribution.
@end menu
@end ifnottex
@iftex
@itemize
@item @math{M/M/1} single-server queueing station;
@item @math{M/M/m} multiple-server queueing station;
@item Asymmetric @math{M/M/m};
@item @math{M/M/\infty} infinite-server station (delay center);
@item @math{M/M/1/K} single-server, finite-capacity queueing station;
@item @math{M/M/m/K} multiple-server, finite-capacity queueing station;
@item @math{M/G/1} single-server with general service time distribution;
@item @math{M/H_m/1} single-server with hyperexponential service time distribution.
@end itemize
@end iftex
@c
@c M/M/1
@c
@node The M/M/1 System
@section The @math{M/M/1} System
The @math{M/M/1} system contains a single server connected to an
unbounded FCFS queue. Requests arrive according to a Poisson process
with rate @math{\lambda}; the service time is exponentially
distributed with average service rate @math{\mu}. The system is stable
if @math{\lambda < \mu}.
@anchor{doc-qsmm1}
@deftypefn {Function File} {[@var{U}, @var{R}, @var{Q}, @var{X}, @var{p0}] =} qsmm1 (@var{lambda}, @var{mu})
@deftypefnx {Function File} {@var{pk} =} qsmm1 (@var{lambda}, @var{mu}, @var{k})
@cindex @math{M/M/1} system
Compute utilization, response time, average number of requests and throughput for a @math{M/M/1} queue.
@tex
The steady-state probability @math{\pi_k} that there are @math{k}
jobs in the system, @math{k \geq 0}, can be computed as:
$$
\pi_k = (1-\rho)\rho^k
$$
where @math{\rho = \lambda/\mu} is the server utilization.
@end tex
@strong{INPUTS}
@table @code
@item @var{lambda}
Arrival rate (@code{@var{lambda} @geq{} 0}).
@item @var{mu}
Service rate (@code{@var{mu} > @var{lambda}}).
@item @var{k}
Number of requests in the system (@code{@var{k} @geq{} 0}).
@end table
@strong{OUTPUTS}
@table @code
@item @var{U}
Server utilization
@item @var{R}
Server response time
@item @var{Q}
Average number of requests in the system
@item @var{X}
Server throughput. If the system is ergodic (@code{@var{mu} >
@var{lambda}}), we always have @code{@var{X} = @var{lambda}}
@item @var{p0}
Steady-state probability that there are no requests in the system.
@item @var{pk}
Steady-state probability that there are @var{k} requests in the system.
(including the one being served).
@end table
If this function is called with less than three input parameters,
@var{lambda} and @var{mu} can be vectors of the same size. In this
case, the results will be vectors as well.
@strong{REFERENCES}
@itemize
@item
G. Bolch, S. Greiner, H. de Meer and K. Trivedi, @cite{Queueing Networks
and Markov Chains: Modeling and Performance Evaluation with Computer
Science Applications}, Wiley, 1998, Section 6.3
@end itemize
@xseealso{qsmmm, qsmminf, qsmmmk}
@end deftypefn
@c
@c M/M/m
@c
@node The M/M/m System
@section The @math{M/M/m} System
The @math{M/M/m} system is similar to the @math{M/M/1} system, except
that there are @math{m \geq 1} identical servers connected to a shared
FCFS queue. Thus, at most @math{m} requests can be served at the same
time. The @math{M/M/m} system can be seen as a single server with
load-dependent service rate @math{\mu(n)}, which is a function of the
number @math{n} of requests in the system:
@iftex
@tex
$$\mu(n) = \mu \times \min(m,n)$$
@end tex
@end iftex
@ifnottex
@example
mu(n) = min(m,n)*mu
@end example
@end ifnottex
@noindent where @math{\mu} is the service rate of each individual server.
@anchor{doc-qsmmm}
@deftypefn {Function File} {[@var{U}, @var{R}, @var{Q}, @var{X}, @var{p0}, @var{pm}] =} qsmmm (@var{lambda}, @var{mu})
@deftypefnx {Function File} {[@var{U}, @var{R}, @var{Q}, @var{X}, @var{p0}, @var{pm}] =} qsmmm (@var{lambda}, @var{mu}, @var{m})
@deftypefnx {Function File} {@var{pk} =} qsmmm (@var{lambda}, @var{mu}, @var{m}, @var{k})
@cindex @math{M/M/m} system
Compute utilization, response time, average number of requests in
service and throughput for a @math{M/M/m} queue, a queueing system
with @math{m} identical servers connected to a single FCFS
queue.
@tex
The steady-state probability @math{\pi_k} that there are @math{k}
requests in the system, @math{k \geq 0}, can be computed as:
$$
\pi_k = \cases{ \displaystyle{\pi_0 { ( m\rho )^k \over k!}} & $0 \leq k \leq m$;\cr\cr
\displaystyle{\pi_0 { \rho^k m^m \over m!}} & $k>m$.\cr
}
$$
where @math{\rho = \lambda/(m\mu)} is the individual server utilization.
The steady-state probability @math{\pi_0} that there are no jobs in the
system is:
$$
\pi_0 = \left[ \sum_{k=0}^{m-1} { (m\rho)^k \over k! } + { (m\rho)^m \over m!} {1 \over 1-\rho} \right]^{-1}
$$
@end tex
@strong{INPUTS}
@table @code
@item @var{lambda}
Arrival rate (@code{@var{lambda}>0}).
@item @var{mu}
Service rate (@code{@var{mu}>@var{lambda}}).
@item @var{m}
Number of servers (@code{@var{m} @geq{} 1}).
Default is @code{@var{m}=1}.
@item @var{k}
Number of requests in the system (@code{@var{k} @geq{} 0}).
@end table
@strong{OUTPUTS}
@table @code
@item @var{U}
Service center utilization, @math{U = \lambda / (m \mu)}.
@item @var{R}
Service center mean response time
@item @var{Q}
Average number of requests in the system
@item @var{X}
Service center throughput. If the system is ergodic,
we will always have @code{@var{X} = @var{lambda}}
@item @var{p0}
Steady-state probability that there are 0 requests in the system
@item @var{pm}
Steady-state probability that an arriving request has to wait in the
queue
@item @var{pk}
Steady-state probability that there are @var{k} requests in the
system (including the one being served).
@end table
If this function is called with less than four parameters,
@var{lambda}, @var{mu} and @var{m} can be vectors of the same size. In this
case, the results will be vectors as well.
@strong{REFERENCES}
@itemize
@item
G. Bolch, S. Greiner, H. de Meer and K. Trivedi, @cite{Queueing Networks
and Markov Chains: Modeling and Performance Evaluation with Computer
Science Applications}, Wiley, 1998, Section 6.5
@end itemize
@xseealso{erlangc,qsmm1,qsmminf,qsmmmk}
@end deftypefn
@c
@c Erlang-B
@c
@node The Erlang-B Formula
@section The Erlang-B Formula
@anchor{doc-erlangb}
@deftypefn {Function File} {@var{B} =} erlangb (@var{A}, @var{m})
@cindex Erlang-B formula
Compute the steady-state blocking probability in the Erlang loss model.
The Erlang-B formula @math{E_B(A, m)} gives the probability that an
open system with @math{m} identical servers, arrival rate
@math{\lambda}, individual service rate @math{\mu} and offered load
@math{A = \lambda / \mu} has all servers busy. This corresponds to
the rejection probability of an @math{M/M/m/0} system with @math{m}
servers and no queue.
@tex
@math{E_B(A, m)} is defined as:
$$
E_B(A, m) = \displaystyle{{A^m \over m!} \left( \sum_{k=0}^m {A^k \over k!} \right) ^{-1}}
$$
@end tex
@strong{INPUTS}
@table @code
@item @var{A}
Offered load, defined as @math{A = \lambda / \mu} where
@math{\lambda} is the mean arrival rate and @math{\mu} the mean
service rate of each individual server (real, @math{A > 0}).
@item @var{m}
Number of identical servers (integer, @math{m @geq{} 1}). Default @math{m = 1}
@end table
@strong{OUTPUTS}
@table @code
@item @var{B}
The value @math{E_B(A, m)}
@end table
@var{A} or @var{m} can be vectors, and in this case, the results will
be vectors as well.
@strong{REFERENCES}
@itemize
@item
G. Zeng, @cite{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
@end itemize
@xseealso{erlangc,engset,qsmmm}
@end deftypefn
@c
@c Erlang-c
@c
@node The Erlang-C Formula
@section The Erlang-C Formula
@anchor{doc-erlangc}
@deftypefn {Function File} {@var{C} =} erlangc (@var{A}, @var{m})
@cindex Erlang-C formula
Compute the steady-state probability of delay in the Erlang delay model.
The Erlang-C formula @math{E_C(A, m)} gives the probability that an
open queueing system with @math{m} identical servers, infinite
wating space, arrival rate @math{\lambda}, individual service rate
@math{\mu} and offered load @math{A = \lambda / \mu} has all the
servers busy. This is the waiting probability in an
@math{M/M/m/\infty} system with @math{m} servers and an infinite
queue.
@tex
@math{E_C(A, m)} is defined as:
$$
E_C(A, m) = \displaystyle{ {A^m \over m!} {1 \over 1-\rho} \left( \sum_{k=0}^{m-1} {A^k \over k!} + {A^m \over m!} {1 \over 1 - \rho} \right) ^{-1}}
$$
where @math{\rho = A / m = \lambda / (m \mu)}.
@end tex
@strong{INPUTS}
@table @code
@item @var{A}
Offered load. @math{A = \lambda / \mu} where
@math{\lambda} is the mean arrival rate and @math{\mu} the mean
service rate of each individual server (real, @math{0 < A < m}).
@item @var{m}
Number of identical servers (integer, @math{m @geq{} 1}).
Default @math{m = 1}
@end table
@strong{OUTPUTS}
@table @code
@item @var{B}
The value @math{E_C(A, m)}
@end table
@var{A} or @var{m} can be vectors, and in this case, the results will
be vectors as well.
@strong{REFERENCES}
@itemize
@item
G. Zeng, @cite{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
@end itemize
@xseealso{erlangb,engset,qsmmm}
@end deftypefn
@c
@c Engset
@c
@node The Engset Formula
@section The Engset Formula
@anchor{doc-engset}
@deftypefn {Function File} {@var{B} =} engset (@var{A}, @var{m}, @var{n})
@cindex Engset loss formula
Evaluate the Engset loss formula.
The Engset formula computes the blocking probability
@math{P_b(A,m,n)} for a system with a finite population of @math{n}
users, @math{m} identical servers, no queue, individual service
rate @math{\mu}, individual arrival rate @math{\lambda} (i.e., the
time until a user tries to request service is exponentially
distributed with mean @math{1/\lambda}), and offered load
@math{A=\lambda/\mu}.
@tex
@math{P_b(A, m, n)} is defined for @math{n > m} as:
$$
P_b(A, m, n) = {{\displaystyle{A^m {n \choose m}}} \over {\displaystyle{\sum_{k=0}^m A^k {n \choose k}}}}
$$
and is 0 if @math{n @leq{} m}.
@end tex
@strong{INPUTS}
@table @code
@item @var{A}
Offered load, defined as @math{A = \lambda / \mu} where
@math{\lambda} is the mean arrival rate and @math{\mu} the mean
service rate of each individual server (real, @math{A > 0}).
@item @var{m}
Number of identical servers (integer, @math{m @geq{} 1}). Default @math{m = 1}
@item @var{n}
Number of requests (integer, @math{n @geq{} 1}). Default @math{n = 1}
@end table
@strong{OUTPUTS}
@table @code
@item @var{B}
The value @math{P_b(A, m, n)}
@end table
@var{A}, @var{m} or @math{n} can be vectors, and in this case, the
results will be vectors as well.
@strong{REFERENCES}
@itemize
@item
G. Zeng, @cite{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
@end itemize
@xseealso{erlangb, erlangc}
@end deftypefn
@c
@c M/M/inf
@c
@node The M/M/inf System
@section The @math{M/M/}inf System
The @math{M/M/\infty} system is a special case of @math{M/M/m} system
with infinitely many identical servers (i.e., @math{m = \infty}). Each
new request is always assigned to a new server, so that queueing never
occurs. The @math{M/M/\infty} system is always stable.
@anchor{doc-qsmminf}
@deftypefn {Function File} {[@var{U}, @var{R}, @var{Q}, @var{X}, @var{p0}] =} qsmminf (@var{lambda}, @var{mu})
@deftypefnx {Function File} {@var{pk} =} qsmminf (@var{lambda}, @var{mu}, @var{k})
Compute utilization, response time, average number of requests and throughput for an infinite-server queue.
The @math{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.
@cindex @math{M/M/}inf system
@tex
The steady-state probability @math{\pi_k} that there are @math{k}
requests in the system, @math{k @geq{} 0}, can be computed as:
$$
\pi_k = {1 \over k!} \left( \lambda \over \mu \right)^k e^{-\lambda / \mu}
$$
@end tex
@strong{INPUTS}
@table @code
@item @var{lambda}
Arrival rate (@code{@var{lambda}>0}).
@item @var{mu}
Service rate (@code{@var{mu}>0}).
@item @var{k}
Number of requests in the system (@code{@var{k} @geq{} 0}).
@end table
@strong{OUTPUTS}
@table @code
@item @var{U}
Traffic intensity (defined as @math{\lambda/\mu}). Note that this is
different from the utilization, which in the case of @math{M/M/\infty}
centers is always zero.
@cindex traffic intensity
@item @var{R}
Service center response time.
@item @var{Q}
Average number of requests in the system (which is equal to the
traffic intensity @math{\lambda/\mu}).
@item @var{X}
Throughput (which is always equal to @code{@var{X} = @var{lambda}}).
@item @var{p0}
Steady-state probability that there are no requests in the system
@item @var{pk}
Steady-state probability that there are @var{k} requests in the
system (including the one being served).
@end table
If this function is called with less than three arguments,
@var{lambda} and @var{mu} can be vectors of the same size. In this
case, the results will be vectors as well.
@strong{REFERENCES}
@itemize
@item
G. Bolch, S. Greiner, H. de Meer and K. Trivedi, @cite{Queueing Networks
and Markov Chains: Modeling and Performance Evaluation with Computer
Science Applications}, Wiley, 1998, Section 6.4
@end itemize
@xseealso{qsmm1,qsmmm,qsmmmk}
@end deftypefn
@c
@c M/M/1/k
@c
@node The M/M/1/K System
@section The @math{M/M/1/K} System
In a @math{M/M/1/K} finite capacity system there is a single server,
and there can be at most @math{K} jobs at any time (including the job
currently in service), @math{K > 1}. If a new request tries to join
the system when there are already @math{K} other requests, the request
is lost. The queue has @math{K-1} slots. The @math{M/M/1/K} system is
always stable, regardless of the arrival and service rates.
@anchor{doc-qsmm1k}
@deftypefn {Function File} {[@var{U}, @var{R}, @var{Q}, @var{X}, @var{p0}, @var{pK}] =} qsmm1k (@var{lambda}, @var{mu}, @var{K})
@deftypefnx {Function File} {@var{pn} =} qsmm1k (@var{lambda}, @var{mu}, @var{K}, @var{n})
@cindex @math{M/M/1/K} system
Compute utilization, response time, average number of requests and
throughput for a @math{M/M/1/K} finite capacity system.
In a @math{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 @math{K}, and the maximum
queue length is therefore @math{K-1}.
@tex
The steady-state probability @math{\pi_n} that there are @math{n}
jobs in the system, @math{0 @leq{} n @leq{} K}, is:
$$
\pi_n = {(1-a)a^n \over 1-a^{K+1}}
$$
where @math{a = \lambda/\mu}.
@end tex
@strong{INPUTS}
@table @code
@item @var{lambda}
Arrival rate (@code{@var{lambda}>0}).
@item @var{mu}
Service rate (@code{@var{mu}>0}).
@item @var{K}
Maximum number of requests allowed in the system (@code{@var{K} @geq{} 1}).
@item @var{n}
Number of requests in the (@code{0 @leq{} @var{n} @leq{} K}).
@end table
@strong{OUTPUTS}
@table @code
@item @var{U}
Service center utilization, which is defined as @code{@var{U} = 1-@var{p0}}
@item @var{R}
Service center response time
@item @var{Q}
Average number of requests in the system
@item @var{X}
Service center throughput
@item @var{p0}
Steady-state probability that there are no requests in the system
@item @var{pK}
Steady-state probability that there are @math{K} requests in the system
(i.e., that the system is full)
@item @var{pn}
Steady-state probability that there are @math{n} requests in the system
(including the one being served).
@end table
If this function is called with less than four arguments,
@var{lambda}, @var{mu} and @var{K} can be vectors of the
same size. In this case, the results will be vectors as well.
@xseealso{qsmm1,qsmminf,qsmmm}
@end deftypefn
@c
@c M/M/m/k
@c
@node The M/M/m/K System
@section The @math{M/M/m/K} System
The @math{M/M/m/K} finite capacity system is similar to the
@math{M/M/1/k} system except that the number of servers is @math{m},
where @math{1 \leq m \leq K}. The queue has @math{K-m} slots. The
@math{M/M/m/K} system is always stable.
@anchor{doc-qsmmmk}
@deftypefn {Function File} {[@var{U}, @var{R}, @var{Q}, @var{X}, @var{p0}, @var{pK}] =} qsmmmk (@var{lambda}, @var{mu}, @var{m}, @var{K})
@deftypefnx {Function File} {@var{pn} =} qsmmmk (@var{lambda}, @var{mu}, @var{m}, @var{K}, @var{n})
@cindex @math{M/M/m/K} system
Compute utilization, response time, average number of requests and
throughput for a @math{M/M/m/K} finite capacity system. In a
@math{M/M/m/K} system there are @math{m \geq 1} identical service centers
sharing a fixed-capacity queue. At any time, at most @math{K @geq{} m} requests can be in the system, including those being served. The maximum queue length
is @math{K-m}. This function generates and
solves the underlying CTMC.
@tex
The steady-state probability @math{\pi_n} that there are @math{n}
jobs in the system, @math{0 @leq{} n @leq{} K}, is:
$$
\pi_n = \cases{ \displaystyle{{\rho^n \over n!} \pi_0} & if $0 \leq n \leq m$;\cr\cr
\displaystyle{{\rho^m \over m!} \left( \rho \over m \right)^{n-m} \pi_0} & if $m < n \leq K$\cr}
$$
where @math{\rho = \lambda/\mu} is the offered load. The probability
@math{\pi_0} that the system is empty can be computed by considering
that all probabilities must sum to one: @math{\sum_{k=0}^K \pi_k = 1},
that gives:
$$
\pi_0 = \left[ \sum_{k=0}^m {\rho^k \over k!} + {\rho^m \over m!} \sum_{k=m+1}^K \left( {\rho \over m}\right)^{k-m} \right]^{-1}
$$
@end tex
@strong{INPUTS}
@table @code
@item @var{lambda}
Arrival rate (@code{@var{lambda}>0})
@item @var{mu}
Service rate (@code{@var{mu}>0})
@item @var{m}
Number of servers (@code{@var{m} @geq{} 1})
@item @var{K}
Maximum number of requests allowed in the system,
including those being served (@code{@var{K} @geq{} @var{m}})
@item @var{n}
Number of requests in the (@code{0 @leq{} @var{n} @leq{} K}).
@end table
@strong{OUTPUTS}
@table @code
@item @var{U}
Service center utilization
@item @var{R}
Service center response time
@item @var{Q}
Average number of requests in the system
@item @var{X}
Service center throughput
@item @var{p0}
Steady-state probability that there are no requests in the system.
@item @var{pK}
Steady-state probability that there are @var{K} requests in the system
(i.e., probability that the system is full).
@item @var{pn}
Steady-state probability that there are @var{n} requests in the system
(including those being served).
@end table
If this function is called with less than five arguments,
@var{lambda}, @var{mu}, @var{m} and @var{K} can be either scalars, or
vectors of the same size. In this case, the results will be vectors
as well.
@strong{REFERENCES}
@itemize
@item
G. Bolch, S. Greiner, H. de Meer and K. Trivedi, @cite{Queueing Networks
and Markov Chains: Modeling and Performance Evaluation with Computer
Science Applications}, Wiley, 1998, Section 6.6
@end itemize
@xseealso{qsmm1,qsmminf,qsmmm}
@end deftypefn
@c
@c Asymmetric M/M/m
@c
@node The Asymmetric M/M/m System
@section The Asymmetric @math{M/M/m} System
The Asymmetric @math{M/M/m} system contains @math{m} servers connected
to a single queue. Differently from the @math{M/M/m} system, in the
asymmetric @math{M/M/m} each server may have a different service time.
@anchor{doc-qsammm}
@deftypefn {Function File} {[@var{U}, @var{R}, @var{Q}, @var{X}] =} qsammm (@var{lambda}, @var{mu})
@cindex asymmetric @math{M/M/m} system
Compute @emph{approximate} utilization, response time, average
number of requests in service and throughput for an asymmetric
@math{M/M/m} queue. In this type of system there are @math{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.
@strong{INPUTS}
@table @code
@item @var{lambda}
Arrival rate (@code{@var{lambda}>0})
@item @var{mu}
@code{@var{mu}(i)} is the service rate of server
@math{i}, @math{1 @leq{} i @leq{} m}.
The system must be ergodic (@code{@var{lambda} < sum(@var{mu})}).
@end table
@strong{OUTPUTS}
@table @code
@item @var{U}
Approximate service center utilization,
@math{U = \lambda / ( \sum_{i=1}^m \mu_i )}.
@item @var{R}
Approximate service center response time
@item @var{Q}
Approximate number of requests in the system
@item @var{X}
Approximate system throughput. If the system is ergodic,
@code{@var{X} = @var{lambda}}
@end table
@strong{REFERENCES}
@itemize
@item
G. Bolch, S. Greiner, H. de Meer and K. Trivedi, @cite{Queueing Networks
and Markov Chains: Modeling and Performance Evaluation with Computer
Science Applications}, Wiley, 1998
@end itemize
@xseealso{qsmmm}
@end deftypefn
@c
@c
@c
@node The M/G/1 System
@section The @math{M/G/1} System
@anchor{doc-qsmg1}
@deftypefn {Function File} {[@var{U}, @var{R}, @var{Q}, @var{X}, @var{p0}] =} qsmg1 (@var{lambda}, @var{xavg}, @var{x2nd})
@cindex @math{M/G/1} system
Compute utilization, response time, average number of requests and
throughput for a @math{M/G/1} system. The service time distribution
is described by its mean @var{xavg}, and by its second moment
@var{x2nd}. The computations are based on results from L. Kleinrock,
@cite{Queuing Systems}, Wiley, Vol 2, and Pollaczek-Khinchine formula.
@strong{INPUTS}
@table @code
@item @var{lambda}
Arrival rate
@item @var{xavg}
Average service time
@item @var{x2nd}
Second moment of service time distribution
@end table
@strong{OUTPUTS}
@table @code
@item @var{U}
Service center utilization
@item @var{R}
Service center response time
@item @var{Q}
Average number of requests in the system
@item @var{X}
Service center throughput
@item @var{p0}
Probability that there is not any request at system
@end table
@var{lambda}, @var{xavg}, @var{t2nd} can be vectors of the
same size. In this case, the results will be vectors as well.
@xseealso{qsmh1}
@end deftypefn
@c
@c
@c
@node The M/Hm/1 System
@section The @math{M/H_m/1} System
@anchor{doc-qsmh1}
@deftypefn {Function File} {[@var{U}, @var{R}, @var{Q}, @var{X}, @var{p0}] =} qsmh1 (@var{lambda}, @var{mu}, @var{alpha})
@cindex @math{M/H_m/1} system
Compute utilization, response time, average number of requests and
throughput for a @math{M/H_m/1} system. In this system, the customer
service times have hyper-exponential distribution:
@tex
$$ B(x) = \sum_{j=1}^m \alpha_j(1-e^{-\mu_j x}),\quad x>0 $$
@end tex
@ifnottex
@example
@group
___ m
\
B(x) = > alpha(j) * (1-exp(-mu(j)*x)) x>0
/__
j=1
@end group
@end example
@end ifnottex
where @math{\alpha_j} is the probability that the request is served
at phase @math{j}, in which case the average service rate is
@math{\mu_j}. After completing service at phase @math{j}, for
some @math{j}, the request exits the system.
@strong{INPUTS}
@table @code
@item @var{lambda}
Arrival rate
@item @var{mu}
@code{@var{mu}(j)} is the phase @math{j} service rate. The total
number of phases @math{m} is @code{length(@var{mu})}.
@item @var{alpha}
@code{@var{alpha}(j)} is the probability that a request
is served at phase @math{j}. @var{alpha} must have the same size
as @var{mu}.
@end table
@strong{OUTPUTS}
@table @code
@item @var{U}
Service center utilization
@item @var{R}
Service center response time
@item @var{Q}
Average number of requests in the system
@item @var{X}
Service center throughput
@end table
@end deftypefn
|