Mercurial > forge
annotate main/queueing/doc/queueing.html @ 9692:dee7b9b17fae octave-forge
updated documentation
author | mmarzolla |
---|---|
date | Wed, 14 Mar 2012 09:00:49 +0000 |
parents | 210968b14f63 |
children | 394c375af7a9 |
rev | line source |
---|---|
9391 | 1 <html lang="en"> |
2 <head> | |
3 <title>queueing</title> | |
4 <meta http-equiv="Content-Type" content="text/html"> | |
5 <meta name="description" content="User manual for the queueing toolbox, a GNU Octave package for queueing networks and Markov chains analysis. This package supports single-station queueing systems, queueing networks and Markov chains. The queueing toolbox implements, among others, the Mean Value Analysis (MVA) and convolution algorithms for product-form queueing networks. Transient and steady-state analysis of Markov chains is also implemented."> | |
6 <meta name="generator" content="makeinfo 4.13"> | |
7 <link title="Top" rel="top" href="#Top"> | |
8 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> | |
9 <meta http-equiv="Content-Style-Type" content="text/css"> | |
10 <style type="text/css"><!-- | |
11 pre.display { font-family:inherit } | |
12 pre.format { font-family:inherit } | |
13 pre.smalldisplay { font-family:inherit; font-size:smaller } | |
14 pre.smallformat { font-family:inherit; font-size:smaller } | |
15 pre.smallexample { font-size:smaller } | |
16 pre.smalllisp { font-size:smaller } | |
17 span.sc { font-variant:small-caps } | |
18 span.roman { font-family:serif; font-weight:normal; } | |
19 span.sansserif { font-family:sans-serif; font-weight:normal; } | |
20 --></style> | |
21 </head> | |
22 <body> | |
23 Copyright © 2008, 2009, 2010, 2011, 2012 Moreno Marzolla. | |
24 | |
25 <p>Permission is granted to make and distribute verbatim copies of | |
26 this manual provided the copyright notice and this permission notice | |
27 are preserved on all copies. | |
28 | |
29 <p>Permission is granted to copy and distribute modified versions of | |
30 this manual under the conditions for verbatim copying, provided that | |
31 the entire resulting derived work is distributed under the terms of | |
32 a permission notice identical to this one. | |
33 | |
34 <p>Permission is granted to copy and distribute translations of this | |
35 manual into another language, under the above conditions for | |
36 modified versions. | |
37 | |
38 <div class="contents"> | |
39 <h2>Table of Contents</h2> | |
40 <ul> | |
41 <li><a name="toc_Top" href="#Top">queueing</a> | |
42 <li><a name="toc_Summary" href="#Summary">1 Summary</a> | |
43 <li><a name="toc_Installation" href="#Installation">2 Installing the queueing toolbox</a> | |
44 <ul> | |
45 <li><a href="#Installation-through-Octave-package-management-system">2.1 Installation through Octave package management system</a> | |
46 <li><a href="#Manual-installation">2.2 Manual installation</a> | |
47 <li><a href="#Content-of-the-source-distribution">2.3 Content of the source distribution</a> | |
48 <li><a href="#Using-the-queueing-toolbox">2.4 Using the queueing toolbox</a> | |
49 </li></ul> | |
50 <li><a name="toc_Getting-Started" href="#Getting-Started">3 Introduction and Getting Started</a> | |
51 <ul> | |
52 <li><a href="#Analysis-of-Closed-Networks">3.1 Analysis of Closed Networks</a> | |
53 <li><a href="#Analysis-of-Open-Networks">3.2 Analysis of Open Networks</a> | |
54 </li></ul> | |
55 <li><a name="toc_Markov-Chains" href="#Markov-Chains">4 Markov Chains</a> | |
56 <ul> | |
57 <li><a href="#Discrete_002dTime-Markov-Chains">4.1 Discrete-Time Markov Chains</a> | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
58 <ul> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
59 <li><a href="#Discrete_002dTime-Markov-Chains">4.1.1 State occupancy probabilities</a> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
60 <li><a href="#Discrete_002dTime-Markov-Chains">4.1.2 Birth-Death process</a> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
61 <li><a href="#Discrete_002dTime-Markov-Chains">4.1.3 First passage times</a> |
9632
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
62 <li><a href="#Discrete_002dTime-Markov-Chains">4.1.4 Mean Time to Absorption</a> |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
63 </li></ul> |
9391 | 64 <li><a href="#Continuous_002dTime-Markov-Chains">4.2 Continuous-Time Markov Chains</a> |
65 <ul> | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
66 <li><a href="#State-occupancy-probabilities">4.2.1 State occupancy probabilities</a> |
9391 | 67 <li><a href="#Birth_002dDeath-process">4.2.2 Birth-Death process</a> |
68 <li><a href="#Expected-Sojourn-Time">4.2.3 Expected Sojourn Time</a> | |
69 <li><a href="#Time_002dAveraged-Expected-Sojourn-Time">4.2.4 Time-Averaged Expected Sojourn Time</a> | |
9632
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
70 <li><a href="#Mean-Time-to-Absorption">4.2.5 Mean Time to Absorption</a> |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
71 <li><a href="#First-Passage-Times">4.2.6 First Passage Times</a> |
9391 | 72 </li></ul> |
73 </li></ul> | |
74 <li><a name="toc_Single-Station-Queueing-Systems" href="#Single-Station-Queueing-Systems">5 Single Station Queueing Systems</a> | |
75 <ul> | |
76 <li><a href="#The-M_002fM_002f1-System">5.1 The M/M/1 System</a> | |
77 <li><a href="#The-M_002fM_002fm-System">5.2 The M/M/m System</a> | |
78 <li><a href="#The-M_002fM_002finf-System">5.3 The M/M/inf System</a> | |
79 <li><a href="#The-M_002fM_002f1_002fK-System">5.4 The M/M/1/K System</a> | |
80 <li><a href="#The-M_002fM_002fm_002fK-System">5.5 The M/M/m/K System</a> | |
81 <li><a href="#The-Asymmetric-M_002fM_002fm-System">5.6 The Asymmetric M/M/m System</a> | |
82 <li><a href="#The-M_002fG_002f1-System">5.7 The M/G/1 System</a> | |
83 <li><a href="#The-M_002fHm_002f1-System">5.8 The M/H_m/1 System</a> | |
84 </li></ul> | |
85 <li><a name="toc_Queueing-Networks" href="#Queueing-Networks">6 Queueing Networks</a> | |
86 <ul> | |
87 <li><a href="#Introduction-to-QNs">6.1 Introduction to QNs</a> | |
88 <ul> | |
89 <li><a href="#Introduction-to-QNs">6.1.1 Single class models</a> | |
90 <li><a href="#Introduction-to-QNs">6.1.2 Multiple class models</a> | |
91 </li></ul> | |
92 <li><a href="#Generic-Algorithms">6.2 Generic Algorithms</a> | |
93 <li><a href="#Algorithms-for-Product_002dForm-QNs">6.3 Algorithms for Product-Form QNs</a> | |
94 <ul> | |
95 <li><a href="#Algorithms-for-Product_002dForm-QNs">6.3.1 Jackson Networks</a> | |
96 <li><a href="#Algorithms-for-Product_002dForm-QNs">6.3.2 The Convolution Algorithm</a> | |
97 <li><a href="#Algorithms-for-Product_002dForm-QNs">6.3.3 Open networks</a> | |
98 <li><a href="#Algorithms-for-Product_002dForm-QNs">6.3.4 Closed Networks</a> | |
99 <li><a href="#Algorithms-for-Product_002dForm-QNs">6.3.5 Mixed Networks</a> | |
100 </li></ul> | |
101 <li><a href="#Algorithms-for-non-Product_002dform-QNs">6.4 Algorithms for non Product-Form QNs</a> | |
102 <li><a href="#Bounds-on-performance">6.5 Bounds on performance</a> | |
103 <li><a href="#Utility-functions">6.6 Utility functions</a> | |
104 <ul> | |
105 <li><a href="#Utility-functions">6.6.1 Open or closed networks</a> | |
106 <li><a href="#Utility-functions">6.6.2 Computation of the visit counts</a> | |
107 <li><a href="#Utility-functions">6.6.3 Other utility functions</a> | |
108 </li></ul> | |
109 </li></ul> | |
110 <li><a name="toc_Contributing-Guidelines" href="#Contributing-Guidelines">Appendix A Contributing Guidelines</a> | |
111 <li><a name="toc_Acknowledgements" href="#Acknowledgements">Appendix B Acknowledgements</a> | |
112 <li><a name="toc_Copying" href="#Copying">Appendix C GNU GENERAL PUBLIC LICENSE</a> | |
113 <li><a name="toc_Concept-Index" href="#Concept-Index">Concept Index</a> | |
114 <li><a name="toc_Function-Index" href="#Function-Index">Function Index</a> | |
115 <li><a name="toc_Author-Index" href="#Author-Index">Author Index</a> | |
116 </li></ul> | |
117 </div> | |
118 | |
119 <div class="node"> | |
120 <a name="Top"></a> | |
121 <p><hr> | |
122 Next: <a rel="next" accesskey="n" href="#Summary">Summary</a>, | |
123 Up: <a rel="up" accesskey="u" href="#dir">(dir)</a> | |
124 | |
125 </div> | |
126 | |
127 <h2 class="unnumbered">queueing</h2> | |
128 | |
129 <p>This manual documents how to install and run the Queueing Toolbox. | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
130 It corresponds to version 1.X.0 of the package. |
9391 | 131 |
132 <!-- --> | |
133 <ul class="menu"> | |
134 <li><a accesskey="1" href="#Summary">Summary</a> | |
135 <li><a accesskey="2" href="#Installation">Installation</a>: Installation of the queueing toolbox. | |
136 <li><a accesskey="3" href="#Getting-Started">Getting Started</a>: Getting started with the queueing toolbox. | |
137 <li><a accesskey="4" href="#Markov-Chains">Markov Chains</a>: Functions for Markov Chains. | |
138 <li><a accesskey="5" href="#Single-Station-Queueing-Systems">Single Station Queueing Systems</a>: Functions for single-station queueing systems. | |
139 <li><a accesskey="6" href="#Queueing-Networks">Queueing Networks</a>: Functions for queueing networks. | |
140 <li><a accesskey="7" href="#Contributing-Guidelines">Contributing Guidelines</a>: How to contribute. | |
141 <li><a accesskey="8" href="#Acknowledgements">Acknowledgements</a>: People who contributed to the queueing toolbox. | |
142 <li><a accesskey="9" href="#Copying">Copying</a>: The GNU General Public License. | |
143 <li><a href="#Concept-Index">Concept Index</a>: An item for each concept. | |
144 <li><a href="#Function-Index">Function Index</a>: An item for each function. | |
145 <li><a href="#Author-Index">Author Index</a>: An item for each author. | |
146 </ul> | |
147 | |
148 <!-- --> | |
149 <!-- DO NOT EDIT! Generated automatically by munge-texi. --> | |
150 <!-- *- texinfo -*- --> | |
151 <!-- Copyright (C) 2008, 2009, 2010, 2011, 2012 Moreno Marzolla --> | |
152 <!-- This file is part of the queueing toolbox, a Queueing Networks --> | |
153 <!-- analysis package for GNU Octave. --> | |
154 <!-- The queueing toolbox is free software; you can redistribute it --> | |
155 <!-- and/or modify it under the terms of the GNU General Public License --> | |
156 <!-- as published by the Free Software Foundation; either version 3 of --> | |
157 <!-- the License, or (at your option) any later version. --> | |
158 <!-- The queueing toolbox is distributed in the hope that it will be --> | |
159 <!-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty --> | |
160 <!-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --> | |
161 <!-- GNU General Public License for more details. --> | |
162 <!-- You should have received a copy of the GNU General Public License --> | |
163 <!-- along with the queueing toolbox; see the file COPYING. If not, see --> | |
164 <!-- <http://www.gnu.org/licenses/>. --> | |
165 <div class="node"> | |
166 <a name="Summary"></a> | |
167 <p><hr> | |
168 Next: <a rel="next" accesskey="n" href="#Installation">Installation</a>, | |
169 Previous: <a rel="previous" accesskey="p" href="#Top">Top</a>, | |
170 Up: <a rel="up" accesskey="u" href="#Top">Top</a> | |
171 | |
172 </div> | |
173 | |
174 <h2 class="chapter">1 Summary</h2> | |
175 | |
176 <p>This document describes the <code>queueing</code> toolbox for GNU Octave | |
177 (<code>queueing</code> in short). The <code>queueing</code> toolbox, previously | |
178 known as <code>qnetworks</code>, is a collection of functions written in GNU | |
179 Octave for analyzing queueing networks and Markov | |
180 chains. Specifically, <code>queueing</code> contains functions for analyzing | |
181 Jackson networks, open, closed or mixed product-form BCMP networks, | |
182 and computation of performance bounds. The following algorithms have | |
183 been implemented | |
184 | |
185 <ul> | |
186 <li>Convolution for closed, single-class product-form networks | |
187 with load-dependent service centers; | |
188 | |
189 <li>Exact and approximate Mean Value Analysis (MVA) for single and | |
190 multiple class product-form closed networks; | |
191 | |
192 <li>MVA for mixed, multiple class product-form networks | |
193 with load-independent service centers; | |
194 | |
195 <li>Approximate MVA for closed, single-class networks with blocking | |
196 (MVABLO algorithm by F. Akyildiz); | |
197 | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
198 <li>Asymptotic Bounds, Balanced System Bounds and Geometric Bounds; |
9391 | 199 |
200 </ul> | |
201 | |
202 <p class="noindent"><code>queueing</code> | |
203 provides functions for analyzing the following kind of single-station | |
204 queueing systems: | |
205 | |
206 <ul> | |
207 <li>M/M/1 | |
208 <li>M/M/m | |
209 <li>M/M/\infty | |
210 <li>M/M/1/k single-server, finite capacity system | |
211 <li>M/M/m/k multiple-server, finite capacity system | |
212 <li>Asymmetric M/M/m | |
213 <li>M/G/1 (general service time distribution) | |
214 <li>M/H_m/1 (Hyperexponential service time distribution) | |
215 </ul> | |
216 | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
217 <p>Functions for Markov chain analysis are also provided, for discrete-time |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
218 chains (DTMC) or continuous-time chains (CTMC): |
9391 | 219 |
220 <ul> | |
9634 | 221 <li>Birth-death process; |
222 <li>Transient and steady-state occupancy probabilities; | |
223 <li>Mean times to absorption; | |
224 <li>Expected sojourn times and time-averaged sojourn times (CTMC only); | |
225 <li>Mean first passage times; | |
9391 | 226 |
227 </ul> | |
228 | |
229 <p>The <code>queueing</code> toolbox is distributed under the terms of the GNU | |
230 General Public License (GPL), version 3 or later | |
231 (see <a href="#Copying">Copying</a>). You are encouraged to share this software with | |
232 others, and make this package more useful by contributing additional | |
233 functions and reporting problems. See <a href="#Contributing-Guidelines">Contributing Guidelines</a>. | |
234 | |
235 <p>If you use the <code>queueing</code> toolbox in a technical paper, please | |
236 cite it as: | |
237 | |
238 <blockquote> | |
239 Moreno Marzolla, <em>The qnetworks Toolbox: A Software Package for | |
240 Queueing Networks Analysis</em>. Khalid Al-Begain, Dieter Fiems and | |
241 William J. Knottenbelt, Editors, Proceedings 17th International | |
242 Conference on Analytical and Stochastic Modeling Techniques and | |
243 Applications (ASMTA 2010) Cardiff, UK, June 14–16, 2010, volume 6148 | |
244 of Lecture Notes in Computer Science, Springer, pp. 102–116, ISBN | |
245 978-3-642-13567-5 | |
246 </blockquote> | |
247 | |
248 <p>If you use BibTeX, this is the citation block: | |
249 | |
250 <pre class="verbatim">@inproceedings{queueing, | |
251 author = {Moreno Marzolla}, | |
252 title = {The qnetworks Toolbox: A Software Package for Queueing | |
253 Networks Analysis}, | |
254 booktitle = {Analytical and Stochastic Modeling Techniques and | |
255 Applications, 17th International Conference, | |
256 ASMTA 2010, Cardiff, UK, June 14-16, 2010. Proceedings}, | |
257 editor = {Khalid Al-Begain and Dieter Fiems and William J. Knottenbelt}, | |
258 year = {2010}, | |
259 publisher = {Springer}, | |
260 series = {Lecture Notes in Computer Science}, | |
261 volume = {6148}, | |
262 pages = {102--116}, | |
263 ee = {http://dx.doi.org/10.1007/978-3-642-13568-2_8}, | |
264 isbn = {978-3-642-13567-5} | |
265 } | |
266 </pre> | |
267 | |
268 <p>An early draft of the paper above is available as Technical Report | |
269 <a href="http://www.informatica.unibo.it/ricerca/ublcs/2010/UBLCS-2010-04">UBLCS-2010-04</a>, February 2010, Department of Computer Science, | |
270 University of Bologna, Italy. | |
271 | |
272 <!-- DO NOT EDIT! Generated automatically by munge-texi. --> | |
273 <!-- *- texinfo -*- --> | |
274 <!-- Copyright (C) 2008, 2009, 2010, 2011, 2012 Moreno Marzolla --> | |
275 <!-- This file is part of the queueing toolbox, a Queueing Networks --> | |
276 <!-- analysis package for GNU Octave. --> | |
277 <!-- The queueing toolbox is free software; you can redistribute it --> | |
278 <!-- and/or modify it under the terms of the GNU General Public License --> | |
279 <!-- as published by the Free Software Foundation; either version 3 of --> | |
280 <!-- the License, or (at your option) any later version. --> | |
281 <!-- The queueing toolbox is distributed in the hope that it will be --> | |
282 <!-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty --> | |
283 <!-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --> | |
284 <!-- GNU General Public License for more details. --> | |
285 <!-- You should have received a copy of the GNU General Public License --> | |
286 <!-- along with the queueing toolbox; see the file COPYING. If not, see --> | |
287 <!-- <http://www.gnu.org/licenses/>. --> | |
288 <div class="node"> | |
289 <a name="Installation"></a> | |
290 <p><hr> | |
291 Next: <a rel="next" accesskey="n" href="#Getting-Started">Getting Started</a>, | |
292 Previous: <a rel="previous" accesskey="p" href="#Summary">Summary</a>, | |
293 Up: <a rel="up" accesskey="u" href="#Top">Top</a> | |
294 | |
295 </div> | |
296 | |
297 <h2 class="chapter">2 Installing the queueing toolbox</h2> | |
298 | |
299 <ul class="menu"> | |
300 <li><a accesskey="1" href="#Installation-through-Octave-package-management-system">Installation through Octave package management system</a> | |
301 <li><a accesskey="2" href="#Manual-installation">Manual installation</a> | |
302 <li><a accesskey="3" href="#Content-of-the-source-distribution">Content of the source distribution</a> | |
303 <li><a accesskey="4" href="#Using-the-queueing-toolbox">Using the queueing toolbox</a> | |
304 </ul> | |
305 | |
306 <div class="node"> | |
307 <a name="Installation-through-Octave-package-management-system"></a> | |
308 <p><hr> | |
309 Next: <a rel="next" accesskey="n" href="#Manual-installation">Manual installation</a>, | |
310 Up: <a rel="up" accesskey="u" href="#Installation">Installation</a> | |
311 | |
312 </div> | |
313 | |
314 <h3 class="section">2.1 Installation through Octave package management system</h3> | |
315 | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
316 <p>The most recent version of <code>queueing</code> is 1.X.0 and can |
9408 | 317 be downloaded from Octave-Forge |
318 | |
319 <p><a href="http://octave.sourceforge.net/queueing/">http://octave.sourceforge.net/queueing/</a> | |
9395 | 320 |
321 <p>The package Web page is | |
322 | |
323 <p><a href="http://www.moreno.marzolla.name/software/queueing/">http://www.moreno.marzolla.name/software/queueing/</a> | |
9391 | 324 |
9408 | 325 <p>If you have a recent version of GNU Octave and a network connection, |
326 you can install <code>queueing</code> directly from the prompt using this | |
327 command: | |
328 | |
329 <pre class="example"> octave:1> <kbd>pkg install -forge queueing</kbd> | |
9391 | 330 </pre> |
9408 | 331 <p>The command above will automaticall download and install the latest |
332 version of the queueing toolbox from Octave Forge, and install it on | |
333 your machine. You can verify that the package is indeed installed: | |
334 | |
335 <pre class="example"> octave:1><kbd>pkg list queueing</kbd> | |
336 Package Name | Version | Installation directory | |
337 --------------+---------+----------------------- | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
338 queueing *| 1.X.0 | /home/moreno/octave/queueing-1.X.0 |
9408 | 339 </pre> |
340 <p>Alternatively, you can first download <code>queueing</code> from | |
341 Octave-Forge; then, to install the package in the system-wide | |
342 location issue this command at the Octave prompt: | |
343 | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
344 <pre class="example"> octave:1> <kbd>pkg install </kbd><em>queueing-1.X.0.tar.gz</em> |
9408 | 345 </pre> |
346 <p class="noindent">(you may need to start Octave as root in order to allow the | |
9391 | 347 installation to copy the files to the target locations). After this, |
348 all functions will be readily available each time Octave starts, | |
9408 | 349 without the need to tweak the search path. |
350 | |
351 <p>If you do not have root access, you can do a local install using: | |
9391 | 352 |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
353 <pre class="example"> octave:1> <kbd>pkg install -local queueing-1.X.0.tar.gz</kbd> |
9391 | 354 </pre> |
9408 | 355 <p>This will install <code>queueing</code> within your home directory, and the |
356 package will be available to your user only. <strong>Note:</strong> Octave | |
357 version 3.2.3 as shipped with Ubuntu 10.04 seems to ignore | |
9391 | 358 <code>-local</code> and always tries to install the package on the system |
359 directory. | |
360 | |
9408 | 361 <p>To remove <code>queueing</code> you can use |
362 | |
363 <pre class="example"> octave:1> <kbd>pkg uninstall queueing</kbd> | |
364 </pre> | |
365 <div class="node"> | |
9391 | 366 <a name="Manual-installation"></a> |
367 <p><hr> | |
368 Next: <a rel="next" accesskey="n" href="#Content-of-the-source-distribution">Content of the source distribution</a>, | |
369 Previous: <a rel="previous" accesskey="p" href="#Installation-through-Octave-package-management-system">Installation through Octave package management system</a>, | |
370 Up: <a rel="up" accesskey="u" href="#Installation">Installation</a> | |
371 | |
372 </div> | |
373 | |
374 <h3 class="section">2.2 Manual installation</h3> | |
375 | |
9408 | 376 <p>If you want to manually install <code>queueing</code> in a custom location, |
377 you can download the tarball and unpack it somewhere: | |
378 | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
379 <pre class="example"> <kbd>tar xvfz queueing-1.X.0.tar.gz</kbd> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
380 <kbd>cd queueing-1.X.0/queueing/</kbd> |
9391 | 381 </pre> |
382 <p>Copy all <code>.m</code> files from the <samp><span class="file">inst/</span></samp> directory to some | |
9408 | 383 target location. Then, start Octave with the <samp><span class="option">-p</span></samp> option to add |
384 the target location to the search path, so that Octave will find all | |
385 <code>queueing</code> functions automatically: | |
9391 | 386 |
387 <pre class="example"> <kbd>octave -p </kbd><em>/path/to/queueing</em> | |
388 </pre> | |
389 <p>For example, if all <code>queueing</code> m-files are in | |
390 <samp><span class="file">/usr/local/queueing</span></samp>, you can start Octave as follows: | |
391 | |
9408 | 392 <pre class="example"> <kbd>octave -p </kbd><em>/usr/local/queueing</em> |
9391 | 393 </pre> |
394 <p>If you want, you can add the following line to <samp><span class="file">~/.octaverc</span></samp>: | |
395 | |
396 <pre class="example"> <kbd>addpath("</kbd><em>/path/to/queueing</em><kbd>");</kbd> | |
397 </pre> | |
398 <p class="noindent">so that the path <samp><span class="file">/usr/local/queueing</span></samp> is automatically | |
399 added to the search path each time Octave is started, and you no | |
400 longer need to specify the <samp><span class="option">-p</span></samp> option on the command line. | |
401 | |
402 <div class="node"> | |
403 <a name="Content-of-the-source-distribution"></a> | |
404 <p><hr> | |
405 Next: <a rel="next" accesskey="n" href="#Using-the-queueing-toolbox">Using the queueing toolbox</a>, | |
406 Previous: <a rel="previous" accesskey="p" href="#Manual-installation">Manual installation</a>, | |
407 Up: <a rel="up" accesskey="u" href="#Installation">Installation</a> | |
408 | |
409 </div> | |
410 | |
411 <h3 class="section">2.3 Content of the source distribution</h3> | |
412 | |
9408 | 413 <p>The source code of the latest version of the <code>queueing</code> |
414 package can be found in the Subversion repository at the URL: | |
415 | |
416 <p><a href="http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/queueing/">http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/queueing/</a> | |
417 | |
418 <p>The source distribution contains the following directories (some of | |
419 which are not included in the installation tarball): | |
9391 | 420 |
421 <dl> | |
422 <dt><samp><span class="file">doc/</span></samp><dd>Documentation source. Most of the documentation is extracted from the | |
423 comment blocks of individual function files from the <samp><span class="file">inst/</span></samp> | |
424 directory. | |
425 | |
426 <br><dt><samp><span class="file">inst/</span></samp><dd>This directory contains the <tt>m</tt>-files which implement the | |
427 various Queueing Network algorithms provided by <code>queueing</code>. As a | |
428 notational convention, the names of source files containing functions | |
429 for Queueing Networks start with the ‘<samp><span class="samp">qn</span></samp>’ prefix; the name of | |
430 source files containing functions for Continuous-Time Markov Chains | |
431 (CTMSs) start with the ‘<samp><span class="samp">ctmc</span></samp>’ prefix, and the names of files | |
432 containing functions for Discrete-Time Markov Chains (DTMCs) start | |
433 with the ‘<samp><span class="samp">dtmc</span></samp>’ prefix. | |
434 | |
435 <br><dt><samp><span class="file">test/</span></samp><dd>This directory contains the test functions used to invoke all tests on | |
436 all function files. | |
437 | |
438 <br><dt><samp><span class="file">scripts/</span></samp><dd>This directory contains some utility scripts mostly from GNU Octave, | |
439 which extract the documentation from the specially-formatted comments | |
440 in the <tt>m</tt>-files. | |
441 | |
442 <br><dt><samp><span class="file">examples/</span></samp><dd>This directory contains examples which are automatically extracted | |
443 from the ‘<samp><span class="samp">demo</span></samp>’ blocks of the function files. | |
444 | |
9394 | 445 <br><dt><samp><span class="file">devel/</span></samp><dd>This directory contains function files which are either not working |
9395 | 446 properly, or need additional testing before they are moved to the |
9391 | 447 <samp><span class="file">inst/</span></samp> directory. |
448 | |
449 </dl> | |
450 | |
451 <p>The <code>queueing</code> package ships with a Makefile which can be used | |
452 to produce the documentation (in PDF and HTML format), and | |
453 automatically execute all function tests. Specifically, the following | |
454 targets are defined: | |
455 | |
456 <dl> | |
457 <dt><code>all</code><dd>Running ‘<samp><span class="samp">make</span></samp>’ (or ‘<samp><span class="samp">make all</span></samp>’) on the top-level directory | |
458 builds the programs used to extract the documentation from the | |
459 comments embedded in the <tt>m</tt>-files, and then produce the | |
460 documentation in PDF and HTML format (<samp><span class="file">doc/queueing.pdf</span></samp> and | |
461 <samp><span class="file">doc/queueing.html</span></samp>, respectively). | |
462 | |
463 <br><dt><code>check</code><dd>Running ‘<samp><span class="samp">make check</span></samp>’ will execute all tests contained in the | |
464 <tt>m</tt>-files. If you modify the code of any function in the | |
465 <samp><span class="file">inst/</span></samp> directory, you should run the tests to ensure that no | |
466 errors have been introduced. You are also encouraged to contribute new | |
467 tests, especially for functions which are not adequately validated. | |
468 | |
469 <br><dt><code>clean</code><dt><code>distclean</code><dt><code>dist</code><dd>The ‘<samp><span class="samp">make clean</span></samp>’, ‘<samp><span class="samp">make distclean</span></samp>’ and ‘<samp><span class="samp">make dist</span></samp>’ | |
470 commands are used to clean up the source directory and prepare the | |
471 distribution archive in compressed tar format. | |
472 | |
473 </dl> | |
474 | |
475 <div class="node"> | |
476 <a name="Using-the-queueing-toolbox"></a> | |
477 <p><hr> | |
478 Previous: <a rel="previous" accesskey="p" href="#Content-of-the-source-distribution">Content of the source distribution</a>, | |
479 Up: <a rel="up" accesskey="u" href="#Installation">Installation</a> | |
480 | |
481 </div> | |
482 | |
483 <h3 class="section">2.4 Using the queueing toolbox</h3> | |
484 | |
485 <p>You can use all functions by simply invoking their name with the | |
486 appropriate parameters; the <code>queueing</code> package should display an | |
487 error message in case of missing/wrong parameters. You can display the | |
488 help text for any function using the <samp><span class="command">help</span></samp> command. For | |
489 example: | |
490 | |
491 <pre class="example"> octave:2> <kbd>help qnmvablo</kbd> | |
492 </pre> | |
493 <p>prints the documentation for the <samp><span class="command">qnmvablo</span></samp> function. | |
494 Additional information can be found in the <code>queueing</code> manual, | |
495 which is available in PDF format in <samp><span class="file">doc/queueing.pdf</span></samp> and in | |
496 HTML format in <samp><span class="file">doc/queueing.html</span></samp>. | |
497 | |
498 <p>Within GNU Octave, you can also run the test and demo blocks | |
499 associated to the functions, using the <samp><span class="command">test</span></samp> and | |
500 <samp><span class="command">demo</span></samp> commands respectively. To run all the tests of, say, | |
501 the <samp><span class="command">qnmvablo</span></samp> function: | |
502 | |
503 <pre class="example"> octave:3> <kbd>test qnmvablo</kbd> | |
504 -| PASSES 4 out of 4 tests | |
505 </pre> | |
506 <p>To execute the demos of the <samp><span class="command">qnclosed</span></samp> function, use the | |
507 following: | |
508 | |
509 <pre class="example"> octave:4> <kbd>demo qnclosed</kbd> | |
510 </pre> | |
511 <!-- DO NOT EDIT! Generated automatically by munge-texi. --> | |
512 <!-- *- texinfo -*- --> | |
513 <!-- Copyright (C) 2008, 2009, 2010, 2011, 2012 Moreno Marzolla --> | |
514 <!-- This file is part of the queueing toolbox, a Queueing Networks --> | |
515 <!-- analysis package for GNU Octave. --> | |
516 <!-- The queueing toolbox is free software; you can redistribute it --> | |
517 <!-- and/or modify it under the terms of the GNU General Public License --> | |
518 <!-- as published by the Free Software Foundation; either version 3 of --> | |
519 <!-- the License, or (at your option) any later version. --> | |
520 <!-- The queueing toolbox is distributed in the hope that it will be --> | |
521 <!-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty --> | |
522 <!-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --> | |
523 <!-- GNU General Public License for more details. --> | |
524 <!-- You should have received a copy of the GNU General Public License --> | |
525 <!-- along with the queueing toolbox; see the file COPYING. If not, see --> | |
526 <!-- <http://www.gnu.org/licenses/>. --> | |
527 <div class="node"> | |
528 <a name="Getting-Started"></a> | |
529 <p><hr> | |
530 Next: <a rel="next" accesskey="n" href="#Markov-Chains">Markov Chains</a>, | |
531 Previous: <a rel="previous" accesskey="p" href="#Installation">Installation</a>, | |
532 Up: <a rel="up" accesskey="u" href="#Top">Top</a> | |
533 | |
534 </div> | |
535 | |
536 <h2 class="chapter">3 Introduction and Getting Started</h2> | |
537 | |
538 <ul class="menu"> | |
539 <li><a accesskey="1" href="#Analysis-of-Closed-Networks">Analysis of Closed Networks</a> | |
540 <li><a accesskey="2" href="#Analysis-of-Open-Networks">Analysis of Open Networks</a> | |
541 </ul> | |
542 | |
543 <p>In this chapter we give some usage examples of the <code>queueing</code> | |
544 package. The reader is assumed to be familiar with Queueing Networks | |
545 (although some basic terminology and notation will be given | |
546 here). Additional usage examples are embedded in most of the function | |
547 files; to display and execute the demos associated with function | |
548 <em>fname</em> you can type <samp><span class="command">demo </span><em>fname</em></samp> at the Octave | |
549 prompt. For example | |
550 | |
551 <pre class="example"> <kbd>demo qnclosed</kbd> | |
552 </pre> | |
553 <p class="noindent">executes all demos (if any) for the <samp><span class="command">qnclosed</span></samp> function. | |
554 | |
555 <div class="node"> | |
556 <a name="Analysis-of-Closed-Networks"></a> | |
557 <p><hr> | |
558 Next: <a rel="next" accesskey="n" href="#Analysis-of-Open-Networks">Analysis of Open Networks</a>, | |
559 Up: <a rel="up" accesskey="u" href="#Getting-Started">Getting Started</a> | |
560 | |
561 </div> | |
562 | |
563 <h3 class="section">3.1 Analysis of Closed Networks</h3> | |
564 | |
565 <p>Let us consider a simple closed network with K=3 service | |
566 centers. Each center is of type M/M/1–FCFS. We denote with | |
567 S_i the average service time at center i, i=1, 2, | |
568 3. Let S_1 = 1.0, S_2 = 2.0 and S_3 = 0.8. The | |
569 routing of jobs within the network is described with a <em>routing | |
570 probability matrix</em> P. Specifically, a request completing | |
571 service at center i is enqueued at center j with | |
572 probability P_ij. Let us assume the following routing | |
573 probability matrix: | |
574 | |
575 <pre class="example"> [ 0 0.3 0.7 ] | |
576 P = [ 1 0 0 ] | |
577 [ 1 0 0 ] | |
578 </pre> | |
579 <p>For example, according to matric P a job completing service at | |
580 center 1 is routed to center 2 with probability 0.3, and is routed to | |
581 center 3 with probability 0.7. | |
582 | |
583 <p>The network above can be analyzed with the <samp><span class="command">qnclosed</span></samp> | |
584 function; if there is just a single class of requests, as in the | |
585 example above, <samp><span class="command">qnclosed</span></samp> calls <samp><span class="command">qnclosedsinglemva</span></samp> | |
586 which implements the Mean Value Analysys (MVA) algorithm for | |
587 single-class, product-form network. | |
588 | |
589 <p><samp><span class="command">qnclosed</span></samp> requires the following parameters: | |
590 | |
591 <dl> | |
592 <dt><var>N</var><dd>Number of requests in the network (since we are considering a closed | |
593 network, the number of requests is fixed) | |
594 | |
595 <br><dt><var>S</var><dd>Array of average service times at the centers: <var>S</var><code>(k)</code> is | |
596 the average service time at center k. | |
597 | |
598 <br><dt><var>V</var><dd>Array of visit ratios: <var>V</var><code>(k)</code> is the average number of | |
599 visits to center k. | |
600 | |
601 </dl> | |
602 | |
603 <p>As can be seen, we must compute the <em>visit ratios</em> (or visit | |
604 counts) V_k for each center k. The visit counts satisfy | |
605 the following equations: | |
606 | |
607 <pre class="example"> V_j = sum_i V_i P_ij | |
608 </pre> | |
609 <p>We can compute V_k from the routing probability matrix | |
610 P_ij using the <samp><span class="command">qnvisits</span></samp> function: | |
611 | |
612 <pre class="example"> <kbd>P = [0 0.3 0.7; 1 0 0; 1 0 0];</kbd> | |
613 <kbd>V = qnvisits(P)</kbd> | |
614 ⇒ V = 1.00000 0.30000 0.70000 | |
615 </pre> | |
616 <p>We can check that the computed values satisfy the above equation by | |
617 evaluating the following expression: | |
618 | |
619 <pre class="example"> <kbd>V*P</kbd> | |
620 ⇒ ans = 1.00000 0.30000 0.70000 | |
621 </pre> | |
622 <p class="noindent">which is equal to V. | |
623 Hence, we can analyze the network for a given population size N | |
624 (for example, N=10) as follows: | |
625 | |
626 <pre class="example"> <kbd>N = 10;</kbd> | |
627 <kbd>S = [1 2 0.8];</kbd> | |
628 <kbd>P = [0 0.3 0.7; 1 0 0; 1 0 0];</kbd> | |
629 <kbd>V = qnvisits(P);</kbd> | |
630 <kbd>[U R Q X] = qnclosed( N, S, V )</kbd> | |
631 ⇒ U = 0.99139 0.59483 0.55518 | |
632 ⇒ R = 7.4360 4.7531 1.7500 | |
633 ⇒ Q = 7.3719 1.4136 1.2144 | |
634 ⇒ X = 0.99139 0.29742 0.69397 | |
635 </pre> | |
636 <p>The output of <samp><span class="command">qnclosed</span></samp> includes the vector of utilizations | |
637 U_k at center k, response time R_k, average | |
638 number of customers Q_k and throughput X_k. In our | |
639 example, the throughput of center 1 is X_1 = 0.99139, and the | |
640 average number of requests in center 3 is Q_3 = 1.2144. The | |
641 utilization of center 1 is U_1 = 0.99139, which is the higher | |
642 value among the service centers. Tus, center 1 is the <em>bottleneck | |
643 device</em>. | |
644 | |
645 <p>This network can also be analyzed with the <samp><span class="command">qnsolve</span></samp> | |
646 function. <samp><span class="command">qnsolve</span></samp> can handle open, closed or mixed networks, | |
647 and allows the network to be described in a very flexible way. First, | |
648 let <var>Q1</var>, <var>Q2</var> and <var>Q3</var> be the variables describing the | |
649 service centers. Each variable is instantiated with the | |
650 <samp><span class="command">qnmknode</span></samp> function. | |
651 | |
652 <pre class="example"> <kbd>Q1 = qnmknode( "m/m/m-fcfs", 1 );</kbd> | |
653 <kbd>Q2 = qnmknode( "m/m/m-fcfs", 2 );</kbd> | |
654 <kbd>Q3 = qnmknode( "m/m/m-fcfs", 0.8 );</kbd> | |
655 </pre> | |
656 <p>The first parameter of <samp><span class="command">qnmknode</span></samp> is a string describing the | |
657 type of the node. Here we use <code>"m/m/m-fcfs"</code> to denote a | |
658 M/M/m–FCFS center. The second parameter gives the average | |
659 service time. An optional third parameter can be used to specify the | |
660 number m of service centers. If omitted, it is assumed | |
661 m=1 (single-server node). | |
662 | |
663 <p>Now, the network can be analyzed as follows: | |
664 | |
665 <pre class="example"> <kbd>N = 10;</kbd> | |
666 <kbd>V = [1 0.3 0.7];</kbd> | |
667 <kbd>[U R Q X] = qnsolve( "closed", N, { Q1, Q2, Q3 }, V )</kbd> | |
668 ⇒ U = 0.99139 0.59483 0.55518 | |
669 ⇒ R = 7.4360 4.7531 1.7500 | |
670 ⇒ Q = 7.3719 1.4136 1.2144 | |
671 ⇒ X = 0.99139 0.29742 0.69397 | |
672 </pre> | |
673 <p>Of course, we get exactly the same results. Other functions can be used | |
674 for closed networks, see <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a>. | |
675 | |
676 <div class="node"> | |
677 <a name="Analysis-of-Open-Networks"></a> | |
678 <p><hr> | |
679 Previous: <a rel="previous" accesskey="p" href="#Analysis-of-Closed-Networks">Analysis of Closed Networks</a>, | |
680 Up: <a rel="up" accesskey="u" href="#Getting-Started">Getting Started</a> | |
681 | |
682 </div> | |
683 | |
684 <h3 class="section">3.2 Analysis of Open Networks</h3> | |
685 | |
686 <p>Open networks can be analyzed in a similar way. Let us consider | |
687 an open network with K=3 service centers, and routing | |
688 probability matrix as follows: | |
689 | |
690 <pre class="example"> [ 0 0.3 0.5 ] | |
691 P = [ 1 0 0 ] | |
692 [ 1 0 0 ] | |
693 </pre> | |
694 <p>In this network, requests can leave the system from center 1 with | |
695 probability (1-(0.3+0.5) = 0.2. We suppose that external jobs | |
696 arrive at center 1 with rate \lambda_1 = 0.15; there are no | |
697 arrivals at centers 2 and 3. | |
698 | |
699 <p>Similarly to closed networks, we first need to compute the visit | |
700 counts V_k to center k. Again, we use the | |
701 <samp><span class="command">qnvisits</span></samp> function as follows: | |
702 | |
703 <pre class="example"> <kbd>P = [0 0.3 0.5; 1 0 0; 1 0 0];</kbd> | |
704 <kbd>lambda = [0.15 0 0];</kbd> | |
705 <kbd>V = qnvisits(P, lambda)</kbd> | |
706 ⇒ V = 5.00000 1.50000 2.50000 | |
707 </pre> | |
708 <p class="noindent">where <var>lambda</var><code>(k)</code> is the arrival rate at center k, | |
709 and <var>P</var> is the routing matrix. The visit counts V_k for | |
710 open networks satisfy the following equation: | |
711 | |
712 <pre class="example"> V_j = sum_i V_i P_ij | |
713 </pre> | |
714 <p>where P_0j is the probability of an external arrival to | |
715 center j. This can be computed as: | |
716 | |
717 <p>Assuming the same service times as in the previous example, the | |
718 network can be analyzed with the <samp><span class="command">qnopen</span></samp> function, as | |
719 follows: | |
720 | |
721 <pre class="example"> <kbd>S = [1 2 0.8];</kbd> | |
722 <kbd>[U R Q X] = qnopen( sum(lambda), S, V )</kbd> | |
723 ⇒ U = 0.75000 0.45000 0.30000 | |
724 ⇒ R = 4.0000 3.6364 1.1429 | |
725 ⇒ Q = 3.00000 0.81818 0.42857 | |
726 ⇒ X = 0.75000 0.22500 0.37500 | |
727 </pre> | |
728 <p>The first parameter of the <samp><span class="command">qnopen</span></samp> function is the (scalar) | |
729 aggregate arrival rate. | |
730 | |
731 <p>Again, it is possible to use the <samp><span class="command">qnsolve</span></samp> high-level function: | |
732 | |
733 <pre class="example"> <kbd>Q1 = qnmknode( "m/m/m-fcfs", 1 );</kbd> | |
734 <kbd>Q2 = qnmknode( "m/m/m-fcfs", 2 );</kbd> | |
735 <kbd>Q3 = qnmknode( "m/m/m-fcfs", 0.8 );</kbd> | |
736 <kbd>lambda = [0.15 0 0];</kbd> | |
737 <kbd>[U R Q X] = qnsolve( "open", sum(lambda), { Q1, Q2, Q3 }, V )</kbd> | |
738 ⇒ U = 0.75000 0.45000 0.30000 | |
739 ⇒ R = 4.0000 3.6364 1.1429 | |
740 ⇒ Q = 3.00000 0.81818 0.42857 | |
741 ⇒ X = 0.75000 0.22500 0.37500 | |
742 </pre> | |
743 <!-- @node Markov Chains Analysis --> | |
744 <!-- @section Markov Chains Analysis --> | |
745 <!-- @subsection Discrete-Time Markov Chains --> | |
746 <!-- (TODO) --> | |
747 <!-- @subsection Continuous-Time Markov Chains --> | |
748 <!-- (TODO) --> | |
749 <!-- DO NOT EDIT! Generated automatically by munge-texi. --> | |
750 <!-- *- texinfo -*- --> | |
751 <!-- Copyright (C) 2008, 2009, 2010, 2011, 2012 Moreno Marzolla --> | |
752 <!-- This file is part of the queueing toolbox, a Queueing Networks --> | |
753 <!-- analysis package for GNU Octave. --> | |
754 <!-- The queueing toolbox is free software; you can redistribute it --> | |
755 <!-- and/or modify it under the terms of the GNU General Public License --> | |
756 <!-- as published by the Free Software Foundation; either version 3 of --> | |
757 <!-- the License, or (at your option) any later version. --> | |
758 <!-- The queueing toolbox is distributed in the hope that it will be --> | |
759 <!-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty --> | |
760 <!-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --> | |
761 <!-- GNU General Public License for more details. --> | |
762 <!-- You should have received a copy of the GNU General Public License --> | |
763 <!-- along with the queueing toolbox; see the file COPYING. If not, see --> | |
764 <!-- <http://www.gnu.org/licenses/>. --> | |
765 <div class="node"> | |
766 <a name="Markov-Chains"></a> | |
767 <p><hr> | |
768 Next: <a rel="next" accesskey="n" href="#Single-Station-Queueing-Systems">Single Station Queueing Systems</a>, | |
769 Previous: <a rel="previous" accesskey="p" href="#Getting-Started">Getting Started</a>, | |
770 Up: <a rel="up" accesskey="u" href="#Top">Top</a> | |
771 | |
772 </div> | |
773 | |
774 <h2 class="chapter">4 Markov Chains</h2> | |
775 | |
776 <ul class="menu"> | |
777 <li><a accesskey="1" href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a> | |
778 <li><a accesskey="2" href="#Continuous_002dTime-Markov-Chains">Continuous-Time Markov Chains</a> | |
779 </ul> | |
780 | |
781 <div class="node"> | |
782 <a name="Discrete-Time-Markov-Chains"></a> | |
783 <a name="Discrete_002dTime-Markov-Chains"></a> | |
784 <p><hr> | |
785 Next: <a rel="next" accesskey="n" href="#Continuous_002dTime-Markov-Chains">Continuous-Time Markov Chains</a>, | |
786 Up: <a rel="up" accesskey="u" href="#Markov-Chains">Markov Chains</a> | |
787 | |
788 </div> | |
789 | |
790 <h3 class="section">4.1 Discrete-Time Markov Chains</h3> | |
791 | |
9412 | 792 <p>Let X_0, X_1, <small class="dots">...</small>, X_n, <small class="dots">...</small> be a sequence of random |
793 variables, each one defined over a discete state space 0, 1, 2, | |
794 <small class="dots">...</small>. The sequence X_0, X_1, <small class="dots">...</small>, X_n, <small class="dots">...</small> is a | |
795 <em>stochastic process</em> with discrete time 0, 1, 2, | |
796 <small class="dots">...</small>. A <em>Markov chain</em> is a stochastic process {X_n, | |
797 n=0, 1, 2, <small class="dots">...</small>} which satisfies the following Marrkov property: | |
798 | |
9439 | 799 <p>P(X_n+1 = x_n+1 | X_n = x_n, X_n-1 = x_n-1, ..., X_0 = x_0) = P(X_n+1 = x_n+1 | X_n = x_n) |
800 | |
801 <p class="noindent">which means that the probability that the system is in | |
9412 | 802 a particular state at time n+1 only depends on the state the |
803 system was at time n. | |
804 | |
805 <p>The evolution of a Markov chain with finite state space {1, 2, | |
806 <small class="dots">...</small>, N} can be fully described by a stochastic matrix \bf | |
807 P(n) = P_i,j(n) such that P_i, j(n) = P( X_n+1 = j\ |\ | |
808 X_n = j ). If the Markov chain is homogeneous (that is, the | |
809 transition probability matrix \bf P(n) is time-independent), | |
810 we can simply write \bf P = P_i, j, where P_i, j = | |
811 P( X_n+1 = j\ |\ X_n = j ) for all n=0, 1, 2, <small class="dots">...</small>. | |
812 | |
813 <p>The transition probability matrix \bf P must satisfy the | |
814 following two properties: (1) P_i, j ≥ 0 for all | |
9629 | 815 i, j, and (2) \sum_j=1^N P_i,j = 1. |
9412 | 816 |
9628 | 817 <p><a name="doc_002ddtmc_005fcheck_005fP"></a> |
818 | |
819 <div class="defun"> | |
820 — Function File: [<var>result</var> <var>err</var>] = <b>dtmc_check_P</b> (<var>P</var>)<var><a name="index-dtmc_005fcheck_005fP-1"></a></var><br> | |
821 <blockquote> | |
822 <p><a name="index-Markov-chain_002c-discrete-time-2"></a> | |
823 If <var>P</var> is a valid transition probability matrix, return | |
824 the size (number of rows or columns) of <var>P</var>. If <var>P</var> is not | |
825 a transition probability matrix, set <var>result</var> to zero, and | |
826 <var>err</var> to an appropriate error string. | |
827 | |
828 </blockquote></div> | |
829 | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
830 <h4 class="subsection">4.1.1 State occupancy probabilities</h4> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
831 |
9629 | 832 <p>We denote with \bf \pi(n) = (\pi_1(n), \pi_2(n), <small class="dots">...</small>, |
833 \pi_N(n) ) the <em>state occupancy probability vector</em> at step | |
834 n. \pi_i(n) denotes the probability that the system is | |
835 in state i at step n. | |
836 | |
837 <p>Given the transition probability matrix \bf P and the initial | |
9412 | 838 state occupancy probability vector \bf \pi(0) = (\pi_1(0), |
839 \pi_2(0), <small class="dots">...</small>, \pi_N(0)) at step 0, the state occupancy | |
840 probability vector \bf \pi(n) at step n can be | |
841 computed as: | |
842 | |
843 <pre class="example"> \pi(n) = \pi(0) P^n | |
844 </pre> | |
845 <p>Under certain conditions, there exists a <em>stationary state | |
846 occupancy probability</em> \bf \pi = \lim_n \rightarrow +\infty | |
847 \bf \pi(n), which is independent from the initial state occupancy | |
9439 | 848 \bf \pi(0). The stationary state occupancy probability vector |
9629 | 849 \bf \pi satisfies \bf \pi = \bf \pi \bf P |
850 and \sum_i=1^N \pi_i = 1 | |
9412 | 851 |
852 <p><a name="doc_002ddtmc"></a> | |
9391 | 853 |
854 <div class="defun"> | |
9628 | 855 — Function File: <var>p</var> = <b>dtmc</b> (<var>P</var>)<var><a name="index-dtmc-3"></a></var><br> |
856 — Function File: <var>p</var> = <b>dtmc</b> (<var>P, n, p0</var>)<var><a name="index-dtmc-4"></a></var><br> | |
9391 | 857 <blockquote> |
9628 | 858 <p><a name="index-Markov-chain_002c-discrete-time-5"></a><a name="index-Discrete-time-Markov-chain-6"></a><a name="index-Markov-chain_002c-stationary-probabilities-7"></a><a name="index-Stationary-probabilities-8"></a> |
9391 | 859 With a single argument, compute the steady-state probability vector |
860 <var>p</var><code>(1), ..., </code><var>p</var><code>(N)</code> for a | |
861 Discrete-Time Markov Chain given the N \times N transition | |
862 probability matrix <var>P</var>. With three arguments, compute the | |
863 probability vector <var>p</var><code>(1), ..., </code><var>p</var><code>(N)</code> | |
864 after <var>n</var> steps, given initial probability vector <var>p0</var> at | |
865 time 0. | |
866 | |
867 <p><strong>INPUTS</strong> | |
868 | |
869 <dl> | |
870 <dt><var>P</var><dd><var>P</var><code>(i,j)</code> is the transition probability from state i | |
871 to state j. <var>P</var> must be an irreducible stochastic matrix, | |
872 which means that the sum of each row must be 1 (\sum_j=1^N P_i j = 1), and the rank of | |
873 <var>P</var> must be equal to its dimension. | |
874 | |
875 <br><dt><var>n</var><dd>Step at which to compute the transient probability | |
876 | |
877 <br><dt><var>p0</var><dd><var>p0</var><code>(i)</code> is the probability that at step 0 the system | |
878 is in state i. | |
879 | |
880 </dl> | |
881 | |
882 <p><strong>OUTPUTS</strong> | |
883 | |
884 <dl> | |
885 <dt><var>p</var><dd>If this function is invoked with a single argument, | |
886 <var>p</var><code>(i)</code> is the steady-state probability that the system is | |
887 in state i. <var>p</var> satisfies the equations p = p\bf P and \sum_i=1^N p_i = 1. If this function is invoked | |
888 with three arguments, <var>p</var><code>(i)</code> is the marginal probability | |
889 that the system is in state i at step <var>n</var>, | |
890 given the initial probabilities <var>p0</var><code>(i)</code> that the initial state is | |
891 i. | |
892 | |
893 </dl> | |
894 | |
895 </blockquote></div> | |
896 | |
9412 | 897 <p class="noindent"><strong>EXAMPLE</strong> |
898 | |
899 <pre class="example"><pre class="verbatim"> a = 0.2; | |
900 b = 0.15; | |
901 P = [ 1-a a; b 1-b]; | |
902 T = 0:14; | |
903 pp = zeros(2,length(T)); | |
904 for i=1:length(T) | |
905 pp(:,i) = dtmc(P,T(i),[1 0]); | |
906 endfor | |
907 ss = dtmc(P); # compute steady state probabilities | |
908 plot( T, pp(1,:), "b+;p_0(t);", "linewidth", 2, \ | |
909 T, ss(1)*ones(size(T)), "b;Steady State;", \ | |
910 T, pp(2,:), "r+;p_1(t);", "linewidth", 2, \ | |
911 T, ss(2)*ones(size(T)), "r;Steady State;" ); | |
912 xlabel("Time Step");</pre> | |
913 </pre> | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
914 <h4 class="subsection">4.1.2 Birth-Death process</h4> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
915 |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
916 <p><a name="doc_002ddtmc_005fbd"></a> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
917 |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
918 <div class="defun"> |
9628 | 919 — Function File: <var>P</var> = <b>dtmc_bd</b> (<var>birth, death</var>)<var><a name="index-dtmc_005fbd-9"></a></var><br> |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
920 <blockquote> |
9628 | 921 <p><a name="index-Markov-chain_002c-discrete-time-10"></a><a name="index-Birth_002ddeath-process-11"></a> |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
922 Returns the N \times N transition probability matrix P |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
923 for a birth-death process with given rates. |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
924 |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
925 <p><strong>INPUTS</strong> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
926 |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
927 <dl> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
928 <dt><var>birth</var><dd>Vector with N-1 elements, where <var>birth</var><code>(i)</code> is the |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
929 transition probability from state i to state i+1. |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
930 |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
931 <br><dt><var>death</var><dd>Vector with N-1 elements, where <var>death</var><code>(i)</code> is the |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
932 transition probability from state i+1 to state i. |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
933 |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
934 </dl> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
935 |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
936 <p><strong>OUTPUTS</strong> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
937 |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
938 <dl> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
939 <dt><var>P</var><dd>Transition probability matrix for the birth-death process. |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
940 |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
941 </dl> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
942 |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
943 </blockquote></div> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
944 |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
945 <h4 class="subsection">4.1.3 First passage times</h4> |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
946 |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
947 <p>The First Passage Time M_i j is defined as the average |
9391 | 948 number of transitions needed to visit state j for the first |
949 time, starting from state i. Matrix \bf M satisfies the | |
950 property that | |
951 | |
952 <pre class="example"> ___ | |
953 \ | |
954 M_ij = 1 + > P_ij * M_kj | |
955 /___ | |
956 k!=j | |
957 </pre> | |
958 <p><a name="doc_002ddtmc_005ffpt"></a> | |
959 | |
960 <div class="defun"> | |
9628 | 961 — Function File: <var>M</var> = <b>dtmc_fpt</b> (<var>P</var>)<var><a name="index-dtmc_005ffpt-12"></a></var><br> |
962 — Function File: <var>m</var> = <b>dtmc_fpt</b> (<var>P, i, j</var>)<var><a name="index-dtmc_005ffpt-13"></a></var><br> | |
9391 | 963 <blockquote> |
9628 | 964 <p><a name="index-Markov-chain_002c-discrete-time-14"></a><a name="index-First-passage-times-15"></a> |
9391 | 965 If called with a single argument, computes the mean first passage |
966 times <var>M</var><code>(i,j)</code>, that are the average number of transitions before | |
967 state <var>j</var> is reached, starting from state <var>i</var>, for all | |
968 1 \leq i, j \leq N. If called with three arguments, returns | |
969 the single value <var>m</var><code> = </code><var>M</var><code>(i,j)</code>. | |
970 | |
971 <p><strong>INPUTS</strong> | |
972 | |
973 <dl> | |
974 <dt><var>P</var><dd><var>P</var><code>(i,j)</code> is the transition probability from state i | |
975 to state j. <var>P</var> must be an irreducible stochastic matrix, | |
976 which means that the sum of each row must be 1 (\sum_j=1^N | |
977 P_i j = 1), and the rank of <var>P</var> must be equal to its | |
978 dimension. | |
979 | |
980 <br><dt><var>i</var><dd>Initial state. | |
981 | |
982 <br><dt><var>j</var><dd>Destination state. If <var>j</var> is a vector, returns the mean first passage | |
983 time to any state in <var>j</var>. | |
984 | |
985 </dl> | |
986 | |
987 <p><strong>OUTPUTS</strong> | |
988 | |
989 <dl> | |
9628 | 990 <dt><var>M</var><dd>If this function is called with a single argument, |
9391 | 991 <var>M</var><code>(i,j)</code> is the average number of transitions before state |
9628 | 992 <var>j</var> is reached for the first time, starting from state <var>i</var>. |
993 <var>M</var><code>(i,i)</code> is the <em>mean recurrence time</em>, and | |
994 represents the average time needed to return to state <var>i</var>. | |
9391 | 995 |
996 <br><dt><var>m</var><dd>If this function is called with three arguments, the result <var>m</var> | |
997 is the average number of transitions before state <var>j</var> is visited | |
998 for the first time, starting from state <var>i</var>. | |
999 | |
1000 </dl> | |
1001 | |
1002 </blockquote></div> | |
1003 | |
9632
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1004 <h4 class="subsection">4.1.4 Mean Time to Absorption</h4> |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1005 |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1006 <p><a name="doc_002ddtmc_005fmtta"></a> |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1007 |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1008 <div class="defun"> |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1009 — Function File: [<var>t</var> <var>B</var>] = <b>dtmc_mtta</b> (<var>P</var>)<var><a name="index-dtmc_005fmtta-16"></a></var><br> |
9634 | 1010 — Function File: [<var>t</var> <var>B</var>] = <b>dtmc_mtta</b> (<var>P, p0</var>)<var><a name="index-dtmc_005fmtta-17"></a></var><br> |
9632
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1011 <blockquote> |
9634 | 1012 <p><a name="index-Markov-chain_002c-disctete-time-18"></a><a name="index-Mean-time-to-absorption-19"></a> |
1013 Compute the expected number of steps before absorption for the | |
1014 DTMC with N \times N transition probability matrix <var>P</var>. | |
9632
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1015 |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1016 <p><strong>INPUTS</strong> |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1017 |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1018 <dl> |
9634 | 1019 <dt><var>P</var><dd>Transition probability matrix. |
1020 | |
1021 <br><dt><var>p0</var><dd>Initial state occupancy probabilities. | |
9632
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1022 |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1023 </dl> |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1024 |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1025 <p><strong>OUTPUTS</strong> |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1026 |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1027 <dl> |
9634 | 1028 <dt><var>t</var><dd>When called with a single argument, <var>t</var> is a vector such that |
1029 <var>t</var><code>(i)</code> is the expected number of steps before being | |
1030 absorbed, starting from state i. When called with two | |
1031 arguments, <var>t</var> is a scalar and represents the average number of | |
1032 steps before absorption, given initial state occupancy probabilities | |
1033 <var>p0</var>. | |
1034 | |
1035 <br><dt><var>B</var><dd>When called with a single argument, <var>B</var> is a N \times N | |
1036 matrix where <var>B</var><code>(i,j)</code> is the probability of being absorbed | |
1037 in state j, starting from state i; if j is not | |
1038 absorbing, <var>B</var><code>(i,j) = 0</code>; if i is absorbing, then | |
1039 <var>B</var><code>(i,i) = 1</code>. When called with two arguments, <var>B</var> is a | |
1040 vector with N elements where <var>B</var><code>(j)</code> is the | |
1041 probability of being absorbed in state <var>j</var>, given initial state | |
1042 occupancy probabilities <var>p0</var>. | |
9632
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1043 |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1044 </dl> |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1045 |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1046 </blockquote></div> |
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1047 |
9391 | 1048 <div class="node"> |
1049 <a name="Continuous-Time-Markov-Chains"></a> | |
1050 <a name="Continuous_002dTime-Markov-Chains"></a> | |
1051 <p><hr> | |
1052 Previous: <a rel="previous" accesskey="p" href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a>, | |
1053 Up: <a rel="up" accesskey="u" href="#Markov-Chains">Markov Chains</a> | |
1054 | |
1055 </div> | |
1056 | |
1057 <h3 class="section">4.2 Continuous-Time Markov Chains</h3> | |
1058 | |
9629 | 1059 <p>A stochastic process {X(t), t ≥ 0} is a continuous-time |
1060 Markov chain if, for all integers n, and for any sequence | |
1061 t_0, t_1 , \ldots , t_n, t_n+1 such that t_0 < t_1 < | |
1062 \ldots < t_n < t_n+1, we have | |
1063 | |
1064 <p>P(X_n+1 = x_n+1 | X_n = x_n, X_n-1 = x_n-1, ..., X_0 = x_0) = P(X_n+1 = x_n+1 | X_n = x_n) | |
1065 | |
1066 <p>A continuous-time Markov chain is defined according to an | |
1067 <em>infinitesimal generator matrix</em> \bf Q = [Q_i,j] such | |
1068 that for each i \neq j, Q_i, j is the transition rate | |
1069 from state i to state j. The elements Q_i, i | |
1070 must be defined in such a way that the infinitesimal generator matrix | |
1071 \bf Q satisfies the property \sum_j=1^N Q_i,j = 0. | |
1072 | |
1073 <p><a name="doc_002dctmc_005fcheck_005fQ"></a> | |
9628 | 1074 |
1075 <div class="defun"> | |
9634 | 1076 — Function File: [<var>result</var> <var>err</var>] = <b>ctmc_check_Q</b> (<var>Q</var>)<var><a name="index-ctmc_005fcheck_005fQ-20"></a></var><br> |
9628 | 1077 <blockquote> |
9634 | 1078 <p><a name="index-Markov-chain_002c-continuous-time-21"></a> |
9628 | 1079 If <var>Q</var> is a valid infinitesimal generator matrix, return |
1080 the size (number of rows or columns) of <var>Q</var>. If <var>Q</var> is not | |
1081 an infinitesimal generator matrix, set <var>result</var> to zero, and | |
1082 <var>err</var> to an appropriate error string. | |
1083 | |
1084 </blockquote></div> | |
1085 | |
9391 | 1086 <ul class="menu"> |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
1087 <li><a accesskey="1" href="#State-occupancy-probabilities">State occupancy probabilities</a> |
9391 | 1088 <li><a accesskey="2" href="#Birth_002dDeath-process">Birth-Death process</a> |
1089 <li><a accesskey="3" href="#Expected-Sojourn-Time">Expected Sojourn Time</a> | |
1090 <li><a accesskey="4" href="#Time_002dAveraged-Expected-Sojourn-Time">Time-Averaged Expected Sojourn Time</a> | |
9632
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1091 <li><a accesskey="5" href="#Mean-Time-to-Absorption">Mean Time to Absorption</a> |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
1092 <li><a accesskey="6" href="#First-Passage-Times">First Passage Times</a> |
9391 | 1093 </ul> |
1094 | |
1095 <div class="node"> | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
1096 <a name="State-occupancy-probabilities"></a> |
9391 | 1097 <p><hr> |
1098 Next: <a rel="next" accesskey="n" href="#Birth_002dDeath-process">Birth-Death process</a>, | |
1099 Up: <a rel="up" accesskey="u" href="#Continuous_002dTime-Markov-Chains">Continuous-Time Markov Chains</a> | |
1100 | |
1101 </div> | |
1102 | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
1103 <h4 class="subsection">4.2.1 State occupancy probabilities</h4> |
9391 | 1104 |
9629 | 1105 <p>Similarly to the discrete case, we denote with \bf \pi(t) = |
1106 (\pi_1(t), \pi_2(t), <small class="dots">...</small>, \pi_N(t) ) the <em>state occupancy | |
1107 probability vector</em> at time t. \pi_i(t) denotes the | |
1108 probability that the system is in state i at time t ≥ 0. | |
1109 | |
1110 <p>Given the infinitesimal generator matrix \bf Q and the initial | |
1111 state occupancy probability vector \bf \pi(0) = (\pi_1(0), | |
1112 \pi_2(0), <small class="dots">...</small>, \pi_N(0)), the state occupancy probability vector | |
1113 \bf \pi(t) at time t can be computed as: | |
1114 | |
1115 <pre class="example"> \pi(t) = \pi(0) exp(Qt) | |
1116 </pre> | |
1117 <p class="noindent">where \exp( \bf Q t ) is the matrix exponential | |
1118 of \bf Q t. Under certain conditions, there exists a | |
1119 <em>stationary state occupancy probability</em> \bf \pi = | |
1120 \lim_t \rightarrow +\infty \bf \pi(t), which is independent from | |
1121 the initial state occupancy \bf \pi(0). The stationary state | |
1122 occupancy probability vector \bf \pi satisfies | |
1123 \bf \pi \bf Q = \bf 0 and \sum_i=1^N \pi_i = 1. | |
1124 | |
1125 <p><a name="doc_002dctmc"></a> | |
9391 | 1126 |
1127 <div class="defun"> | |
9634 | 1128 — Function File: <var>p</var> = <b>ctmc</b> (<var>Q</var>)<var><a name="index-ctmc-22"></a></var><br> |
1129 — Function File: <var>p</var> = <b>ctmc</b> (<var>Q, t. p0</var>)<var><a name="index-ctmc-23"></a></var><br> | |
9391 | 1130 <blockquote> |
9634 | 1131 <p><a name="index-Markov-chain_002c-continuous-time-24"></a><a name="index-Continuous-time-Markov-chain-25"></a><a name="index-Markov-chain_002c-state-occupancy-probabilities-26"></a><a name="index-Stationary-probabilities-27"></a> |
9391 | 1132 With a single argument, compute the stationary state occupancy |
1133 probability vector <var>p</var>(1), <small class="dots">...</small>, <var>p</var>(N) for a | |
1134 Continuous-Time Markov Chain with infinitesimal generator matrix | |
1135 <var>Q</var> of size N \times N. With three arguments, compute the | |
1136 state occupancy probabilities <var>p</var>(1), <small class="dots">...</small>, <var>p</var>(N) at time | |
1137 <var>t</var>, given initial state occupancy probabilities <var>p0</var> at time | |
1138 0. | |
1139 | |
1140 <p><strong>INPUTS</strong> | |
1141 | |
1142 <dl> | |
1143 <dt><var>Q</var><dd>Infinitesimal generator matrix. <var>Q</var> is a N \times N square | |
1144 matrix where <var>Q</var><code>(i,j)</code> is the transition rate from state | |
1145 i to state j, for 1 ≤ i \neq j ≤ N. | |
1146 Transition rates must be nonnegative, and \sum_j=1^N Q_i j = 0 | |
1147 | |
1148 <br><dt><var>t</var><dd>Time at which to compute the transient probability | |
1149 | |
1150 <br><dt><var>p0</var><dd><var>p0</var><code>(i)</code> is the probability that the system | |
1151 is in state i at time 0 . | |
1152 | |
1153 </dl> | |
1154 | |
1155 <p><strong>OUTPUTS</strong> | |
1156 | |
1157 <dl> | |
1158 <dt><var>p</var><dd>If this function is invoked with a single argument, | |
1159 <var>p</var><code>(i)</code> is the steady-state probability that the system is | |
1160 in state i, i = 1, <small class="dots">...</small>, N. The vector <var>p</var> | |
1161 satisfies the equation p\bf Q = 0 and \sum_i=1^N p_i = 1. | |
1162 If this function is invoked with three arguments, <var>p</var><code>(i)</code> | |
1163 is the probability that the system is in state i at time <var>t</var>, | |
9629 | 1164 given the initial occupancy probabilities <var>p0</var>. |
9391 | 1165 |
1166 </dl> | |
1167 | |
1168 </blockquote></div> | |
1169 | |
1170 <p class="noindent"><strong>EXAMPLE</strong> | |
1171 | |
1172 <p>Consider a two-state CTMC such that transition rates between states | |
1173 are equal to 1. This can be solved as follows: | |
1174 | |
1175 <pre class="example"><pre class="verbatim"> Q = [ -1 1; \ | |
1176 1 -1 ]; | |
1177 q = ctmc(Q)</pre> ⇒ q = 0.50000 0.50000 | |
1178 </pre> | |
1179 <div class="node"> | |
1180 <a name="Birth-Death-process"></a> | |
1181 <a name="Birth_002dDeath-process"></a> | |
1182 <p><hr> | |
1183 Next: <a rel="next" accesskey="n" href="#Expected-Sojourn-Time">Expected Sojourn Time</a>, | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
1184 Previous: <a rel="previous" accesskey="p" href="#State-occupancy-probabilities">State occupancy probabilities</a>, |
9391 | 1185 Up: <a rel="up" accesskey="u" href="#Continuous_002dTime-Markov-Chains">Continuous-Time Markov Chains</a> |
1186 | |
1187 </div> | |
1188 | |
1189 <h4 class="subsection">4.2.2 Birth-Death process</h4> | |
1190 | |
1191 <p><a name="doc_002dctmc_005fbd"></a> | |
1192 | |
1193 <div class="defun"> | |
9634 | 1194 — Function File: <var>Q</var> = <b>ctmc_bd</b> (<var>birth, death</var>)<var><a name="index-ctmc_005fbd-28"></a></var><br> |
9391 | 1195 <blockquote> |
9634 | 1196 <p><a name="index-Markov-chain_002c-continuous-time-29"></a><a name="index-Birth_002ddeath-process-30"></a> |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
1197 Returns the N \times N infinitesimal generator matrix Q |
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
1198 for a birth-death process with given rates. |
9391 | 1199 |
1200 <p><strong>INPUTS</strong> | |
1201 | |
1202 <dl> | |
1203 <dt><var>birth</var><dd>Vector with N-1 elements, where <var>birth</var><code>(i)</code> is the | |
1204 transition rate from state i to state i+1. | |
1205 | |
1206 <br><dt><var>death</var><dd>Vector with N-1 elements, where <var>death</var><code>(i)</code> is the | |
1207 transition rate from state i+1 to state i. | |
1208 | |
1209 </dl> | |
1210 | |
1211 <p><strong>OUTPUTS</strong> | |
1212 | |
1213 <dl> | |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
1214 <dt><var>Q</var><dd>Infinitesimal generator matrix for the birth-death process. |
9391 | 1215 |
1216 </dl> | |
1217 | |
1218 </blockquote></div> | |
1219 | |
1220 <div class="node"> | |
1221 <a name="Expected-Sojourn-Time"></a> | |
1222 <p><hr> | |
1223 Next: <a rel="next" accesskey="n" href="#Time_002dAveraged-Expected-Sojourn-Time">Time-Averaged Expected Sojourn Time</a>, | |
1224 Previous: <a rel="previous" accesskey="p" href="#Birth_002dDeath-process">Birth-Death process</a>, | |
1225 Up: <a rel="up" accesskey="u" href="#Continuous_002dTime-Markov-Chains">Continuous-Time Markov Chains</a> | |
1226 | |
1227 </div> | |
1228 | |
1229 <h4 class="subsection">4.2.3 Expected Sojourn Time</h4> | |
1230 | |
1231 <p>Given a N state continuous-time Markov Chain with infinitesimal | |
1232 generator matrix \bf Q, we define the vector \bf L(t) = | |
1233 (L_1(t), L_2(t), \ldots L_N(t)) such that L_i(t) is the | |
1234 expected sojourn time in state i during the interval | |
1235 [0,t), assuming that the initial occupancy probability at time | |
9629 | 1236 0 was \bf \pi(0). \bf L(t) is the solution of |
9391 | 1237 the following differential equation: |
1238 | |
1239 <pre class="example"> dL | |
1240 --(t) = L(t) Q + pi(0), L(0) = 0 | |
1241 dt | |
1242 </pre> | |
9629 | 1243 <p>Alternatively, \bf L(t) can also be expressed in integral |
1244 form as: | |
1245 | |
1246 <pre class="example"> / t | |
1247 L(t) = | pi(u) du | |
1248 / u=0 | |
1249 </pre> | |
1250 <p class="noindent">where \bf \pi(t) = \bf \pi(0) \exp(\bf Qt) is | |
1251 the state occupancy probability at time t. | |
9391 | 1252 |
1253 <p><a name="doc_002dctmc_005fexps"></a> | |
1254 | |
1255 <div class="defun"> | |
9634 | 1256 — Function File: <var>L</var> = <b>ctmc_exps</b> (<var>Q, t, p </var>)<var><a name="index-ctmc_005fexps-31"></a></var><br> |
1257 — Function File: <var>L</var> = <b>ctmc_exps</b> (<var>Q, p</var>)<var><a name="index-ctmc_005fexps-32"></a></var><br> | |
9391 | 1258 <blockquote> |
9634 | 1259 <p><a name="index-Markov-chain_002c-continuous-time-33"></a><a name="index-Expected-sojourn-time-34"></a> |
9625 | 1260 With three arguments, compute the expected times <var>L</var><code>(i)</code> |
1261 spent in each state i during the time interval | |
1262 [0,t], assuming that the state occupancy probabilities | |
1263 at time 0 are <var>p</var>. With two arguments, compute the expected time | |
1264 <var>L</var><code>(i)</code> spent in each state i until absorption. | |
9391 | 1265 |
1266 <p><strong>INPUTS</strong> | |
1267 | |
1268 <dl> | |
9622 | 1269 <dt><var>Q</var><dd>N \times N infinitesimal generator matrix. <var>Q</var><code>(i,j)</code> |
1270 is the transition rate from state i to state j, 1 | |
1271 ≤ i \neq j ≤ N. The matrix <var>Q</var> must also satisfy the | |
1272 condition \sum_j=1^N Q_ij = 0. | |
9391 | 1273 |
9625 | 1274 <br><dt><var>t</var><dd>Time |
9391 | 1275 |
9622 | 1276 <br><dt><var>p</var><dd>Initial occupancy probability vector; <var>p</var><code>(i)</code> is the |
1277 probability the system is in state i at time 0, i = 1, | |
1278 <small class="dots">...</small>, N | |
9391 | 1279 |
1280 </dl> | |
1281 | |
1282 <p><strong>OUTPUTS</strong> | |
1283 | |
1284 <dl> | |
9625 | 1285 <dt><var>L</var><dd>If this function is called with three arguments, <var>L</var><code>(i)</code> is |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
1286 the expected time spent in state i during the interval |
9625 | 1287 [0,t]. If this function is called with two arguments |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
1288 <var>L</var><code>(i)</code> is either the expected time spent in state i until |
9625 | 1289 absorption (if i is a transient state), or zero |
1290 (if <var>i</var> is an absorbing state). | |
9391 | 1291 |
1292 </dl> | |
1293 | |
1294 </blockquote></div> | |
1295 | |
1296 <p class="noindent"><strong>EXAMPLE</strong> | |
1297 | |
1298 <p>Let us consider a pure-birth, 4-states CTMC such that the transition | |
1299 rate from state i to state i+1 is \lambda_i = i | |
1300 \lambda (i=1, 2, 3), with \lambda = 0.5. The following | |
1301 code computes the expected sojourn time in state i, | |
9629 | 1302 given the initial occupancy probability \bf \pi_0=(1,0,0,0). |
9391 | 1303 |
1304 <pre class="example"><pre class="verbatim"> lambda = 0.5; | |
1305 N = 4; | |
1306 birth = lambda*linspace(1,N-1,N-1); | |
1307 death = zeros(1,N-1); | |
1308 Q = diag(birth,1)+diag(death,-1); | |
1309 Q -= diag(sum(Q,2)); | |
9626 | 1310 t = linspace(0,10,100); |
9391 | 1311 p0 = zeros(1,N); p0(1)=1; |
9626 | 1312 L = zeros(length(t),N); |
1313 for i=1:length(t) | |
1314 L(i,:) = ctmc_exps(Q,t(i),p0); | |
1315 endfor | |
1316 plot( t, L(:,1), ";State 1;", "linewidth", 2, \ | |
1317 t, L(:,2), ";State 2;", "linewidth", 2, \ | |
1318 t, L(:,3), ";State 3;", "linewidth", 2, \ | |
1319 t, L(:,4), ";State 4;", "linewidth", 2 ); | |
9391 | 1320 legend("location","northwest"); |
1321 xlabel("Time"); | |
1322 ylabel("Expected sojourn time");</pre> | |
1323 </pre> | |
1324 <div class="node"> | |
1325 <a name="Time-Averaged-Expected-Sojourn-Time"></a> | |
1326 <a name="Time_002dAveraged-Expected-Sojourn-Time"></a> | |
1327 <p><hr> | |
9632
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1328 Next: <a rel="next" accesskey="n" href="#Mean-Time-to-Absorption">Mean Time to Absorption</a>, |
9391 | 1329 Previous: <a rel="previous" accesskey="p" href="#Expected-Sojourn-Time">Expected Sojourn Time</a>, |
1330 Up: <a rel="up" accesskey="u" href="#Continuous_002dTime-Markov-Chains">Continuous-Time Markov Chains</a> | |
1331 | |
1332 </div> | |
1333 | |
1334 <h4 class="subsection">4.2.4 Time-Averaged Expected Sojourn Time</h4> | |
1335 | |
1336 <p><a name="doc_002dctmc_005ftaexps"></a> | |
1337 | |
1338 <div class="defun"> | |
9634 | 1339 — Function File: <var>M</var> = <b>ctmc_taexps</b> (<var>Q, t, p</var>)<var><a name="index-ctmc_005ftaexps-35"></a></var><br> |
9692 | 1340 — Function File: <var>M</var> = <b>ctmc_taexps</b> (<var>Q, p</var>)<var><a name="index-ctmc_005ftaexps-36"></a></var><br> |
9391 | 1341 <blockquote> |
9692 | 1342 <p><a name="index-Markov-chain_002c-continuous-time-37"></a><a name="index-Time_002dalveraged-sojourn-time-38"></a> |
9625 | 1343 Compute the <em>time-averaged sojourn time</em> <var>M</var><code>(i)</code>, |
9692 | 1344 defined as the fraction of the time interval [0,t] (or until |
1345 absorption) spent in state i, assuming that the state | |
1346 occupancy probabilities at time 0 are <var>p</var>. | |
9391 | 1347 |
1348 <p><strong>INPUTS</strong> | |
1349 | |
1350 <dl> | |
1351 <dt><var>Q</var><dd>Infinitesimal generator matrix. <var>Q</var><code>(i,j)</code> is the transition | |
1352 rate from state i to state j, | |
1353 1 ≤ i \neq j ≤ N. The | |
9625 | 1354 matrix <var>Q</var> must also satisfy the condition \sum_j=1^N Q_ij = 0 |
1355 | |
9692 | 1356 <br><dt><var>t</var><dd>Time. If omitted, the results are computed until absorption. |
9391 | 1357 |
1358 <br><dt><var>p</var><dd><var>p</var><code>(i)</code> is the probability that, at time 0, the system was in | |
1359 state i, for all i = 1, <small class="dots">...</small>, N | |
1360 | |
1361 </dl> | |
1362 | |
1363 <p><strong>OUTPUTS</strong> | |
1364 | |
1365 <dl> | |
9692 | 1366 <dt><var>M</var><dd>If this function is called with three parameters, <var>M</var><code>(i)</code> |
1367 is the expected fraction of the interval 0,t] spent in state | |
1368 i assuming that the state occupancy probability at time zero | |
1369 is <var>p</var>. If this function is called with two parameters, | |
1370 <var>M</var><code>(i)</code> is the expected fraction of time until absorption | |
1371 spent in state i. | |
9391 | 1372 |
1373 </dl> | |
1374 | |
1375 </blockquote></div> | |
1376 | |
1377 <p class="noindent"><strong>EXAMPLE</strong> | |
1378 | |
1379 <pre class="example"><pre class="verbatim"> lambda = 0.5; | |
1380 N = 4; | |
1381 birth = lambda*linspace(1,N-1,N-1); | |
1382 death = zeros(1,N-1); | |
1383 Q = diag(birth,1)+diag(death,-1); | |
1384 Q -= diag(sum(Q,2)); | |
9626 | 1385 t = linspace(1e-5,30,100); |
9391 | 1386 p = zeros(1,N); p(1)=1; |
9626 | 1387 M = zeros(length(t),N); |
1388 for i=1:length(t) | |
1389 M(i,:) = ctmc_taexps(Q,t(i),p); | |
1390 endfor | |
9391 | 1391 plot(t, M(:,1), ";State 1;", "linewidth", 2, \ |
1392 t, M(:,2), ";State 2;", "linewidth", 2, \ | |
1393 t, M(:,3), ";State 3;", "linewidth", 2, \ | |
1394 t, M(:,4), ";State 4 (absorbing);", "linewidth", 2 ); | |
1395 legend("location","east"); | |
1396 xlabel("Time"); | |
1397 ylabel("Time-averaged Expected sojourn time");</pre> | |
1398 </pre> | |
1399 <div class="node"> | |
9632
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1400 <a name="Mean-Time-to-Absorption"></a> |
9391 | 1401 <p><hr> |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
1402 Next: <a rel="next" accesskey="n" href="#First-Passage-Times">First Passage Times</a>, |
9391 | 1403 Previous: <a rel="previous" accesskey="p" href="#Time_002dAveraged-Expected-Sojourn-Time">Time-Averaged Expected Sojourn Time</a>, |
1404 Up: <a rel="up" accesskey="u" href="#Continuous_002dTime-Markov-Chains">Continuous-Time Markov Chains</a> | |
1405 | |
1406 </div> | |
1407 | |
9632
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1408 <h4 class="subsection">4.2.5 Mean Time to Absorption</h4> |
9391 | 1409 |
1410 <p>If we consider a Markov Chain with absorbing states, it is possible to | |
1411 define the <em>expected time to absorption</em> as the expected time | |
1412 until the system goes into an absorbing state. More specifically, let | |
1413 us suppose that A is the set of transient (i.e., non-absorbing) | |
1414 states of a CTMC with N states and infinitesimal generator | |
1415 matrix \bf Q. The expected time to absorption \bf | |
1416 L_A(\infty) is defined as the solution of the following equation: | |
1417 | |
1418 <pre class="example"> L_A( inf ) Q_A = -pi_A(0) | |
1419 </pre> | |
1420 <p class="noindent">where \bf Q_A is the restriction of matrix \bf Q to | |
1421 only states in A, and \bf \pi_A(0) is the initial | |
1422 state occupancy probability at time 0, restricted to states in | |
1423 A. | |
1424 | |
1425 <p><a name="doc_002dctmc_005fmtta"></a> | |
1426 | |
1427 <div class="defun"> | |
9692 | 1428 — Function File: <var>t</var> = <b>ctmc_mtta</b> (<var>Q, p</var>)<var><a name="index-ctmc_005fmtta-39"></a></var><br> |
9391 | 1429 <blockquote> |
9692 | 1430 <p><a name="index-Markov-chain_002c-continuous-time-40"></a><a name="index-Mean-time-to-absorption-41"></a> |
9622 | 1431 Compute the Mean-Time to Absorption (MTTA) of the CTMC described by |
1432 the infinitesimal generator matrix <var>Q</var>, starting from initial | |
9625 | 1433 occupancy probabilities <var>p</var>. If there are no absorbing states, this |
9622 | 1434 function fails with an error. |
9391 | 1435 |
1436 <p><strong>INPUTS</strong> | |
1437 | |
1438 <dl> | |
1439 <dt><var>Q</var><dd>N \times N infinitesimal generator matrix. <var>Q</var><code>(i,j)</code> | |
1440 is the transition rate from state i to state j, i | |
1441 \neq j. The matrix <var>Q</var> must satisfy the condition | |
1442 \sum_j=1^N Q_i j = 0 | |
1443 | |
1444 <br><dt><var>p</var><dd><var>p</var><code>(i)</code> is the probability that the system is in state i | |
1445 at time 0, for each i=1, <small class="dots">...</small>, N | |
1446 | |
1447 </dl> | |
1448 | |
1449 <p><strong>OUTPUTS</strong> | |
1450 | |
1451 <dl> | |
1452 <dt><var>t</var><dd>Mean time to absorption of the process represented by matrix <var>Q</var>. | |
1453 If there are no absorbing states, this function fails. | |
1454 | |
1455 </dl> | |
1456 | |
1457 </blockquote></div> | |
1458 | |
1459 <p class="noindent"><strong>EXAMPLE</strong> | |
1460 | |
1461 <p>Let us consider a simple model of a redundant disk array. We assume | |
1462 that the array is made of 5 independent disks, such that the array can | |
1463 tolerate up to 2 disk failures without losing data. If three or more | |
1464 disks break, the array is dead and unrecoverable. We want to estimate | |
1465 the Mean-Time-To-Failure (MTTF) of the disk array. | |
1466 | |
1467 <p>We model this system as a 4 states Markov chain with state space | |
1468 \ 2, 3, 4, 5 \. State i denotes the fact that exactly | |
1469 i disks are active; state 2 is absorbing. Let \mu | |
1470 be the failure rate of a single disk. The system starts in state | |
1471 5 (all disks are operational). We use a pure death process, | |
1472 with death rate from state i to state i-1 is \mu | |
1473 i, for i = 3, 4, 5). | |
1474 | |
1475 <p>The MTTF of the disk array is the MTTA of the Markov Chain, and can be | |
1476 computed with the following expression: | |
1477 | |
1478 <pre class="example"><pre class="verbatim"> mu = 0.01; | |
1479 death = [ 3 4 5 ] * mu; | |
1480 Q = diag(death,-1); | |
1481 Q -= diag(sum(Q,2)); | |
9626 | 1482 [t L] = ctmc_mtta(Q,[0 0 0 1])</pre> ⇒ t = 78.333 |
9391 | 1483 </pre> |
1484 <p class="noindent"><strong>REFERENCES</strong> | |
1485 | |
1486 <p>G. Bolch, S. Greiner, H. de Meer and | |
1487 K. Trivedi, <cite>Queueing Networks and Markov Chains: Modeling and | |
1488 Performance Evaluation with Computer Science Applications</cite>, Wiley, | |
1489 1998. | |
1490 | |
9692 | 1491 <p><a name="index-Bolch_002c-G_002e-42"></a><a name="index-Greiner_002c-S_002e-43"></a><a name="index-de-Meer_002c-H_002e-44"></a><a name="index-Trivedi_002c-K_002e-45"></a> |
9391 | 1492 <div class="node"> |
9627
8e744625e429
New function dtmc_bd() added; misc fixes and improvements
mmarzolla
parents:
9626
diff
changeset
|
1493 <a name="First-Passage-Times"></a> |
9391 | 1494 <p><hr> |
9632
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
1495 Previous: <a rel="previous" accesskey="p" href="#Mean-Time-to-Absorption">Mean Time to Absorption</a>, |
9391 | 1496 Up: <a rel="up" accesskey="u" href="#Continuous_002dTime-Markov-Chains">Continuous-Time Markov Chains</a> |
1497 | |
1498 </div> | |
1499 | |
1500 <h4 class="subsection">4.2.6 First Passage Times</h4> | |
1501 | |
1502 <p><a name="doc_002dctmc_005ffpt"></a> | |
1503 | |
1504 <div class="defun"> | |
9692 | 1505 — Function File: <var>M</var> = <b>ctmc_fpt</b> (<var>Q</var>)<var><a name="index-ctmc_005ffpt-46"></a></var><br> |
1506 — Function File: <var>m</var> = <b>ctmc_fpt</b> (<var>Q, i, j</var>)<var><a name="index-ctmc_005ffpt-47"></a></var><br> | |
9391 | 1507 <blockquote> |
9692 | 1508 <p><a name="index-Markov-chain_002c-continuous-time-48"></a><a name="index-First-passage-times-49"></a> |
9391 | 1509 If called with a single argument, computes the mean first passage |
1510 times <var>M</var><code>(i,j)</code>, the average times before state <var>j</var> is | |
1511 reached, starting from state <var>i</var>, for all 1 \leq i, j \leq | |
1512 N. If called with three arguments, returns the single value | |
1513 <var>m</var><code> = </code><var>M</var><code>(i,j)</code>. | |
1514 | |
1515 <p><strong>INPUTS</strong> | |
1516 | |
1517 <dl> | |
1518 <dt><var>Q</var><dd>Infinitesimal generator matrix. <var>Q</var> is a N \times N square | |
1519 matrix where <var>Q</var><code>(i,j)</code> is the transition rate from state | |
1520 i to state j, for 1 ≤ i \neq j ≤ N. | |
1521 Transition rates must be nonnegative, and \sum_j=1^N Q_i j = 0 | |
1522 | |
1523 <br><dt><var>i</var><dd>Initial state. | |
1524 | |
1525 <br><dt><var>j</var><dd>Destination state. If <var>j</var> is a vector, returns the mean first passage | |
1526 time to any state in <var>j</var>. | |
1527 | |
1528 </dl> | |
1529 | |
1530 <p><strong>OUTPUTS</strong> | |
1531 | |
1532 <dl> | |
1533 <dt><var>M</var><dd>If this function is called with a single argument, the result | |
1534 <var>M</var><code>(i,j)</code> is the average time before state | |
1535 <var>j</var> is visited for the first time, starting from state <var>i</var>. | |
1536 | |
1537 <br><dt><var>m</var><dd>If this function is called with three arguments, the result | |
1538 <var>m</var> is the average time before state <var>j</var> is visited for the first | |
1539 time, starting from state <var>i</var>. | |
1540 | |
1541 </dl> | |
1542 | |
1543 </blockquote></div> | |
1544 | |
1545 <!-- DO NOT EDIT! Generated automatically by munge-texi. --> | |
1546 <!-- *- texinfo -*- --> | |
1547 <!-- Copyright (C) 2008, 2009, 2010, 2011, 2012 Moreno Marzolla --> | |
1548 <!-- This file is part of the queueing toolbox, a Queueing Networks --> | |
1549 <!-- analysis package for GNU Octave. --> | |
1550 <!-- The queueing toolbox is free software; you can redistribute it --> | |
1551 <!-- and/or modify it under the terms of the GNU General Public License --> | |
1552 <!-- as published by the Free Software Foundation; either version 3 of --> | |
1553 <!-- the License, or (at your option) any later version. --> | |
1554 <!-- The queueing toolbox is distributed in the hope that it will be --> | |
1555 <!-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty --> | |
1556 <!-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --> | |
1557 <!-- GNU General Public License for more details. --> | |
1558 <!-- You should have received a copy of the GNU General Public License --> | |
1559 <!-- along with the queueing toolbox; see the file COPYING. If not, see --> | |
1560 <!-- <http://www.gnu.org/licenses/>. --> | |
1561 <div class="node"> | |
1562 <a name="Single-Station-Queueing-Systems"></a> | |
1563 <p><hr> | |
1564 Next: <a rel="next" accesskey="n" href="#Queueing-Networks">Queueing Networks</a>, | |
1565 Previous: <a rel="previous" accesskey="p" href="#Markov-Chains">Markov Chains</a>, | |
1566 Up: <a rel="up" accesskey="u" href="#Top">Top</a> | |
1567 | |
1568 </div> | |
1569 | |
1570 <h2 class="chapter">5 Single Station Queueing Systems</h2> | |
1571 | |
1572 <p>Single Station Queueing Systems contain a single station, and are thus | |
1573 quite easy to analyze. The <code>queueing</code> package contains functions | |
1574 for handling the following types of queues: | |
1575 | |
1576 <ul class="menu"> | |
1577 <li><a accesskey="1" href="#The-M_002fM_002f1-System">The M/M/1 System</a>: Single-server queueing station. | |
1578 <li><a accesskey="2" href="#The-M_002fM_002fm-System">The M/M/m System</a>: Multiple-server queueing station. | |
1579 <li><a accesskey="3" href="#The-M_002fM_002finf-System">The M/M/inf System</a>: Infinite-server (delay center) station. | |
1580 <li><a accesskey="4" href="#The-M_002fM_002f1_002fK-System">The M/M/1/K System</a>: Single-server, finite-capacity queueing station. | |
1581 <li><a accesskey="5" href="#The-M_002fM_002fm_002fK-System">The M/M/m/K System</a>: Multiple-server, finite-capacity queueing station. | |
1582 <li><a accesskey="6" href="#The-Asymmetric-M_002fM_002fm-System">The Asymmetric M/M/m System</a>: Asymmetric multiple-server queueing station. | |
1583 <li><a accesskey="7" href="#The-M_002fG_002f1-System">The M/G/1 System</a>: Single-server with general service time distribution. | |
1584 <li><a accesskey="8" href="#The-M_002fHm_002f1-System">The M/Hm/1 System</a>: Single-server with hyperexponential service time distribution. | |
1585 </ul> | |
1586 | |
1587 <p>The functions which analyze the queues above can be used as building | |
1588 blocks for analyzing Queueing Networks. For example, Jackson networks | |
1589 can be solved by computing the aggregate arrival rates to each node, | |
1590 and then solving each node in isolation as if it were a single station | |
1591 queueing system. | |
1592 | |
1593 <!-- M/M/1 --> | |
1594 <div class="node"> | |
1595 <a name="The-M%2fM%2f1-System"></a> | |
1596 <a name="The-M_002fM_002f1-System"></a> | |
1597 <p><hr> | |
1598 Next: <a rel="next" accesskey="n" href="#The-M_002fM_002fm-System">The M/M/m System</a>, | |
1599 Up: <a rel="up" accesskey="u" href="#Single-Station-Queueing-Systems">Single Station Queueing Systems</a> | |
1600 | |
1601 </div> | |
1602 | |
1603 <h3 class="section">5.1 The M/M/1 System</h3> | |
1604 | |
1605 <p>The M/M/1 system is made of a single server connected to an | |
1606 unlimited FCFS queue. The mean arrival rate is Poisson with arrival | |
1607 rate \lambda; the service time is exponentially distributed | |
1608 with average service rate \mu. The system is stable if | |
1609 \lambda < \mu. | |
1610 | |
1611 <p><a name="doc_002dqnmm1"></a> | |
1612 | |
1613 <div class="defun"> | |
9692 | 1614 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>p0</var>] = <b>qnmm1</b> (<var>lambda, mu</var>)<var><a name="index-qnmm1-50"></a></var><br> |
9391 | 1615 <blockquote> |
9692 | 1616 <p><a name="index-g_t_0040math_007bM_002fM_002f1_007d-system-51"></a> |
9391 | 1617 Compute utilization, response time, average number of requests |
1618 and throughput for a M/M/1 queue. | |
1619 | |
1620 <p><strong>INPUTS</strong> | |
1621 | |
1622 <dl> | |
1623 <dt><var>lambda</var><dd>Arrival rate (<var>lambda</var><code> > 0</code>). | |
1624 | |
1625 <br><dt><var>mu</var><dd>Service rate (<var>mu</var><code> > </code><var>lambda</var>). | |
1626 | |
1627 </dl> | |
1628 | |
1629 <p><strong>OUTPUTS</strong> | |
1630 | |
1631 <dl> | |
1632 <dt><var>U</var><dd>Server utilization | |
1633 | |
1634 <br><dt><var>R</var><dd>Service center response time | |
1635 | |
1636 <br><dt><var>Q</var><dd>Average number of requests in the system | |
1637 | |
1638 <br><dt><var>X</var><dd>Service center throughput. If the system is ergodic, | |
1639 we will always have <var>X</var><code> = </code><var>lambda</var> | |
1640 | |
1641 <br><dt><var>p0</var><dd>Steady-state probability that there are no requests in the system. | |
1642 | |
1643 </dl> | |
1644 | |
1645 <p><var>lambda</var> and <var>mu</var> can be vectors of the same size. In this | |
1646 case, the results will be vectors as well. | |
1647 | |
1648 <pre class="sp"> | |
1649 | |
1650 </pre> | |
1651 <strong>See also:</strong> qnmmm, qnmminf, qnmmmk. | |
1652 | |
1653 </blockquote></div> | |
1654 | |
1655 <p class="noindent"><strong>REFERENCES</strong> | |
1656 | |
1657 <p class="noindent">G. Bolch, S. Greiner, H. de Meer and K. Trivedi, <cite>Queueing Networks | |
1658 and Markov Chains: Modeling and Performance Evaluation with Computer | |
1659 Science Applications</cite>, Wiley, 1998, Section 6.3. | |
1660 | |
9692 | 1661 <p><a name="index-Bolch_002c-G_002e-52"></a><a name="index-Greiner_002c-S_002e-53"></a><a name="index-de-Meer_002c-H_002e-54"></a><a name="index-Trivedi_002c-K_002e-55"></a> |
9391 | 1662 <!-- M/M/m --> |
1663 <div class="node"> | |
1664 <a name="The-M%2fM%2fm-System"></a> | |
1665 <a name="The-M_002fM_002fm-System"></a> | |
1666 <p><hr> | |
1667 Next: <a rel="next" accesskey="n" href="#The-M_002fM_002finf-System">The M/M/inf System</a>, | |
1668 Previous: <a rel="previous" accesskey="p" href="#The-M_002fM_002f1-System">The M/M/1 System</a>, | |
1669 Up: <a rel="up" accesskey="u" href="#Single-Station-Queueing-Systems">Single Station Queueing Systems</a> | |
1670 | |
1671 </div> | |
1672 | |
1673 <h3 class="section">5.2 The M/M/m System</h3> | |
1674 | |
1675 <p>The M/M/m system is similar to the M/M/1 system, except | |
1676 that there are m \geq 1 identical servers connected to a single | |
1677 queue. Thus, at most m requests can be served at the same | |
1678 time. The M/M/m system can be seen as a single server with | |
1679 load-dependent service rate \mu(n), which is a function of the | |
1680 number n of nodes in the center: | |
1681 | |
1682 <pre class="example"> <code>mu(n) = min(m,n)*mu</code> | |
1683 </pre> | |
1684 <p><a name="doc_002dqnmmm"></a> | |
1685 | |
1686 <div class="defun"> | |
9692 | 1687 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>p0</var>, <var>pm</var>] = <b>qnmmm</b> (<var>lambda, mu</var>)<var><a name="index-qnmmm-56"></a></var><br> |
1688 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>p0</var>, <var>pm</var>] = <b>qnmmm</b> (<var>lambda, mu, m</var>)<var><a name="index-qnmmm-57"></a></var><br> | |
9391 | 1689 <blockquote> |
9692 | 1690 <p><a name="index-g_t_0040math_007bM_002fM_002fm_007d-system-58"></a> |
9391 | 1691 Compute utilization, response time, average number of requests in |
1692 service and throughput for a M/M/m queue, a queueing | |
1693 system with m identical service centers connected to a single queue. | |
1694 | |
1695 <p><strong>INPUTS</strong> | |
1696 | |
1697 <dl> | |
1698 <dt><var>lambda</var><dd>Arrival rate (<var>lambda</var><code>>0</code>). | |
1699 | |
1700 <br><dt><var>mu</var><dd>Service rate (<var>mu</var><code>></code><var>lambda</var>). | |
1701 | |
1702 <br><dt><var>m</var><dd>Number of servers (<var>m</var><code> ≥ 1</code>). | |
1703 If omitted, it is assumed <var>m</var><code>=1</code>. | |
1704 | |
1705 </dl> | |
1706 | |
1707 <p><strong>OUTPUTS</strong> | |
1708 | |
1709 <dl> | |
1710 <dt><var>U</var><dd>Service center utilization, U = \lambda / (m \mu). | |
1711 | |
1712 <br><dt><var>R</var><dd>Service center response time | |
1713 | |
1714 <br><dt><var>Q</var><dd>Average number of requests in the system | |
1715 | |
1716 <br><dt><var>X</var><dd>Service center throughput. If the system is ergodic, | |
1717 we will always have <var>X</var><code> = </code><var>lambda</var> | |
1718 | |
1719 <br><dt><var>p0</var><dd>Steady-state probability that there are 0 requests in the system | |
1720 | |
1721 <br><dt><var>pm</var><dd>Steady-state probability that an arriving request has to wait in the | |
1722 queue | |
1723 | |
1724 </dl> | |
1725 | |
1726 <p><var>lambda</var>, <var>mu</var> and <var>m</var> can be vectors of the same size. In this | |
1727 case, the results will be vectors as well. | |
1728 | |
1729 <pre class="sp"> | |
1730 | |
1731 </pre> | |
1732 <strong>See also:</strong> qnmm1,qnmminf,qnmmmk. | |
1733 | |
1734 </blockquote></div> | |
1735 | |
1736 <p class="noindent"><strong>REFERENCES</strong> | |
1737 | |
1738 <p class="noindent">G. Bolch, S. Greiner, H. de Meer and K. Trivedi, <cite>Queueing Networks | |
1739 and Markov Chains: Modeling and Performance Evaluation with Computer | |
1740 Science Applications</cite>, Wiley, 1998, Section 6.5. | |
1741 | |
9692 | 1742 <p><a name="index-Bolch_002c-G_002e-59"></a><a name="index-Greiner_002c-S_002e-60"></a><a name="index-de-Meer_002c-H_002e-61"></a><a name="index-Trivedi_002c-K_002e-62"></a> |
9391 | 1743 <!-- M/M/inf --> |
1744 <div class="node"> | |
1745 <a name="The-M%2fM%2finf-System"></a> | |
1746 <a name="The-M_002fM_002finf-System"></a> | |
1747 <p><hr> | |
1748 Next: <a rel="next" accesskey="n" href="#The-M_002fM_002f1_002fK-System">The M/M/1/K System</a>, | |
1749 Previous: <a rel="previous" accesskey="p" href="#The-M_002fM_002fm-System">The M/M/m System</a>, | |
1750 Up: <a rel="up" accesskey="u" href="#Single-Station-Queueing-Systems">Single Station Queueing Systems</a> | |
1751 | |
1752 </div> | |
1753 | |
1754 <h3 class="section">5.3 The M/M/inf System</h3> | |
1755 | |
1756 <p>The M/M/\infty system is similar to the M/M/m system, | |
1757 except that there are infinitely many identical servers (that is, | |
1758 m = \infty). Each new request is assigned to a new server, so | |
1759 that queueing never occurs. The M/M/\infty system is always | |
1760 stable. | |
1761 | |
1762 <p><a name="doc_002dqnmminf"></a> | |
1763 | |
1764 <div class="defun"> | |
9692 | 1765 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>p0</var>] = <b>qnmminf</b> (<var>lambda, mu</var>)<var><a name="index-qnmminf-63"></a></var><br> |
9391 | 1766 <blockquote> |
1767 <p>Compute utilization, response time, average number of requests and | |
1768 throughput for a M/M/\infty queue. This is a system with an | |
1769 infinite number of identical servers. Note that a M/M/\infty | |
1770 system is always stable, regardless the values of the arrival and | |
1771 service rates. | |
1772 | |
9692 | 1773 <p><a name="index-g_t_0040math_007bM_002fM_002f_007dinf-system-64"></a> |
9391 | 1774 |
1775 <p><strong>INPUTS</strong> | |
1776 | |
1777 <dl> | |
1778 <dt><var>lambda</var><dd>Arrival rate (<var>lambda</var><code>>0</code>). | |
1779 | |
1780 <br><dt><var>mu</var><dd>Service rate (<var>mu</var><code>>0</code>). | |
1781 | |
1782 </dl> | |
1783 | |
1784 <p><strong>OUTPUTS</strong> | |
1785 | |
1786 <dl> | |
1787 <dt><var>U</var><dd>Traffic intensity (defined as \lambda/\mu). Note that this is | |
1788 different from the utilization, which in the case of M/M/\infty | |
1789 centers is always zero. | |
1790 | |
9692 | 1791 <p><a name="index-traffic-intensity-65"></a> |
9391 | 1792 <br><dt><var>R</var><dd>Service center response time. |
1793 | |
1794 <br><dt><var>Q</var><dd>Average number of requests in the system (which is equal to the | |
1795 traffic intensity \lambda/\mu). | |
1796 | |
1797 <br><dt><var>X</var><dd>Throughput (which is always equal to <var>X</var><code> = </code><var>lambda</var>). | |
1798 | |
1799 <br><dt><var>p0</var><dd>Steady-state probability that there are no requests in the system | |
1800 | |
1801 </dl> | |
1802 | |
1803 <p><var>lambda</var> and <var>mu</var> can be vectors of the same size. In this | |
1804 case, the results will be vectors as well. | |
1805 | |
1806 <pre class="sp"> | |
1807 | |
1808 </pre> | |
1809 <strong>See also:</strong> qnmm1,qnmmm,qnmmmk. | |
1810 | |
1811 </blockquote></div> | |
1812 | |
1813 <p class="noindent"><strong>REFERENCES</strong> | |
1814 | |
1815 <p class="noindent">G. Bolch, S. Greiner, H. de Meer and K. Trivedi, <cite>Queueing Networks | |
1816 and Markov Chains: Modeling and Performance Evaluation with Computer | |
1817 Science Applications</cite>, Wiley, 1998, Section 6.4. | |
1818 | |
9692 | 1819 <p><a name="index-Bolch_002c-G_002e-66"></a><a name="index-Greiner_002c-S_002e-67"></a><a name="index-de-Meer_002c-H_002e-68"></a><a name="index-Trivedi_002c-K_002e-69"></a> |
9391 | 1820 <!-- M/M/1/k --> |
1821 <div class="node"> | |
1822 <a name="The-M%2fM%2f1%2fK-System"></a> | |
1823 <a name="The-M_002fM_002f1_002fK-System"></a> | |
1824 <p><hr> | |
1825 Next: <a rel="next" accesskey="n" href="#The-M_002fM_002fm_002fK-System">The M/M/m/K System</a>, | |
1826 Previous: <a rel="previous" accesskey="p" href="#The-M_002fM_002finf-System">The M/M/inf System</a>, | |
1827 Up: <a rel="up" accesskey="u" href="#Single-Station-Queueing-Systems">Single Station Queueing Systems</a> | |
1828 | |
1829 </div> | |
1830 | |
1831 <h3 class="section">5.4 The M/M/1/K System</h3> | |
1832 | |
1833 <p>In a M/M/1/K finite capacity system there can be at most | |
1834 k jobs at any time. If a new request tries to join the system | |
1835 when there are already K other requests, the arriving request | |
1836 is lost. The queue has K-1 slots. The M/M/1/K system is | |
1837 always stable, regardless of the arrival and service rates | |
1838 \lambda and \mu. | |
1839 | |
1840 <p><a name="doc_002dqnmm1k"></a> | |
1841 | |
1842 <div class="defun"> | |
9692 | 1843 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>p0</var>, <var>pK</var>] = <b>qnmm1k</b> (<var>lambda, mu, K</var>)<var><a name="index-qnmm1k-70"></a></var><br> |
9391 | 1844 <blockquote> |
9692 | 1845 <p><a name="index-g_t_0040math_007bM_002fM_002f1_002fK_007d-system-71"></a> |
9391 | 1846 Compute utilization, response time, average number of requests and |
1847 throughput for a M/M/1/K finite capacity system. In a | |
1848 M/M/1/K queue there is a single server; the maximum number of | |
1849 requests in the system is K, and the maximum queue length is | |
1850 K-1. | |
1851 | |
1852 <p><strong>INPUTS</strong> | |
1853 | |
1854 <dl> | |
1855 <dt><var>lambda</var><dd>Arrival rate (<var>lambda</var><code>>0</code>). | |
1856 | |
1857 <br><dt><var>mu</var><dd>Service rate (<var>mu</var><code>>0</code>). | |
1858 | |
1859 <br><dt><var>K</var><dd>Maximum number of requests allowed in the system (<var>K</var><code> ≥ 1</code>). | |
1860 | |
1861 </dl> | |
1862 | |
1863 <p><strong>OUTPUTS</strong> | |
1864 | |
1865 <dl> | |
1866 <dt><var>U</var><dd>Service center utilization, which is defined as <var>U</var><code> = 1-</code><var>p0</var> | |
1867 | |
1868 <br><dt><var>R</var><dd>Service center response time | |
1869 | |
1870 <br><dt><var>Q</var><dd>Average number of requests in the system | |
1871 | |
1872 <br><dt><var>X</var><dd>Service center throughput | |
1873 | |
1874 <br><dt><var>p0</var><dd>Steady-state probability that there are no requests in the system | |
1875 | |
1876 <br><dt><var>pK</var><dd>Steady-state probability that there are K requests in the system | |
1877 (i.e., that the system is full) | |
1878 | |
1879 </dl> | |
1880 | |
1881 <p><var>lambda</var>, <var>mu</var> and <var>K</var> can be vectors of the | |
1882 same size. In this case, the results will be vectors as well. | |
1883 | |
1884 <pre class="sp"> | |
1885 | |
1886 </pre> | |
1887 <strong>See also:</strong> qnmm1,qnmminf,qnmmm. | |
1888 | |
1889 </blockquote></div> | |
1890 | |
1891 <!-- M/M/m/k --> | |
1892 <div class="node"> | |
1893 <a name="The-M%2fM%2fm%2fK-System"></a> | |
1894 <a name="The-M_002fM_002fm_002fK-System"></a> | |
1895 <p><hr> | |
1896 Next: <a rel="next" accesskey="n" href="#The-Asymmetric-M_002fM_002fm-System">The Asymmetric M/M/m System</a>, | |
1897 Previous: <a rel="previous" accesskey="p" href="#The-M_002fM_002f1_002fK-System">The M/M/1/K System</a>, | |
1898 Up: <a rel="up" accesskey="u" href="#Single-Station-Queueing-Systems">Single Station Queueing Systems</a> | |
1899 | |
1900 </div> | |
1901 | |
1902 <h3 class="section">5.5 The M/M/m/K System</h3> | |
1903 | |
1904 <p>The M/M/m/K finite capacity system is similar to the | |
1905 M/M/1/k system except that the number of servers is m, | |
1906 where 1 \leq m \leq K. The queue is made of K-m | |
1907 slots. The M/M/m/K system is always stable. | |
1908 | |
1909 <p><a name="doc_002dqnmmmk"></a> | |
1910 | |
1911 <div class="defun"> | |
9692 | 1912 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>p0</var>, <var>pK</var>] = <b>qnmmmk</b> (<var>lambda, mu, m, K</var>)<var><a name="index-qnmmmk-72"></a></var><br> |
9391 | 1913 <blockquote> |
9692 | 1914 <p><a name="index-g_t_0040math_007bM_002fM_002fm_002fK_007d-system-73"></a> |
9391 | 1915 Compute utilization, response time, average number of requests and |
1916 throughput for a M/M/m/K finite capacity system. In a | |
1917 M/M/m/K system there are m \geq 1 identical service | |
1918 centers sharing a fixed-capacity queue. At any time, at most K ≥ m requests can be in the system. The maximum queue length | |
1919 is K-m. This function generates and | |
1920 solves the underlying CTMC. | |
1921 | |
1922 <p><strong>INPUTS</strong> | |
1923 | |
1924 <dl> | |
1925 <dt><var>lambda</var><dd>Arrival rate (<var>lambda</var><code>>0</code>). | |
1926 | |
1927 <br><dt><var>mu</var><dd>Service rate (<var>mu</var><code>>0</code>). | |
1928 | |
1929 <br><dt><var>m</var><dd>Number of servers (<var>m</var><code> ≥ 1</code>). | |
1930 | |
1931 <br><dt><var>K</var><dd>Maximum number of requests allowed in the system, | |
1932 including those inside the service centers | |
1933 (<var>K</var><code> ≥ </code><var>m</var>). | |
1934 | |
1935 </dl> | |
1936 | |
1937 <p><strong>OUTPUTS</strong> | |
1938 | |
1939 <dl> | |
1940 <dt><var>U</var><dd>Service center utilization | |
1941 | |
1942 <br><dt><var>R</var><dd>Service center response time | |
1943 | |
1944 <br><dt><var>Q</var><dd>Average number of requests in the system | |
1945 | |
1946 <br><dt><var>X</var><dd>Service center throughput | |
1947 | |
1948 <br><dt><var>p0</var><dd>Steady-state probability that there are no requests in the system. | |
1949 | |
1950 <br><dt><var>pK</var><dd>Steady-state probability that there are <var>K</var> requests in the system | |
1951 (i.e., probability that the system is full). | |
1952 | |
1953 </dl> | |
1954 | |
1955 <p><var>lambda</var>, <var>mu</var>, <var>m</var> and <var>K</var> can be either scalars, or | |
1956 vectors of the same size. In this case, the results will be vectors | |
1957 as well. | |
1958 | |
1959 <pre class="sp"> | |
1960 | |
1961 </pre> | |
1962 <strong>See also:</strong> qnmm1,qnmminf,qnmmm. | |
1963 | |
1964 </blockquote></div> | |
1965 | |
1966 <p class="noindent"><strong>REFERENCES</strong> | |
1967 | |
1968 <p class="noindent">G. Bolch, S. Greiner, H. de Meer and K. Trivedi, <cite>Queueing Networks | |
1969 and Markov Chains: Modeling and Performance Evaluation with Computer | |
1970 Science Applications</cite>, Wiley, 1998, Section 6.6. | |
1971 | |
9692 | 1972 <p><a name="index-Bolch_002c-G_002e-74"></a><a name="index-Greiner_002c-S_002e-75"></a><a name="index-de-Meer_002c-H_002e-76"></a><a name="index-Trivedi_002c-K_002e-77"></a> |
9391 | 1973 |
1974 <!-- Approximate M/M/m --> | |
1975 <div class="node"> | |
1976 <a name="The-Asymmetric-M%2fM%2fm-System"></a> | |
1977 <a name="The-Asymmetric-M_002fM_002fm-System"></a> | |
1978 <p><hr> | |
1979 Next: <a rel="next" accesskey="n" href="#The-M_002fG_002f1-System">The M/G/1 System</a>, | |
1980 Previous: <a rel="previous" accesskey="p" href="#The-M_002fM_002fm_002fK-System">The M/M/m/K System</a>, | |
1981 Up: <a rel="up" accesskey="u" href="#Single-Station-Queueing-Systems">Single Station Queueing Systems</a> | |
1982 | |
1983 </div> | |
1984 | |
1985 <h3 class="section">5.6 The Asymmetric M/M/m System</h3> | |
1986 | |
1987 <p>The Asymmetric M/M/m system contains m servers connected | |
1988 to a single queue. Differently from the M/M/m system, in the | |
1989 asymmetric M/M/m each server may have a different service time. | |
1990 | |
1991 <p><a name="doc_002dqnammm"></a> | |
1992 | |
1993 <div class="defun"> | |
9692 | 1994 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnammm</b> (<var>lambda, mu</var>)<var><a name="index-qnammm-78"></a></var><br> |
9391 | 1995 <blockquote> |
9692 | 1996 <p><a name="index-Asymmetric-_0040math_007bM_002fM_002fm_007d-system-79"></a> |
9391 | 1997 Compute <em>approximate</em> utilization, response time, average number |
1998 of requests in service and throughput for an asymmetric M/M/m | |
1999 queue. In this system there are m different service centers | |
2000 connected to a single queue. Each server has its own (possibly different) | |
2001 service rate. If there is more than one server available, requests | |
2002 are routed to a randomly-chosen one. | |
2003 | |
2004 <p><strong>INPUTS</strong> | |
2005 | |
2006 <dl> | |
2007 <dt><var>lambda</var><dd>Arrival rate (<var>lambda</var><code>>0</code>). | |
2008 | |
2009 <br><dt><var>mu</var><dd><var>mu</var><code>(i)</code> is the service rate of server | |
2010 i, 1 ≤ i ≤ m. | |
2011 The system must be ergodic (<var>lambda</var><code> < sum(</code><var>mu</var><code>)</code>). | |
2012 | |
2013 </dl> | |
2014 | |
2015 <p><strong>OUTPUTS</strong> | |
2016 | |
2017 <dl> | |
2018 <dt><var>U</var><dd>Approximate service center utilization, | |
2019 U = \lambda / ( \sum_i \mu_i ). | |
2020 | |
2021 <br><dt><var>R</var><dd>Approximate service center response time | |
2022 | |
2023 <br><dt><var>Q</var><dd>Approximate number of requests in the system | |
2024 | |
2025 <br><dt><var>X</var><dd>Approximate service center throughput. If the system is ergodic, | |
2026 we will always have <var>X</var><code> = </code><var>lambda</var> | |
2027 | |
2028 </dl> | |
2029 | |
2030 <pre class="sp"> | |
2031 | |
2032 </pre> | |
2033 <strong>See also:</strong> qnmmm. | |
2034 | |
2035 </blockquote></div> | |
2036 | |
2037 <p class="noindent"><strong>REFERENCES</strong> | |
2038 | |
2039 <p class="noindent">G. Bolch, S. Greiner, H. de Meer and K. Trivedi, <cite>Queueing Networks | |
2040 and Markov Chains: Modeling and Performance Evaluation with Computer | |
2041 Science Applications</cite>, Wiley, 1998 | |
2042 | |
9692 | 2043 <p><a name="index-Bolch_002c-G_002e-80"></a><a name="index-Greiner_002c-S_002e-81"></a><a name="index-de-Meer_002c-H_002e-82"></a><a name="index-Trivedi_002c-K_002e-83"></a> |
9391 | 2044 <div class="node"> |
2045 <a name="The-M%2fG%2f1-System"></a> | |
2046 <a name="The-M_002fG_002f1-System"></a> | |
2047 <p><hr> | |
2048 Next: <a rel="next" accesskey="n" href="#The-M_002fHm_002f1-System">The M/Hm/1 System</a>, | |
2049 Previous: <a rel="previous" accesskey="p" href="#The-Asymmetric-M_002fM_002fm-System">The Asymmetric M/M/m System</a>, | |
2050 Up: <a rel="up" accesskey="u" href="#Single-Station-Queueing-Systems">Single Station Queueing Systems</a> | |
2051 | |
2052 </div> | |
2053 | |
2054 <h3 class="section">5.7 The M/G/1 System</h3> | |
2055 | |
2056 <p><a name="doc_002dqnmg1"></a> | |
2057 | |
2058 <div class="defun"> | |
9692 | 2059 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>p0</var>] = <b>qnmg1</b> (<var>lambda, xavg, x2nd</var>)<var><a name="index-qnmg1-84"></a></var><br> |
9391 | 2060 <blockquote> |
9692 | 2061 <p><a name="index-g_t_0040math_007bM_002fG_002f1_007d-system-85"></a> |
9391 | 2062 Compute utilization, response time, average number of requests and |
2063 throughput for a M/G/1 system. The service time distribution | |
2064 is described by its mean <var>xavg</var>, and by its second moment | |
2065 <var>x2nd</var>. The computations are based on results from L. Kleinrock, | |
2066 <cite>Queuing Systems</cite>, Wiley, Vol 2, and Pollaczek-Khinchine formula. | |
2067 | |
2068 <p><strong>INPUTS</strong> | |
2069 | |
2070 <dl> | |
2071 <dt><var>lambda</var><dd>Arrival rate. | |
2072 | |
2073 <br><dt><var>xavg</var><dd>Average service time | |
2074 | |
2075 <br><dt><var>x2nd</var><dd>Second moment of service time distribution | |
2076 | |
2077 </dl> | |
2078 | |
2079 <p><strong>OUTPUTS</strong> | |
2080 | |
2081 <dl> | |
2082 <dt><var>U</var><dd>Service center utilization | |
2083 | |
2084 <br><dt><var>R</var><dd>Service center response time | |
2085 | |
2086 <br><dt><var>Q</var><dd>Average number of requests in the system | |
2087 | |
2088 <br><dt><var>X</var><dd>Service center throughput | |
2089 | |
2090 <br><dt><var>p0</var><dd>probability that there is not any request at system | |
2091 | |
2092 </dl> | |
2093 | |
2094 <p><var>lambda</var>, <var>xavg</var>, <var>t2nd</var> can be vectors of the | |
2095 same size. In this case, the results will be vectors as well. | |
2096 | |
2097 <pre class="sp"> | |
2098 | |
2099 </pre> | |
2100 <strong>See also:</strong> qnmh1. | |
2101 | |
2102 </blockquote></div> | |
2103 | |
2104 <div class="node"> | |
2105 <a name="The-M%2fHm%2f1-System"></a> | |
2106 <a name="The-M_002fHm_002f1-System"></a> | |
2107 <p><hr> | |
2108 Previous: <a rel="previous" accesskey="p" href="#The-M_002fG_002f1-System">The M/G/1 System</a>, | |
2109 Up: <a rel="up" accesskey="u" href="#Single-Station-Queueing-Systems">Single Station Queueing Systems</a> | |
2110 | |
2111 </div> | |
2112 | |
2113 <h3 class="section">5.8 The M/H_m/1 System</h3> | |
2114 | |
2115 <p><a name="doc_002dqnmh1"></a> | |
2116 | |
2117 <div class="defun"> | |
9692 | 2118 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>p0</var>] = <b>qnmh1</b> (<var>lambda, mu, alpha</var>)<var><a name="index-qnmh1-86"></a></var><br> |
9391 | 2119 <blockquote> |
9692 | 2120 <p><a name="index-g_t_0040math_007bM_002fH_005fm_002f1_007d-system-87"></a> |
9391 | 2121 Compute utilization, response time, average number of requests and |
2122 throughput for a M/H_m/1 system. In this system, the customer | |
2123 service times have hyper-exponential distribution: | |
2124 | |
2125 <pre class="example"> ___ m | |
2126 \ | |
2127 B(x) = > alpha(j) * (1-exp(-mu(j)*x)) x>0 | |
2128 /__ | |
2129 j=1 | |
2130 </pre> | |
2131 <p>where \alpha_j is the probability that the request is served | |
2132 at phase j, in which case the average service rate is | |
2133 \mu_j. After completing service at phase j, for | |
2134 some j, the request exits the system. | |
2135 | |
2136 <p><strong>INPUTS</strong> | |
2137 | |
2138 <dl> | |
2139 <dt><var>lambda</var><dd>Arrival rate. | |
2140 | |
2141 <br><dt><var>mu</var><dd><var>mu</var><code>(j)</code> is the phase j service rate. The total | |
2142 number of phases m is <code>length(</code><var>mu</var><code>)</code>. | |
2143 | |
2144 <br><dt><var>alpha</var><dd><var>alpha</var><code>(j)</code> is the probability that a request | |
2145 is served at phase j. <var>alpha</var> must have the same size | |
2146 as <var>mu</var>. | |
2147 | |
2148 </dl> | |
2149 | |
2150 <p><strong>OUTPUTS</strong> | |
2151 | |
2152 <dl> | |
2153 <dt><var>U</var><dd>Service center utilization | |
2154 | |
2155 <br><dt><var>R</var><dd>Service center response time | |
2156 | |
2157 <br><dt><var>Q</var><dd>Average number of requests in the system | |
2158 | |
2159 <br><dt><var>X</var><dd>Service center throughput | |
2160 | |
2161 </dl> | |
2162 | |
2163 <!-- @seealso{qnmhr1} --> | |
2164 </blockquote></div> | |
2165 | |
2166 <!-- DO NOT EDIT! Generated automatically by munge-texi. --> | |
2167 <!-- *- texinfo -*- --> | |
2168 <!-- Copyright (C) 2008, 2009, 2010, 2011, 2012 Moreno Marzolla --> | |
2169 <!-- This file is part of the queueing toolbox, a Queueing Networks --> | |
2170 <!-- analysis package for GNU Octave. --> | |
2171 <!-- The queueing toolbox is free software; you can redistribute it --> | |
2172 <!-- and/or modify it under the terms of the GNU General Public License --> | |
2173 <!-- as published by the Free Software Foundation; either version 3 of --> | |
2174 <!-- the License, or (at your option) any later version. --> | |
2175 <!-- The queueing toolbox is distributed in the hope that it will be --> | |
2176 <!-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty --> | |
2177 <!-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --> | |
2178 <!-- GNU General Public License for more details. --> | |
2179 <!-- You should have received a copy of the GNU General Public License --> | |
2180 <!-- along with the queueing toolbox; see the file COPYING. If not, see --> | |
2181 <!-- <http://www.gnu.org/licenses/>. --> | |
2182 <div class="node"> | |
2183 <a name="Queueing-Networks"></a> | |
2184 <p><hr> | |
2185 Next: <a rel="next" accesskey="n" href="#Contributing-Guidelines">Contributing Guidelines</a>, | |
2186 Previous: <a rel="previous" accesskey="p" href="#Single-Station-Queueing-Systems">Single Station Queueing Systems</a>, | |
2187 Up: <a rel="up" accesskey="u" href="#Top">Top</a> | |
2188 | |
2189 </div> | |
2190 | |
2191 <h2 class="chapter">6 Queueing Networks</h2> | |
2192 | |
2193 <ul class="menu"> | |
2194 <li><a accesskey="1" href="#Introduction-to-QNs">Introduction to QNs</a>: A brief introduction to Queueing Networks. | |
2195 <li><a accesskey="2" href="#Generic-Algorithms">Generic Algorithms</a>: High-level functions for QN analysis | |
2196 <li><a accesskey="3" href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a>: Functions to analyze product-form QNs | |
2197 <li><a accesskey="4" href="#Algorithms-for-non-Product_002dform-QNs">Algorithms for non Product-form QNs</a>: Functions to analyze non product-form QNs | |
2198 <li><a accesskey="5" href="#Bounds-on-performance">Bounds on performance</a>: Functions to compute performance bounds | |
2199 <li><a accesskey="6" href="#Utility-functions">Utility functions</a>: Utility functions to compute miscellaneous quantities | |
2200 </ul> | |
2201 | |
9692 | 2202 <p><a name="index-queueing-networks-88"></a> |
9391 | 2203 <!-- INTRODUCTION --> |
2204 <div class="node"> | |
2205 <a name="Introduction-to-QNs"></a> | |
2206 <p><hr> | |
2207 Next: <a rel="next" accesskey="n" href="#Generic-Algorithms">Generic Algorithms</a>, | |
2208 Up: <a rel="up" accesskey="u" href="#Queueing-Networks">Queueing Networks</a> | |
2209 | |
2210 </div> | |
2211 | |
2212 <h3 class="section">6.1 Introduction to QNs</h3> | |
2213 | |
2214 <p>Queueing Networks (QN) are a very simple yet powerful modeling tool | |
2215 which is used to analyze many kind of systems. In its simplest form, a | |
2216 QN is made of K service centers. Each service center i | |
2217 has a queue, which is connected to m_i (generally identical) | |
2218 <em>servers</em>. Customers (or requests) arrive at the service center, | |
2219 and join the queue if there is a slot available. Then, requests are | |
2220 served according to a (de)queueing policy. After service completes, | |
2221 the requests leave the service center. | |
2222 | |
2223 <p>The service centers for which m_i = \infty are called | |
2224 <em>delay centers</em> or <em>infinite servers</em>. If a service center | |
2225 has infinite servers, of course each new request will find one server | |
2226 available, so there will never be queueing. | |
2227 | |
2228 <p>Requests join the queue according to a <em>queueing policy</em>, such as: | |
2229 | |
2230 <dl> | |
2231 <dt><strong>FCFS</strong><dd>First-Come-First-Served | |
2232 | |
2233 <br><dt><strong>LCFS-PR</strong><dd>Last-Come-First-Served, Preemptive Resume | |
2234 | |
2235 <br><dt><strong>PS</strong><dd>Processor Sharing | |
2236 | |
2237 <br><dt><strong>IS</strong><dd>Infinite Server, there is an infinite number of identical servers so | |
2238 that each request always finds a server available, and there is no | |
2239 queueing | |
2240 | |
2241 </dl> | |
2242 | |
2243 <p>A population of <em>requests</em> or <em>customers</em> arrives to the | |
2244 system system, requesting service to the service centers. The request | |
2245 population may be <em>open</em> or <em>closed</em>. In open systems there | |
2246 is an infinite population of requests. New customers arrive from | |
2247 outside the system, and eventually leave the system. In closed systems | |
2248 there is a fixed population of request which continuously interacts | |
2249 with the system. | |
2250 | |
2251 <p>There might be a single class of requests, meaning that all requests | |
2252 behave in the same way (e.g., they spend the same average time on each | |
2253 particular server), or there might be multiple classes of requests. | |
2254 | |
2255 <h4 class="subsection">6.1.1 Single class models</h4> | |
2256 | |
2257 <p>In single class models, all requests are indistinguishable and belong to | |
2258 the same class. This means that every request has the same average | |
2259 service time, and all requests move through the system with the same | |
2260 routing probabilities. | |
2261 | |
2262 <p class="noindent"><strong>Model Inputs</strong> | |
2263 | |
2264 <dl> | |
2265 <dt>\lambda_i<dd>External arrival rate to service center i. | |
2266 | |
2267 <br><dt>\lambda<dd>Overall external arrival rate to the whole system: \lambda = | |
2268 \sum_i \lambda_i. | |
2269 | |
2270 <br><dt>S_i<dd>Average service time. S_i is the average service time on service | |
2271 center i. In other words, S_i is the average time from the | |
2272 instant in which a request is extracted from the queue and starts being | |
2273 service, and the instant at which service finishes and the request moves | |
2274 to another queue (or exits the system). | |
2275 | |
2276 <br><dt>P_ij<dd>Routing probability matrix. \bf P = P_ij is a K \times | |
2277 K matrix such that P_ij is the probability that a request | |
2278 completing service at server i will move directly to server | |
2279 j, The probability that a request leaves the system after service | |
2280 at service center i is 1-\sum_j=1^K P_ij. | |
2281 | |
2282 <br><dt>V_i<dd>Average number of visits. V_i is the average number of visits to | |
2283 the service center i. This quantity will be described shortly. | |
2284 | |
2285 </dl> | |
2286 | |
2287 <p class="noindent"><strong>Model Outputs</strong> | |
2288 | |
2289 <dl> | |
2290 <dt>U_i<dd>Service center utilization. U_i is the utilization of service | |
2291 center i. The utilization is defined as the fraction of time in | |
2292 which the resource is busy (i.e., the server is processing requests). | |
2293 | |
2294 <br><dt>R_i<dd>Average response time. R_i is the average response time of | |
2295 service center i. The average response time is defined as the | |
2296 average time between the arrival of a customer in the queue, and the | |
2297 completion of service. | |
2298 | |
2299 <br><dt>Q_i<dd>Average number of customers. Q_i is the average number of | |
2300 requests in service center i. This includes both the requests in | |
2301 the queue, and the request being served. | |
2302 | |
2303 <br><dt>X_i<dd>Throughput. X_i is the throughput of service center i. | |
2304 The throughput is defined as the ratio of job completions (i.e., average | |
2305 number of jobs completed over a fixed interval of time). | |
2306 | |
2307 </dl> | |
2308 | |
2309 <p class="noindent">Given these output parameters, additional performance measures can | |
2310 be computed as follows: | |
2311 | |
2312 <dl> | |
2313 <dt>X<dd>System throughput, X = X_1 / V_1 | |
2314 | |
2315 <br><dt>R<dd>System response time, R = \sum_k=1^K R_k V_k | |
2316 | |
2317 <br><dt>Q<dd>Average number of requests in the system, Q = N-XZ | |
2318 | |
2319 </dl> | |
2320 | |
2321 <p>For open, single-class models, the scalar \lambda denotes the | |
2322 external arrival rate of requests to the system. The average number of | |
2323 visits satisfy the following equation: | |
2324 | |
2325 <pre class="example"> V == P0 + V*P; | |
2326 </pre> | |
2327 <p class="noindent">where P_0 j is the probability that an external | |
2328 arrival goes to service center j. If \lambda_j is the | |
2329 external arrival rate to service center j, and \lambda = | |
2330 \sum_j \lambda_j is the overall external arrival rate, then | |
2331 P_0 j = \lambda_j / \lambda. | |
2332 | |
2333 <p>For closed models, the visit ratios satisfy the following equation: | |
2334 | |
2335 <pre class="example"> V(1) == 1 && V == V*P; | |
2336 </pre> | |
2337 <h4 class="subsection">6.1.2 Multiple class models</h4> | |
2338 | |
2339 <p>In multiple class QN models, we assume that there exist C | |
2340 different classes of requests. Each request from class c spends | |
2341 on average time S_ck in service at service center k. For | |
2342 open models, we denote with \bf \lambda = \lambda_ck the | |
2343 arrival rates, where \lambda_ck is the external arrival rate of | |
2344 class c customers at service center k. For closed models, | |
2345 we denote with \bf N = (N_1, N_2, \ldots N_C) the population | |
2346 vector, where N_c is the number of class c requests in the | |
2347 system. | |
2348 | |
2349 <p>The transition probability matrix for these kind of networks will be a | |
2350 C \times K \times C \times K matrix \bf P = | |
2351 P_risj such that P_risj is the probability that a | |
2352 class r request which completes service at center i will | |
2353 join server j as a class s request. | |
2354 | |
2355 <p>Model input and outputs can be adjusted by adding additional | |
2356 indexes for the customer classes. | |
2357 | |
2358 <p class="noindent"><strong>Model Inputs</strong> | |
2359 | |
2360 <dl> | |
2361 <dt>\lambda_ci<dd>External arrival rate of class-c requests to service center i | |
2362 | |
2363 <br><dt>\lambda<dd>Overall external arrival rate to the whole system: \lambda = \sum_c \sum_i \lambda_ci | |
2364 | |
2365 <br><dt>S_ci<dd>Average service time. S_ci is the average service time on service | |
2366 center i for class c requests. | |
2367 | |
2368 <br><dt>P_risj<dd>Routing probability matrix. \bf P = P_risj is a C | |
2369 \times K \times C \times K matrix such that P_risj is the | |
2370 probability that a class r request which completes service at | |
2371 server i will move to server j as a class s | |
2372 request. | |
2373 | |
2374 <br><dt>V_ci<dd>Average number of visits. V_ci is the average number of visits | |
2375 of class c requests to the service center i. | |
2376 | |
2377 </dl> | |
2378 | |
2379 <p class="noindent"><strong>Model Outputs</strong> | |
2380 | |
2381 <dl> | |
2382 <dt>U_ci<dd>Utilization of service center i by class c requests. The | |
2383 utilization is defined as the fraction of time in which the resource is | |
2384 busy (i.e., the server is processing requests). | |
2385 | |
2386 <br><dt>R_ci<dd>Average response time experienced by class c requests on service | |
2387 center i. The average response time is defined as the average | |
2388 time between the arrival of a customer in the queue, and the completion | |
2389 of service. | |
2390 | |
2391 <br><dt>Q_ci<dd>Average number of class c requests on service center | |
2392 i. This includes both the requests in the queue, and the request | |
2393 being served. | |
2394 | |
2395 <br><dt>X_ci<dd>Throughput of service center i for class c requests. The | |
2396 throughput is defined as the rate of completion of class c | |
2397 requests. | |
2398 | |
2399 </dl> | |
2400 | |
2401 <p class="noindent">It is possible to define aggregate performance measures as follows: | |
2402 | |
2403 <dl> | |
2404 <dt>U_i<dd>Utilization of service center i: | |
2405 <code>Ui = sum(U,1);</code> | |
2406 | |
2407 <br><dt>R_c<dd>System response time for class c requests: | |
2408 <code>Rc = sum( V.*R, 1 );</code> | |
2409 | |
2410 <br><dt>Q_c<dd>Average number of class c requests in the system: | |
2411 <code>Qc = sum( Q, 2 );</code> | |
2412 | |
2413 <br><dt>X_c<dd>Class c throughput: | |
2414 <code>Xc = X(:,1) ./ V(:,1);</code> | |
2415 | |
2416 </dl> | |
2417 | |
2418 <p>We can define the visit ratios V_sj for class s | |
2419 customers at service center j as follows: | |
2420 | |
2421 <p>V_sj = sum_r sum_i V_ri P_risj, for all s,j | |
2422 | |
2423 <p class="noindent">while for open networks: | |
2424 | |
2425 <p>V_sj = P_0sj + sum_r sum_i V_ri P_risj, for all s,j | |
2426 | |
2427 <p class="noindent">where P_0sj is the probability that an external | |
2428 arrival goes to service center j as a class-s request. | |
2429 If \lambda_sj is the external arrival rate of class s | |
2430 requests to service center j, and \lambda = \sum_s \sum_j | |
2431 \lambda_sj is the overall external arrival rate to the whole system, | |
2432 then P_0sj = \lambda_sj / \lambda. | |
2433 | |
2434 <div class="node"> | |
2435 <a name="Generic-Algorithms"></a> | |
2436 <p><hr> | |
2437 Next: <a rel="next" accesskey="n" href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a>, | |
2438 Previous: <a rel="previous" accesskey="p" href="#Introduction-to-QNs">Introduction to QNs</a>, | |
2439 Up: <a rel="up" accesskey="u" href="#Queueing-Networks">Queueing Networks</a> | |
2440 | |
2441 </div> | |
2442 | |
2443 <h3 class="section">6.2 Generic Algorithms</h3> | |
2444 | |
2445 <p>The <code>queueing</code> package provides a couple of high-level functions | |
2446 for defining and solving QN models. These functions can be used to | |
2447 define a open or closed QN model (with single or multiple job | |
2448 classes), with arbitrary configuration and queueing disciplines. At | |
2449 the moment only product-form networks can be solved, See <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a>. | |
2450 | |
2451 <p>The network is defined by two parameters. The first one is the list of | |
2452 nodes, encoded as an Octave <em>cell array</em>. The second parameter is | |
2453 the visit ration <var>V</var>, which can be either a vector (for | |
2454 single-class models) or a two-dimensional matrix (for multiple-class | |
2455 models). | |
2456 | |
2457 <p>Individual nodes in the network are structures build using the | |
2458 <code>qnmknode</code> function. | |
2459 | |
2460 <p><a name="doc_002dqnmknode"></a> | |
2461 | |
2462 <div class="defun"> | |
9692 | 2463 — Function File: <var>Q</var> = <b>qnmknode</b> (<var>"m/m/m-fcfs", S</var>)<var><a name="index-qnmknode-89"></a></var><br> |
2464 — Function File: <var>Q</var> = <b>qnmknode</b> (<var>"m/m/m-fcfs", S, m</var>)<var><a name="index-qnmknode-90"></a></var><br> | |
2465 — Function File: <var>Q</var> = <b>qnmknode</b> (<var>"m/m/1-lcfs-pr", S</var>)<var><a name="index-qnmknode-91"></a></var><br> | |
2466 — Function File: <var>Q</var> = <b>qnmknode</b> (<var>"-/g/1-ps", S</var>)<var><a name="index-qnmknode-92"></a></var><br> | |
2467 — Function File: <var>Q</var> = <b>qnmknode</b> (<var>"-/g/1-ps", S, s2</var>)<var><a name="index-qnmknode-93"></a></var><br> | |
2468 — Function File: <var>Q</var> = <b>qnmknode</b> (<var>"-/g/inf", S</var>)<var><a name="index-qnmknode-94"></a></var><br> | |
2469 — Function File: <var>Q</var> = <b>qnmknode</b> (<var>"-/g/inf", S, s2</var>)<var><a name="index-qnmknode-95"></a></var><br> | |
9391 | 2470 <blockquote> |
2471 <p>Creates a node; this function can be used together with | |
2472 <code>qnsolve</code>. It is possible to create either single-class nodes | |
2473 (where there is only one customer class), or multiple-class nodes | |
2474 (where the service time is given per-class). Furthermore, it is | |
2475 possible to specify load-dependent service times. | |
2476 | |
2477 <p><strong>INPUTS</strong> | |
2478 | |
2479 <dl> | |
2480 <dt><var>S</var><dd>Average service time. S can be either a scalar, a row vector, | |
2481 a column vector or a two-dimensional matrix. | |
2482 | |
2483 <ul> | |
2484 <li>If S is a scalar, | |
2485 it is assumed to be a load-independent, class-independent service time. | |
2486 | |
2487 <li>If S is a column vector, then <var>S</var><code>(c)</code> is assumed to | |
2488 the the load-independent service time for class c customers. | |
2489 | |
2490 <li>If S is a row vector, then <var>S</var><code>(n)</code> is assumed to be | |
2491 the class-independent service time at the node, when there are n | |
2492 requests. | |
2493 | |
2494 <li>Finally, if <var>S</var> is a two-dimensional matrix, then | |
2495 <var>S</var><code>(c,n)</code> is assumed to be the class c service time | |
2496 when there are n requests at the node. | |
2497 | |
2498 </ul> | |
2499 | |
2500 <br><dt><var>m</var><dd>Number of identical servers at the node. Default is <var>m</var><code>=1</code>. | |
2501 | |
2502 <br><dt><var>s2</var><dd>Squared coefficient of variation for the service time. Default is 1.0. | |
2503 | |
2504 </dl> | |
2505 | |
2506 <p>The returned struct <var>Q</var> should be considered opaque to the client. | |
2507 | |
2508 <!-- The returned struct @var{Q} has the following fields: --> | |
2509 <!-- @table @var --> | |
2510 <!-- @item Q.node --> | |
2511 <!-- (String) type of the node; valid values are @code{"m/m/m-fcfs"}, --> | |
2512 <!-- @code{"-/g/1-lcfs-pr"}, @code{"-/g/1-ps"} (Processor-Sharing) --> | |
2513 <!-- and @code{"-/g/inf"} (Infinite Server, or delay center). --> | |
2514 <!-- @item Q.S --> | |
2515 <!-- Average service time. If @code{@var{Q}.S} is a vector, then --> | |
2516 <!-- @code{@var{Q}.S(i)} is the average service time at that node --> | |
2517 <!-- if there are @math{i} requests. --> | |
2518 <!-- @item Q.m --> | |
2519 <!-- Number of identical servers at a @code{"m/m/m-fcfs"}. Default is 1. --> | |
2520 <!-- @item Q.c --> | |
2521 <!-- Number of customer classes. Default is 1. --> | |
2522 <!-- @end table --> | |
2523 <pre class="sp"> | |
2524 | |
2525 </pre> | |
2526 <strong>See also:</strong> qnsolve. | |
2527 | |
2528 </blockquote></div> | |
2529 | |
2530 <p>After the network has been defined, it is possible to solve it using | |
2531 the <code>qnsolve</code> function. Note that this function is somewhat less | |
2532 efficient than those described in later sections, but | |
2533 generally easier to use. | |
2534 | |
2535 <p><a name="doc_002dqnsolve"></a> | |
2536 | |
2537 <div class="defun"> | |
9692 | 2538 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnsolve</b> (<var>"closed", N, QQ, V</var>)<var><a name="index-qnsolve-96"></a></var><br> |
2539 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnsolve</b> (<var>"closed", N, QQ, V, Z</var>)<var><a name="index-qnsolve-97"></a></var><br> | |
2540 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnsolve</b> (<var>"open", lambda, QQ, V</var>)<var><a name="index-qnsolve-98"></a></var><br> | |
2541 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnsolve</b> (<var>"mixed", lambda, N, QQ, V</var>)<var><a name="index-qnsolve-99"></a></var><br> | |
9391 | 2542 <blockquote> |
2543 <p>General evaluator of QN models. Networks can be open, | |
2544 closed or mixed; single as well as multiclass networks are supported. | |
2545 | |
2546 <ul> | |
2547 <li>For <strong>closed</strong> networks, the following server types are | |
2548 supported: M/M/m–FCFS, -/G/\infty, -/G/1–LCFS-PR, | |
2549 -/G/1–PS and load-dependent variants. | |
2550 | |
2551 <li>For <strong>open</strong> networks, the following server types are supported: | |
2552 M/M/m–FCFS, -/G/\infty and -/G/1–PS. General | |
2553 load-dependent nodes are <em>not</em> supported. Multiclass open networks | |
2554 do not support multiple server M/M/m nodes, but only | |
2555 single server M/M/1–FCFS. | |
2556 | |
2557 <li>For <strong>mixed</strong> networks, the following server types are supported: | |
2558 M/M/1–FCFS, -/G/\infty and -/G/1–PS. General | |
2559 load-dependent nodes are <em>not</em> supported. | |
2560 | |
2561 </ul> | |
2562 | |
2563 <p><strong>INPUTS</strong> | |
2564 | |
2565 <dl> | |
2566 <dt><var>N</var><dd>Number of requests in the system for closed networks. For | |
2567 single-class networks, <var>N</var> must be a scalar. For multiclass | |
2568 networks, <var>N</var><code>(c)</code> is the population size of closed class | |
2569 c. | |
2570 | |
2571 <br><dt><var>lambda</var><dd>External arrival rate (scalar) for open networks. For single-class | |
2572 networks, <var>lambda</var> must be a scalar. For multiclass networks, | |
2573 <var>lambda</var><code>(c)</code> is the class c overall arrival rate. | |
2574 | |
2575 <br><dt><var>QQ</var><dd>List of queues in the network. This must be a cell array | |
2576 with N elements, such that <var>QQ</var><code>{i}</code> is | |
2577 a struct produced by the <code>qnmknode</code> function. | |
2578 | |
2579 <br><dt><var>Z</var><dd>External delay ("think time") for closed networks. Default 0. | |
2580 | |
2581 </dl> | |
2582 | |
2583 <p><strong>OUTPUTS</strong> | |
2584 | |
2585 <dl> | |
2586 <dt><var>U</var><dd>If i is a FCFS node, then <var>U</var><code>(i)</code> is the utilization | |
2587 of service center i. If i is an IS node, then | |
2588 <var>U</var><code>(i)</code> is the <em>traffic intensity</em> defined as | |
2589 <var>X</var><code>(i)*</code><var>S</var><code>(i)</code>. | |
2590 | |
2591 <br><dt><var>R</var><dd><var>R</var><code>(i)</code> is the average response time of service center i. | |
2592 | |
2593 <br><dt><var>Q</var><dd><var>Q</var><code>(i)</code> is the average number of customers in service center | |
2594 i. | |
2595 | |
2596 <br><dt><var>X</var><dd><var>X</var><code>(i)</code> is the throughput of service center i. | |
2597 | |
2598 </dl> | |
2599 | |
2600 <p>Note that for multiclass networks, the computed results are per-class | |
2601 utilization, response time, number of customers and throughput: | |
2602 <var>U</var><code>(c,k)</code>, <var>R</var><code>(c,k)</code>, <var>Q</var><code>(c,k)</code>, | |
2603 <var>X</var><code>(c,k)</code>, | |
2604 | |
2605 </blockquote></div> | |
2606 | |
2607 <p class="noindent"><strong>EXAMPLE</strong> | |
2608 | |
2609 <p>Let us consider a closed, multiclass network with C=2 classes | |
2610 and K=3 service center. Let the population be M=(2, 1) | |
2611 (class 1 has 2 requests, and class 2 has 1 request). The nodes are as | |
2612 follows: | |
2613 | |
2614 <ul> | |
2615 <li>Node 1 is a M/M/1–FCFS node, with load-dependent service | |
2616 times. Service times are class-independent, and are defined by the | |
2617 matrix <code>[0.2 0.1 0.1; 0.2 0.1 0.1]</code>. Thus, <var>S</var><code>(1,2) = | |
2618 0.2</code> means that service time for class 1 customers where there are 2 | |
2619 requests in 0.2. Note that service times are class-independent; | |
2620 | |
2621 <li>Node 2 is a -/G/1–PS node, with service times | |
2622 S_12 = 0.4 for class 1, and S_22 = 0.6 for class 2 | |
2623 requests; | |
2624 | |
2625 <li>Node 3 is a -/G/\infty node (delay center), with service | |
2626 times S_13=1 and S_23=2 for class 1 and 2 | |
2627 respectively. | |
2628 | |
2629 </ul> | |
2630 | |
2631 <p>After defining the per-class visit count <var>V</var> such that | |
2632 <var>V</var><code>(c,k)</code> is the visit count of class c requests to | |
2633 service center k. We can define and solve the model as | |
2634 follows: | |
2635 | |
2636 <pre class="example"><pre class="verbatim"> QQ = { qnmknode( "m/m/m-fcfs", [0.2 0.1 0.1; 0.2 0.1 0.1] ), \ | |
2637 qnmknode( "-/g/1-ps", [0.4; 0.6] ), \ | |
2638 qnmknode( "-/g/inf", [1; 2] ) }; | |
2639 V = [ 1 0.6 0.4; \ | |
2640 1 0.3 0.7 ]; | |
2641 N = [ 2 1 ]; | |
2642 [U R Q X] = qnsolve( "closed", N, QQ, V );</pre></pre> | |
2643 <div class="node"> | |
2644 <a name="Algorithms-for-Product-Form-QNs"></a> | |
2645 <a name="Algorithms-for-Product_002dForm-QNs"></a> | |
2646 <p><hr> | |
2647 Next: <a rel="next" accesskey="n" href="#Algorithms-for-non-Product_002dform-QNs">Algorithms for non Product-form QNs</a>, | |
2648 Previous: <a rel="previous" accesskey="p" href="#Generic-Algorithms">Generic Algorithms</a>, | |
2649 Up: <a rel="up" accesskey="u" href="#Queueing-Networks">Queueing Networks</a> | |
2650 | |
2651 </div> | |
2652 | |
2653 <h3 class="section">6.3 Algorithms for Product-Form QNs</h3> | |
2654 | |
2655 <p>Product-form queueing networks fulfill the following assumptions: | |
2656 | |
2657 <ul> | |
2658 <li>The network can consist of open and closed job classes. | |
2659 | |
2660 <li>The following queueing disciplines are allowed: FCFS, PS, LCFS-PR and IS. | |
2661 | |
2662 <li>Service times for FCFS nodes must be exponentially distributed and | |
2663 class-independent. Service centers at PS, LCFS-PR and IS nodes can | |
2664 have any kind of service time distribution with a rational Laplace | |
2665 transform. Furthermore, for PS, LCFS-PR and IS nodes, different | |
2666 classes of customers can have different service times. | |
2667 | |
2668 <li>The service rate of an FCFS node is only allowed to depend on the | |
2669 number of jobs at this node; in a PS, LCFS-PR and IS node the service | |
2670 rate for a particular job class can also depend on the number of jobs | |
2671 of that class at the node. | |
2672 | |
2673 <li>In open networks two kinds of arrival processes are allowed: i) the | |
2674 arrival process is Poisson, with arrival rate \lambda which can | |
2675 depend on the number of jobs in the network. ii) the arrival process | |
2676 consists of U independent Poisson arrival streams where the | |
2677 U job sources are assigned to the U chains; the arrival | |
2678 rate can be load dependent. | |
2679 | |
2680 </ul> | |
2681 | |
2682 <!-- Jackson Networks --> | |
2683 <h4 class="subsection">6.3.1 Jackson Networks</h4> | |
2684 | |
2685 <p>Jackson networks satisfy the following conditions: | |
2686 | |
2687 <ul> | |
2688 <li>There is only one job class in the network; the overall number of jobs | |
2689 in the system is unlimited. | |
2690 | |
2691 <li>There are N service centers in the network. Each service center | |
2692 may have Poisson arrivals from outside the system. A job can leave | |
2693 the system from any node. | |
2694 | |
2695 <li>Arrival rates as well as routing probabilities are independent from | |
2696 the number of nodes in the network. | |
2697 | |
2698 <li>External arrivals and service times at the service centers are | |
2699 exponentially distributed, and in general can be load-dependent. | |
2700 | |
2701 <li>Service discipline at each node is FCFS | |
2702 | |
2703 </ul> | |
2704 | |
2705 <p>We define the <em>joint probability vector</em> \pi(k_1, k_2, | |
2706 \ldots k_N) as the steady-state probability that there are k_i | |
2707 requests at service center i, for all i=1,2, \ldots N. | |
2708 Jackson networks have the property that the joint probability is the | |
2709 product of the marginal probabilities \pi_i: | |
2710 | |
2711 <pre class="example"> <var>joint_prob</var> = prod( <var>pi</var> ) | |
2712 </pre> | |
2713 <p class="noindent">where \pi_i(k_i) is the steady-state probability | |
2714 that there are k_i requests at service center i. | |
2715 | |
2716 <p><a name="doc_002dqnjackson"></a> | |
2717 | |
2718 <div class="defun"> | |
9692 | 2719 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnjackson</b> (<var>lambda, S, P </var>)<var><a name="index-qnjackson-100"></a></var><br> |
2720 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnjackson</b> (<var>lambda, S, P, m </var>)<var><a name="index-qnjackson-101"></a></var><br> | |
2721 — Function File: <var>pr</var> = <b>qnjackson</b> (<var>lambda, S, P, m, k</var>)<var><a name="index-qnjackson-102"></a></var><br> | |
9391 | 2722 <blockquote> |
9692 | 2723 <p><a name="index-open-network_002c-single-class-103"></a><a name="index-Jackson-network-104"></a> |
9391 | 2724 With three or four input parameters, this function computes the |
2725 steady-state occupancy probabilities for a Jackson network. With five | |
2726 input parameters, this function computes the steady-state probability | |
2727 <var>pi</var><code>(j)</code> that there are <var>k</var><code>(j)</code> requests at | |
2728 service center j. | |
2729 | |
2730 <p>This function solves a subset of Jackson networks, with the | |
2731 following constraints: | |
2732 | |
2733 <ul> | |
2734 <li>External arrival rates are load-independent. | |
2735 | |
2736 <li>Service center i consists either of <var>m</var><code>(i) ≥ | |
2737 1</code> identical servers with individual average service time | |
2738 <var>S</var><code>(i)</code>, or of an Infinite Server (IS) node. | |
2739 | |
2740 </ul> | |
2741 | |
2742 <p><strong>INPUTS</strong> | |
2743 | |
2744 <dl> | |
2745 <dt><var>lambda</var><dd><var>lambda</var><code>(i)</code> is | |
2746 the external arrival rate to service center i. <var>lambda</var> | |
2747 must be a vector of length N, <var>lambda</var><code>(i) ≥ 0</code>. | |
2748 | |
2749 <br><dt><var>S</var><dd><var>S</var><code>(i)</code> is the average service time on service center i | |
2750 <var>S</var> must be a vector of length N, <var>S</var><code>(i)>0</code>. | |
2751 | |
2752 <br><dt><var>P</var><dd><var>P</var><code>(i,j)</code> is the probability | |
2753 that a job which completes service at service center i proceeds | |
2754 to service center j. <var>P</var> must be a matrix of size | |
2755 N \times N. | |
2756 | |
2757 <br><dt><var>m</var><dd><var>m</var><code>(i)</code> is the number of servers at service center | |
2758 i. If <var>m</var><code>(i) < 1</code>, service center i is an | |
2759 infinite-server node. Otherwise, it is a regular FCFS queueing center with | |
2760 <var>m</var><code>(i)</code> servers. If this parameter is omitted, default is | |
2761 <var>m</var><code>(i) = 1</code> for all i. If this parameter is a scalar, | |
2762 it will be promoted to a vector with the same size as <var>lambda</var>. | |
2763 Otherwise, <var>m</var> must be a vector of length N. | |
2764 | |
2765 <br><dt><var>k</var><dd>Compute the steady-state probability that there are <var>k</var><code>(i)</code> | |
2766 requests at service center i. <var>k</var> must have the same length | |
2767 as <var>lambda</var>, with <var>k</var><code>(i) ≥ 0</code>. | |
2768 | |
2769 </dl> | |
2770 | |
2771 <p><strong>OUTPUT</strong> | |
2772 | |
2773 <dl> | |
2774 <dt><var>U</var><dd>If i is a FCFS node, then | |
2775 <var>U</var><code>(i)</code> is the utilization of service center i. | |
2776 If i is an IS node, then <var>U</var><code>(i)</code> is the | |
2777 <em>traffic intensity</em> defined as <var>X</var><code>(i)*</code><var>S</var><code>(i)</code>. | |
2778 | |
2779 <br><dt><var>R</var><dd><var>R</var><code>(i)</code> is the average response time of service center i. | |
2780 | |
2781 <br><dt><var>Q</var><dd><var>Q</var><code>(i)</code> is the average number of customers in service center | |
2782 i. | |
2783 | |
2784 <br><dt><var>X</var><dd><var>X</var><code>(i)</code> is the throughput of service center i. | |
2785 | |
2786 <br><dt><var>pr</var><dd><var>pr</var><code>(i)</code> is the steady state probability | |
2787 that there are <var>k</var><code>(i)</code> requests at service center i. | |
2788 | |
2789 </dl> | |
2790 | |
2791 <pre class="sp"> | |
2792 | |
2793 </pre> | |
2794 <strong>See also:</strong> qnopen. | |
2795 | |
2796 </blockquote></div> | |
2797 | |
2798 <p class="noindent"><strong>REFERENCES</strong> | |
2799 | |
2800 <p>This implementation is based on G. Bolch, S. Greiner, H. de Meer and | |
2801 K. Trivedi, <cite>Queueing Networks and Markov Chains: Modeling and | |
2802 Performance Evaluation with Computer Science Applications</cite>, Wiley, | |
2803 1998, pp. 284–287. | |
2804 | |
9692 | 2805 <p><a name="index-Bolch_002c-G_002e-105"></a><a name="index-Greiner_002c-S_002e-106"></a><a name="index-de-Meer_002c-H_002e-107"></a><a name="index-Trivedi_002c-K_002e-108"></a> |
9391 | 2806 |
2807 <h4 class="subsection">6.3.2 The Convolution Algorithm</h4> | |
2808 | |
2809 <p>According to the BCMP theorem, the state probability of a closed | |
2810 single class queueing network with K nodes and N requests | |
2811 can be expressed as: | |
2812 | |
2813 <pre class="example"> k = [k1, k2, ... kn]; <span class="roman">population vector</span> | |
2814 p = 1/G(N+1) \prod F(i,k); | |
2815 </pre> | |
2816 <p>Here \pi(k_1, k_2, \ldots k_K) is the joint probability of | |
2817 having k_i requests at node i, for all i=1,2, | |
2818 \ldots K. | |
2819 | |
2820 <p>The <em>convolution algorithms</em> computes the normalization constants | |
2821 G = (G(0), G(1), \ldots G(N)) for single-class, closed networks | |
2822 with N requests. The normalization constants are returned as | |
2823 vector <var>G</var><code>=[</code><var>G</var><code>(1), </code><var>G</var><code>(2), ... </code><var>G</var><code>(N+1)]</code> where | |
2824 <var>G</var><code>(i+1)</code> is the value of G(i) (remember that Octave | |
2825 uses 1-base vectors). The normalization constant can be used to | |
2826 compute all performance measures of interest (utilization, average | |
2827 response time and so on). | |
2828 | |
2829 <p><code>queueing</code> implements the convolution algorithm, in the function | |
2830 <code>qnconvolution</code> and <code>qnconvolutionld</code>. The first one | |
2831 supports single-station nodes, multiple-station nodes and IS nodes. | |
2832 The second one supports networks with general load-dependent service | |
2833 centers. | |
2834 | |
2835 <!-- The Convolution Algorithm --> | |
2836 <p><a name="doc_002dqnconvolution"></a> | |
2837 | |
2838 <div class="defun"> | |
9692 | 2839 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>G</var>] = <b>qnconvolution</b> (<var>N, S, V</var>)<var><a name="index-qnconvolution-109"></a></var><br> |
2840 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>G</var>] = <b>qnconvolution</b> (<var>N, S, V, m</var>)<var><a name="index-qnconvolution-110"></a></var><br> | |
9391 | 2841 <blockquote> |
9692 | 2842 <p><a name="index-closed-network-111"></a><a name="index-normalization-constant-112"></a><a name="index-convolution-algorithm-113"></a> |
9391 | 2843 This function implements the <em>convolution algorithm</em> for |
2844 computing steady-state performance measures of product-form, | |
2845 single-class closed queueing networks. Load-independent service | |
2846 centers, multiple servers (M/M/m queues) and IS nodes are | |
2847 supported. For general load-dependent service centers, use the | |
2848 <code>qnconvolutionld</code> function instead. | |
2849 | |
2850 <p><strong>INPUTS</strong> | |
2851 | |
2852 <dl> | |
2853 <dt><var>N</var><dd>Number of requests in the system (<var>N</var><code>>0</code>). | |
2854 | |
2855 <br><dt><var>S</var><dd><var>S</var><code>(k)</code> is the average service time on center k | |
2856 (<var>S</var><code>(k) ≥ 0</code>). | |
2857 | |
2858 <br><dt><var>V</var><dd><var>V</var><code>(k)</code> is the visit count of service center k | |
2859 (<var>V</var><code>(k) ≥ 0</code>). | |
2860 | |
2861 <br><dt><var>m</var><dd><var>m</var><code>(k)</code> is the number of servers at center | |
2862 k. If <var>m</var><code>(k) < 1</code>, center k is a delay center (IS); | |
2863 if <var>m</var><code>(k) ≥ 1</code>, center k | |
2864 it is a regular M/M/m queueing center with <var>m</var><code>(k)</code> | |
2865 identical servers. Default is <var>m</var><code>(k) = 1</code> for all k. | |
2866 | |
2867 </dl> | |
2868 | |
2869 <p><strong>OUTPUT</strong> | |
2870 | |
2871 <dl> | |
2872 <dt><var>U</var><dd><var>U</var><code>(k)</code> is the utilization of center k. | |
2873 For IS nodes, <var>U</var><code>(k)</code> is the <em>traffic intensity</em>. | |
2874 | |
2875 <br><dt><var>R</var><dd><var>R</var><code>(k)</code> is the average response time of center k. | |
2876 | |
2877 <br><dt><var>Q</var><dd><var>Q</var><code>(k)</code> is the average number of customers at center | |
2878 k. | |
2879 | |
2880 <br><dt><var>X</var><dd><var>X</var><code>(k)</code> is the throughput of center k. | |
2881 | |
2882 <br><dt><var>G</var><dd>Vector of normalization constants. <var>G</var><code>(n+1)</code> contains the value of | |
2883 the normalization constant with n requests | |
2884 G(n), n=0, <small class="dots">...</small>, N. | |
2885 | |
2886 </dl> | |
2887 | |
2888 <pre class="sp"> | |
2889 | |
2890 </pre> | |
2891 <strong>See also:</strong> qnconvolutionld. | |
2892 | |
2893 </blockquote></div> | |
2894 | |
2895 <p class="noindent"><strong>EXAMPLE</strong> | |
2896 | |
2897 <p>The normalization constant G can be used to compute the | |
2898 steady-state probabilities for a closed single class product-form | |
2899 Queueing Network with K nodes. Let <var>k</var><code>=[k_1, | |
2900 k_2, ... k_K]</code> be a valid population vector. Then, the | |
2901 steady-state probability <var>p</var><code>(i)</code> to have <var>k</var><code>(i)</code> | |
2902 requests at service center i can be computed as: | |
2903 | |
2904 <pre class="example"><pre class="verbatim"> k = [1 2 0]; | |
2905 K = sum(k); # Total population size | |
2906 S = [ 1/0.8 1/0.6 1/0.4 ]; | |
2907 m = [ 2 3 1 ]; | |
2908 V = [ 1 .667 .2 ]; | |
2909 [U R Q X G] = qnconvolution( K, S, V, m ); | |
2910 p = [0 0 0]; # initialize p | |
2911 # Compute the probability to have k(i) jobs at service center i | |
2912 for i=1:3 | |
2913 p(i) = (V(i)*S(i))^k(i) / G(K+1) * \ | |
2914 (G(K-k(i)+1) - V(i)*S(i)*G(K-k(i)) ); | |
2915 printf("k(%d)=%d prob=%f\n", i, k(i), p(i) ); | |
2916 endfor</pre>-| k(1)=1 prob=0.17975 | |
2917 -| k(2)=2 prob=0.48404 | |
2918 -| k(3)=0 prob=0.52779 | |
2919 </pre> | |
2920 <p class="noindent"><strong>NOTE</strong> | |
2921 | |
2922 <p>For a network with K service centers and N requests, | |
2923 this implementation of the convolution algorithm has time and space | |
2924 complexity O(NK). | |
2925 | |
2926 <p class="noindent"><strong>REFERENCES</strong> | |
2927 | |
2928 <p>Jeffrey P. Buzen, <cite>Computational Algorithms for Closed Queueing | |
2929 Networks with Exponential Servers</cite>, Communications of the ACM, volume | |
2930 16, number 9, september 1973, | |
2931 pp. 527–531. <a href="http://doi.acm.org/10.1145/362342.362345">http://doi.acm.org/10.1145/362342.362345</a> | |
2932 | |
9692 | 2933 <p><a name="index-Buzen_002c-J_002e-P_002e-114"></a> |
9391 | 2934 This implementation is based on G. Bolch, S. Greiner, H. de Meer and |
2935 K. Trivedi, <cite>Queueing Networks and Markov Chains: Modeling and | |
2936 Performance Evaluation with Computer Science Applications</cite>, Wiley, | |
2937 1998, pp. 313–317. | |
2938 | |
9692 | 2939 <p><a name="index-Bolch_002c-G_002e-115"></a><a name="index-Greiner_002c-S_002e-116"></a><a name="index-de-Meer_002c-H_002e-117"></a><a name="index-Trivedi_002c-K_002e-118"></a> |
9391 | 2940 <!-- Convolution for load-dependent service centers --> |
2941 <a name="doc_002dqnconvolutionld"></a> | |
2942 | |
2943 <div class="defun"> | |
9692 | 2944 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>G</var>] = <b>qnconvolutionld</b> (<var>N, S, V</var>)<var><a name="index-qnconvolutionld-119"></a></var><br> |
9391 | 2945 <blockquote> |
9692 | 2946 <p><a name="index-closed-network-120"></a><a name="index-normalization-constant-121"></a><a name="index-convolution-algorithm-122"></a><a name="index-load_002ddependent-service-center-123"></a> |
9391 | 2947 This function implements the <em>convolution algorithm</em> for |
2948 product-form, single-class closed queueing networks with general | |
2949 load-dependent service centers. | |
2950 | |
2951 <p>This function computes steady-state performance measures for | |
2952 single-class, closed networks with load-dependent service centers | |
2953 using the convolution algorithm; the normalization constants are also | |
2954 computed. The normalization constants are returned as vector | |
2955 <var>G</var><code>=[</code><var>G</var><code>(1), ..., </code><var>G</var><code>(N+1)]</code> where | |
2956 <var>G</var><code>(i+1)</code> is the value of G(i). | |
2957 | |
2958 <p><strong>INPUTS</strong> | |
2959 | |
2960 <dl> | |
2961 <dt><var>N</var><dd>Number of requests in the system (<var>N</var><code>>0</code>). | |
2962 | |
2963 <br><dt><var>S</var><dd><var>S</var><code>(k,n)</code> is the mean service time at center k | |
2964 where there are n requests, 1 ≤ n | |
2965 ≤ N. <var>S</var><code>(k,n)</code> = 1 / \mu_k,n, | |
2966 where \mu_k,n is the service rate of center k | |
2967 when there are n requests. | |
2968 | |
2969 <br><dt><var>V</var><dd><var>V</var><code>(k)</code> is the visit count of service center k | |
2970 (<var>V</var><code>(k) ≥ 0</code>). The length of <var>V</var> is the number of | |
2971 servers K in the network. | |
2972 | |
2973 </dl> | |
2974 | |
2975 <p><strong>OUTPUT</strong> | |
2976 | |
2977 <dl> | |
2978 <dt><var>U</var><dd><var>U</var><code>(k)</code> is the utilization of center k. | |
2979 | |
2980 <br><dt><var>R</var><dd><var>R</var><code>(k)</code> is the average response time at center k. | |
2981 | |
2982 <br><dt><var>Q</var><dd><var>Q</var><code>(k)</code> is the average number of customers in center k. | |
2983 | |
2984 <br><dt><var>X</var><dd><var>X</var><code>(k)</code> is the throughput of center k. | |
2985 | |
2986 <br><dt><var>G</var><dd>Normalization constants (vector). <var>G</var><code>(n+1)</code> | |
2987 corresponds to G(n), as array indexes in Octave start | |
2988 from 1. | |
2989 | |
2990 </dl> | |
2991 | |
2992 <pre class="sp"> | |
2993 | |
2994 </pre> | |
2995 <strong>See also:</strong> qnconvolution. | |
2996 | |
2997 </blockquote></div> | |
2998 | |
2999 <p class="noindent"><strong>REFERENCES</strong> | |
3000 | |
3001 <p>Herb Schwetman, <cite>Some Computational Aspects of Queueing Network | |
3002 Models</cite>, Technical Report CSD-TR-354, Department of Computer Sciences, | |
3003 Purdue University, feb, 1981 (revised). | |
3004 <a href="http://www.cs.purdue.edu/research/technical_reports/1980/TR%2080-354.pdf">http://www.cs.purdue.edu/research/technical_reports/1980/TR%2080-354.pdf</a> | |
3005 | |
9692 | 3006 <p><a name="index-Schwetman_002c-H_002e-124"></a> |
9391 | 3007 M. Reiser, H. Kobayashi, <cite>On The Convolution Algorithm for |
3008 Separable Queueing Networks</cite>, In Proceedings of the 1976 ACM | |
3009 SIGMETRICS Conference on Computer Performance Modeling Measurement and | |
3010 Evaluation (Cambridge, Massachusetts, United States, March 29–31, | |
3011 1976). SIGMETRICS '76. ACM, New York, NY, | |
3012 pp. 109–117. <a href="http://doi.acm.org/10.1145/800200.806187">http://doi.acm.org/10.1145/800200.806187</a> | |
3013 | |
9692 | 3014 <p><a name="index-Reiser_002c-M_002e-125"></a><a name="index-Kobayashi_002c-H_002e-126"></a> |
9391 | 3015 This implementation is based on G. Bolch, S. Greiner, H. de Meer and |
3016 K. Trivedi, <cite>Queueing Networks and Markov Chains: Modeling and | |
3017 Performance Evaluation with Computer Science Applications</cite>, Wiley, | |
3018 1998, pp. 313–317. Function <code>qnconvolutionld</code> is slightly | |
3019 different from the version described in Bolch et al. because it | |
3020 supports general load-dependent centers (while the version in the book | |
3021 does not). The modification is in the definition of function | |
3022 <code>F()</code> in <code>qnconvolutionld</code> which has been made similar to | |
3023 function f_i defined in Schwetman, <code>Some Computational | |
3024 Aspects of Queueing Network Models</code>. | |
3025 | |
9692 | 3026 <p><a name="index-Bolch_002c-G_002e-127"></a><a name="index-Greiner_002c-S_002e-128"></a><a name="index-de-Meer_002c-H_002e-129"></a><a name="index-Trivedi_002c-K_002e-130"></a> |
9391 | 3027 |
3028 <h4 class="subsection">6.3.3 Open networks</h4> | |
3029 | |
3030 <!-- Open networks with single class --> | |
3031 <p><a name="doc_002dqnopensingle"></a> | |
3032 | |
3033 <div class="defun"> | |
9692 | 3034 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnopensingle</b> (<var>lambda, S, V</var>)<var><a name="index-qnopensingle-131"></a></var><br> |
3035 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnopensingle</b> (<var>lambda, S, V, m</var>)<var><a name="index-qnopensingle-132"></a></var><br> | |
9391 | 3036 <blockquote> |
9692 | 3037 <p><a name="index-open-network_002c-single-class-133"></a><a name="index-BCMP-network-134"></a> |
9391 | 3038 Analyze open, single class BCMP queueing networks. |
3039 | |
3040 <p>This function works for a subset of BCMP single-class open networks | |
3041 satisfying the following properties: | |
3042 | |
3043 <ul> | |
3044 <li>The allowed service disciplines at network nodes are: FCFS, | |
3045 PS, LCFS-PR, IS (infinite server); | |
3046 | |
3047 <li>Service times are exponentially distributed and | |
3048 load-independent; | |
3049 | |
3050 <li>Service center i can consist of <var>m</var><code>(i) ≥ 1</code> | |
3051 identical servers. | |
3052 | |
3053 <li>Routing is load-independent | |
3054 | |
3055 </ul> | |
3056 | |
3057 <p><strong>INPUTS</strong> | |
3058 | |
3059 <dl> | |
3060 <dt><var>lambda</var><dd>Overall external arrival rate (<var>lambda</var><code>>0</code>). | |
3061 | |
3062 <br><dt><var>S</var><dd><var>S</var><code>(k)</code> is the average service time at center | |
3063 i (<var>S</var><code>(k)>0</code>). | |
3064 | |
3065 <br><dt><var>V</var><dd><var>V</var><code>(k)</code> is the average number of visits to center | |
3066 k (<var>V</var><code>(k) ≥ 0</code>). | |
3067 | |
3068 <br><dt><var>m</var><dd><var>m</var><code>(k)</code> is the number of servers at center i. If | |
3069 <var>m</var><code>(k) < 1</code>, then service center k is a delay center | |
3070 (IS); otherwise it is a regular queueing center with | |
3071 <var>m</var><code>(k)</code> servers. Default is <var>m</var><code>(k) = 1</code> for each | |
3072 k. | |
3073 | |
3074 </dl> | |
3075 | |
3076 <p><strong>OUTPUTS</strong> | |
3077 | |
3078 <dl> | |
3079 <dt><var>U</var><dd>If k is a queueing center, | |
3080 <var>U</var><code>(k)</code> is the utilization of center k. | |
3081 If k is an IS node, then <var>U</var><code>(k)</code> is the | |
3082 <em>traffic intensity</em> defined as <var>X</var><code>(k)*</code><var>S</var><code>(k)</code>. | |
3083 | |
3084 <br><dt><var>R</var><dd><var>R</var><code>(k)</code> is the average response time of center k. | |
3085 | |
3086 <br><dt><var>Q</var><dd><var>Q</var><code>(k)</code> is the average number of requests at center | |
3087 k. | |
3088 | |
3089 <br><dt><var>X</var><dd><var>X</var><code>(k)</code> is the throughput of center k. | |
3090 | |
3091 </dl> | |
3092 | |
3093 <pre class="sp"> | |
3094 | |
3095 </pre> | |
3096 <strong>See also:</strong> qnopen,qnclosed,qnvisits. | |
3097 | |
3098 </blockquote></div> | |
3099 | |
3100 <p>From the results computed by this function, it is possible to derive | |
3101 other quantities of interest as follows: | |
3102 | |
3103 <ul> | |
3104 <li><strong>System Response Time</strong>: The overall system response time | |
3105 can be computed as | |
3106 <code>R_s = dot(V,R);</code> | |
3107 | |
3108 <li><strong>Average number of requests</strong>: The average number of requests | |
3109 in the system can be computed as: | |
3110 <code>Q_s = sum(Q)</code> | |
3111 | |
3112 </ul> | |
3113 | |
3114 <p class="noindent"><strong>EXAMPLE</strong> | |
3115 | |
3116 <pre class="example"><pre class="verbatim"> lambda = 3; | |
3117 V = [16 7 8]; | |
3118 S = [0.01 0.02 0.03]; | |
3119 [U R Q X] = qnopensingle( lambda, S, V ); | |
3120 R_s = dot(R,V) # System response time | |
3121 N = sum(Q) # Average number in system</pre>-| R_s = 1.4062 | |
3122 -| N = 4.2186 | |
3123 </pre> | |
3124 <p class="noindent"><strong>REFERENCES</strong> | |
3125 | |
3126 <p>G. Bolch, S. Greiner, H. de Meer and K. Trivedi, <cite>Queueing | |
3127 Networks and Markov Chains: Modeling and Performance Evaluation with | |
3128 Computer Science Applications</cite>, Wiley, 1998. | |
3129 | |
9692 | 3130 <p><a name="index-Bolch_002c-G_002e-135"></a><a name="index-Greiner_002c-S_002e-136"></a><a name="index-de-Meer_002c-H_002e-137"></a><a name="index-Trivedi_002c-K_002e-138"></a> |
9391 | 3131 |
3132 <!-- Open network with multiple classes --> | |
3133 <p><a name="doc_002dqnopenmulti"></a> | |
3134 | |
3135 <div class="defun"> | |
9692 | 3136 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnopenmulti</b> (<var>lambda, S, V</var>)<var><a name="index-qnopenmulti-139"></a></var><br> |
3137 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnopenmulti</b> (<var>lambda, S, V, m</var>)<var><a name="index-qnopenmulti-140"></a></var><br> | |
9391 | 3138 <blockquote> |
9692 | 3139 <p><a name="index-open-network_002c-multiple-classes-141"></a> |
9391 | 3140 Exact analysis of open, multiple-class BCMP networks. The network can |
3141 be made of <em>single-server</em> queueing centers (FCFS, LCFS-PR or | |
3142 PS) or delay centers (IS). This function assumes a network with | |
3143 K service centers and C customer classes. | |
3144 | |
3145 <p><strong>INPUTS</strong> | |
3146 | |
3147 <dl> | |
3148 <dt><var>lambda</var><dd><var>lambda</var><code>(c)</code> is the external | |
3149 arrival rate of class c customers (<var>lambda</var><code>(c)>0</code>). | |
3150 | |
3151 <br><dt><var>S</var><dd><var>S</var><code>(c,k)</code> is the mean service time of class c | |
3152 customers on the service center k (<var>S</var><code>(c,k)>0</code>). | |
3153 For FCFS nodes, average service times must be class-independent. | |
3154 | |
3155 <br><dt><var>V</var><dd><var>V</var><code>(c,k)</code> is the average number of visits of class c | |
3156 customers to service center k (<var>V</var><code>(c,k) ≥ 0 </code>). | |
3157 | |
3158 <br><dt><var>m</var><dd><var>m</var><code>(k)</code> is the number of servers at service center | |
3159 k. Valid values are <var>m</var><code>(k) < 1</code> to denote a delay | |
3160 center (-/G/\infty), and <var>m</var><code>(k)==1</code> to denote | |
3161 a single server queueing center (M/M/1–FCFS, | |
3162 -/G/1–LCFS-PR or -/G/1–PS). | |
3163 | |
3164 </dl> | |
3165 | |
3166 <p><strong>OUTPUTS</strong> | |
3167 | |
3168 <dl> | |
3169 <dt><var>U</var><dd>If k is a queueing center, then <var>U</var><code>(c,k)</code> is the | |
3170 class c utilization of center k. If k is | |
3171 an IS node, then <var>U</var><code>(c,k)</code> is the | |
3172 class c <em>traffic intensity</em> | |
3173 defined as <var>X</var><code>(c,k)*</code><var>S</var><code>(c,k)</code>. | |
3174 | |
3175 <br><dt><var>R</var><dd><var>R</var><code>(c,k)</code> is the class c response time at | |
3176 center k. The system response time for | |
3177 class c requests can be computed | |
3178 as <code>dot(</code><var>R</var><code>, </code><var>V</var><code>, 2)</code>. | |
3179 | |
3180 <br><dt><var>Q</var><dd><var>Q</var><code>(c,k)</code> is the average number of class c requests | |
3181 at center k. The average number of class c requests | |
3182 in the system <var>Qc</var> can be computed as <code>Qc = sum(</code><var>Q</var><code>, 2)</code> | |
3183 | |
3184 <br><dt><var>X</var><dd><var>X</var><code>(c,k)</code> is the class c throughput | |
3185 at center k. | |
3186 | |
3187 </dl> | |
3188 | |
3189 <pre class="sp"> | |
3190 | |
3191 </pre> | |
3192 <strong>See also:</strong> qnopen,qnopensingle,qnvisits. | |
3193 | |
3194 </blockquote></div> | |
3195 | |
3196 <p class="noindent"><strong>REFERENCES</strong> | |
3197 | |
3198 <p>Edward D. Lazowska, John Zahorjan, G. Scott Graham, and Kenneth C. | |
3199 Sevcik, <cite>Quantitative System Performance: Computer System | |
3200 Analysis Using Queueing Network Models</cite>, Prentice Hall, | |
3201 1984. <a href="http://www.cs.washington.edu/homes/lazowska/qsp/">http://www.cs.washington.edu/homes/lazowska/qsp/</a>. In | |
3202 particular, see section 7.4.1 ("Open Model Solution Techniques"). | |
3203 | |
9692 | 3204 <p><a name="index-Lazowska_002c-E_002e-D_002e-142"></a><a name="index-Zahorjan_002c-J_002e-143"></a><a name="index-Graham_002c-G_002e-S_002e-144"></a><a name="index-Sevcik_002c-K_002e-C_002e-145"></a> |
9391 | 3205 |
3206 <h4 class="subsection">6.3.4 Closed Networks</h4> | |
3207 | |
3208 <!-- MVA for single class, closed networks --> | |
3209 <p><a name="doc_002dqnclosedsinglemva"></a> | |
3210 | |
3211 <div class="defun"> | |
9692 | 3212 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>G</var>] = <b>qnclosedsinglemva</b> (<var>N, S, V</var>)<var><a name="index-qnclosedsinglemva-146"></a></var><br> |
3213 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>G</var>] = <b>qnclosedsinglemva</b> (<var>N, S, V, m</var>)<var><a name="index-qnclosedsinglemva-147"></a></var><br> | |
3214 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>, <var>G</var>] = <b>qnclosedsinglemva</b> (<var>N, S, V, m, Z</var>)<var><a name="index-qnclosedsinglemva-148"></a></var><br> | |
9391 | 3215 <blockquote> |
9692 | 3216 <p><a name="index-Mean-Value-Analysys-_0028MVA_0029-149"></a><a name="index-closed-network_002c-single-class-150"></a><a name="index-normalization-constant-151"></a> |
9391 | 3217 Analyze closed, single class queueing networks using the exact Mean |
3218 Value Analysis (MVA) algorithm. The following queueing disciplines | |
3219 are supported: FCFS, LCFS-PR, PS and IS (Infinite Server). This | |
3220 function supports fixed-rate service centers or multiple server | |
3221 nodes. For general load-dependent service centers, use the function | |
3222 <code>qnclosedsinglemvald</code> instead. | |
3223 | |
3224 <p>Additionally, the normalization constant G(n), n=0, | |
3225 <small class="dots">...</small>, N is computed; G(n) can be used in conjunction with | |
3226 the BCMP theorem to compute steady-state probabilities. | |
3227 | |
3228 <p><strong>INPUTS</strong> | |
3229 | |
3230 <dl> | |
3231 <dt><var>N</var><dd>Population size (number of requests in the system, <var>N</var><code> ≥ 0</code>). | |
3232 If <var>N</var><code> == 0</code>, this function returns | |
3233 <var>U</var><code> = </code><var>R</var><code> = </code><var>Q</var><code> = </code><var>X</var><code> = 0</code> | |
3234 | |
3235 <br><dt><var>S</var><dd><var>S</var><code>(k)</code> is the mean service time on server k | |
3236 (<var>S</var><code>(k)>0</code>). | |
3237 | |
3238 <br><dt><var>V</var><dd><var>V</var><code>(k)</code> is the average number of visits to service center | |
3239 k (<var>V</var><code>(k) ≥ 0</code>). | |
3240 | |
3241 <br><dt><var>Z</var><dd>External delay for customers (<var>Z</var><code> ≥ 0</code>). Default is 0. | |
3242 | |
3243 <br><dt><var>m</var><dd><var>m</var><code>(k)</code> is the number of servers at center k | |
3244 (if <var>m</var> is a scalar, all centers have that number of servers). If | |
3245 <var>m</var><code>(k) < 1</code>, center k is a delay center (IS); | |
3246 otherwise it is a regular queueing center (FCFS, LCFS-PR or PS) with | |
3247 <var>m</var><code>(k)</code> servers. Default is <var>m</var><code>(k) = 1</code> for all | |
3248 k (each service center has a single server). | |
3249 | |
3250 </dl> | |
3251 | |
3252 <p><strong>OUTPUTS</strong> | |
3253 | |
3254 <dl> | |
3255 <dt><var>U</var><dd>If k is a FCFS, LCFS-PR or PS node (<var>m</var><code>(k) == 1</code>), | |
3256 then <var>U</var><code>(k)</code> is the utilization of center k. If | |
3257 k is an IS node (<var>m</var><code>(k) < 1</code>), then | |
3258 <var>U</var><code>(k)</code> is the <em>traffic intensity</em> defined as | |
3259 <var>X</var><code>(k)*</code><var>S</var><code>(k)</code>. | |
3260 | |
3261 <br><dt><var>R</var><dd><var>R</var><code>(k)</code> is the response time at center k. | |
9622 | 3262 The <em>Residence Time</em> at center k is |
3263 <var>R</var><code>(k) * </code><var>V</var><code>(k)</code>. | |
9391 | 3264 The system response time <var>Rsys</var> |
9622 | 3265 can be computed either as <var>Rsys</var><code> = </code><var>N</var><code>/</code><var>Xsys</var><code> - Z</code> |
3266 or as <var>Rsys</var><code> = dot(</code><var>R</var><code>,</code><var>V</var><code>)</code> | |
9391 | 3267 |
3268 <br><dt><var>Q</var><dd><var>Q</var><code>(k)</code> is the average number of requests at center | |
3269 k. The number of requests in the system can be computed | |
3270 either as <code>sum(</code><var>Q</var><code>)</code>, or using the formula | |
3271 <var>N</var><code>-</code><var>Xsys</var><code>*</code><var>Z</var>. | |
3272 | |
3273 <br><dt><var>X</var><dd><var>X</var><code>(k)</code> is the throughput of center k. The | |
3274 system throughput <var>Xsys</var> can be computed as | |
3275 <var>Xsys</var><code> = </code><var>X</var><code>(1) / </code><var>V</var><code>(1)</code> | |
3276 | |
3277 <br><dt><var>G</var><dd>Normalization constants. <var>G</var><code>(n+1)</code> corresponds to the value | |
3278 of the normalization constant G(n), n=0, <small class="dots">...</small>, N as | |
3279 array indexes in Octave start from 1. G(n) can be used in | |
3280 conjunction with the BCMP theorem to compute steady-state | |
3281 probabilities. | |
3282 | |
3283 </dl> | |
3284 | |
3285 <pre class="sp"> | |
3286 | |
3287 </pre> | |
3288 <strong>See also:</strong> qnclosedsinglemvald. | |
3289 | |
3290 </blockquote></div> | |
3291 | |
3292 <p>From the results provided by this function, it is possible to derive | |
3293 other quantities of interest as follows: | |
3294 | |
3295 <p class="noindent"><strong>EXAMPLE</strong> | |
3296 | |
3297 <pre class="example"><pre class="verbatim"> S = [ 0.125 0.3 0.2 ]; | |
3298 V = [ 16 10 5 ]; | |
3299 N = 20; | |
3300 m = ones(1,3); | |
3301 Z = 4; | |
3302 [U R Q X] = qnclosedsinglemva(N,S,V,m,Z); | |
3303 X_s = X(1)/V(1); # System throughput | |
3304 R_s = dot(R,V); # System response time | |
3305 printf("\t Util Qlen RespT Tput\n"); | |
3306 printf("\t-------- -------- -------- --------\n"); | |
3307 for k=1:length(S) | |
3308 printf("Dev%d\t%8.4f %8.4f %8.4f %8.4f\n", k, U(k), Q(k), R(k), X(k) ); | |
3309 endfor | |
3310 printf("\nSystem\t %8.4f %8.4f %8.4f\n\n", N-X_s*Z, R_s, X_s );</pre></pre> | |
3311 <p class="noindent"><strong>REFERENCES</strong> | |
3312 | |
3313 <p>M. Reiser and S. S. Lavenberg, <cite>Mean-Value Analysis of Closed | |
3314 Multichain Queuing Networks</cite>, Journal of the ACM, vol. 27, n. 2, April | |
3315 1980, pp. 313–322. <a href="http://doi.acm.org/10.1145/322186.322195">http://doi.acm.org/10.1145/322186.322195</a> | |
3316 | |
9692 | 3317 <p><a name="index-Reiser_002c-M_002e-152"></a><a name="index-Lavenberg_002c-S_002e-S_002e-153"></a> |
9391 | 3318 This implementation is described in R. Jain , <cite>The Art of Computer |
3319 Systems Performance Analysis</cite>, Wiley, 1991, p. 577. Multi-server nodes | |
3320 <!-- and the computation of @math{G(N)}, --> | |
3321 are treated according to G. Bolch, S. Greiner, H. de Meer and | |
3322 K. Trivedi, <cite>Queueing Networks and Markov Chains: Modeling and | |
3323 Performance Evaluation with Computer Science Applications</cite>, Wiley, | |
3324 1998, Section 8.2.1, "Single Class Queueing Networks". | |
3325 | |
9692 | 3326 <p><a name="index-Jain_002c-R_002e-154"></a><a name="index-Bolch_002c-G_002e-155"></a><a name="index-Greiner_002c-S_002e-156"></a><a name="index-de-Meer_002c-H_002e-157"></a><a name="index-Trivedi_002c-K_002e-158"></a> |
9391 | 3327 <!-- MVA for single class, closed networks with load dependent servers --> |
3328 <a name="doc_002dqnclosedsinglemvald"></a> | |
3329 | |
3330 <div class="defun"> | |
9692 | 3331 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedsinglemvald</b> (<var>N, S, V</var>)<var><a name="index-qnclosedsinglemvald-159"></a></var><br> |
3332 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedsinglemvald</b> (<var>N, S, V, Z</var>)<var><a name="index-qnclosedsinglemvald-160"></a></var><br> | |
9391 | 3333 <blockquote> |
9692 | 3334 <p><a name="index-Mean-Value-Analysys-_0028MVA_0029-161"></a><a name="index-closed-network_002c-single-class-162"></a><a name="index-load_002ddependent-service-center-163"></a> |
9391 | 3335 Exact MVA algorithm for closed, single class queueing networks |
3336 with load-dependent service centers. This function supports | |
3337 FCFS, LCFS-PR, PS and IS nodes. For networks with only fixed-rate | |
3338 service centers and multiple-server nodes, the function | |
3339 <code>qnclosedsinglemva</code> is more efficient. | |
3340 | |
3341 <p><strong>INPUTS</strong> | |
3342 | |
3343 <dl> | |
3344 <dt><var>N</var><dd>Population size (number of requests in the system, <var>N</var><code> ≥ 0</code>). | |
3345 If <var>N</var><code> == 0</code>, this function returns <var>U</var><code> = </code><var>R</var><code> = </code><var>Q</var><code> = </code><var>X</var><code> = 0</code> | |
3346 | |
3347 <br><dt><var>S</var><dd><var>S</var><code>(k,n)</code> is the mean service time at center k | |
3348 where there are n requests, 1 ≤ n | |
3349 ≤ N. <var>S</var><code>(k,n)</code> = 1 / \mu_k,n, | |
3350 where \mu_k,n is the service rate of center k | |
3351 when there are n requests. | |
3352 | |
3353 <br><dt><var>V</var><dd><var>V</var><code>(k)</code> is the average number | |
3354 of visits to service center k (<var>V</var><code>(k) ≥ 0</code>). | |
3355 | |
3356 <br><dt><var>Z</var><dd>external delay ("think time", <var>Z</var><code> ≥ 0</code>); default 0. | |
3357 | |
3358 </dl> | |
3359 | |
3360 <p><strong>OUTPUTS</strong> | |
3361 | |
3362 <dl> | |
3363 <dt><var>U</var><dd><var>U</var><code>(k)</code> is the utilization of service center k. The | |
3364 utilization is defined as the probability that service center | |
3365 k is not empty, that is, U_k = 1-\pi_k(0) where | |
3366 \pi_k(0) is the steady-state probability that there are 0 | |
3367 jobs at service center k. | |
3368 | |
3369 <br><dt><var>R</var><dd><var>R</var><code>(k)</code> is the response time on service center k. | |
3370 | |
3371 <br><dt><var>Q</var><dd><var>Q</var><code>(k)</code> is the average number of requests in service center | |
3372 k. | |
3373 | |
3374 <br><dt><var>X</var><dd><var>X</var><code>(k)</code> is the throughput of service center k. | |
3375 | |
3376 </dl> | |
3377 | |
3378 </blockquote></div> | |
3379 | |
3380 <p class="noindent"><strong>REFERENCES</strong> | |
3381 | |
3382 <p>M. Reiser and S. S. Lavenberg, <cite>Mean-Value Analysis of Closed | |
3383 Multichain Queuing Networks</cite>, Journal of the ACM, vol. 27, n. 2, | |
3384 April 1980, pp. 313–322. <a href="http://doi.acm.org/10.1145/322186.322195">http://doi.acm.org/10.1145/322186.322195</a> | |
3385 | |
3386 <p>This implementation is described in G. Bolch, S. Greiner, H. de Meer | |
3387 and K. Trivedi, <cite>Queueing Networks and Markov Chains: Modeling | |
3388 and Performance Evaluation with Computer Science Applications</cite>, Wiley, | |
3389 1998, Section 8.2.4.1, “Networks with Load-Deèpendent Service: Closed | |
3390 Networks”. | |
3391 | |
9692 | 3392 <p><a name="index-Bolch_002c-G_002e-164"></a><a name="index-Greiner_002c-S_002e-165"></a><a name="index-de-Meer_002c-H_002e-166"></a><a name="index-Trivedi_002c-K_002e-167"></a> |
9391 | 3393 <!-- CMVA for single class, closed networks with a single load dependent servers --> |
3394 <a name="doc_002dqncmva"></a> | |
3395 | |
3396 <div class="defun"> | |
9692 | 3397 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qncmva</b> (<var>N, S, Sld, V</var>)<var><a name="index-qncmva-168"></a></var><br> |
3398 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qncmva</b> (<var>N, S, Sld, V, Z</var>)<var><a name="index-qncmva-169"></a></var><br> | |
9391 | 3399 <blockquote> |
9692 | 3400 <p><a name="index-Mean-Value-Analysys-_0028MVA_0029-170"></a><a name="index-CMVA-171"></a> |
9391 | 3401 Implementation of the Conditional MVA (CMVA) algorithm, a numerically |
3402 stable variant of MVA for load-dependent servers. CMVA is described | |
3403 in G. Casale, <cite>A Note on Stable Flow-Equivalent Aggregation in | |
3404 Closed Networks</cite>. The network is made of M service centers and | |
3405 a delay center. Servers 1, \ldots, M-1 are load-independent; | |
3406 server M is load-dependent. | |
3407 | |
3408 <p><strong>INPUTS</strong> | |
3409 | |
3410 <dl> | |
3411 <dt><var>N</var><dd>Population size (number of requests in the system, <var>N</var><code> ≥ 0</code>). | |
3412 If <var>N</var><code> == 0</code>, this function returns | |
3413 <var>U</var><code> = </code><var>R</var><code> = </code><var>Q</var><code> = </code><var>X</var><code> = 0</code> | |
3414 | |
3415 <br><dt><var>S</var><dd><var>S</var><code>(k)</code> is the mean service time on server k = 1, <small class="dots">...</small>, M-1 | |
3416 (<var>S</var><code>(k) > 0</code>). | |
3417 | |
3418 <br><dt><var>Sld</var><dd><var>Sld</var><code>(n)</code> is the mean service time on server M | |
3419 when there are n requests, n=1, <small class="dots">...</small>, N. | |
3420 <var>Sld</var><code>(n) = </code> 1 / \mu(n), where \mu(n) is the | |
3421 service rate at center N when there are n requests. | |
3422 | |
3423 <br><dt><var>V</var><dd><var>V</var><code>(k)</code> is the average number of visits to service center | |
3424 k= 1, <small class="dots">...</small>, M (<var>V</var><code>(k) ≥ 0</code>). | |
3425 | |
3426 <br><dt><var>Z</var><dd>External delay for customers (<var>Z</var><code> ≥ 0</code>). Default is 0. | |
3427 | |
3428 </dl> | |
3429 | |
3430 <p><strong>OUTPUTS</strong> | |
3431 | |
3432 <dl> | |
3433 <dt><var>U</var><dd><var>U</var><code>(k)</code> is the utilization of center k=1, <small class="dots">...</small>, M | |
3434 | |
3435 <br><dt><var>R</var><dd><var>R</var><code>(k)</code> is the response time at center k=1, <small class="dots">...</small>, M. | |
3436 The system response time <var>Rsys</var> | |
3437 can be computed as <var>Rsys</var><code> = </code><var>N</var><code>/</code><var>Xsys</var><code> - Z</code> | |
3438 | |
3439 <br><dt><var>Q</var><dd><var>Q</var><code>(k)</code> is the average number of requests at center | |
3440 k=1, <small class="dots">...</small>, M. | |
3441 | |
3442 <br><dt><var>X</var><dd><var>X</var><code>(k)</code> is the throughput of center k=1, <small class="dots">...</small>, M. | |
3443 | |
3444 </dl> | |
3445 | |
3446 </blockquote></div> | |
3447 | |
3448 <p class="noindent"><strong>REFERENCES</strong> | |
3449 | |
3450 <p>G. Casale. <cite>A note on stable flow-equivalent aggregation in | |
3451 closed networks</cite>. Queueing Syst. Theory Appl., 60:193–202, December | |
3452 2008. | |
3453 | |
9692 | 3454 <p><a name="index-Casale_002c-G_002e-172"></a> |
9391 | 3455 <!-- Approximate MVA for single class, closed networks --> |
3456 | |
3457 <p><a name="doc_002dqnclosedsinglemvaapprox"></a> | |
3458 | |
3459 <div class="defun"> | |
9692 | 3460 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedsinglemvaapprox</b> (<var>N, S, V</var>)<var><a name="index-qnclosedsinglemvaapprox-173"></a></var><br> |
3461 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedsinglemvaapprox</b> (<var>N, S, V, m</var>)<var><a name="index-qnclosedsinglemvaapprox-174"></a></var><br> | |
3462 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedsinglemvaapprox</b> (<var>N, S, V, m, Z</var>)<var><a name="index-qnclosedsinglemvaapprox-175"></a></var><br> | |
3463 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedsinglemvaapprox</b> (<var>N, S, V, m, Z, tol</var>)<var><a name="index-qnclosedsinglemvaapprox-176"></a></var><br> | |
3464 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedsinglemvaapprox</b> (<var>N, S, V, m, Z, tol, iter_max</var>)<var><a name="index-qnclosedsinglemvaapprox-177"></a></var><br> | |
9391 | 3465 <blockquote> |
9692 | 3466 <p><a name="index-Mean-Value-Analysys-_0028MVA_0029_002c-approximate-178"></a><a name="index-Approximate-MVA-179"></a><a name="index-Closed-network_002c-single-class-180"></a><a name="index-Closed-network_002c-approximate-analysis-181"></a> |
9391 | 3467 Analyze closed, single class queueing networks using the Approximate |
3468 Mean Value Analysis (MVA) algorithm. This function is based on | |
3469 approximating the number of customers seen at center k when a | |
3470 new request arrives as Q_k(N) \times (N-1)/N. This function | |
3471 only handles single-server and delay centers; if your network | |
3472 contains general load-dependent service centers, use the function | |
3473 <code>qnclosedsinglemvald</code> instead. | |
3474 | |
3475 <p><strong>INPUTS</strong> | |
3476 | |
3477 <dl> | |
3478 <dt><var>N</var><dd>Population size (number of requests in the system, <var>N</var><code> > 0</code>). | |
3479 | |
3480 <br><dt><var>S</var><dd><var>S</var><code>(k)</code> is the mean service time on server k | |
3481 (<var>S</var><code>(k)>0</code>). | |
3482 | |
3483 <br><dt><var>V</var><dd><var>V</var><code>(k)</code> is the average number of visits to service center | |
3484 k (<var>V</var><code>(k) ≥ 0</code>). | |
3485 | |
3486 <br><dt><var>m</var><dd><var>m</var><code>(k)</code> is the number of servers at center k | |
3487 (if <var>m</var> is a scalar, all centers have that number of servers). If | |
3488 <var>m</var><code>(k) < 1</code>, center k is a delay center (IS); if | |
3489 <var>m</var><code>(k) == 1</code>, center k is a regular queueing | |
3490 center (FCFS, LCFS-PR or PS) with one server (default). This function | |
3491 does not support multiple server nodes (<var>m</var><code>(k) > 1</code>). | |
3492 | |
3493 <br><dt><var>Z</var><dd>External delay for customers (<var>Z</var><code> ≥ 0</code>). Default is 0. | |
3494 | |
3495 <br><dt><var>tol</var><dd>Stopping tolerance. The algorithm stops when the maximum relative difference | |
3496 between the new and old value of the queue lengths <var>Q</var> becomes | |
3497 less than the tolerance. Default is 10^-5. | |
3498 | |
3499 <br><dt><var>iter_max</var><dd>Maximum number of iterations (<var>iter_max</var><code>>0</code>. | |
3500 The function aborts if convergenge is not reached within the maximum | |
3501 number of iterations. Default is 100. | |
3502 | |
3503 </dl> | |
3504 | |
3505 <p><strong>OUTPUTS</strong> | |
3506 | |
3507 <dl> | |
3508 <dt><var>U</var><dd>If k is a FCFS, LCFS-PR or PS node (<var>m</var><code>(k) == 1</code>), | |
3509 then <var>U</var><code>(k)</code> is the utilization of center k. If | |
3510 k is an IS node (<var>m</var><code>(k) < 1</code>), then | |
3511 <var>U</var><code>(k)</code> is the <em>traffic intensity</em> defined as | |
3512 <var>X</var><code>(k)*</code><var>S</var><code>(k)</code>. | |
3513 | |
3514 <br><dt><var>R</var><dd><var>R</var><code>(k)</code> is the response time at center k. | |
3515 The system response time <var>Rsys</var> | |
3516 can be computed as <var>Rsys</var><code> = </code><var>N</var><code>/</code><var>Xsys</var><code> - Z</code> | |
3517 | |
3518 <br><dt><var>Q</var><dd><var>Q</var><code>(k)</code> is the average number of requests at center | |
3519 k. The number of requests in the system can be computed | |
3520 either as <code>sum(</code><var>Q</var><code>)</code>, or using the formula | |
3521 <var>N</var><code>-</code><var>Xsys</var><code>*</code><var>Z</var>. | |
3522 | |
3523 <br><dt><var>X</var><dd><var>X</var><code>(k)</code> is the throughput of center k. The | |
3524 system throughput <var>Xsys</var> can be computed as | |
3525 <var>Xsys</var><code> = </code><var>X</var><code>(1) / </code><var>V</var><code>(1)</code> | |
3526 | |
3527 </dl> | |
3528 | |
3529 <pre class="sp"> | |
3530 | |
3531 </pre> | |
3532 <strong>See also:</strong> qnclosedsinglemva,qnclosedsinglemvald. | |
3533 | |
3534 </blockquote></div> | |
3535 | |
3536 <p class="noindent"><strong>REFERENCES</strong> | |
3537 | |
3538 <p>This implementation is based on Edward D. Lazowska, John Zahorjan, | |
3539 G. Scott Graham, and Kenneth C. Sevcik, <cite>Quantitative System | |
3540 Performance: Computer System Analysis Using Queueing Network Models</cite>, | |
3541 Prentice Hall, | |
3542 1984. <a href="http://www.cs.washington.edu/homes/lazowska/qsp/">http://www.cs.washington.edu/homes/lazowska/qsp/</a>. In | |
3543 particular, see section 6.4.2.2 ("Approximate Solution Techniques"). | |
3544 | |
9692 | 3545 <p><a name="index-Lazowska_002c-E_002e-D_002e-182"></a><a name="index-Zahorjan_002c-J_002e-183"></a><a name="index-Graham_002c-G_002e-S_002e-184"></a><a name="index-Sevcik_002c-K_002e-C_002e-185"></a> |
9391 | 3546 |
3547 <!-- MVA for multiple class, closed networks --> | |
3548 <p><a name="doc_002dqnclosedmultimva"></a> | |
3549 | |
3550 <div class="defun"> | |
9692 | 3551 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedmultimva</b> (<var>N, S </var>)<var><a name="index-qnclosedmultimva-186"></a></var><br> |
3552 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedmultimva</b> (<var>N, S, V</var>)<var><a name="index-qnclosedmultimva-187"></a></var><br> | |
3553 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedmultimva</b> (<var>N, S, V, m</var>)<var><a name="index-qnclosedmultimva-188"></a></var><br> | |
3554 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedmultimva</b> (<var>N, S, V, m, Z</var>)<var><a name="index-qnclosedmultimva-189"></a></var><br> | |
3555 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedmultimva</b> (<var>N, S, P</var>)<var><a name="index-qnclosedmultimva-190"></a></var><br> | |
3556 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedmultimva</b> (<var>N, S, P, m</var>)<var><a name="index-qnclosedmultimva-191"></a></var><br> | |
9391 | 3557 <blockquote> |
9692 | 3558 <p><a name="index-Mean-Value-Analysys-_0028MVA_0029-192"></a><a name="index-closed-network_002c-multiple-classes-193"></a> |
9391 | 3559 Analyze closed, multiclass queueing networks with K service |
3560 centers and C independent customer classes (chains) using the | |
3561 Mean Value Analysys (MVA) algorithm. | |
3562 | |
3563 <p>Queueing policies at service centers can be any of the following: | |
3564 | |
3565 <dl> | |
3566 <dt><strong>FCFS</strong><dd>(First-Come-First-Served) customers are served in order of arrival; | |
3567 multiple servers are allowed. For this kind of queueing discipline, | |
3568 average service times must be class-independent. | |
3569 | |
3570 <br><dt><strong>PS</strong><dd>(Processor Sharing) customers are served in parallel by a single | |
3571 server, each customer receiving an equal share of the service rate. | |
3572 | |
3573 <br><dt><strong>LCFS-PR</strong><dd>(Last-Come-First-Served, Preemptive Resume) customers are served in | |
3574 reverse order of arrival by a single server and the last arrival | |
3575 preempts the customer in service who will later resume service at the | |
3576 point of interruption. | |
3577 | |
3578 <br><dt><strong>IS</strong><dd>(Infinite Server) customers are delayed independently of other | |
3579 customers at the service center (there is effectively an infinite | |
3580 number of servers). | |
3581 | |
3582 </dl> | |
3583 | |
3584 <blockquote> | |
3585 <b>Note:</b> If this function is called specifying the visit ratios | |
3586 <var>V</var>, class switching is <strong>not</strong> allowed. | |
3587 | |
3588 <p>If this function is called specifying the routing probability matrix | |
3589 <var>P</var>, then class switching <strong>is</strong> allowed; however, in this | |
3590 case all nodes are restricted to be fixed rate service centers or | |
3591 delay centers: multiple-server and general load-dependent | |
3592 centers are not supported.</blockquote> | |
3593 | |
3594 <p><strong>INPUTS</strong> | |
3595 | |
3596 <dl> | |
3597 <dt><var>N</var><dd><var>N</var><code>(c)</code> is the number of class c requests in the | |
3598 system; <var>N</var><code>(c) ≥ 0</code>. If class c has | |
3599 no requests (<var>N</var><code>(c) = 0</code>), then | |
3600 <var>U</var><code>(c,k) = </code><var>R</var><code>(c,k) = </code><var>Q</var><code>(c,k) = </code><var>X</var><code>(c,k) = 0</code> | |
3601 for all <var>k</var>. | |
3602 | |
3603 <br><dt><var>S</var><dd><var>S</var><code>(c,k)</code> is the mean service time for class c | |
3604 customers at center k (<var>S</var><code>(c,k) ≥ 0</code>). | |
3605 If service time at center k is class-dependent, | |
3606 then center #mathk is assumed to be of type -/G/1–PS | |
3607 (Processor Sharing). | |
3608 If center k is a FCFS node (<var>m</var><code>(k)>1</code>), then the | |
3609 service times <strong>must</strong> be class-independent. | |
3610 | |
3611 <br><dt><var>V</var><dd><var>V</var><code>(c,k)</code> is the average number of visits of class c | |
3612 customers to service center k; <var>V</var><code>(c,k) ≥ 0</code>, | |
3613 default is 1. | |
9439 | 3614 <strong>If you pass this parameter, class switching is not |
9391 | 3615 allowed</strong> |
3616 | |
3617 <br><dt><var>P</var><dd><var>P</var><code>(r,i,s,j)</code> is the probability that a class r | |
3618 job completing service at center i is routed to center j | |
3619 as a class s job. <strong>If you pass this parameter, | |
3620 class switching is allowed</strong>. | |
3621 | |
3622 <br><dt><var>m</var><dd>If <var>m</var><code>(k)<1</code>, then center k is assumed to be a delay | |
3623 center (IS node -/G/\infty). If <var>m</var><code>(k)==1</code>, then | |
3624 service center k is a regular queueing center | |
3625 (M/M/1–FCFS, -/G/1–LCFS-PR or -/G/1–PS). | |
3626 Finally, if <var>m</var><code>(k)>1</code>, center k is a | |
3627 M/M/m–FCFS center with <var>m</var><code>(k)</code> identical servers. | |
3628 Default is <var>m</var><code>(k)=1</code> for each k. | |
3629 | |
3630 <br><dt><var>Z</var><dd><var>Z</var><code>(c)</code> is the class c external delay (think time); | |
3631 <var>Z</var><code>(c) ≥ 0</code>. Default is 0. | |
3632 | |
3633 </dl> | |
3634 | |
3635 <p><strong>OUTPUTS</strong> | |
3636 | |
3637 <dl> | |
3638 <dt><var>U</var><dd>If k is a FCFS, LCFS-PR or PS node, then <var>U</var><code>(c,k)</code> | |
3639 is the class c utilization at center | |
3640 k. If k is an IS node, then <var>U</var><code>(c,k)</code> is the | |
3641 class c <em>traffic intensity</em> at center k, | |
3642 defined as <var>U</var><code>(c,k) = </code><var>X</var><code>(c,k)*</code><var>S</var><code>(c,k)</code>. | |
3643 | |
3644 <br><dt><var>R</var><dd><var>R</var><code>(c,k)</code> is the class c response time at | |
9622 | 3645 center k. The class c <em>residence time</em> |
3646 at center k is <var>R</var><code>(c,k) * </code><var>C</var><code>(c,k)</code>. | |
3647 The total class c system response time | |
3648 is <code>dot(</code><var>R</var><code>, </code><var>V</var><code>, 2)</code>. | |
9391 | 3649 |
3650 <br><dt><var>Q</var><dd><var>Q</var><code>(c,k)</code> is the average number of | |
3651 class c requests at center k. The total number of | |
3652 requests at center k is <code>sum(</code><var>Q</var><code>(:,k))</code>. | |
3653 The total number of class c requests in the system | |
3654 is <code>sum(</code><var>Q</var><code>(c,:))</code>. | |
3655 | |
3656 <br><dt><var>X</var><dd><var>X</var><code>(c,k)</code> is the class c throughput at | |
3657 center k. The class c system throughput can be computed | |
3658 as <var>X</var><code>(c,1) / </code><var>V</var><code>(c,1)</code>. | |
3659 | |
3660 </dl> | |
3661 | |
3662 <pre class="sp"> | |
3663 | |
3664 </pre> | |
3665 <strong>See also:</strong> qnclosed, qnclosedmultimvaapprox. | |
3666 | |
3667 </blockquote></div> | |
3668 | |
3669 <p class="noindent"><strong>NOTE</strong> | |
3670 | |
3671 <p>Given a network with K service centers, C job classes and | |
3672 population vector \bf N=(N_1, N_2, \ldots N_C), the MVA | |
3673 algorithm requires space O(C \prod_i (N_i + 1)). The time | |
3674 complexity is O(CK\prod_i (N_i + 1)). This implementation is | |
3675 slightly more space-efficient (see details in the code). While the space | |
3676 requirement can be mitigated by using some optimizations, the time | |
3677 complexity can not. If you need to analyze large closed networks you | |
3678 should consider the <samp><span class="command">qnclosedmultimvaapprox</span></samp> function, which | |
3679 implements the approximate MVA algorithm. Note however that | |
3680 <samp><span class="command">qnclosedmultimvaapprox</span></samp> will only provide approximate results. | |
3681 | |
3682 <p class="noindent"><strong>REFERENCES</strong> | |
3683 | |
3684 <p>M. Reiser and S. S. Lavenberg, <cite>Mean-Value Analysis of Closed | |
3685 Multichain Queuing Networks</cite>, Journal of the ACM, vol. 27, n. 2, April | |
3686 1980, pp. 313–322. <a href="http://doi.acm.org/10.1145/322186.322195">http://doi.acm.org/10.1145/322186.322195</a> | |
3687 | |
9692 | 3688 <p><a name="index-Reiser_002c-M_002e-194"></a><a name="index-Lavenberg_002c-S_002e-S_002e-195"></a> |
9391 | 3689 This implementation is based on G. Bolch, S. Greiner, H. de Meer and |
3690 K. Trivedi, <cite>Queueing Networks and Markov Chains: Modeling and | |
3691 Performance Evaluation with Computer Science Applications</cite>, Wiley, | |
3692 1998 and Edward D. Lazowska, John Zahorjan, G. Scott Graham, and | |
3693 Kenneth C. Sevcik, <cite>Quantitative System Performance: Computer | |
3694 System Analysis Using Queueing Network Models</cite>, Prentice Hall, | |
3695 1984. <a href="http://www.cs.washington.edu/homes/lazowska/qsp/">http://www.cs.washington.edu/homes/lazowska/qsp/</a>. In | |
3696 particular, see section 7.4.2.1 ("Exact Solution Techniques"). | |
3697 | |
9692 | 3698 <p><a name="index-Bolch_002c-G_002e-196"></a><a name="index-Greiner_002c-S_002e-197"></a><a name="index-de-Meer_002c-H_002e-198"></a><a name="index-Trivedi_002c-K_002e-199"></a><a name="index-Lazowska_002c-E_002e-D_002e-200"></a><a name="index-Zahorjan_002c-J_002e-201"></a><a name="index-Graham_002c-G_002e-S_002e-202"></a><a name="index-Sevcik_002c-K_002e-C_002e-203"></a> |
9391 | 3699 <!-- Approximate MVA, with Bard-Schweitzer approximation --> |
3700 <a name="doc_002dqnclosedmultimvaapprox"></a> | |
3701 | |
3702 <div class="defun"> | |
9692 | 3703 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedmultimvaapprox</b> (<var>N, S, V</var>)<var><a name="index-qnclosedmultimvaapprox-204"></a></var><br> |
3704 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedmultimvaapprox</b> (<var>N, S, V, m</var>)<var><a name="index-qnclosedmultimvaapprox-205"></a></var><br> | |
3705 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedmultimvaapprox</b> (<var>N, S, V, m, Z</var>)<var><a name="index-qnclosedmultimvaapprox-206"></a></var><br> | |
3706 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedmultimvaapprox</b> (<var>N, S, V, m, Z, tol</var>)<var><a name="index-qnclosedmultimvaapprox-207"></a></var><br> | |
3707 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosedmultimvaapprox</b> (<var>N, S, V, m, Z, tol, iter_max</var>)<var><a name="index-qnclosedmultimvaapprox-208"></a></var><br> | |
9391 | 3708 <blockquote> |
9692 | 3709 <p><a name="index-Mean-Value-Analysys-_0028MVA_0029_002c-approximate-209"></a><a name="index-Approximate-MVA-210"></a><a name="index-Closed-network_002c-multiple-classes-211"></a><a name="index-Closed-network_002c-approximate-analysis-212"></a> |
9391 | 3710 Analyze closed, multiclass queueing networks with K service |
3711 centers and C customer classes using the approximate Mean | |
3712 Value Analysys (MVA) algorithm. | |
3713 | |
3714 <p>This implementation uses Bard and Schweitzer approximation. It is based | |
3715 on the assumption that | |
3716 the queue length at service center k with population | |
3717 set \bf N-\bf 1_c is approximately equal to the queue length | |
3718 with population set \bf N, times (n-1)/n: | |
3719 | |
3720 <pre class="example"> Q_i(N-1c) ~ (n-1)/n Q_i(N) | |
3721 </pre> | |
3722 <p>where \bf N is a valid population mix, \bf N-\bf 1_c | |
3723 is the population mix \bf N with one class c customer | |
3724 removed, and n = \sum_c N_c is the total number of requests. | |
3725 | |
3726 <p>This implementation works for networks made of infinite server (IS) | |
3727 nodes and single-server nodes only. | |
3728 | |
3729 <p><strong>INPUTS</strong> | |
3730 | |
3731 <dl> | |
3732 <dt><var>N</var><dd><var>N</var><code>(c)</code> is the number of | |
3733 class c requests in the system (<var>N</var><code>(c)>0</code>). | |
3734 | |
3735 <br><dt><var>S</var><dd><var>S</var><code>(c,k)</code> is the mean service time for class c | |
3736 customers at center k (<var>S</var><code>(c,k) ≥ 0</code>). | |
3737 | |
3738 <br><dt><var>V</var><dd><var>V</var><code>(c,k)</code> is the average number of visits of class c | |
3739 requests to center k (<var>V</var><code>(c,k) ≥ 0</code>). | |
3740 | |
3741 <br><dt><var>m</var><dd><var>m</var><code>(k)</code> is the number of servers at service center | |
3742 k. If <var>m</var><code>(k) < 1</code>, then the service center k | |
3743 is assumed to be a delay center (IS). If <var>m</var><code>(k) == 1</code>, | |
3744 service center k is a regular queueing center (FCFS, LCFS-PR | |
3745 or PS) with a single server node. If omitted, each service center has | |
3746 a single server. Note that multiple server nodes are not supported. | |
3747 | |
3748 <br><dt><var>Z</var><dd><var>Z</var><code>(c)</code> is the class c external delay. Default | |
3749 is 0. | |
3750 | |
3751 <br><dt><var>tol</var><dd>Stopping tolerance (<var>tol</var><code>>0</code>). The algorithm stops if | |
3752 the queue length computed on two subsequent iterations are less than | |
3753 <var>tol</var>. Default is 10^-5. | |
3754 | |
3755 <br><dt><var>iter_max</var><dd>Maximum number of iterations (<var>iter_max</var><code>>0</code>. | |
3756 The function aborts if convergenge is not reached within the maximum | |
3757 number of iterations. Default is 100. | |
3758 | |
3759 </dl> | |
3760 | |
3761 <p><strong>OUTPUTS</strong> | |
3762 | |
3763 <dl> | |
3764 <dt><var>U</var><dd>If k is a FCFS, LCFS-PR or PS node, then <var>U</var><code>(c,k)</code> | |
3765 is the utilization of class c requests on service center | |
3766 k. If k is an IS node, then <var>U</var><code>(c,k)</code> is the | |
3767 class c <em>traffic intensity</em> at device k, | |
3768 defined as <var>U</var><code>(c,k) = </code><var>X</var><code>(c)*</code><var>S</var><code>(c,k)</code> | |
3769 | |
3770 <br><dt><var>R</var><dd><var>R</var><code>(c,k)</code> is the response | |
3771 time of class c requests at service center k. | |
3772 | |
3773 <br><dt><var>Q</var><dd><var>Q</var><code>(c,k)</code> is the average number of | |
3774 class c requests at service center k. | |
3775 | |
3776 <br><dt><var>X</var><dd><var>X</var><code>(c,k)</code> is the class c | |
3777 throughput at service center k. | |
3778 | |
3779 </dl> | |
3780 | |
3781 <pre class="sp"> | |
3782 | |
3783 </pre> | |
3784 <strong>See also:</strong> qnclosed. | |
3785 | |
3786 </blockquote></div> | |
3787 | |
3788 <p class="noindent"><strong>REFERENCES</strong> | |
3789 | |
3790 <p>Y. Bard, <cite>Some Extensions to Multiclass Queueing Network Analysis</cite>, | |
3791 proc. 4th Int. Symp. on Modelling and Performance Evaluation of | |
3792 Computer Systems, feb. 1979, pp. 51–62. | |
3793 | |
9692 | 3794 <p><a name="index-Bard_002c-Y_002e-213"></a> |
9391 | 3795 P. Schweitzer, <cite>Approximate Analysis of Multiclass Closed |
3796 Networks of Queues</cite>, Proc. Int. Conf. on Stochastic Control and | |
3797 Optimization, jun 1979, pp. 25–29. | |
3798 | |
9692 | 3799 <p><a name="index-Schweitzer_002c-P_002e-214"></a> |
9391 | 3800 This implementation is based on Edward D. Lazowska, John Zahorjan, G. |
3801 Scott Graham, and Kenneth C. Sevcik, <cite>Quantitative System | |
3802 Performance: Computer System Analysis Using Queueing Network Models</cite>, | |
3803 Prentice Hall, | |
3804 1984. <a href="http://www.cs.washington.edu/homes/lazowska/qsp/">http://www.cs.washington.edu/homes/lazowska/qsp/</a>. In | |
3805 particular, see section 7.4.2.2 ("Approximate Solution | |
3806 Techniques"). This implementation is slightly different from the one | |
3807 described above, as it computes the average response times R | |
3808 instead of the residence times. | |
3809 | |
9692 | 3810 <p><a name="index-Lazowska_002c-E_002e-D_002e-215"></a><a name="index-Zahorjan_002c-J_002e-216"></a><a name="index-Graham_002c-G_002e-S_002e-217"></a><a name="index-Sevcik_002c-K_002e-C_002e-218"></a> |
9391 | 3811 |
3812 <h4 class="subsection">6.3.5 Mixed Networks</h4> | |
3813 | |
3814 <!-- MVA for mixed networks --> | |
3815 <p><a name="doc_002dqnmix"></a> | |
3816 | |
3817 <div class="defun"> | |
9692 | 3818 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnmix</b> (<var>lambda, N, S, V, m</var>)<var><a name="index-qnmix-219"></a></var><br> |
9391 | 3819 <blockquote> |
9692 | 3820 <p><a name="index-Mean-Value-Analysys-_0028MVA_0029-220"></a><a name="index-mixed-network-221"></a> |
9391 | 3821 Solution of mixed queueing networks through MVA. The network consists |
3822 of K service centers (single-server or delay centers) and | |
3823 C independent customer chains. Both open and closed chains | |
3824 are possible. <var>lambda</var> is the vector of per-chain | |
3825 arrival rates (open classes); <var>N</var> is the vector of populations | |
3826 for closed chains. | |
3827 | |
3828 <blockquote> | |
3829 <b>Note:</b> In this implementation class switching is <strong>not</strong> allowed. Each | |
3830 customer class <em>must</em> correspond to an independent chain. | |
3831 </blockquote> | |
3832 | |
3833 <p>If the network is made of open or closed classes only, then this | |
3834 function calls <code>qnopenmulti</code> or <code>qnclosedmultimva</code> | |
3835 respectively, and prints a warning message. | |
3836 | |
3837 <p><strong>INPUTS</strong> | |
3838 | |
3839 <dl> | |
3840 <dt><var>lambda</var><dt><var>N</var><dd>For each customer chain c: | |
3841 | |
3842 <ul> | |
3843 <li>if c is a closed chain, then <var>N</var><code>(c)>0</code> is the | |
3844 number of class c requests and <var>lambda</var><code>(c)</code> must be | |
3845 zero; | |
3846 | |
3847 <li>If c is an open chain, | |
3848 <var>lambda</var><code>(c)>0</code> is the arrival rate of class c | |
3849 requests and <var>N</var><code>(c)</code> must be zero; | |
3850 | |
3851 </ul> | |
3852 | |
3853 <p class="noindent">For each c, the following must hold: | |
3854 | |
3855 <pre class="example"> (<var>lambda</var>(c)>0 && <var>N</var>(c)==0) || (<var>lambda</var>(c)==0 && <var>N</var>(c)>0) | |
3856 </pre> | |
3857 <p>which means that either <var>lambda</var><code>(c)</code> is nonzero and | |
3858 <var>N</var><code>(n)</code> is zero, or the other way around. If for some | |
3859 c, <var>lambda</var>(c) \neq 0 and <var>N</var>(c) \neq 0, an | |
3860 error is reported and this function aborts. | |
3861 | |
3862 <br><dt><var>S</var><dd><var>S</var><code>(c,k)</code> is the mean service time for class c | |
3863 customers on service center k, <var>S</var><code>(c,k) ≥ 0</code>. | |
3864 For FCFS nodes, service times must be class-independent. | |
3865 | |
3866 <br><dt><var>V</var><dd><var>V</var><code>(c,k)</code> is the average number of visits of class c | |
3867 customers to service center k (<var>V</var><code>(c,k) ≥ 0</code>). | |
3868 | |
3869 <br><dt><var>m</var><dd><var>m</var><code>(k)</code> is the number of servers at service center | |
3870 k. Only single-server (<var>m</var><code>(k)==1</code>) or IS (Infinite | |
3871 Server) nodes (<var>m</var><code>(k)<1</code>) are supported. If omitted, each | |
3872 service center is assumed to have a single server. Queueing discipline | |
3873 for single-server nodes can be FCFS, PS or LCFS-PR. | |
3874 | |
3875 </dl> | |
3876 | |
3877 <p><strong>OUTPUTS</strong> | |
3878 | |
3879 <dl> | |
3880 <dt><var>U</var><dd><var>U</var><code>(c,k)</code> is the | |
3881 utilization of class c requests on service center k. | |
3882 | |
3883 <br><dt><var>R</var><dd><var>R</var><code>(c,k)</code> is the response | |
3884 time of class c requests on service center k. | |
3885 | |
3886 <br><dt><var>Q</var><dd><var>Q</var><code>(c,k)</code> is the average number of | |
3887 class c requests on service center k. | |
3888 | |
3889 <br><dt><var>X</var><dd><var>X</var><code>(c,k)</code> is the class c | |
3890 throughput on service center k. | |
3891 | |
3892 </dl> | |
3893 | |
3894 <pre class="sp"> | |
3895 | |
3896 </pre> | |
3897 <strong>See also:</strong> qnclosedmultimva, qnopenmulti. | |
3898 | |
3899 </blockquote></div> | |
3900 | |
3901 <p class="noindent"><strong>REFERENCES</strong> | |
3902 | |
3903 <p>Edward D. Lazowska, John Zahorjan, G. Scott Graham, and Kenneth C. | |
3904 Sevcik, <cite>Quantitative System Performance: Computer System | |
3905 Analysis Using Queueing Network Models</cite>, Prentice Hall, | |
3906 1984. <a href="http://www.cs.washington.edu/homes/lazowska/qsp/">http://www.cs.washington.edu/homes/lazowska/qsp/</a>. In | |
3907 particular, see section 7.4.3 ("Mixed Model Solution Techniques"). | |
3908 Note that in this function we compute the mean response time R | |
3909 instead of the mean residence time as in the reference. | |
3910 | |
9692 | 3911 <p><a name="index-Lazowska_002c-E_002e-D_002e-222"></a><a name="index-Zahorjan_002c-J_002e-223"></a><a name="index-Graham_002c-G_002e-S_002e-224"></a><a name="index-Sevcik_002c-K_002e-C_002e-225"></a> |
9391 | 3912 Herb Schwetman, <cite>Implementing the Mean Value Algorithm for the |
3913 Solution of Queueing Network Models</cite>, Technical Report CSD-TR-355, | |
3914 Department of Computer Sciences, Purdue University, feb 15, 1982, | |
3915 available at | |
3916 <a href="http://www.cs.purdue.edu/research/technical_reports/1980/TR%2080-355.pdf">http://www.cs.purdue.edu/research/technical_reports/1980/TR%2080-355.pdf</a> | |
3917 | |
9692 | 3918 <p><a name="index-Schwetman_002c-H_002e-226"></a> |
9391 | 3919 |
3920 <div class="node"> | |
3921 <a name="Algorithms-for-non-Product-form-QNs"></a> | |
3922 <a name="Algorithms-for-non-Product_002dform-QNs"></a> | |
3923 <p><hr> | |
3924 Next: <a rel="next" accesskey="n" href="#Bounds-on-performance">Bounds on performance</a>, | |
3925 Previous: <a rel="previous" accesskey="p" href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a>, | |
3926 Up: <a rel="up" accesskey="u" href="#Queueing-Networks">Queueing Networks</a> | |
3927 | |
3928 </div> | |
3929 | |
3930 <h3 class="section">6.4 Algorithms for non Product-Form QNs</h3> | |
3931 | |
3932 <!-- MVABLO algorithm for approximate analysis of closed, single class --> | |
3933 <!-- QN with blocking --> | |
3934 <p><a name="doc_002dqnmvablo"></a> | |
3935 | |
3936 <div class="defun"> | |
9692 | 3937 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnmvablo</b> (<var>N, S, M, P</var>)<var><a name="index-qnmvablo-227"></a></var><br> |
9391 | 3938 <blockquote> |
9692 | 3939 <p><a name="index-queueing-network-with-blocking-228"></a><a name="index-blocking-queueing-network-229"></a><a name="index-closed-network_002c-finite-capacity-230"></a> |
9391 | 3940 MVA algorithm for closed queueing networks with blocking. <samp><span class="command">qnmvablo</span></samp> |
3941 computes approximate utilization, response time and mean queue length | |
3942 for closed, single class queueing networks with blocking. | |
3943 | |
3944 <p><strong>INPUTS</strong> | |
3945 | |
3946 <dl> | |
3947 <dt><var>N</var><dd>population size, i.e., number of requests in the system. <var>N</var> must | |
3948 be strictly greater than zero, and less than the overall network capacity: | |
3949 <code>0 < </code><var>N</var><code> < sum(</code><var>M</var><code>)</code>. | |
3950 | |
3951 <br><dt><var>S</var><dd>Average service time. <var>S</var><code>(i)</code> is the average service time | |
3952 requested on server i (<var>S</var><code>(i) > 0</code>). | |
3953 | |
3954 <br><dt><var>M</var><dd>Server capacity. <var>M</var><code>(i)</code> is the capacity of service center | |
3955 i. The capacity is the maximum number of requests in a service | |
3956 center, including the request currently in service (<var>M</var><code>(i) ≥ 1</code>). | |
3957 | |
3958 <br><dt><var>P</var><dd><var>P</var><code>(i,j)</code> is the probability that a request which completes | |
3959 service at server i will be transferred to server j. | |
3960 | |
3961 </dl> | |
3962 | |
3963 <p><strong>OUTPUTS</strong> | |
3964 | |
3965 <dl> | |
3966 <dt><var>U</var><dd><var>U</var><code>(i)</code> is the utilization of | |
3967 service center i. | |
3968 | |
3969 <br><dt><var>R</var><dd><var>R</var><code>(i)</code> is the average response time | |
3970 of service center i. | |
3971 | |
3972 <br><dt><var>Q</var><dd><var>Q</var><code>(i)</code> is | |
3973 the average number of requests in service center i (including | |
3974 the request in service). | |
3975 | |
3976 <br><dt><var>X</var><dd><var>X</var><code>(i)</code> is the throughput of | |
3977 service center i. | |
3978 | |
3979 </dl> | |
3980 | |
3981 <pre class="sp"> | |
3982 | |
3983 </pre> | |
3984 <strong>See also:</strong> qnopen, qnclosed. | |
3985 | |
3986 </blockquote></div> | |
3987 | |
3988 <p class="noindent"><strong>REFERENCES</strong> | |
3989 | |
3990 <p>Ian F. Akyildiz, <cite>Mean Value Analysis for Blocking Queueing | |
3991 Networks</cite>, IEEE Transactions on Software Engineering, vol. 14, n. 2, | |
3992 april 1988, pp. 418–428. <a href="http://dx.doi.org/10.1109/32.4663">http://dx.doi.org/10.1109/32.4663</a> | |
3993 | |
9692 | 3994 <p><a name="index-Akyildiz_002c-I_002e-F_002e-231"></a> |
9391 | 3995 <a name="doc_002dqnmarkov"></a> |
3996 | |
3997 <div class="defun"> | |
9692 | 3998 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnmarkov</b> (<var>lambda, S, C, P</var>)<var><a name="index-qnmarkov-232"></a></var><br> |
3999 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnmarkov</b> (<var>lambda, S, C, P, m</var>)<var><a name="index-qnmarkov-233"></a></var><br> | |
4000 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnmarkov</b> (<var>N, S, C, P</var>)<var><a name="index-qnmarkov-234"></a></var><br> | |
4001 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnmarkov</b> (<var>N, S, C, P, m</var>)<var><a name="index-qnmarkov-235"></a></var><br> | |
9391 | 4002 <blockquote> |
9692 | 4003 <p><a name="index-closed-network_002c-multiple-classes-236"></a><a name="index-closed-network_002c-finite-capacity-237"></a><a name="index-blocking-queueing-network-238"></a><a name="index-RS-blocking-239"></a> |
9391 | 4004 Compute utilization, response time, average queue length and |
4005 throughput for open or closed queueing networks with finite capacity. | |
4006 Blocking type is Repetitive-Service (RS). This function explicitly | |
4007 generates and solve the underlying Markov chain, and thus might | |
4008 require a large amount of memory. | |
4009 | |
4010 <p>More specifically, networks which can me analyzed by this | |
4011 function have the following properties: | |
4012 | |
4013 <ul> | |
4014 <li>There exists only a single class of customers. | |
4015 | |
4016 <li>The network has K service centers. Center | |
4017 i has m_i > 0 servers, and has a total (finite) capacity of | |
4018 C_i \geq m_i which includes both buffer space and servers. | |
4019 The buffer space at service center i is therefore | |
4020 C_i - m_i. | |
4021 | |
4022 <li>The network can be open, with external arrival rate to | |
4023 center i equal to | |
4024 \lambda_i, or closed with fixed | |
4025 population size N. For closed networks, the population size | |
4026 N must be strictly less than the network capacity: N < \sum_i C_i. | |
4027 | |
4028 <li>Average service times are load-independent. | |
4029 | |
4030 <li>P_ij is the probability that requests completing | |
4031 execution at center i are transferred to | |
4032 center j, i \neq j. For open networks, a request may leave the system | |
4033 from any node i with probability 1-\sum_j P_ij. | |
4034 | |
4035 <li>Blocking type is Repetitive-Service (RS). Service | |
4036 center j is <em>saturated</em> if the number of requests is equal | |
4037 to its capacity <code>C_j</code>. Under the RS blocking discipline, | |
4038 a request completing service at center i which is being | |
4039 transferred to a saturated server j is put back at the end of | |
4040 the queue of i and will receive service again. Center i | |
4041 then processes the next request in queue. External arrivals to a | |
4042 saturated servers are dropped. | |
4043 | |
4044 </ul> | |
4045 | |
4046 <p><strong>INPUTS</strong> | |
4047 | |
4048 <dl> | |
4049 <dt><var>lambda</var><dt><var>N</var><dd>If the first argument is a vector <var>lambda</var>, it is considered to be | |
4050 the external arrival rate <var>lambda</var><code>(i) ≥ 0</code> to service center | |
4051 i of an open network. If the first argument is a scalar, it is | |
4052 considered as the population size <var>N</var> of a closed network; in this case | |
4053 <var>N</var> must be strictly | |
4054 less than the network capacity: <var>N</var><code> < sum(</code><var>C</var><code>)</code>. | |
4055 | |
4056 <br><dt><var>S</var><dd><var>S</var><code>(i)</code> is the average service time at service center | |
4057 i | |
4058 | |
4059 <br><dt><var>C</var><dd><var>C</var><code>(i)</code> is the Capacity of service center i. The capacity includes both | |
4060 the buffer and server space <var>m</var><code>(i)</code>. Thus the buffer space is | |
4061 <var>C</var><code>(i)-</code><var>m</var><code>(i)</code>. | |
4062 | |
4063 <br><dt><var>P</var><dd><var>P</var><code>(i,j)</code> is the transition probability from service center | |
4064 i to service center j. | |
4065 | |
4066 <br><dt><var>m</var><dd><var>m</var><code>(i)</code> is the number of servers at service center | |
4067 i. Note that <var>m</var><code>(i) ≥ </code><var>C</var><code>(i)</code> for each <var>i</var>. | |
4068 If <var>m</var> is omitted, all service centers are assumed to have a | |
4069 single server (<var>m</var><code>(i) = 1</code> for all i). | |
4070 | |
4071 </dl> | |
4072 | |
4073 <p><strong>OUTPUTS</strong> | |
4074 | |
4075 <dl> | |
4076 <dt><var>U</var><dd><var>U</var><code>(i)</code> is the utilization of service center i. | |
4077 | |
4078 <br><dt><var>R</var><dd><var>R</var><code>(i)</code> is the response time on service center i. | |
4079 | |
4080 <br><dt><var>Q</var><dd><var>Q</var><code>(i)</code> is the average number of customers in the | |
4081 service center i, <em>including</em> the request in service. | |
4082 | |
4083 <br><dt><var>X</var><dd><var>X</var><code>(i)</code> is the throughput of service center i. | |
4084 | |
4085 </dl> | |
4086 | |
4087 <blockquote> | |
4088 <b>Note:</b> | |
4089 The space complexity of this implementation is | |
4090 O( \prod_i=1^K (C_i + 1)^2). The time complexity is dominated | |
4091 by the time needed to solve a linear system with | |
4092 \prod_i=1^K (C_i + 1) | |
4093 unknowns. | |
4094 | |
4095 </blockquote> | |
4096 | |
4097 </blockquote></div> | |
4098 | |
4099 <div class="node"> | |
4100 <a name="Bounds-on-performance"></a> | |
4101 <p><hr> | |
4102 Next: <a rel="next" accesskey="n" href="#Utility-functions">Utility functions</a>, | |
4103 Previous: <a rel="previous" accesskey="p" href="#Algorithms-for-non-Product_002dform-QNs">Algorithms for non Product-form QNs</a>, | |
4104 Up: <a rel="up" accesskey="u" href="#Queueing-Networks">Queueing Networks</a> | |
4105 | |
4106 </div> | |
4107 | |
4108 <h3 class="section">6.5 Bounds on performance</h3> | |
4109 | |
4110 <p><a name="doc_002dqnopenab"></a> | |
4111 | |
4112 <div class="defun"> | |
9692 | 4113 — Function File: [<var>Xu</var>, <var>Rl</var>] = <b>qnopenab</b> (<var>lambda, D</var>)<var><a name="index-qnopenab-240"></a></var><br> |
9391 | 4114 <blockquote> |
9692 | 4115 <p><a name="index-bounds_002c-asymptotic-241"></a><a name="index-open-network-242"></a> |
9391 | 4116 Compute Asymptotic Bounds for single-class, open Queueing Networks |
4117 with K service centers. | |
4118 | |
4119 <p><strong>INPUTS</strong> | |
4120 | |
4121 <dl> | |
4122 <dt><var>lambda</var><dd>overall arrival rate to the system (scalar). Abort if | |
4123 <var>lambda</var><code> ≤ 0</code> | |
4124 | |
4125 <br><dt><var>D</var><dd><var>D</var><code>(k)</code> is the service demand at center k. | |
4126 The service demand vector <var>D</var> must be nonempty, and all demands | |
4127 must be nonnegative (<var>D</var><code>(k) ≥ 0</code> for all k). | |
4128 | |
4129 </dl> | |
4130 | |
4131 <p><strong>OUTPUTS</strong> | |
4132 | |
4133 <dl> | |
4134 <dt><var>Xu</var><dd>Upper bound on the system throughput. | |
4135 | |
4136 <br><dt><var>Rl</var><dd>Lower bound on the system response time. | |
4137 | |
4138 </dl> | |
4139 | |
4140 <pre class="sp"> | |
4141 | |
4142 </pre> | |
4143 <strong>See also:</strong> qnopenbsb. | |
4144 | |
4145 </blockquote></div> | |
4146 | |
4147 <p class="noindent"><strong>REFERENCES</strong> | |
4148 | |
4149 <p>Edward D. Lazowska, John Zahorjan, G. Scott Graham, and Kenneth | |
4150 C. Sevcik, <cite>Quantitative System Performance: Computer System | |
4151 Analysis Using Queueing Network Models</cite>, Prentice Hall, | |
4152 1984. <a href="http://www.cs.washington.edu/homes/lazowska/qsp/">http://www.cs.washington.edu/homes/lazowska/qsp/</a>. In | |
4153 particular, see section 5.2 ("Asymptotic Bounds"). | |
4154 | |
9692 | 4155 <p><a name="index-Lazowska_002c-E_002e-D_002e-243"></a><a name="index-Zahorjan_002c-J_002e-244"></a><a name="index-Graham_002c-G_002e-S_002e-245"></a><a name="index-Sevcik_002c-K_002e-C_002e-246"></a> |
9391 | 4156 <a name="doc_002dqnclosedab"></a> |
4157 | |
4158 <div class="defun"> | |
9692 | 4159 — Function File: [<var>Xl</var>, <var>Xu</var>, <var>Rl</var>, <var>Ru</var>] = <b>qnclosedab</b> (<var>N, D</var>)<var><a name="index-qnclosedab-247"></a></var><br> |
4160 — Function File: [<var>Xl</var>, <var>Xu</var>, <var>Rl</var>, <var>Ru</var>] = <b>qnclosedab</b> (<var>N, D, Z</var>)<var><a name="index-qnclosedab-248"></a></var><br> | |
9391 | 4161 <blockquote> |
9692 | 4162 <p><a name="index-bounds_002c-asymptotic-249"></a><a name="index-closed-network-250"></a> |
9391 | 4163 Compute Asymptotic Bounds for single-class, closed Queueing Networks |
4164 with K service centers. | |
4165 | |
4166 <p><strong>INPUTS</strong> | |
4167 | |
4168 <dl> | |
4169 <dt><var>N</var><dd>number of requests in the system (scalar, <var>N</var><code>>0</code>). | |
4170 | |
4171 <br><dt><var>D</var><dd><var>D</var><code>(k)</code> is the service demand of service center k, | |
4172 <var>D</var><code>(k) ≥ 0</code>. | |
4173 | |
4174 <br><dt><var>Z</var><dd>external delay (think time, scalar, <var>Z</var><code> ≥ 0</code>). If | |
4175 omitted, it is assumed to be zero. | |
4176 | |
4177 </dl> | |
4178 | |
4179 <p><strong>OUTPUTS</strong> | |
4180 | |
4181 <dl> | |
4182 <dt><var>Xl</var><dt><var>Xu</var><dd>Lower and upper bound on the system throughput. | |
4183 | |
4184 <br><dt><var>Rl</var><dt><var>Ru</var><dd>Lower and upper bound on the system response time. | |
4185 | |
4186 </dl> | |
4187 | |
4188 <pre class="sp"> | |
4189 | |
4190 </pre> | |
4191 <strong>See also:</strong> qnclosedbsb, qnclosedgb, qnclosedpb. | |
4192 | |
4193 </blockquote></div> | |
4194 | |
4195 <p class="noindent"><strong>REFERENCES</strong> | |
4196 | |
4197 <p class="noindent">Edward D. Lazowska, John Zahorjan, G. Scott Graham, and Kenneth | |
4198 C. Sevcik, <cite>Quantitative System Performance: Computer System | |
4199 Analysis Using Queueing Network Models</cite>, Prentice Hall, | |
4200 1984. <a href="http://www.cs.washington.edu/homes/lazowska/qsp/">http://www.cs.washington.edu/homes/lazowska/qsp/</a>. In | |
4201 particular, see section 5.2 ("Asymptotic Bounds"). | |
4202 | |
9692 | 4203 <p><a name="index-Lazowska_002c-E_002e-D_002e-251"></a><a name="index-Zahorjan_002c-J_002e-252"></a><a name="index-Graham_002c-G_002e-S_002e-253"></a><a name="index-Sevcik_002c-K_002e-C_002e-254"></a> |
9391 | 4204 |
4205 <p><a name="doc_002dqnopenbsb"></a> | |
4206 | |
4207 <div class="defun"> | |
9692 | 4208 — Function File: [<var>Xu</var>, <var>Rl</var>, <var>Ru</var>] = <b>qnopenbsb</b> (<var>lambda, D</var>)<var><a name="index-qnopenbsb-255"></a></var><br> |
9391 | 4209 <blockquote> |
9692 | 4210 <p><a name="index-bounds_002c-balanced-system-256"></a><a name="index-open-network-257"></a> |
9391 | 4211 Compute Balanced System Bounds for single-class, open Queueing Networks |
4212 with K service centers. | |
4213 | |
4214 <p><strong>INPUTS</strong> | |
4215 | |
4216 <dl> | |
4217 <dt><var>lambda</var><dd>overall arrival rate to the system (scalar). Abort if | |
4218 <var>lambda</var><code> < 0 </code> | |
4219 | |
4220 <br><dt><var>D</var><dd><var>D</var><code>(k)</code> is the service demand at center k. | |
4221 The service demand vector <var>D</var> must be nonempty, and all demands | |
4222 must be nonnegative (<var>D</var><code>(k) ≥ 0</code> for all k). | |
4223 | |
4224 </dl> | |
4225 | |
4226 <p><strong>OUTPUTS</strong> | |
4227 | |
4228 <dl> | |
4229 <dt><var>Xl</var><dd>Lower bound on the system throughput. | |
4230 | |
4231 <br><dt><var>Rl</var><dt><var>Ru</var><dd>Lower and upper bound on the system response time. | |
4232 | |
4233 </dl> | |
4234 | |
4235 <pre class="sp"> | |
4236 | |
4237 </pre> | |
4238 <strong>See also:</strong> qnopenab. | |
4239 | |
4240 </blockquote></div> | |
4241 | |
4242 <p class="noindent"><strong>REFERENCES</strong> | |
4243 | |
4244 <p>Edward D. Lazowska, John Zahorjan, G. Scott Graham, and Kenneth | |
4245 C. Sevcik, <cite>Quantitative System Performance: Computer System | |
4246 Analysis Using Queueing Network Models</cite>, Prentice Hall, | |
4247 1984. <a href="http://www.cs.washington.edu/homes/lazowska/qsp/">http://www.cs.washington.edu/homes/lazowska/qsp/</a>. In | |
4248 particular, see section 5.4 ("Balanced Systems Bounds"). | |
4249 | |
9692 | 4250 <p><a name="index-Lazowska_002c-E_002e-D_002e-258"></a><a name="index-Zahorjan_002c-J_002e-259"></a><a name="index-Graham_002c-G_002e-S_002e-260"></a><a name="index-Sevcik_002c-K_002e-C_002e-261"></a> |
9391 | 4251 <a name="doc_002dqnclosedbsb"></a> |
4252 | |
4253 <div class="defun"> | |
9692 | 4254 — Function File: [<var>Xl</var>, <var>Xu</var>, <var>Rl</var>, <var>Ru</var>] = <b>qnclosedbsb</b> (<var>N, D</var>)<var><a name="index-qnclosedbsb-262"></a></var><br> |
4255 — Function File: [<var>Xl</var>, <var>Xu</var>, <var>Rl</var>, <var>Ru</var>] = <b>qnclosedbsb</b> (<var>N, D, Z</var>)<var><a name="index-qnclosedbsb-263"></a></var><br> | |
9391 | 4256 <blockquote> |
9692 | 4257 <p><a name="index-bounds_002c-balanced-system-264"></a><a name="index-closed-network-265"></a> |
9391 | 4258 Compute Balanced System Bounds for single-class, closed Queueing Networks |
4259 with K service centers. | |
4260 | |
4261 <p><strong>INPUTS</strong> | |
4262 | |
4263 <dl> | |
4264 <dt><var>N</var><dd>number of requests in the system (scalar). | |
4265 | |
4266 <br><dt><var>D</var><dd><var>D</var><code>(k)</code> is the service demand at center k; | |
4267 <var>K</var><code>(k) ≥ 0</code>. | |
4268 | |
4269 <br><dt><var>Z</var><dd>external delay (think time, scalar, <var>Z</var><code> ≥ 0</code>). If | |
4270 omitted, it is assumed to be zero. | |
4271 | |
4272 </dl> | |
4273 | |
4274 <p><strong>OUTPUTS</strong> | |
4275 | |
4276 <dl> | |
4277 <dt><var>Xl</var><dt><var>Xu</var><dd>Lower and upper bound on the system throughput. | |
4278 | |
4279 <br><dt><var>Rl</var><dt><var>Ru</var><dd>Lower and upper bound on the system response time. | |
4280 | |
4281 </dl> | |
4282 | |
4283 <pre class="sp"> | |
4284 | |
4285 </pre> | |
4286 <strong>See also:</strong> qnclosedab, qnclosedgb, qnclosedpb. | |
4287 | |
4288 </blockquote></div> | |
4289 | |
4290 <p><a name="doc_002dqnclosedpb"></a> | |
4291 | |
4292 <div class="defun"> | |
9692 | 4293 — Function File: [<var>Xl</var>, <var>Xu</var>] = <b>qnclosedpb</b> (<var>N, D </var>)<var><a name="index-qnclosedpb-266"></a></var><br> |
9391 | 4294 <blockquote> |
4295 <p>Compute PB Bounds (C. H. Hsieh and S. Lam, 1987) | |
4296 for single-class, closed Queueing Networks | |
4297 with K service centers. | |
4298 | |
4299 <p><strong>INPUTS</strong> | |
4300 | |
4301 <dl> | |
4302 <dt><var>N</var><dd>number of requests in the system (scalar). Must be <var>N</var><code> > 0</code>. | |
4303 | |
4304 <br><dt><var>D</var><dd><var>D</var><code>(k)</code> is the service demand of service center k. Must be | |
4305 <var>D</var><code>(k) ≥ 0</code> for all k. | |
4306 | |
4307 <br><dt><var>Z</var><dd>external delay (think time, scalar). If omitted, it is assumed to be zero. | |
4308 Must be <var>Z</var><code> ≥ 0</code>. | |
4309 | |
4310 </dl> | |
4311 | |
4312 <p><strong>OUTPUTS</strong> | |
4313 | |
4314 <dl> | |
4315 <dt><var>Xl</var><dt><var>Xu</var><dd>Lower and upper bounds on the system throughput. | |
4316 | |
4317 </dl> | |
4318 | |
4319 <pre class="sp"> | |
4320 | |
4321 </pre> | |
4322 <strong>See also:</strong> qnclosedab, qbclosedbsb, qnclosedgb. | |
4323 | |
4324 </blockquote></div> | |
4325 | |
4326 <p class="noindent"><strong>REFERENCES</strong> | |
4327 | |
4328 <p>The original paper describing PB Bounds is C. H. Hsieh and S. Lam, | |
4329 <cite>Two classes of performance bounds for closed queueing networks</cite>, | |
4330 PEVA, vol. 7, n. 1, pp. 3–30, 1987 | |
4331 | |
4332 <p>This function implements the non-iterative variant described in G. | |
4333 Casale, R. R. Muntz, G. Serazzi, <cite>Geometric Bounds: a | |
4334 Non-Iterative Analysis Technique for Closed Queueing Networks</cite>, IEEE | |
4335 Transactions on Computers, 57(6):780-794, June 2008. | |
4336 | |
9692 | 4337 <p><a name="index-Hsieh_002c-C_002e-H-267"></a><a name="index-Lam_002c-S_002e-268"></a><a name="index-Casale_002c-G_002e-269"></a><a name="index-Muntz_002c-R_002e-R_002e-270"></a><a name="index-Serazzi_002c-G_002e-271"></a> |
9391 | 4338 <a name="doc_002dqnclosedgb"></a> |
4339 | |
4340 <div class="defun"> | |
9692 | 4341 — Function File: [<var>Xl</var>, <var>Xu</var>, <var>Ql</var>, <var>Qu</var>] = <b>qnclosedgb</b> (<var>N, D, Z</var>)<var><a name="index-qnclosedgb-272"></a></var><br> |
9391 | 4342 <blockquote> |
9692 | 4343 <p><a name="index-bounds_002c-geometric-273"></a><a name="index-closed-network-274"></a> |
9391 | 4344 Compute Geometric Bounds (GB) for single-class, closed Queueing Networks. |
4345 | |
4346 <p><strong>INPUTS</strong> | |
4347 | |
4348 <dl> | |
4349 <dt><var>N</var><dd>number of requests in the system (scalar, <var>N</var><code> > 0</code>). | |
4350 | |
4351 <br><dt><var>D</var><dd><var>D</var><code>(k)</code> is the service demand of service center k | |
4352 (<var>D</var><code>(k) ≥ 0</code>). | |
4353 | |
4354 <br><dt><var>Z</var><dd>external delay (think time, scalar). If omitted, it is assumed to be zero. | |
4355 | |
4356 </dl> | |
4357 | |
4358 <p><strong>OUTPUTS</strong> | |
4359 | |
4360 <dl> | |
4361 <dt><var>Xl</var><dt><var>Xu</var><dd>Lower and upper bound on the system throughput. If <var>Z</var><code>>0</code>, | |
4362 these bounds are computed using <em>Geometric Square-root Bounds</em> | |
4363 (GSB). If <var>Z</var><code>==0</code>, these bounds are computed using <em>Geometric Bounds</em> (GB) | |
4364 | |
4365 <br><dt><var>Ql</var><dt><var>Qu</var><dd><var>Ql</var><code>(i)</code> and <var>Qu</var><code>(i)</code> are the lower and upper | |
4366 bounds respectively of the queue length for service center i. | |
4367 | |
4368 </dl> | |
4369 | |
4370 <pre class="sp"> | |
4371 | |
4372 </pre> | |
4373 <strong>See also:</strong> qnclosedab. | |
4374 | |
4375 </blockquote></div> | |
4376 | |
4377 <p class="noindent"><strong>REFERENCES</strong> | |
4378 | |
4379 <p>G. Casale, R. R. Muntz, G. Serazzi, | |
4380 <cite>Geometric Bounds: a Non-Iterative Analysis Technique for Closed | |
4381 Queueing Networks</cite>, IEEE Transactions on Computers, 57(6):780-794, | |
4382 June 2008. <a href="http://doi.ieeecomputersociety.org/10.1109/TC.2008.37">http://doi.ieeecomputersociety.org/10.1109/TC.2008.37</a> | |
4383 | |
9692 | 4384 <p><a name="index-Casale_002c-G_002e-275"></a><a name="index-Muntz_002c-R_002e-R_002e-276"></a><a name="index-Serazzi_002c-G_002e-277"></a> |
9391 | 4385 In this implementation we set X^+ and X^- as the upper |
4386 and lower Asymptotic Bounds as computed by the <code>qnclosedab</code> | |
4387 function, respectively. | |
4388 | |
4389 <div class="node"> | |
4390 <a name="Utility-functions"></a> | |
4391 <p><hr> | |
4392 Previous: <a rel="previous" accesskey="p" href="#Bounds-on-performance">Bounds on performance</a>, | |
4393 Up: <a rel="up" accesskey="u" href="#Queueing-Networks">Queueing Networks</a> | |
4394 | |
4395 </div> | |
4396 | |
4397 <h3 class="section">6.6 Utility functions</h3> | |
4398 | |
4399 <h4 class="subsection">6.6.1 Open or closed networks</h4> | |
4400 | |
4401 <p><a name="doc_002dqnclosed"></a> | |
4402 | |
4403 <div class="defun"> | |
9692 | 4404 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnclosed</b> (<var>N, S, V, <small class="dots">...</small></var>)<var><a name="index-qnclosed-278"></a></var><br> |
9391 | 4405 <blockquote> |
9692 | 4406 <p><a name="index-closed-network-279"></a> |
9391 | 4407 This function computes steady-state performance measures of closed |
4408 queueing networks using the Mean Value Analysis (MVA) algorithm. The | |
4409 qneneing network is allowed to contain fixed-capacity centers, delay | |
4410 centers or general load-dependent centers. Multiple request | |
4411 classes are supported. | |
4412 | |
4413 <p>This function dispatches the computation to one of | |
4414 <code>qnclosedsinglemva</code>, <code>qnclosedsinglemvald</code> or | |
4415 <code>qnclosedmultimva</code>. | |
4416 | |
4417 <ul> | |
4418 <li>If <var>N</var> is a scalar, the network is assumed to have a single | |
4419 class of requests; in this case, the exact MVA algorithm is used to | |
4420 analyze the network. If <var>S</var> is a vector, then <var>S</var><code>(k)</code> | |
4421 is the average service time of center k, and this function | |
4422 calls <code>qnclosedsinglemva</code> which supports load-independent | |
4423 service centers. If <var>S</var> is a matrix, <var>S</var><code>(k,i)</code> is the | |
4424 average service time at service center k when i ≥ | |
4425 1 jobs are present; in this case, the network is analyzed with the | |
4426 <code>qnclosedsinglemvald</code> function. | |
4427 | |
4428 <li>If <var>N</var> is a vector, the network is assumed to have multiple | |
4429 classes of requests, and is analyzed using the exact multiclass | |
4430 MVA algorithm as implemented in the <code>qnclosedmultimva</code> function. | |
4431 | |
4432 </ul> | |
4433 | |
4434 <pre class="sp"> | |
4435 | |
4436 </pre> | |
4437 <strong>See also:</strong> qnclosedsinglemva, qnclosedsinglemvald, qnclosedmultimva. | |
4438 | |
4439 </blockquote></div> | |
4440 | |
4441 <p class="noindent"><strong>EXAMPLE</strong> | |
4442 | |
4443 <pre class="example"><pre class="verbatim"> P = [0 0.3 0.7; 1 0 0; 1 0 0]; # Transition probability matrix | |
4444 S = [1 0.6 0.2]; # Average service times | |
4445 m = ones(1,3); # All centers are single-server | |
4446 Z = 2; # External delay | |
4447 N = 15; # Maximum population to consider | |
4448 | |
4449 V = qnvisits(P); # Compute number of visits from P | |
4450 D = V .* S; # Compute service demand from S and V | |
4451 X_bsb_lower = X_bsb_upper = zeros(1,N); | |
4452 X_ab_lower = X_ab_upper = zeros(1,N); | |
4453 X_mva = zeros(1,N); | |
4454 for n=1:N | |
4455 [X_bsb_lower(n) X_bsb_upper(n)] = qnclosedbsb(n, D, Z); | |
4456 [X_ab_lower(n) X_ab_upper(n)] = qnclosedab(n, D, Z); | |
4457 [U R Q X] = qnclosed( n, S, V, m, Z ); | |
4458 X_mva(n) = X(1)/V(1); | |
4459 endfor | |
4460 close all; | |
4461 plot(1:N, X_ab_lower,"g;Asymptotic Bounds;", \ | |
4462 1:N, X_bsb_lower,"k;Balanced System Bounds;", \ | |
4463 1:N, X_mva,"b;MVA;", "linewidth", 2, \ | |
4464 1:N, X_bsb_upper,"k", \ | |
4465 1:N, X_ab_upper,"g" ); | |
4466 axis([1,N,0,1]); | |
4467 xlabel("Number of Requests n"); | |
4468 ylabel("System Throughput X(n)"); | |
4469 legend("location","southeast");</pre></pre> | |
4470 <p><a name="doc_002dqnopen"></a> | |
4471 | |
4472 <div class="defun"> | |
9692 | 4473 — Function File: [<var>U</var>, <var>R</var>, <var>Q</var>, <var>X</var>] = <b>qnopen</b> (<var>lambda, S, V, <small class="dots">...</small></var>)<var><a name="index-qnopen-280"></a></var><br> |
9391 | 4474 <blockquote> |
9692 | 4475 <p><a name="index-open-network-281"></a> |
9391 | 4476 Compute utilization, response time, average number of requests in the |
4477 system, and throughput for open queueing networks. If <var>lambda</var> is | |
4478 a scalar, the network is considered a single-class QN and is solved | |
4479 using <code>qnopensingle</code>. If <var>lambda</var> is a vector, the network | |
4480 is considered as a multiclass QN and solved using <code>qnopenmulti</code>. | |
4481 | |
4482 <pre class="sp"> | |
4483 | |
4484 </pre> | |
4485 <strong>See also:</strong> qnopensingle, qnopenmulti. | |
4486 | |
4487 </blockquote></div> | |
4488 | |
4489 <!-- Compute the visit counts --> | |
4490 <h4 class="subsection">6.6.2 Computation of the visit counts</h4> | |
4491 | |
4492 <p>For single-class networks the average number of visits satisfy the | |
4493 following equation: | |
4494 | |
4495 <pre class="example"> V == P0 + V*P; | |
4496 </pre> | |
4497 <p class="noindent">where P_0 j is the probability that an external | |
4498 arrival goes to service center j. If \lambda_j is the | |
4499 external arrival rate to service center j, and \lambda = | |
4500 \sum_j \lambda_j is the overall external arrival rate, then | |
4501 P_0 j = \lambda_j / \lambda. | |
4502 | |
4503 <p>For closed networks, the visit ratios satisfy the following equation: | |
4504 | |
4505 <pre class="example"> V(1) == 1 && V == V*P; | |
4506 </pre> | |
4507 <p>The definitions above can be extended to multiple class networks as | |
4508 follows. We define the visit ratios V_sj for class s | |
4509 customers at service center j as follows: | |
4510 | |
4511 <p>V_sj = sum_r sum_i V_ri P_risj, for all s,j | |
4512 V_s1 = 1, for all s | |
4513 | |
4514 <p class="noindent">while for open networks: | |
4515 | |
4516 <p>V_sj = P_0sj + sum_r sum_i V_ri P_risj, for all s,j | |
4517 | |
4518 <p class="noindent">where P_0sj is the probability that an external | |
4519 arrival goes to service center j as a class-s request. | |
4520 If \lambda_sj is the external arrival rate of class s | |
4521 requests to service center j, and \lambda = \sum_s \sum_j | |
4522 \lambda_sj is the overall external arrival rate to the whole system, | |
4523 then P_0sj = \lambda_sj / \lambda. | |
4524 | |
4525 <p><a name="doc_002dqnvisits"></a> | |
4526 | |
4527 <div class="defun"> | |
9692 | 4528 — Function File: [<var>V</var> <var>ch</var>] = <b>qnvisits</b> (<var>P</var>)<var><a name="index-qnvisits-282"></a></var><br> |
4529 — Function File: <var>V</var> = <b>qnvisits</b> (<var>P, lambda</var>)<var><a name="index-qnvisits-283"></a></var><br> | |
9391 | 4530 <blockquote> |
4531 <p>Compute the average number of visits to the service centers of a | |
4532 single class, open or closed Queueing Network with N service | |
4533 centers. | |
4534 | |
4535 <p><strong>INPUTS</strong> | |
4536 | |
4537 <dl> | |
4538 <dt><var>P</var><dd>Routing probability matrix. For single class networks, | |
4539 <var>P</var><code>(i,j)</code> is the probability that a request which completed | |
4540 service at center i is routed to center j. For closed | |
4541 networks it must hold that <code>sum(</code><var>P</var><code>,2)==1</code>. The routing | |
4542 graph myst be strongly connected, meaning that it must be possible to | |
4543 eventually reach each node starting from each node. For multiple | |
4544 class networks, <var>P</var><code>(r,i,s,j)</code> is the probability that a | |
4545 class r request which completed service at center i is | |
4546 routed to center j as a class s request. Class switching | |
4547 is supported. | |
4548 | |
4549 <br><dt><var>lambda</var><dd>(open networks only) vector of external arrivals. For single class | |
4550 networks, <var>lambda</var><code>(i)</code> is the external arrival rate to | |
4551 center i. For multiple class networks, | |
4552 <var>lambda</var><code>(r,i)</code> is the arrival rate of class r | |
4553 requests to center i. If this parameter is omitted, the | |
4554 network is assumed to be closed. | |
4555 | |
4556 </dl> | |
4557 | |
4558 <p><strong>OUTPUTS</strong> | |
4559 | |
4560 <dl> | |
4561 <dt><var>V</var><dd>For single class networks, <var>V</var><code>(i)</code> is the average number of | |
4562 visits to server i. For multiple class networks, | |
4563 <var>V</var><code>(r,i)</code> is the class r visit ratio at center | |
4564 i. | |
4565 | |
9480 | 4566 <br><dt><var>ch</var><dd>(For closed networks only). <var>ch</var><code>(c)</code> is the chain number |
4567 that class c belongs to. Different classes can belong to the | |
4568 same chain. Chains are numbered 1, 2, <small class="dots">...</small>. | |
9391 | 4569 The total number of chains is <code>max(</code><var>ch</var><code>)</code>. |
4570 | |
4571 </dl> | |
4572 | |
4573 </blockquote></div> | |
4574 | |
4575 <p class="noindent"><strong>EXAMPLE</strong> | |
4576 | |
4577 <pre class="example"><pre class="verbatim"> P = [ 0 0.4 0.6 0; \ | |
4578 0.2 0 0.2 0.6; \ | |
4579 0 0 0 1; \ | |
4580 0 0 0 0 ]; | |
4581 lambda = [0.1 0 0 0.3]; | |
4582 V = qnvisits(P,lambda); | |
4583 S = [2 1 2 1.8]; | |
4584 m = [3 1 1 2]; | |
4585 [U R Q X] = qnopensingle( sum(lambda), S, V, m );</pre></pre> | |
4586 <h4 class="subsection">6.6.3 Other utility functions</h4> | |
4587 | |
4588 <p><a name="doc_002dpopulation_005fmix"></a> | |
4589 | |
4590 <div class="defun"> | |
9692 | 4591 — Function File: pop_mix = <b>population_mix</b> (<var>k, N</var>)<var><a name="index-population_005fmix-284"></a></var><br> |
9391 | 4592 <blockquote> |
9692 | 4593 <p><a name="index-population-mix-285"></a><a name="index-closed-network_002c-multiple-classes-286"></a> |
9391 | 4594 Return the set of valid population mixes with exactly <var>k</var> |
4595 customers, for a closed multiclass Queueing Network with population | |
4596 vector <var>N</var>. More specifically, given a multiclass Queueing | |
4597 Network with C customer classes, such that there are | |
4598 <var>N</var><code>(i)</code> requests of class i, a | |
4599 k-mix <var>mix</var> is a C-dimensional vector with the | |
4600 following properties: | |
4601 | |
4602 <pre class="example"> all( mix >= 0 ); | |
4603 all( mix <= N ); | |
4604 sum( mix ) == k; | |
4605 </pre> | |
4606 <p class="noindent">This function enumerates all valid k-mixes, such that | |
4607 <var>pop_mix</var><code>(i)</code> is a C dimensional row vector representing | |
4608 a valid population mix, for all i. | |
4609 | |
4610 <p><strong>INPUTS</strong> | |
4611 | |
4612 <dl> | |
4613 <dt><var>k</var><dd>Total population size of the requested mix. <var>k</var> must be a nonnegative integer | |
4614 | |
4615 <br><dt><var>N</var><dd><var>N</var><code>(i)</code> is the number of class i requests. | |
4616 The condition <var>k</var><code> ≤ sum(</code><var>N</var><code>)</code> must hold. | |
4617 | |
4618 </dl> | |
4619 | |
4620 <p><strong>OUTPUTS</strong> | |
4621 | |
4622 <dl> | |
4623 <dt><var>pop_mix</var><dd><var>pop_mix</var><code>(i,j)</code> is the number of class j requests | |
4624 in the i-th population mix. The number of | |
4625 population mixes is <code>rows( </code><var>pop_mix</var><code> ) </code>. | |
4626 | |
4627 </dl> | |
4628 | |
4629 <p>Note that if you are interested in the number of k-mixes | |
4630 and you don't care to enumerate them, you can use the funcion | |
4631 <code>qnmvapop</code>. | |
4632 | |
4633 <pre class="sp"> | |
4634 | |
4635 </pre> | |
4636 <strong>See also:</strong> qnmvapop. | |
4637 | |
4638 </blockquote></div> | |
4639 | |
4640 <p class="noindent"><strong>REFERENCES</strong> | |
4641 | |
4642 <p>Herb Schwetman, <cite>Implementing the Mean Value Algorithm for the | |
4643 Solution of Queueing Network Models</cite>, Technical Report CSD-TR-355, | |
4644 Department of Computer Sciences, Purdue University, feb 15, 1982, | |
4645 available at | |
4646 <a href="http://www.cs.purdue.edu/research/technical_reports/1980/TR 80-355.pdf">http://www.cs.purdue.edu/research/technical_reports/1980/TR 80-355.pdf</a> | |
4647 | |
4648 <p>Note that the slightly different problem of generating all tuples | |
4649 k_1, k_2, \ldots k_N such that \sum_i k_i = k and | |
4650 k_i are nonnegative integers, for some fixed integer k | |
4651 ≥ 0 has been described in S. Santini, <cite>Computing the | |
4652 Indices for a Complex Summation</cite>, unpublished report, available at | |
4653 <a href="http://arantxa.ii.uam.es/~ssantini/writing/notes/s668_summation.pdf">http://arantxa.ii.uam.es/~ssantini/writing/notes/s668_summation.pdf</a> | |
4654 | |
9692 | 4655 <p><a name="index-Schwetman_002c-H_002e-287"></a><a name="index-Santini_002c-S_002e-288"></a> |
9391 | 4656 <a name="doc_002dqnmvapop"></a> |
4657 | |
4658 <div class="defun"> | |
9692 | 4659 — Function File: <var>H</var> = <b>qnmvapop</b> (<var>N</var>)<var><a name="index-qnmvapop-289"></a></var><br> |
9391 | 4660 <blockquote> |
9692 | 4661 <p><a name="index-population-mix-290"></a><a name="index-closed-network_002c-multiple-classes-291"></a> |
9391 | 4662 Given a network with C customer classes, this function |
4663 computes the number of valid population mixes <var>H</var><code>(r,n)</code> that can | |
4664 be constructed by the multiclass MVA algorithm by allocating n | |
4665 customers to the first r classes. | |
4666 | |
4667 <p><strong>INPUTS</strong> | |
4668 | |
4669 <dl> | |
4670 <dt><var>N</var><dd>Population vector. <var>N</var><code>(c)</code> is the number of class-c | |
4671 requests in the system. The total number of requests in the network | |
4672 is <code>sum(</code><var>N</var><code>)</code>. | |
4673 | |
4674 </dl> | |
4675 | |
4676 <p><strong>OUTPUTS</strong> | |
4677 | |
4678 <dl> | |
4679 <dt><var>H</var><dd><var>H</var><code>(r,n)</code> is the number of valid populations that can be | |
4680 constructed allocating n customers to the first r classes. | |
4681 | |
4682 </dl> | |
4683 | |
4684 <pre class="sp"> | |
4685 | |
4686 </pre> | |
4687 <strong>See also:</strong> qnclosedmultimva,population_mix. | |
4688 | |
4689 </blockquote></div> | |
4690 | |
4691 <p class="noindent"><strong>REFERENCES</strong> | |
4692 | |
4693 <p>Zahorjan, J. and Wong, E. <cite>The solution of separable queueing | |
4694 network models using mean value analysis</cite>. SIGMETRICS | |
4695 Perform. Eval. Rev. 10, 3 (Sep. 1981), 80-85. DOI | |
4696 <a href="http://doi.acm.org/10.1145/1010629.805477">http://doi.acm.org/10.1145/1010629.805477</a> | |
4697 | |
9692 | 4698 <p><a name="index-Zahorjan_002c-J_002e-292"></a><a name="index-Wong_002c-E_002e-293"></a> |
9391 | 4699 |
4700 <!-- Appendix starts here --> | |
4701 <!-- DO NOT EDIT! Generated automatically by munge-texi. --> | |
4702 <!-- *- texinfo -*- --> | |
4703 <!-- Copyright (C) 2008, 2009, 2010, 2011, 2012 Moreno Marzolla --> | |
4704 <!-- This file is part of the queueing toolbox, a Queueing Networks --> | |
4705 <!-- analysis package for GNU Octave. --> | |
4706 <!-- The queueing toolbox is free software; you can redistribute it --> | |
4707 <!-- and/or modify it under the terms of the GNU General Public License --> | |
4708 <!-- as published by the Free Software Foundation; either version 3 of --> | |
4709 <!-- the License, or (at your option) any later version. --> | |
4710 <!-- The queueing toolbox is distributed in the hope that it will be --> | |
4711 <!-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty --> | |
4712 <!-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --> | |
4713 <!-- GNU General Public License for more details. --> | |
4714 <!-- You should have received a copy of the GNU General Public License --> | |
4715 <!-- along with the queueing toolbox; see the file COPYING. If not, see --> | |
4716 <!-- <http://www.gnu.org/licenses/>. --> | |
4717 <div class="node"> | |
4718 <a name="Contributing-Guidelines"></a> | |
4719 <p><hr> | |
4720 Next: <a rel="next" accesskey="n" href="#Acknowledgements">Acknowledgements</a>, | |
4721 Previous: <a rel="previous" accesskey="p" href="#Queueing-Networks">Queueing Networks</a>, | |
4722 Up: <a rel="up" accesskey="u" href="#Top">Top</a> | |
4723 | |
4724 </div> | |
4725 | |
4726 <h2 class="appendix">Appendix A Contributing Guidelines</h2> | |
4727 | |
4728 <p>Contributions and bug reports are <em>always</em> welcome. If you want | |
4729 to contribute to the <code>queueing</code> package, here are some | |
4730 guidelines: | |
4731 | |
4732 <ul> | |
4733 <li>If you are contributing a new function, please embed proper | |
4734 documentation within the function itself. The documentation must be in | |
4735 <code>texinfo</code> format, so that it will be extracted and formatted into | |
4736 the printable manual. See the existing functions of the | |
4737 <code>queueing</code> package for the documentation style. | |
4738 | |
4739 <li>The documentation should be as precise as possible. In particular, | |
4740 always state what the valid ranges of the parameters are. | |
4741 | |
4742 <li>If you are contributing a new function, ensure that the function | |
4743 properly checks the validity of its input parameters. For example, | |
4744 each function accepting vectors should check whether the dimensions | |
4745 match. | |
4746 | |
4747 <li>Always provide bibliographic references for each algorithm you | |
4748 contribute. If your implementation differs in some way from the | |
4749 reference you give, please describe how and why your implementation | |
4750 differs. | |
4751 | |
4752 <li>Include Octave test and demo blocks with your code. | |
4753 Test blocks are particularly important, because Queueing Network | |
4754 algorithms tend to be quite complex to implement correctly, and we | |
4755 must ensure that the implementations provided with the | |
4756 <code>queueing</code> package are (mostly) correct. | |
4757 | |
4758 </ul> | |
4759 | |
4760 <p>Send your contribution to Moreno Marzolla | |
4761 (<a href="mailto:marzolla@cs.unibo.it">marzolla@cs.unibo.it</a>). Even if you are just a user of | |
4762 <code>queueing</code>, and find this package useful, let me know by | |
4763 dropping me a line. Thanks. | |
4764 | |
4765 <!-- DO NOT EDIT! Generated automatically by munge-texi. --> | |
4766 <!-- *- texinfo -*- --> | |
4767 <!-- Copyright (C) 2008, 2009, 2010, 2011, 2012 Moreno Marzolla --> | |
4768 <!-- This file is part of the queueing toolbox, a Queueing Networks --> | |
4769 <!-- analysis package for GNU Octave. --> | |
4770 <!-- The queueing toolbox is free software; you can redistribute it --> | |
4771 <!-- and/or modify it under the terms of the GNU General Public License --> | |
4772 <!-- as published by the Free Software Foundation; either version 3 of --> | |
4773 <!-- the License, or (at your option) any later version. --> | |
4774 <!-- The queueing toolbox is distributed in the hope that it will be --> | |
4775 <!-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty --> | |
4776 <!-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --> | |
4777 <!-- GNU General Public License for more details. --> | |
4778 <!-- You should have received a copy of the GNU General Public License --> | |
4779 <!-- along with the queueing toolbox; see the file COPYING. If not, see --> | |
4780 <!-- <http://www.gnu.org/licenses/>. --> | |
4781 <div class="node"> | |
4782 <a name="Acknowledgements"></a> | |
4783 <p><hr> | |
4784 Next: <a rel="next" accesskey="n" href="#Copying">Copying</a>, | |
4785 Previous: <a rel="previous" accesskey="p" href="#Contributing-Guidelines">Contributing Guidelines</a>, | |
4786 Up: <a rel="up" accesskey="u" href="#Top">Top</a> | |
4787 | |
4788 </div> | |
4789 | |
4790 <h2 class="appendix">Appendix B Acknowledgements</h2> | |
4791 | |
4792 <p>The following people (listed in alphabetical order) contributed to the | |
4793 <code>queueing</code> package, either by providing feedback, reporting bugs | |
4794 or contributing code: Philip Carinhas, Phil Colbourn, Yves Durand, | |
4795 Marco Guazzone, Dmitry Kolesnikov. | |
4796 | |
4797 <!-- DO NOT EDIT! Generated automatically by munge-texi. --> | |
4798 <div class="node"> | |
4799 <a name="Copying"></a> | |
4800 <p><hr> | |
4801 Next: <a rel="next" accesskey="n" href="#Concept-Index">Concept Index</a>, | |
4802 Previous: <a rel="previous" accesskey="p" href="#Acknowledgements">Acknowledgements</a>, | |
4803 Up: <a rel="up" accesskey="u" href="#Top">Top</a> | |
4804 | |
4805 </div> | |
4806 | |
4807 <h2 class="appendix">Appendix C GNU GENERAL PUBLIC LICENSE</h2> | |
4808 | |
9692 | 4809 <p><a name="index-warranty-294"></a><a name="index-copyright-295"></a> |
9391 | 4810 <div align="center">Version 3, 29 June 2007</div> |
4811 | |
4812 <pre class="display"> Copyright © 2007 Free Software Foundation, Inc. <a href="http://fsf.org/">http://fsf.org/</a> | |
4813 | |
4814 Everyone is permitted to copy and distribute verbatim copies of this | |
4815 license document, but changing it is not allowed. | |
4816 </pre> | |
4817 <h3 class="heading">Preamble</h3> | |
4818 | |
4819 <p>The GNU General Public License is a free, copyleft license for | |
4820 software and other kinds of works. | |
4821 | |
4822 <p>The licenses for most software and other practical works are designed | |
4823 to take away your freedom to share and change the works. By contrast, | |
4824 the GNU General Public License is intended to guarantee your freedom | |
4825 to share and change all versions of a program—to make sure it remains | |
4826 free software for all its users. We, the Free Software Foundation, | |
4827 use the GNU General Public License for most of our software; it | |
4828 applies also to any other work released this way by its authors. You | |
4829 can apply it to your programs, too. | |
4830 | |
4831 <p>When we speak of free software, we are referring to freedom, not | |
4832 price. Our General Public Licenses are designed to make sure that you | |
4833 have the freedom to distribute copies of free software (and charge for | |
4834 them if you wish), that you receive source code or can get it if you | |
4835 want it, that you can change the software or use pieces of it in new | |
4836 free programs, and that you know you can do these things. | |
4837 | |
4838 <p>To protect your rights, we need to prevent others from denying you | |
4839 these rights or asking you to surrender the rights. Therefore, you | |
4840 have certain responsibilities if you distribute copies of the | |
4841 software, or if you modify it: responsibilities to respect the freedom | |
4842 of others. | |
4843 | |
4844 <p>For example, if you distribute copies of such a program, whether | |
4845 gratis or for a fee, you must pass on to the recipients the same | |
4846 freedoms that you received. You must make sure that they, too, | |
4847 receive or can get the source code. And you must show them these | |
4848 terms so they know their rights. | |
4849 | |
4850 <p>Developers that use the GNU GPL protect your rights with two steps: | |
4851 (1) assert copyright on the software, and (2) offer you this License | |
4852 giving you legal permission to copy, distribute and/or modify it. | |
4853 | |
4854 <p>For the developers' and authors' protection, the GPL clearly explains | |
4855 that there is no warranty for this free software. For both users' and | |
4856 authors' sake, the GPL requires that modified versions be marked as | |
4857 changed, so that their problems will not be attributed erroneously to | |
4858 authors of previous versions. | |
4859 | |
4860 <p>Some devices are designed to deny users access to install or run | |
4861 modified versions of the software inside them, although the | |
4862 manufacturer can do so. This is fundamentally incompatible with the | |
4863 aim of protecting users' freedom to change the software. The | |
4864 systematic pattern of such abuse occurs in the area of products for | |
4865 individuals to use, which is precisely where it is most unacceptable. | |
4866 Therefore, we have designed this version of the GPL to prohibit the | |
4867 practice for those products. If such problems arise substantially in | |
4868 other domains, we stand ready to extend this provision to those | |
4869 domains in future versions of the GPL, as needed to protect the | |
4870 freedom of users. | |
4871 | |
4872 <p>Finally, every program is threatened constantly by software patents. | |
4873 States should not allow patents to restrict development and use of | |
4874 software on general-purpose computers, but in those that do, we wish | |
4875 to avoid the special danger that patents applied to a free program | |
4876 could make it effectively proprietary. To prevent this, the GPL | |
4877 assures that patents cannot be used to render the program non-free. | |
4878 | |
4879 <p>The precise terms and conditions for copying, distribution and | |
4880 modification follow. | |
4881 | |
4882 <h3 class="heading">TERMS AND CONDITIONS</h3> | |
4883 | |
4884 <ol type=1 start=0> | |
4885 <li>Definitions. | |
4886 | |
4887 <p>“This License” refers to version 3 of the GNU General Public License. | |
4888 | |
4889 <p>“Copyright” also means copyright-like laws that apply to other kinds | |
4890 of works, such as semiconductor masks. | |
4891 | |
4892 <p>“The Program” refers to any copyrightable work licensed under this | |
4893 License. Each licensee is addressed as “you”. “Licensees” and | |
4894 “recipients” may be individuals or organizations. | |
4895 | |
4896 <p>To “modify” a work means to copy from or adapt all or part of the work | |
4897 in a fashion requiring copyright permission, other than the making of | |
4898 an exact copy. The resulting work is called a “modified version” of | |
4899 the earlier work or a work “based on” the earlier work. | |
4900 | |
4901 <p>A “covered work” means either the unmodified Program or a work based | |
4902 on the Program. | |
4903 | |
4904 <p>To “propagate” a work means to do anything with it that, without | |
4905 permission, would make you directly or secondarily liable for | |
4906 infringement under applicable copyright law, except executing it on a | |
4907 computer or modifying a private copy. Propagation includes copying, | |
4908 distribution (with or without modification), making available to the | |
4909 public, and in some countries other activities as well. | |
4910 | |
4911 <p>To “convey” a work means any kind of propagation that enables other | |
4912 parties to make or receive copies. Mere interaction with a user | |
4913 through a computer network, with no transfer of a copy, is not | |
4914 conveying. | |
4915 | |
4916 <p>An interactive user interface displays “Appropriate Legal Notices” to | |
4917 the extent that it includes a convenient and prominently visible | |
4918 feature that (1) displays an appropriate copyright notice, and (2) | |
4919 tells the user that there is no warranty for the work (except to the | |
4920 extent that warranties are provided), that licensees may convey the | |
4921 work under this License, and how to view a copy of this License. If | |
4922 the interface presents a list of user commands or options, such as a | |
4923 menu, a prominent item in the list meets this criterion. | |
4924 | |
4925 <li>Source Code. | |
4926 | |
4927 <p>The “source code” for a work means the preferred form of the work for | |
4928 making modifications to it. “Object code” means any non-source form | |
4929 of a work. | |
4930 | |
4931 <p>A “Standard Interface” means an interface that either is an official | |
4932 standard defined by a recognized standards body, or, in the case of | |
4933 interfaces specified for a particular programming language, one that | |
4934 is widely used among developers working in that language. | |
4935 | |
4936 <p>The “System Libraries” of an executable work include anything, other | |
4937 than the work as a whole, that (a) is included in the normal form of | |
4938 packaging a Major Component, but which is not part of that Major | |
4939 Component, and (b) serves only to enable use of the work with that | |
4940 Major Component, or to implement a Standard Interface for which an | |
4941 implementation is available to the public in source code form. A | |
4942 “Major Component”, in this context, means a major essential component | |
4943 (kernel, window system, and so on) of the specific operating system | |
4944 (if any) on which the executable work runs, or a compiler used to | |
4945 produce the work, or an object code interpreter used to run it. | |
4946 | |
4947 <p>The “Corresponding Source” for a work in object code form means all | |
4948 the source code needed to generate, install, and (for an executable | |
4949 work) run the object code and to modify the work, including scripts to | |
4950 control those activities. However, it does not include the work's | |
4951 System Libraries, or general-purpose tools or generally available free | |
4952 programs which are used unmodified in performing those activities but | |
4953 which are not part of the work. For example, Corresponding Source | |
4954 includes interface definition files associated with source files for | |
4955 the work, and the source code for shared libraries and dynamically | |
4956 linked subprograms that the work is specifically designed to require, | |
4957 such as by intimate data communication or control flow between those | |
4958 subprograms and other parts of the work. | |
4959 | |
4960 <p>The Corresponding Source need not include anything that users can | |
4961 regenerate automatically from other parts of the Corresponding Source. | |
4962 | |
4963 <p>The Corresponding Source for a work in source code form is that same | |
4964 work. | |
4965 | |
4966 <li>Basic Permissions. | |
4967 | |
4968 <p>All rights granted under this License are granted for the term of | |
4969 copyright on the Program, and are irrevocable provided the stated | |
4970 conditions are met. This License explicitly affirms your unlimited | |
4971 permission to run the unmodified Program. The output from running a | |
4972 covered work is covered by this License only if the output, given its | |
4973 content, constitutes a covered work. This License acknowledges your | |
4974 rights of fair use or other equivalent, as provided by copyright law. | |
4975 | |
4976 <p>You may make, run and propagate covered works that you do not convey, | |
4977 without conditions so long as your license otherwise remains in force. | |
4978 You may convey covered works to others for the sole purpose of having | |
4979 them make modifications exclusively for you, or provide you with | |
4980 facilities for running those works, provided that you comply with the | |
4981 terms of this License in conveying all material for which you do not | |
4982 control copyright. Those thus making or running the covered works for | |
4983 you must do so exclusively on your behalf, under your direction and | |
4984 control, on terms that prohibit them from making any copies of your | |
4985 copyrighted material outside their relationship with you. | |
4986 | |
4987 <p>Conveying under any other circumstances is permitted solely under the | |
4988 conditions stated below. Sublicensing is not allowed; section 10 | |
4989 makes it unnecessary. | |
4990 | |
4991 <li>Protecting Users' Legal Rights From Anti-Circumvention Law. | |
4992 | |
4993 <p>No covered work shall be deemed part of an effective technological | |
4994 measure under any applicable law fulfilling obligations under article | |
4995 11 of the WIPO copyright treaty adopted on 20 December 1996, or | |
4996 similar laws prohibiting or restricting circumvention of such | |
4997 measures. | |
4998 | |
4999 <p>When you convey a covered work, you waive any legal power to forbid | |
5000 circumvention of technological measures to the extent such | |
5001 circumvention is effected by exercising rights under this License with | |
5002 respect to the covered work, and you disclaim any intention to limit | |
5003 operation or modification of the work as a means of enforcing, against | |
5004 the work's users, your or third parties' legal rights to forbid | |
5005 circumvention of technological measures. | |
5006 | |
5007 <li>Conveying Verbatim Copies. | |
5008 | |
5009 <p>You may convey verbatim copies of the Program's source code as you | |
5010 receive it, in any medium, provided that you conspicuously and | |
5011 appropriately publish on each copy an appropriate copyright notice; | |
5012 keep intact all notices stating that this License and any | |
5013 non-permissive terms added in accord with section 7 apply to the code; | |
5014 keep intact all notices of the absence of any warranty; and give all | |
5015 recipients a copy of this License along with the Program. | |
5016 | |
5017 <p>You may charge any price or no price for each copy that you convey, | |
5018 and you may offer support or warranty protection for a fee. | |
5019 | |
5020 <li>Conveying Modified Source Versions. | |
5021 | |
5022 <p>You may convey a work based on the Program, or the modifications to | |
5023 produce it from the Program, in the form of source code under the | |
5024 terms of section 4, provided that you also meet all of these | |
5025 conditions: | |
5026 | |
5027 <ol type=a start=1> | |
5028 <li>The work must carry prominent notices stating that you modified it, | |
5029 and giving a relevant date. | |
5030 | |
5031 <li>The work must carry prominent notices stating that it is released | |
5032 under this License and any conditions added under section 7. This | |
5033 requirement modifies the requirement in section 4 to “keep intact all | |
5034 notices”. | |
5035 | |
5036 <li>You must license the entire work, as a whole, under this License to | |
5037 anyone who comes into possession of a copy. This License will | |
5038 therefore apply, along with any applicable section 7 additional terms, | |
5039 to the whole of the work, and all its parts, regardless of how they | |
5040 are packaged. This License gives no permission to license the work in | |
5041 any other way, but it does not invalidate such permission if you have | |
5042 separately received it. | |
5043 | |
5044 <li>If the work has interactive user interfaces, each must display | |
5045 Appropriate Legal Notices; however, if the Program has interactive | |
5046 interfaces that do not display Appropriate Legal Notices, your work | |
5047 need not make them do so. | |
5048 </ol> | |
5049 | |
5050 <p>A compilation of a covered work with other separate and independent | |
5051 works, which are not by their nature extensions of the covered work, | |
5052 and which are not combined with it such as to form a larger program, | |
5053 in or on a volume of a storage or distribution medium, is called an | |
5054 “aggregate” if the compilation and its resulting copyright are not | |
5055 used to limit the access or legal rights of the compilation's users | |
5056 beyond what the individual works permit. Inclusion of a covered work | |
5057 in an aggregate does not cause this License to apply to the other | |
5058 parts of the aggregate. | |
5059 | |
5060 <li>Conveying Non-Source Forms. | |
5061 | |
5062 <p>You may convey a covered work in object code form under the terms of | |
5063 sections 4 and 5, provided that you also convey the machine-readable | |
5064 Corresponding Source under the terms of this License, in one of these | |
5065 ways: | |
5066 | |
5067 <ol type=a start=1> | |
5068 <li>Convey the object code in, or embodied in, a physical product | |
5069 (including a physical distribution medium), accompanied by the | |
5070 Corresponding Source fixed on a durable physical medium customarily | |
5071 used for software interchange. | |
5072 | |
5073 <li>Convey the object code in, or embodied in, a physical product | |
5074 (including a physical distribution medium), accompanied by a written | |
5075 offer, valid for at least three years and valid for as long as you | |
5076 offer spare parts or customer support for that product model, to give | |
5077 anyone who possesses the object code either (1) a copy of the | |
5078 Corresponding Source for all the software in the product that is | |
5079 covered by this License, on a durable physical medium customarily used | |
5080 for software interchange, for a price no more than your reasonable | |
5081 cost of physically performing this conveying of source, or (2) access | |
5082 to copy the Corresponding Source from a network server at no charge. | |
5083 | |
5084 <li>Convey individual copies of the object code with a copy of the written | |
5085 offer to provide the Corresponding Source. This alternative is | |
5086 allowed only occasionally and noncommercially, and only if you | |
5087 received the object code with such an offer, in accord with subsection | |
5088 6b. | |
5089 | |
5090 <li>Convey the object code by offering access from a designated place | |
5091 (gratis or for a charge), and offer equivalent access to the | |
5092 Corresponding Source in the same way through the same place at no | |
5093 further charge. You need not require recipients to copy the | |
5094 Corresponding Source along with the object code. If the place to copy | |
5095 the object code is a network server, the Corresponding Source may be | |
5096 on a different server (operated by you or a third party) that supports | |
5097 equivalent copying facilities, provided you maintain clear directions | |
5098 next to the object code saying where to find the Corresponding Source. | |
5099 Regardless of what server hosts the Corresponding Source, you remain | |
5100 obligated to ensure that it is available for as long as needed to | |
5101 satisfy these requirements. | |
5102 | |
5103 <li>Convey the object code using peer-to-peer transmission, provided you | |
5104 inform other peers where the object code and Corresponding Source of | |
5105 the work are being offered to the general public at no charge under | |
5106 subsection 6d. | |
5107 | |
5108 </ol> | |
5109 | |
5110 <p>A separable portion of the object code, whose source code is excluded | |
5111 from the Corresponding Source as a System Library, need not be | |
5112 included in conveying the object code work. | |
5113 | |
5114 <p>A “User Product” is either (1) a “consumer product”, which means any | |
5115 tangible personal property which is normally used for personal, | |
5116 family, or household purposes, or (2) anything designed or sold for | |
5117 incorporation into a dwelling. In determining whether a product is a | |
5118 consumer product, doubtful cases shall be resolved in favor of | |
5119 coverage. For a particular product received by a particular user, | |
5120 “normally used” refers to a typical or common use of that class of | |
5121 product, regardless of the status of the particular user or of the way | |
5122 in which the particular user actually uses, or expects or is expected | |
5123 to use, the product. A product is a consumer product regardless of | |
5124 whether the product has substantial commercial, industrial or | |
5125 non-consumer uses, unless such uses represent the only significant | |
5126 mode of use of the product. | |
5127 | |
5128 <p>“Installation Information” for a User Product means any methods, | |
5129 procedures, authorization keys, or other information required to | |
5130 install and execute modified versions of a covered work in that User | |
5131 Product from a modified version of its Corresponding Source. The | |
5132 information must suffice to ensure that the continued functioning of | |
5133 the modified object code is in no case prevented or interfered with | |
5134 solely because modification has been made. | |
5135 | |
5136 <p>If you convey an object code work under this section in, or with, or | |
5137 specifically for use in, a User Product, and the conveying occurs as | |
5138 part of a transaction in which the right of possession and use of the | |
5139 User Product is transferred to the recipient in perpetuity or for a | |
5140 fixed term (regardless of how the transaction is characterized), the | |
5141 Corresponding Source conveyed under this section must be accompanied | |
5142 by the Installation Information. But this requirement does not apply | |
5143 if neither you nor any third party retains the ability to install | |
5144 modified object code on the User Product (for example, the work has | |
5145 been installed in ROM). | |
5146 | |
5147 <p>The requirement to provide Installation Information does not include a | |
5148 requirement to continue to provide support service, warranty, or | |
5149 updates for a work that has been modified or installed by the | |
5150 recipient, or for the User Product in which it has been modified or | |
5151 installed. Access to a network may be denied when the modification | |
5152 itself materially and adversely affects the operation of the network | |
5153 or violates the rules and protocols for communication across the | |
5154 network. | |
5155 | |
5156 <p>Corresponding Source conveyed, and Installation Information provided, | |
5157 in accord with this section must be in a format that is publicly | |
5158 documented (and with an implementation available to the public in | |
5159 source code form), and must require no special password or key for | |
5160 unpacking, reading or copying. | |
5161 | |
5162 <li>Additional Terms. | |
5163 | |
5164 <p>“Additional permissions” are terms that supplement the terms of this | |
5165 License by making exceptions from one or more of its conditions. | |
5166 Additional permissions that are applicable to the entire Program shall | |
5167 be treated as though they were included in this License, to the extent | |
5168 that they are valid under applicable law. If additional permissions | |
5169 apply only to part of the Program, that part may be used separately | |
5170 under those permissions, but the entire Program remains governed by | |
5171 this License without regard to the additional permissions. | |
5172 | |
5173 <p>When you convey a copy of a covered work, you may at your option | |
5174 remove any additional permissions from that copy, or from any part of | |
5175 it. (Additional permissions may be written to require their own | |
5176 removal in certain cases when you modify the work.) You may place | |
5177 additional permissions on material, added by you to a covered work, | |
5178 for which you have or can give appropriate copyright permission. | |
5179 | |
5180 <p>Notwithstanding any other provision of this License, for material you | |
5181 add to a covered work, you may (if authorized by the copyright holders | |
5182 of that material) supplement the terms of this License with terms: | |
5183 | |
5184 <ol type=a start=1> | |
5185 <li>Disclaiming warranty or limiting liability differently from the terms | |
5186 of sections 15 and 16 of this License; or | |
5187 | |
5188 <li>Requiring preservation of specified reasonable legal notices or author | |
5189 attributions in that material or in the Appropriate Legal Notices | |
5190 displayed by works containing it; or | |
5191 | |
5192 <li>Prohibiting misrepresentation of the origin of that material, or | |
5193 requiring that modified versions of such material be marked in | |
5194 reasonable ways as different from the original version; or | |
5195 | |
5196 <li>Limiting the use for publicity purposes of names of licensors or | |
5197 authors of the material; or | |
5198 | |
5199 <li>Declining to grant rights under trademark law for use of some trade | |
5200 names, trademarks, or service marks; or | |
5201 | |
5202 <li>Requiring indemnification of licensors and authors of that material by | |
5203 anyone who conveys the material (or modified versions of it) with | |
5204 contractual assumptions of liability to the recipient, for any | |
5205 liability that these contractual assumptions directly impose on those | |
5206 licensors and authors. | |
5207 </ol> | |
5208 | |
5209 <p>All other non-permissive additional terms are considered “further | |
5210 restrictions” within the meaning of section 10. If the Program as you | |
5211 received it, or any part of it, contains a notice stating that it is | |
5212 governed by this License along with a term that is a further | |
5213 restriction, you may remove that term. If a license document contains | |
5214 a further restriction but permits relicensing or conveying under this | |
5215 License, you may add to a covered work material governed by the terms | |
5216 of that license document, provided that the further restriction does | |
5217 not survive such relicensing or conveying. | |
5218 | |
5219 <p>If you add terms to a covered work in accord with this section, you | |
5220 must place, in the relevant source files, a statement of the | |
5221 additional terms that apply to those files, or a notice indicating | |
5222 where to find the applicable terms. | |
5223 | |
5224 <p>Additional terms, permissive or non-permissive, may be stated in the | |
5225 form of a separately written license, or stated as exceptions; the | |
5226 above requirements apply either way. | |
5227 | |
5228 <li>Termination. | |
5229 | |
5230 <p>You may not propagate or modify a covered work except as expressly | |
5231 provided under this License. Any attempt otherwise to propagate or | |
5232 modify it is void, and will automatically terminate your rights under | |
5233 this License (including any patent licenses granted under the third | |
5234 paragraph of section 11). | |
5235 | |
5236 <p>However, if you cease all violation of this License, then your license | |
5237 from a particular copyright holder is reinstated (a) provisionally, | |
5238 unless and until the copyright holder explicitly and finally | |
5239 terminates your license, and (b) permanently, if the copyright holder | |
5240 fails to notify you of the violation by some reasonable means prior to | |
5241 60 days after the cessation. | |
5242 | |
5243 <p>Moreover, your license from a particular copyright holder is | |
5244 reinstated permanently if the copyright holder notifies you of the | |
5245 violation by some reasonable means, this is the first time you have | |
5246 received notice of violation of this License (for any work) from that | |
5247 copyright holder, and you cure the violation prior to 30 days after | |
5248 your receipt of the notice. | |
5249 | |
5250 <p>Termination of your rights under this section does not terminate the | |
5251 licenses of parties who have received copies or rights from you under | |
5252 this License. If your rights have been terminated and not permanently | |
5253 reinstated, you do not qualify to receive new licenses for the same | |
5254 material under section 10. | |
5255 | |
5256 <li>Acceptance Not Required for Having Copies. | |
5257 | |
5258 <p>You are not required to accept this License in order to receive or run | |
5259 a copy of the Program. Ancillary propagation of a covered work | |
5260 occurring solely as a consequence of using peer-to-peer transmission | |
5261 to receive a copy likewise does not require acceptance. However, | |
5262 nothing other than this License grants you permission to propagate or | |
5263 modify any covered work. These actions infringe copyright if you do | |
5264 not accept this License. Therefore, by modifying or propagating a | |
5265 covered work, you indicate your acceptance of this License to do so. | |
5266 | |
5267 <li>Automatic Licensing of Downstream Recipients. | |
5268 | |
5269 <p>Each time you convey a covered work, the recipient automatically | |
5270 receives a license from the original licensors, to run, modify and | |
5271 propagate that work, subject to this License. You are not responsible | |
5272 for enforcing compliance by third parties with this License. | |
5273 | |
5274 <p>An “entity transaction” is a transaction transferring control of an | |
5275 organization, or substantially all assets of one, or subdividing an | |
5276 organization, or merging organizations. If propagation of a covered | |
5277 work results from an entity transaction, each party to that | |
5278 transaction who receives a copy of the work also receives whatever | |
5279 licenses to the work the party's predecessor in interest had or could | |
5280 give under the previous paragraph, plus a right to possession of the | |
5281 Corresponding Source of the work from the predecessor in interest, if | |
5282 the predecessor has it or can get it with reasonable efforts. | |
5283 | |
5284 <p>You may not impose any further restrictions on the exercise of the | |
5285 rights granted or affirmed under this License. For example, you may | |
5286 not impose a license fee, royalty, or other charge for exercise of | |
5287 rights granted under this License, and you may not initiate litigation | |
5288 (including a cross-claim or counterclaim in a lawsuit) alleging that | |
5289 any patent claim is infringed by making, using, selling, offering for | |
5290 sale, or importing the Program or any portion of it. | |
5291 | |
5292 <li>Patents. | |
5293 | |
5294 <p>A “contributor” is a copyright holder who authorizes use under this | |
5295 License of the Program or a work on which the Program is based. The | |
5296 work thus licensed is called the contributor's “contributor version”. | |
5297 | |
5298 <p>A contributor's “essential patent claims” are all patent claims owned | |
5299 or controlled by the contributor, whether already acquired or | |
5300 hereafter acquired, that would be infringed by some manner, permitted | |
5301 by this License, of making, using, or selling its contributor version, | |
5302 but do not include claims that would be infringed only as a | |
5303 consequence of further modification of the contributor version. For | |
5304 purposes of this definition, “control” includes the right to grant | |
5305 patent sublicenses in a manner consistent with the requirements of | |
5306 this License. | |
5307 | |
5308 <p>Each contributor grants you a non-exclusive, worldwide, royalty-free | |
5309 patent license under the contributor's essential patent claims, to | |
5310 make, use, sell, offer for sale, import and otherwise run, modify and | |
5311 propagate the contents of its contributor version. | |
5312 | |
5313 <p>In the following three paragraphs, a “patent license” is any express | |
5314 agreement or commitment, however denominated, not to enforce a patent | |
5315 (such as an express permission to practice a patent or covenant not to | |
5316 sue for patent infringement). To “grant” such a patent license to a | |
5317 party means to make such an agreement or commitment not to enforce a | |
5318 patent against the party. | |
5319 | |
5320 <p>If you convey a covered work, knowingly relying on a patent license, | |
5321 and the Corresponding Source of the work is not available for anyone | |
5322 to copy, free of charge and under the terms of this License, through a | |
5323 publicly available network server or other readily accessible means, | |
5324 then you must either (1) cause the Corresponding Source to be so | |
5325 available, or (2) arrange to deprive yourself of the benefit of the | |
5326 patent license for this particular work, or (3) arrange, in a manner | |
5327 consistent with the requirements of this License, to extend the patent | |
5328 license to downstream recipients. “Knowingly relying” means you have | |
5329 actual knowledge that, but for the patent license, your conveying the | |
5330 covered work in a country, or your recipient's use of the covered work | |
5331 in a country, would infringe one or more identifiable patents in that | |
5332 country that you have reason to believe are valid. | |
5333 | |
5334 <p>If, pursuant to or in connection with a single transaction or | |
5335 arrangement, you convey, or propagate by procuring conveyance of, a | |
5336 covered work, and grant a patent license to some of the parties | |
5337 receiving the covered work authorizing them to use, propagate, modify | |
5338 or convey a specific copy of the covered work, then the patent license | |
5339 you grant is automatically extended to all recipients of the covered | |
5340 work and works based on it. | |
5341 | |
5342 <p>A patent license is “discriminatory” if it does not include within the | |
5343 scope of its coverage, prohibits the exercise of, or is conditioned on | |
5344 the non-exercise of one or more of the rights that are specifically | |
5345 granted under this License. You may not convey a covered work if you | |
5346 are a party to an arrangement with a third party that is in the | |
5347 business of distributing software, under which you make payment to the | |
5348 third party based on the extent of your activity of conveying the | |
5349 work, and under which the third party grants, to any of the parties | |
5350 who would receive the covered work from you, a discriminatory patent | |
5351 license (a) in connection with copies of the covered work conveyed by | |
5352 you (or copies made from those copies), or (b) primarily for and in | |
5353 connection with specific products or compilations that contain the | |
5354 covered work, unless you entered into that arrangement, or that patent | |
5355 license was granted, prior to 28 March 2007. | |
5356 | |
5357 <p>Nothing in this License shall be construed as excluding or limiting | |
5358 any implied license or other defenses to infringement that may | |
5359 otherwise be available to you under applicable patent law. | |
5360 | |
5361 <li>No Surrender of Others' Freedom. | |
5362 | |
5363 <p>If conditions are imposed on you (whether by court order, agreement or | |
5364 otherwise) that contradict the conditions of this License, they do not | |
5365 excuse you from the conditions of this License. If you cannot convey | |
5366 a covered work so as to satisfy simultaneously your obligations under | |
5367 this License and any other pertinent obligations, then as a | |
5368 consequence you may not convey it at all. For example, if you agree | |
5369 to terms that obligate you to collect a royalty for further conveying | |
5370 from those to whom you convey the Program, the only way you could | |
5371 satisfy both those terms and this License would be to refrain entirely | |
5372 from conveying the Program. | |
5373 | |
5374 <li>Use with the GNU Affero General Public License. | |
5375 | |
5376 <p>Notwithstanding any other provision of this License, you have | |
5377 permission to link or combine any covered work with a work licensed | |
5378 under version 3 of the GNU Affero General Public License into a single | |
5379 combined work, and to convey the resulting work. The terms of this | |
5380 License will continue to apply to the part which is the covered work, | |
5381 but the special requirements of the GNU Affero General Public License, | |
5382 section 13, concerning interaction through a network will apply to the | |
5383 combination as such. | |
5384 | |
5385 <li>Revised Versions of this License. | |
5386 | |
5387 <p>The Free Software Foundation may publish revised and/or new versions | |
5388 of the GNU General Public License from time to time. Such new | |
5389 versions will be similar in spirit to the present version, but may | |
5390 differ in detail to address new problems or concerns. | |
5391 | |
5392 <p>Each version is given a distinguishing version number. If the Program | |
5393 specifies that a certain numbered version of the GNU General Public | |
5394 License “or any later version” applies to it, you have the option of | |
5395 following the terms and conditions either of that numbered version or | |
5396 of any later version published by the Free Software Foundation. If | |
5397 the Program does not specify a version number of the GNU General | |
5398 Public License, you may choose any version ever published by the Free | |
5399 Software Foundation. | |
5400 | |
5401 <p>If the Program specifies that a proxy can decide which future versions | |
5402 of the GNU General Public License can be used, that proxy's public | |
5403 statement of acceptance of a version permanently authorizes you to | |
5404 choose that version for the Program. | |
5405 | |
5406 <p>Later license versions may give you additional or different | |
5407 permissions. However, no additional obligations are imposed on any | |
5408 author or copyright holder as a result of your choosing to follow a | |
5409 later version. | |
5410 | |
5411 <li>Disclaimer of Warranty. | |
5412 | |
5413 <p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY | |
5414 APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT | |
5415 HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT | |
5416 WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT | |
5417 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
5418 A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND | |
5419 PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE | |
5420 DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR | |
5421 CORRECTION. | |
5422 | |
5423 <li>Limitation of Liability. | |
5424 | |
5425 <p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | |
5426 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR | |
5427 CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | |
5428 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES | |
5429 ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT | |
5430 NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR | |
5431 LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM | |
5432 TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER | |
5433 PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | |
5434 | |
5435 <li>Interpretation of Sections 15 and 16. | |
5436 | |
5437 <p>If the disclaimer of warranty and limitation of liability provided | |
5438 above cannot be given local legal effect according to their terms, | |
5439 reviewing courts shall apply local law that most closely approximates | |
5440 an absolute waiver of all civil liability in connection with the | |
5441 Program, unless a warranty or assumption of liability accompanies a | |
5442 copy of the Program in return for a fee. | |
5443 | |
5444 </ol> | |
5445 | |
5446 <h3 class="heading">END OF TERMS AND CONDITIONS</h3> | |
5447 | |
5448 <h3 class="heading">How to Apply These Terms to Your New Programs</h3> | |
5449 | |
5450 <p>If you develop a new program, and you want it to be of the greatest | |
5451 possible use to the public, the best way to achieve this is to make it | |
5452 free software which everyone can redistribute and change under these | |
5453 terms. | |
5454 | |
5455 <p>To do so, attach the following notices to the program. It is safest | |
5456 to attach them to the start of each source file to most effectively | |
5457 state the exclusion of warranty; and each file should have at least | |
5458 the “copyright” line and a pointer to where the full notice is found. | |
5459 | |
5460 <pre class="smallexample"> <var>one line to give the program's name and a brief idea of what it does.</var> | |
5461 Copyright (C) <var>year</var> <var>name of author</var> | |
5462 | |
5463 This program is free software: you can redistribute it and/or modify | |
5464 it under the terms of the GNU General Public License as published by | |
5465 the Free Software Foundation, either version 3 of the License, or (at | |
5466 your option) any later version. | |
5467 | |
5468 This program is distributed in the hope that it will be useful, but | |
5469 WITHOUT ANY WARRANTY; without even the implied warranty of | |
5470 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
5471 General Public License for more details. | |
5472 | |
5473 You should have received a copy of the GNU General Public License | |
5474 along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. | |
5475 </pre> | |
5476 <p>Also add information on how to contact you by electronic and paper mail. | |
5477 | |
5478 <p>If the program does terminal interaction, make it output a short | |
5479 notice like this when it starts in an interactive mode: | |
5480 | |
5481 <pre class="smallexample"> <var>program</var> Copyright (C) <var>year</var> <var>name of author</var> | |
5482 This program comes with ABSOLUTELY NO WARRANTY; for details type ‘<samp><span class="samp">show w</span></samp>’. | |
5483 This is free software, and you are welcome to redistribute it | |
5484 under certain conditions; type ‘<samp><span class="samp">show c</span></samp>’ for details. | |
5485 </pre> | |
5486 <p>The hypothetical commands ‘<samp><span class="samp">show w</span></samp>’ and ‘<samp><span class="samp">show c</span></samp>’ should show | |
5487 the appropriate parts of the General Public License. Of course, your | |
5488 program's commands might be different; for a GUI interface, you would | |
5489 use an “about box”. | |
5490 | |
5491 <p>You should also get your employer (if you work as a programmer) or school, | |
5492 if any, to sign a “copyright disclaimer” for the program, if necessary. | |
5493 For more information on this, and how to apply and follow the GNU GPL, see | |
5494 <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. | |
5495 | |
5496 <p>The GNU General Public License does not permit incorporating your | |
5497 program into proprietary programs. If your program is a subroutine | |
5498 library, you may consider it more useful to permit linking proprietary | |
5499 applications with the library. If this is what you want to do, use | |
5500 the GNU Lesser General Public License instead of this License. But | |
5501 first, please read <a href="http://www.gnu.org/philosophy/why-not-lgpl.html">http://www.gnu.org/philosophy/why-not-lgpl.html</a>. | |
5502 | |
5503 <!-- INDEX --> | |
5504 <div class="node"> | |
5505 <a name="Concept-Index"></a> | |
5506 <p><hr> | |
5507 Next: <a rel="next" accesskey="n" href="#Function-Index">Function Index</a>, | |
5508 Previous: <a rel="previous" accesskey="p" href="#Copying">Copying</a>, | |
5509 Up: <a rel="up" accesskey="u" href="#Top">Top</a> | |
5510 | |
5511 </div> | |
5512 | |
5513 <h2 class="unnumbered">Concept Index</h2> | |
5514 | |
5515 <ul class="index-cp" compact> | |
9692 | 5516 <li><a href="#index-Approximate-MVA-179">Approximate MVA</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> |
5517 <li><a href="#index-Asymmetric-_0040math_007bM_002fM_002fm_007d-system-79">Asymmetric M/M/m system</a>: <a href="#The-Asymmetric-M_002fM_002fm-System">The Asymmetric M/M/m System</a></li> | |
5518 <li><a href="#index-BCMP-network-134">BCMP network</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
9634 | 5519 <li><a href="#index-Birth_002ddeath-process-30">Birth-death process</a>: <a href="#Birth_002dDeath-process">Birth-Death process</a></li> |
9628 | 5520 <li><a href="#index-Birth_002ddeath-process-11">Birth-death process</a>: <a href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a></li> |
9692 | 5521 <li><a href="#index-blocking-queueing-network-229">blocking queueing network</a>: <a href="#Algorithms-for-non-Product_002dform-QNs">Algorithms for non Product-form QNs</a></li> |
5522 <li><a href="#index-bounds_002c-asymptotic-241">bounds, asymptotic</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5523 <li><a href="#index-bounds_002c-balanced-system-256">bounds, balanced system</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5524 <li><a href="#index-bounds_002c-geometric-273">bounds, geometric</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5525 <li><a href="#index-closed-network-279">closed network</a>: <a href="#Utility-functions">Utility functions</a></li> | |
5526 <li><a href="#index-closed-network-250">closed network</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5527 <li><a href="#index-closed-network-111">closed network</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5528 <li><a href="#index-Closed-network_002c-approximate-analysis-181">Closed network, approximate analysis</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5529 <li><a href="#index-closed-network_002c-finite-capacity-230">closed network, finite capacity</a>: <a href="#Algorithms-for-non-Product_002dform-QNs">Algorithms for non Product-form QNs</a></li> | |
5530 <li><a href="#index-closed-network_002c-multiple-classes-286">closed network, multiple classes</a>: <a href="#Utility-functions">Utility functions</a></li> | |
5531 <li><a href="#index-closed-network_002c-multiple-classes-236">closed network, multiple classes</a>: <a href="#Algorithms-for-non-Product_002dform-QNs">Algorithms for non Product-form QNs</a></li> | |
5532 <li><a href="#index-Closed-network_002c-multiple-classes-211">Closed network, multiple classes</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5533 <li><a href="#index-closed-network_002c-multiple-classes-193">closed network, multiple classes</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5534 <li><a href="#index-Closed-network_002c-single-class-180">Closed network, single class</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5535 <li><a href="#index-closed-network_002c-single-class-150">closed network, single class</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5536 <li><a href="#index-CMVA-171">CMVA</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
9634 | 5537 <li><a href="#index-Continuous-time-Markov-chain-25">Continuous time Markov chain</a>: <a href="#State-occupancy-probabilities">State occupancy probabilities</a></li> |
9692 | 5538 <li><a href="#index-convolution-algorithm-113">convolution algorithm</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> |
5539 <li><a href="#index-copyright-295">copyright</a>: <a href="#Copying">Copying</a></li> | |
9628 | 5540 <li><a href="#index-Discrete-time-Markov-chain-6">Discrete time Markov chain</a>: <a href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a></li> |
9634 | 5541 <li><a href="#index-Expected-sojourn-time-34">Expected sojourn time</a>: <a href="#Expected-Sojourn-Time">Expected Sojourn Time</a></li> |
9692 | 5542 <li><a href="#index-First-passage-times-49">First passage times</a>: <a href="#First-Passage-Times">First Passage Times</a></li> |
9628 | 5543 <li><a href="#index-First-passage-times-15">First passage times</a>: <a href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a></li> |
9692 | 5544 <li><a href="#index-Jackson-network-104">Jackson network</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> |
5545 <li><a href="#index-load_002ddependent-service-center-123">load-dependent service center</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5546 <li><a href="#index-g_t_0040math_007bM_002fG_002f1_007d-system-85">M/G/1 system</a>: <a href="#The-M_002fG_002f1-System">The M/G/1 System</a></li> | |
5547 <li><a href="#index-g_t_0040math_007bM_002fH_005fm_002f1_007d-system-87">M/H_m/1 system</a>: <a href="#The-M_002fHm_002f1-System">The M/Hm/1 System</a></li> | |
5548 <li><a href="#index-g_t_0040math_007bM_002fM_002f1_007d-system-51">M/M/1 system</a>: <a href="#The-M_002fM_002f1-System">The M/M/1 System</a></li> | |
5549 <li><a href="#index-g_t_0040math_007bM_002fM_002f1_002fK_007d-system-71">M/M/1/K system</a>: <a href="#The-M_002fM_002f1_002fK-System">The M/M/1/K System</a></li> | |
5550 <li><a href="#index-g_t_0040math_007bM_002fM_002f_007dinf-system-64">M/M/inf system</a>: <a href="#The-M_002fM_002finf-System">The M/M/inf System</a></li> | |
5551 <li><a href="#index-g_t_0040math_007bM_002fM_002fm_007d-system-58">M/M/m system</a>: <a href="#The-M_002fM_002fm-System">The M/M/m System</a></li> | |
5552 <li><a href="#index-g_t_0040math_007bM_002fM_002fm_002fK_007d-system-73">M/M/m/K system</a>: <a href="#The-M_002fM_002fm_002fK-System">The M/M/m/K System</a></li> | |
5553 <li><a href="#index-Markov-chain_002c-continuous-time-48">Markov chain, continuous time</a>: <a href="#First-Passage-Times">First Passage Times</a></li> | |
5554 <li><a href="#index-Markov-chain_002c-continuous-time-40">Markov chain, continuous time</a>: <a href="#Mean-Time-to-Absorption">Mean Time to Absorption</a></li> | |
5555 <li><a href="#index-Markov-chain_002c-continuous-time-37">Markov chain, continuous time</a>: <a href="#Time_002dAveraged-Expected-Sojourn-Time">Time-Averaged Expected Sojourn Time</a></li> | |
9634 | 5556 <li><a href="#index-Markov-chain_002c-continuous-time-33">Markov chain, continuous time</a>: <a href="#Expected-Sojourn-Time">Expected Sojourn Time</a></li> |
5557 <li><a href="#index-Markov-chain_002c-continuous-time-29">Markov chain, continuous time</a>: <a href="#Birth_002dDeath-process">Birth-Death process</a></li> | |
5558 <li><a href="#index-Markov-chain_002c-continuous-time-24">Markov chain, continuous time</a>: <a href="#State-occupancy-probabilities">State occupancy probabilities</a></li> | |
5559 <li><a href="#index-Markov-chain_002c-continuous-time-21">Markov chain, continuous time</a>: <a href="#Continuous_002dTime-Markov-Chains">Continuous-Time Markov Chains</a></li> | |
9628 | 5560 <li><a href="#index-Markov-chain_002c-discrete-time-2">Markov chain, discrete time</a>: <a href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a></li> |
9634 | 5561 <li><a href="#index-Markov-chain_002c-disctete-time-18">Markov chain, disctete time</a>: <a href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a></li> |
5562 <li><a href="#index-Markov-chain_002c-state-occupancy-probabilities-26">Markov chain, state occupancy probabilities</a>: <a href="#State-occupancy-probabilities">State occupancy probabilities</a></li> | |
9628 | 5563 <li><a href="#index-Markov-chain_002c-stationary-probabilities-7">Markov chain, stationary probabilities</a>: <a href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a></li> |
9692 | 5564 <li><a href="#index-Mean-time-to-absorption-41">Mean time to absorption</a>: <a href="#Mean-Time-to-Absorption">Mean Time to Absorption</a></li> |
9634 | 5565 <li><a href="#index-Mean-time-to-absorption-19">Mean time to absorption</a>: <a href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a></li> |
9692 | 5566 <li><a href="#index-Mean-Value-Analysys-_0028MVA_0029-149">Mean Value Analysys (MVA)</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> |
5567 <li><a href="#index-Mean-Value-Analysys-_0028MVA_0029_002c-approximate-178">Mean Value Analysys (MVA), approximate</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5568 <li><a href="#index-mixed-network-221">mixed network</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5569 <li><a href="#index-normalization-constant-112">normalization constant</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5570 <li><a href="#index-open-network-281">open network</a>: <a href="#Utility-functions">Utility functions</a></li> | |
5571 <li><a href="#index-open-network-242">open network</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5572 <li><a href="#index-open-network_002c-multiple-classes-141">open network, multiple classes</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5573 <li><a href="#index-open-network_002c-single-class-103">open network, single class</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5574 <li><a href="#index-population-mix-285">population mix</a>: <a href="#Utility-functions">Utility functions</a></li> | |
5575 <li><a href="#index-queueing-network-with-blocking-228">queueing network with blocking</a>: <a href="#Algorithms-for-non-Product_002dform-QNs">Algorithms for non Product-form QNs</a></li> | |
5576 <li><a href="#index-queueing-networks-88">queueing networks</a>: <a href="#Queueing-Networks">Queueing Networks</a></li> | |
5577 <li><a href="#index-RS-blocking-239">RS blocking</a>: <a href="#Algorithms-for-non-Product_002dform-QNs">Algorithms for non Product-form QNs</a></li> | |
9634 | 5578 <li><a href="#index-Stationary-probabilities-27">Stationary probabilities</a>: <a href="#State-occupancy-probabilities">State occupancy probabilities</a></li> |
9628 | 5579 <li><a href="#index-Stationary-probabilities-8">Stationary probabilities</a>: <a href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a></li> |
9692 | 5580 <li><a href="#index-Time_002dalveraged-sojourn-time-38">Time-alveraged sojourn time</a>: <a href="#Time_002dAveraged-Expected-Sojourn-Time">Time-Averaged Expected Sojourn Time</a></li> |
5581 <li><a href="#index-traffic-intensity-65">traffic intensity</a>: <a href="#The-M_002fM_002finf-System">The M/M/inf System</a></li> | |
5582 <li><a href="#index-warranty-294">warranty</a>: <a href="#Copying">Copying</a></li> | |
9391 | 5583 </ul><div class="node"> |
5584 <a name="Function-Index"></a> | |
5585 <p><hr> | |
5586 Next: <a rel="next" accesskey="n" href="#Author-Index">Author Index</a>, | |
5587 Previous: <a rel="previous" accesskey="p" href="#Concept-Index">Concept Index</a>, | |
5588 Up: <a rel="up" accesskey="u" href="#Top">Top</a> | |
5589 | |
5590 </div> | |
5591 | |
5592 <h2 class="unnumbered">Function Index</h2> | |
5593 | |
5594 | |
5595 | |
5596 <ul class="index-fn" compact> | |
9634 | 5597 <li><a href="#index-ctmc-22"><code>ctmc</code></a>: <a href="#State-occupancy-probabilities">State occupancy probabilities</a></li> |
5598 <li><a href="#index-ctmc_005fbd-28"><code>ctmc_bd</code></a>: <a href="#Birth_002dDeath-process">Birth-Death process</a></li> | |
5599 <li><a href="#index-ctmc_005fcheck_005fQ-20"><code>ctmc_check_Q</code></a>: <a href="#Continuous_002dTime-Markov-Chains">Continuous-Time Markov Chains</a></li> | |
5600 <li><a href="#index-ctmc_005fexps-31"><code>ctmc_exps</code></a>: <a href="#Expected-Sojourn-Time">Expected Sojourn Time</a></li> | |
9692 | 5601 <li><a href="#index-ctmc_005ffpt-46"><code>ctmc_fpt</code></a>: <a href="#First-Passage-Times">First Passage Times</a></li> |
5602 <li><a href="#index-ctmc_005fmtta-39"><code>ctmc_mtta</code></a>: <a href="#Mean-Time-to-Absorption">Mean Time to Absorption</a></li> | |
9634 | 5603 <li><a href="#index-ctmc_005ftaexps-35"><code>ctmc_taexps</code></a>: <a href="#Time_002dAveraged-Expected-Sojourn-Time">Time-Averaged Expected Sojourn Time</a></li> |
9628 | 5604 <li><a href="#index-dtmc-3"><code>dtmc</code></a>: <a href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a></li> |
5605 <li><a href="#index-dtmc_005fbd-9"><code>dtmc_bd</code></a>: <a href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a></li> | |
5606 <li><a href="#index-dtmc_005fcheck_005fP-1"><code>dtmc_check_P</code></a>: <a href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a></li> | |
5607 <li><a href="#index-dtmc_005ffpt-12"><code>dtmc_fpt</code></a>: <a href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a></li> | |
9632
499daeccb4e8
New function dtmc_mtta() added; removed deprecated functions
mmarzolla
parents:
9629
diff
changeset
|
5608 <li><a href="#index-dtmc_005fmtta-16"><code>dtmc_mtta</code></a>: <a href="#Discrete_002dTime-Markov-Chains">Discrete-Time Markov Chains</a></li> |
9692 | 5609 <li><a href="#index-population_005fmix-284"><code>population_mix</code></a>: <a href="#Utility-functions">Utility functions</a></li> |
5610 <li><a href="#index-qnammm-78"><code>qnammm</code></a>: <a href="#The-Asymmetric-M_002fM_002fm-System">The Asymmetric M/M/m System</a></li> | |
5611 <li><a href="#index-qnclosed-278"><code>qnclosed</code></a>: <a href="#Utility-functions">Utility functions</a></li> | |
5612 <li><a href="#index-qnclosedab-247"><code>qnclosedab</code></a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5613 <li><a href="#index-qnclosedbsb-262"><code>qnclosedbsb</code></a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5614 <li><a href="#index-qnclosedgb-272"><code>qnclosedgb</code></a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5615 <li><a href="#index-qnclosedmultimva-186"><code>qnclosedmultimva</code></a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5616 <li><a href="#index-qnclosedmultimvaapprox-204"><code>qnclosedmultimvaapprox</code></a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5617 <li><a href="#index-qnclosedpb-266"><code>qnclosedpb</code></a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5618 <li><a href="#index-qnclosedsinglemva-146"><code>qnclosedsinglemva</code></a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5619 <li><a href="#index-qnclosedsinglemvaapprox-173"><code>qnclosedsinglemvaapprox</code></a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5620 <li><a href="#index-qnclosedsinglemvald-159"><code>qnclosedsinglemvald</code></a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5621 <li><a href="#index-qncmva-168"><code>qncmva</code></a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5622 <li><a href="#index-qnconvolution-109"><code>qnconvolution</code></a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5623 <li><a href="#index-qnconvolutionld-119"><code>qnconvolutionld</code></a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5624 <li><a href="#index-qnjackson-100"><code>qnjackson</code></a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5625 <li><a href="#index-qnmarkov-232"><code>qnmarkov</code></a>: <a href="#Algorithms-for-non-Product_002dform-QNs">Algorithms for non Product-form QNs</a></li> | |
5626 <li><a href="#index-qnmg1-84"><code>qnmg1</code></a>: <a href="#The-M_002fG_002f1-System">The M/G/1 System</a></li> | |
5627 <li><a href="#index-qnmh1-86"><code>qnmh1</code></a>: <a href="#The-M_002fHm_002f1-System">The M/Hm/1 System</a></li> | |
5628 <li><a href="#index-qnmix-219"><code>qnmix</code></a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5629 <li><a href="#index-qnmknode-89"><code>qnmknode</code></a>: <a href="#Generic-Algorithms">Generic Algorithms</a></li> | |
5630 <li><a href="#index-qnmm1-50"><code>qnmm1</code></a>: <a href="#The-M_002fM_002f1-System">The M/M/1 System</a></li> | |
5631 <li><a href="#index-qnmm1k-70"><code>qnmm1k</code></a>: <a href="#The-M_002fM_002f1_002fK-System">The M/M/1/K System</a></li> | |
5632 <li><a href="#index-qnmminf-63"><code>qnmminf</code></a>: <a href="#The-M_002fM_002finf-System">The M/M/inf System</a></li> | |
5633 <li><a href="#index-qnmmm-56"><code>qnmmm</code></a>: <a href="#The-M_002fM_002fm-System">The M/M/m System</a></li> | |
5634 <li><a href="#index-qnmmmk-72"><code>qnmmmk</code></a>: <a href="#The-M_002fM_002fm_002fK-System">The M/M/m/K System</a></li> | |
5635 <li><a href="#index-qnmvablo-227"><code>qnmvablo</code></a>: <a href="#Algorithms-for-non-Product_002dform-QNs">Algorithms for non Product-form QNs</a></li> | |
5636 <li><a href="#index-qnmvapop-289"><code>qnmvapop</code></a>: <a href="#Utility-functions">Utility functions</a></li> | |
5637 <li><a href="#index-qnopen-280"><code>qnopen</code></a>: <a href="#Utility-functions">Utility functions</a></li> | |
5638 <li><a href="#index-qnopenab-240"><code>qnopenab</code></a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5639 <li><a href="#index-qnopenbsb-255"><code>qnopenbsb</code></a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5640 <li><a href="#index-qnopenmulti-139"><code>qnopenmulti</code></a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5641 <li><a href="#index-qnopensingle-131"><code>qnopensingle</code></a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5642 <li><a href="#index-qnsolve-96"><code>qnsolve</code></a>: <a href="#Generic-Algorithms">Generic Algorithms</a></li> | |
5643 <li><a href="#index-qnvisits-282"><code>qnvisits</code></a>: <a href="#Utility-functions">Utility functions</a></li> | |
9391 | 5644 </ul><div class="node"> |
5645 <a name="Author-Index"></a> | |
5646 <p><hr> | |
5647 Previous: <a rel="previous" accesskey="p" href="#Function-Index">Function Index</a>, | |
5648 Up: <a rel="up" accesskey="u" href="#Top">Top</a> | |
5649 | |
5650 </div> | |
5651 | |
5652 <h2 class="unnumbered">Author Index</h2> | |
5653 | |
5654 | |
5655 | |
5656 <ul class="index-au" compact> | |
9692 | 5657 <li><a href="#index-Akyildiz_002c-I_002e-F_002e-231">Akyildiz, I. F.</a>: <a href="#Algorithms-for-non-Product_002dform-QNs">Algorithms for non Product-form QNs</a></li> |
5658 <li><a href="#index-Bard_002c-Y_002e-213">Bard, Y.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5659 <li><a href="#index-Bolch_002c-G_002e-105">Bolch, G.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5660 <li><a href="#index-Bolch_002c-G_002e-80">Bolch, G.</a>: <a href="#The-Asymmetric-M_002fM_002fm-System">The Asymmetric M/M/m System</a></li> | |
5661 <li><a href="#index-Bolch_002c-G_002e-74">Bolch, G.</a>: <a href="#The-M_002fM_002fm_002fK-System">The M/M/m/K System</a></li> | |
5662 <li><a href="#index-Bolch_002c-G_002e-66">Bolch, G.</a>: <a href="#The-M_002fM_002finf-System">The M/M/inf System</a></li> | |
5663 <li><a href="#index-Bolch_002c-G_002e-59">Bolch, G.</a>: <a href="#The-M_002fM_002fm-System">The M/M/m System</a></li> | |
5664 <li><a href="#index-Bolch_002c-G_002e-52">Bolch, G.</a>: <a href="#The-M_002fM_002f1-System">The M/M/1 System</a></li> | |
5665 <li><a href="#index-Bolch_002c-G_002e-42">Bolch, G.</a>: <a href="#Mean-Time-to-Absorption">Mean Time to Absorption</a></li> | |
5666 <li><a href="#index-Buzen_002c-J_002e-P_002e-114">Buzen, J. P.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5667 <li><a href="#index-Casale_002c-G_002e-269">Casale, G.</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5668 <li><a href="#index-Casale_002c-G_002e-172">Casale, G.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5669 <li><a href="#index-de-Meer_002c-H_002e-107">de Meer, H.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5670 <li><a href="#index-de-Meer_002c-H_002e-82">de Meer, H.</a>: <a href="#The-Asymmetric-M_002fM_002fm-System">The Asymmetric M/M/m System</a></li> | |
5671 <li><a href="#index-de-Meer_002c-H_002e-76">de Meer, H.</a>: <a href="#The-M_002fM_002fm_002fK-System">The M/M/m/K System</a></li> | |
5672 <li><a href="#index-de-Meer_002c-H_002e-68">de Meer, H.</a>: <a href="#The-M_002fM_002finf-System">The M/M/inf System</a></li> | |
5673 <li><a href="#index-de-Meer_002c-H_002e-61">de Meer, H.</a>: <a href="#The-M_002fM_002fm-System">The M/M/m System</a></li> | |
5674 <li><a href="#index-de-Meer_002c-H_002e-54">de Meer, H.</a>: <a href="#The-M_002fM_002f1-System">The M/M/1 System</a></li> | |
5675 <li><a href="#index-de-Meer_002c-H_002e-44">de Meer, H.</a>: <a href="#Mean-Time-to-Absorption">Mean Time to Absorption</a></li> | |
5676 <li><a href="#index-Graham_002c-G_002e-S_002e-245">Graham, G. S.</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5677 <li><a href="#index-Graham_002c-G_002e-S_002e-144">Graham, G. S.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5678 <li><a href="#index-Greiner_002c-S_002e-106">Greiner, S.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5679 <li><a href="#index-Greiner_002c-S_002e-81">Greiner, S.</a>: <a href="#The-Asymmetric-M_002fM_002fm-System">The Asymmetric M/M/m System</a></li> | |
5680 <li><a href="#index-Greiner_002c-S_002e-75">Greiner, S.</a>: <a href="#The-M_002fM_002fm_002fK-System">The M/M/m/K System</a></li> | |
5681 <li><a href="#index-Greiner_002c-S_002e-67">Greiner, S.</a>: <a href="#The-M_002fM_002finf-System">The M/M/inf System</a></li> | |
5682 <li><a href="#index-Greiner_002c-S_002e-60">Greiner, S.</a>: <a href="#The-M_002fM_002fm-System">The M/M/m System</a></li> | |
5683 <li><a href="#index-Greiner_002c-S_002e-53">Greiner, S.</a>: <a href="#The-M_002fM_002f1-System">The M/M/1 System</a></li> | |
5684 <li><a href="#index-Greiner_002c-S_002e-43">Greiner, S.</a>: <a href="#Mean-Time-to-Absorption">Mean Time to Absorption</a></li> | |
5685 <li><a href="#index-Hsieh_002c-C_002e-H-267">Hsieh, C. H</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5686 <li><a href="#index-Jain_002c-R_002e-154">Jain, R.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5687 <li><a href="#index-Kobayashi_002c-H_002e-126">Kobayashi, H.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5688 <li><a href="#index-Lam_002c-S_002e-268">Lam, S.</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5689 <li><a href="#index-Lavenberg_002c-S_002e-S_002e-153">Lavenberg, S. S.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5690 <li><a href="#index-Lazowska_002c-E_002e-D_002e-243">Lazowska, E. D.</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5691 <li><a href="#index-Lazowska_002c-E_002e-D_002e-142">Lazowska, E. D.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5692 <li><a href="#index-Muntz_002c-R_002e-R_002e-270">Muntz, R. R.</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5693 <li><a href="#index-Reiser_002c-M_002e-125">Reiser, M.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5694 <li><a href="#index-Santini_002c-S_002e-288">Santini, S.</a>: <a href="#Utility-functions">Utility functions</a></li> | |
5695 <li><a href="#index-Schweitzer_002c-P_002e-214">Schweitzer, P.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5696 <li><a href="#index-Schwetman_002c-H_002e-287">Schwetman, H.</a>: <a href="#Utility-functions">Utility functions</a></li> | |
5697 <li><a href="#index-Schwetman_002c-H_002e-124">Schwetman, H.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5698 <li><a href="#index-Serazzi_002c-G_002e-271">Serazzi, G.</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5699 <li><a href="#index-Sevcik_002c-K_002e-C_002e-246">Sevcik, K. C.</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5700 <li><a href="#index-Sevcik_002c-K_002e-C_002e-145">Sevcik, K. C.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5701 <li><a href="#index-Trivedi_002c-K_002e-108">Trivedi, K.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
5702 <li><a href="#index-Trivedi_002c-K_002e-83">Trivedi, K.</a>: <a href="#The-Asymmetric-M_002fM_002fm-System">The Asymmetric M/M/m System</a></li> | |
5703 <li><a href="#index-Trivedi_002c-K_002e-77">Trivedi, K.</a>: <a href="#The-M_002fM_002fm_002fK-System">The M/M/m/K System</a></li> | |
5704 <li><a href="#index-Trivedi_002c-K_002e-69">Trivedi, K.</a>: <a href="#The-M_002fM_002finf-System">The M/M/inf System</a></li> | |
5705 <li><a href="#index-Trivedi_002c-K_002e-62">Trivedi, K.</a>: <a href="#The-M_002fM_002fm-System">The M/M/m System</a></li> | |
5706 <li><a href="#index-Trivedi_002c-K_002e-55">Trivedi, K.</a>: <a href="#The-M_002fM_002f1-System">The M/M/1 System</a></li> | |
5707 <li><a href="#index-Trivedi_002c-K_002e-45">Trivedi, K.</a>: <a href="#Mean-Time-to-Absorption">Mean Time to Absorption</a></li> | |
5708 <li><a href="#index-Wong_002c-E_002e-293">Wong, E.</a>: <a href="#Utility-functions">Utility functions</a></li> | |
5709 <li><a href="#index-Zahorjan_002c-J_002e-292">Zahorjan, J.</a>: <a href="#Utility-functions">Utility functions</a></li> | |
5710 <li><a href="#index-Zahorjan_002c-J_002e-244">Zahorjan, J.</a>: <a href="#Bounds-on-performance">Bounds on performance</a></li> | |
5711 <li><a href="#index-Zahorjan_002c-J_002e-143">Zahorjan, J.</a>: <a href="#Algorithms-for-Product_002dForm-QNs">Algorithms for Product-Form QNs</a></li> | |
9391 | 5712 </ul></body></html> |
5713 |