You can subscribe to this list here.
2001 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}
(10) 
_{Aug}
(5) 
_{Sep}
(3) 
_{Oct}
(41) 
_{Nov}
(41) 
_{Dec}
(33) 

2002 
_{Jan}
(75) 
_{Feb}
(10) 
_{Mar}
(170) 
_{Apr}
(174) 
_{May}
(66) 
_{Jun}
(11) 
_{Jul}
(10) 
_{Aug}
(44) 
_{Sep}
(73) 
_{Oct}
(28) 
_{Nov}
(139) 
_{Dec}
(52) 
2003 
_{Jan}
(35) 
_{Feb}
(93) 
_{Mar}
(62) 
_{Apr}
(10) 
_{May}
(55) 
_{Jun}
(70) 
_{Jul}
(37) 
_{Aug}
(16) 
_{Sep}
(56) 
_{Oct}
(31) 
_{Nov}
(57) 
_{Dec}
(83) 
2004 
_{Jan}
(85) 
_{Feb}
(67) 
_{Mar}
(27) 
_{Apr}
(37) 
_{May}
(75) 
_{Jun}
(85) 
_{Jul}
(160) 
_{Aug}
(68) 
_{Sep}
(104) 
_{Oct}
(25) 
_{Nov}
(39) 
_{Dec}
(23) 
2005 
_{Jan}
(10) 
_{Feb}
(45) 
_{Mar}
(43) 
_{Apr}
(19) 
_{May}
(108) 
_{Jun}
(31) 
_{Jul}
(41) 
_{Aug}
(23) 
_{Sep}
(65) 
_{Oct}
(58) 
_{Nov}
(44) 
_{Dec}
(54) 
2006 
_{Jan}
(96) 
_{Feb}
(27) 
_{Mar}
(69) 
_{Apr}
(59) 
_{May}
(67) 
_{Jun}
(35) 
_{Jul}
(13) 
_{Aug}
(461) 
_{Sep}
(160) 
_{Oct}
(399) 
_{Nov}
(32) 
_{Dec}
(72) 
2007 
_{Jan}
(316) 
_{Feb}
(305) 
_{Mar}
(318) 
_{Apr}
(54) 
_{May}
(194) 
_{Jun}
(173) 
_{Jul}
(282) 
_{Aug}
(91) 
_{Sep}
(227) 
_{Oct}
(365) 
_{Nov}
(168) 
_{Dec}
(18) 
2008 
_{Jan}
(71) 
_{Feb}
(111) 
_{Mar}
(155) 
_{Apr}
(173) 
_{May}
(70) 
_{Jun}
(67) 
_{Jul}
(55) 
_{Aug}
(83) 
_{Sep}
(32) 
_{Oct}
(68) 
_{Nov}
(80) 
_{Dec}
(29) 
2009 
_{Jan}
(46) 
_{Feb}
(18) 
_{Mar}
(95) 
_{Apr}
(76) 
_{May}
(140) 
_{Jun}
(98) 
_{Jul}
(84) 
_{Aug}
(123) 
_{Sep}
(94) 
_{Oct}
(131) 
_{Nov}
(142) 
_{Dec}
(125) 
2010 
_{Jan}
(128) 
_{Feb}
(158) 
_{Mar}
(172) 
_{Apr}
(134) 
_{May}
(94) 
_{Jun}
(84) 
_{Jul}
(32) 
_{Aug}
(127) 
_{Sep}
(167) 
_{Oct}
(109) 
_{Nov}
(69) 
_{Dec}
(78) 
2011 
_{Jan}
(39) 
_{Feb}
(58) 
_{Mar}
(52) 
_{Apr}
(47) 
_{May}
(56) 
_{Jun}
(76) 
_{Jul}
(55) 
_{Aug}
(54) 
_{Sep}
(165) 
_{Oct}
(255) 
_{Nov}
(328) 
_{Dec}
(263) 
2012 
_{Jan}
(82) 
_{Feb}
(147) 
_{Mar}
(400) 
_{Apr}
(216) 
_{May}
(209) 
_{Jun}
(160) 
_{Jul}
(86) 
_{Aug}
(141) 
_{Sep}
(156) 
_{Oct}
(6) 
_{Nov}

_{Dec}

S  M  T  W  T  F  S 




1

2

3
(4) 
4
(2) 
5
(6) 
6
(7) 
7

8
(3) 
9
(7) 
10
(11) 
11
(4) 
12

13
(2) 
14

15
(8) 
16
(3) 
17
(2) 
18

19
(2) 
20
(3) 
21
(5) 
22
(22) 
23
(10) 
24
(1) 
25
(8) 
26
(23) 
27
(4) 
28
(7) 
29
(3) 



From: <mmarzolla@us...>  20120203 22:34:27

Revision: 9580 http://octave.svn.sourceforge.net/octave/?rev=9580&view=rev Author: mmarzolla Date: 20120203 22:34:20 +0000 (Fri, 03 Feb 2012) Log Message:  Package restructuring Modified Paths:  trunk/octaveforge/main/queueing/INSTALL trunk/octaveforge/main/queueing/Makefile trunk/octaveforge/main/queueing/doc/README trunk/octaveforge/main/queueing/doc/installation.txi trunk/octaveforge/main/queueing/doc/queueing.html trunk/octaveforge/main/queueing/doc/queueing.pdf trunk/octaveforge/main/queueing/inst/ctmc_fpt.m Added Paths:  trunk/octaveforge/main/queueing/devel/README Modified: trunk/octaveforge/main/queueing/INSTALL ===================================================================  trunk/octaveforge/main/queueing/INSTALL 20120203 22:15:32 UTC (rev 9579) +++ trunk/octaveforge/main/queueing/INSTALL 20120203 22:34:20 UTC (rev 9580) @@ 106,7 +106,7 @@ This directory contains examples which are automatically extracted from the `demo' blocks of the function files. `broken/' +`devel/' This directory contains function files which are either not working properly, or need additional testing before they can be moved to the `inst/' directory. Modified: trunk/octaveforge/main/queueing/Makefile ===================================================================  trunk/octaveforge/main/queueing/Makefile 20120203 22:15:32 UTC (rev 9579) +++ trunk/octaveforge/main/queueing/Makefile 20120203 22:34:20 UTC (rev 9580) @@ 3,7 +3,7 @@ PROGNAME=queueing DISTNAME=$(PROGNAME)$(VERSIONNUM) SUBDIRS=inst scripts examples doc test broken +SUBDIRS=inst scripts examples doc test devel DISTFILES=COPYING NEWS Makefile DESCRIPTION INSTALL DISTSUBDIRS=inst doc Added: trunk/octaveforge/main/queueing/devel/README ===================================================================  trunk/octaveforge/main/queueing/devel/README (rev 0) +++ trunk/octaveforge/main/queueing/devel/README 20120203 22:34:20 UTC (rev 9580) @@ 0,0 +1,3 @@ +This directory contains scripts which are currently under development; +therefore they may not work correctly, or could be not fully +tested. The content of this directory is ignored by pkg install. Modified: trunk/octaveforge/main/queueing/doc/README ===================================================================  trunk/octaveforge/main/queueing/doc/README 20120203 22:15:32 UTC (rev 9579) +++ trunk/octaveforge/main/queueing/doc/README 20120203 22:34:20 UTC (rev 9580) @@ 42,7 +42,7 @@ This directory contains the script used to execute all tests embedded within functions in the inst/ directory. broken/ +devel/ This directory contains scripts which are currently known not to work correctly, or which are workinprogress. Modified: trunk/octaveforge/main/queueing/doc/installation.txi ===================================================================  trunk/octaveforge/main/queueing/doc/installation.txi 20120203 22:15:32 UTC (rev 9579) +++ trunk/octaveforge/main/queueing/doc/installation.txi 20120203 22:34:20 UTC (rev 9580) @@ 168,7 +168,7 @@ This directory contains examples which are automatically extracted from the @samp{demo} blocks of the function files. @... broken/ +@item devel/ This directory contains function files which are either not working properly, or need additional testing before they can be moved to the @file{inst/} directory. Modified: trunk/octaveforge/main/queueing/doc/queueing.html ===================================================================  trunk/octaveforge/main/queueing/doc/queueing.html 20120203 22:15:32 UTC (rev 9579) +++ trunk/octaveforge/main/queueing/doc/queueing.html 20120203 22:34:20 UTC (rev 9580) @@ 416,7 +416,7 @@ <br><dt><samp><span class="file">examples/</span></samp><dd>This directory contains examples which are automatically extracted from the ‘<samp><span class="samp">demo</span></samp>’ blocks of the function files.  <br><dt><samp><span class="file">broken/</span></samp><dd>This directory contains function files which are either not working + <br><dt><samp><span class="file">devel/</span></samp><dd>This directory contains function files which are either not working properly, or need additional testing before they can be moved to the <samp><span class="file">inst/</span></samp> directory. Modified: trunk/octaveforge/main/queueing/doc/queueing.pdf =================================================================== (Binary files differ) Modified: trunk/octaveforge/main/queueing/inst/ctmc_fpt.m ===================================================================  trunk/octaveforge/main/queueing/inst/ctmc_fpt.m 20120203 22:15:32 UTC (rev 9579) +++ trunk/octaveforge/main/queueing/inst/ctmc_fpt.m 20120203 22:34:20 UTC (rev 9580) @@ 112,17 +112,17 @@ %! M = ctmc_fpt(Q) %! m = ctmc_fpt(Q,1,3) %!test +%!xtest %! Q = unifrnd(0.1,0.9,10,10); %! Q = diag(sum(Q,2)); %! M = ctmc_fpt(Q); %!test +%!xtest %! Q = unifrnd(0.1,0.9,10,10); %! Q = diag(sum(Q,2)); %! m = ctmc_fpt(Q,1,3); %!test +%!xtest %! Q = unifrnd(0.1,0.9,10,10); %! Q = diag(sum(Q,2)); %! m = ctmc_fpt(Q,1,[3 5 6]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. 
From: <mmarzolla@us...>  20120203 22:15:38

Revision: 9579 http://octave.svn.sourceforge.net/octave/?rev=9579&view=rev Author: mmarzolla Date: 20120203 22:15:32 +0000 (Fri, 03 Feb 2012) Log Message:  Package restructuring Modified Paths:  trunk/octaveforge/main/queueing/Makefile trunk/octaveforge/main/queueing/doc/queueing.pdf trunk/octaveforge/main/queueing/examples/Makefile Added Paths:  trunk/octaveforge/main/queueing/NEWS trunk/octaveforge/main/queueing/devel/ Removed Paths:  trunk/octaveforge/main/queueing/broken/ Modified: trunk/octaveforge/main/queueing/Makefile ===================================================================  trunk/octaveforge/main/queueing/Makefile 20120203 22:01:31 UTC (rev 9578) +++ trunk/octaveforge/main/queueing/Makefile 20120203 22:15:32 UTC (rev 9579) @@ 4,7 +4,8 @@ DISTNAME=$(PROGNAME)$(VERSIONNUM) SUBDIRS=inst scripts examples doc test broken DISTFILES=COPYING README Makefile DESCRIPTION DESCRIPTION.in INSTALL +DISTFILES=COPYING NEWS Makefile DESCRIPTION INSTALL +DISTSUBDIRS=inst doc .PHONY: clean check @@ 44,7 +45,7 @@ \rm r f $(DISTNAME) fname mkdir $(DISTNAME) echo "$(DISTNAME)" > fname  for d in $(SUBDIRS); do \ + for d in $(DISTSUBDIRS); do \ mkdir p $(DISTNAME)/$$d; \ $(MAKE) C $$d dist; \ done Added: trunk/octaveforge/main/queueing/NEWS ===================================================================  trunk/octaveforge/main/queueing/NEWS (rev 0) +++ trunk/octaveforge/main/queueing/NEWS 20120203 22:15:32 UTC (rev 9579) @@ 0,0 +1,8 @@ +Summary of important uservisible changes for releases of the queueing package + +=============================================================================== +queueing1.0.0 Release Date: 20120203 Release Manager: Moreno Marzolla +=============================================================================== + +** First release of the queueing package + Modified: trunk/octaveforge/main/queueing/doc/queueing.pdf =================================================================== (Binary files differ) Modified: trunk/octaveforge/main/queueing/examples/Makefile ===================================================================  trunk/octaveforge/main/queueing/examples/Makefile 20120203 22:01:31 UTC (rev 9578) +++ trunk/octaveforge/main/queueing/examples/Makefile 20120203 22:15:32 UTC (rev 9579) @@ 1,4 +1,4 @@ DISTFILES=$(wildcard *.m) Makefile +DISTFILES=grabdemo.m Makefile .PHONY: clean distclean check This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. 
From: <mmarzolla@us...>  20120203 22:01:39

Revision: 9578 http://octave.svn.sourceforge.net/octave/?rev=9578&view=rev Author: mmarzolla Date: 20120203 22:01:31 +0000 (Fri, 03 Feb 2012) Log Message:  Package restructuring Modified Paths:  trunk/octaveforge/main/queueing/doc/Makefile Added Paths:  trunk/octaveforge/main/queueing/doc/README Removed Paths:  trunk/octaveforge/main/queueing/README trunk/octaveforge/main/queueing/examples/demo_1_ctmc.m trunk/octaveforge/main/queueing/examples/demo_1_ctmc_exps.m trunk/octaveforge/main/queueing/examples/demo_1_ctmc_fpt.m trunk/octaveforge/main/queueing/examples/demo_1_ctmc_mtta.m trunk/octaveforge/main/queueing/examples/demo_1_ctmc_taexps.m trunk/octaveforge/main/queueing/examples/demo_1_dtmc.m trunk/octaveforge/main/queueing/examples/demo_1_dtmc_fpt.m trunk/octaveforge/main/queueing/examples/demo_1_qnclosed.m trunk/octaveforge/main/queueing/examples/demo_1_qnclosedmultimva.m trunk/octaveforge/main/queueing/examples/demo_1_qnclosedmultimvaapprox.m trunk/octaveforge/main/queueing/examples/demo_1_qnclosedsinglemva.m trunk/octaveforge/main/queueing/examples/demo_1_qnclosedsinglemvaapprox.m trunk/octaveforge/main/queueing/examples/demo_1_qnconvolution.m trunk/octaveforge/main/queueing/examples/demo_1_qnmmm.m trunk/octaveforge/main/queueing/examples/demo_1_qnopensingle.m trunk/octaveforge/main/queueing/examples/demo_1_qnsolve.m trunk/octaveforge/main/queueing/examples/demo_1_qnvisits.m trunk/octaveforge/main/queueing/examples/demo_2_ctmc.m trunk/octaveforge/main/queueing/examples/demo_2_ctmc_mtta.m trunk/octaveforge/main/queueing/examples/demo_2_ctmc_taexps.m trunk/octaveforge/main/queueing/examples/demo_3_ctmc.m Deleted: trunk/octaveforge/main/queueing/README ===================================================================  trunk/octaveforge/main/queueing/README 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/README 20120203 22:01:31 UTC (rev 9578) @@ 1,52 +0,0 @@ ===============================================================================  The Octave queueing toolbox ===============================================================================  Copyright (C) 2008, 2009, 2010, 2011, 2012 Moreno Marzolla <marzolla (at) cs.unibo.it>  The queueing toolbox ("queueing", in short) is a collection of GNU Octave scripts for numerical evaluation of queueing network models. Open, closed and mixed networks are supported, with single or multiple classes of customers. The queueing toolbox also provides functions for steadystate and transient analysis of Markov chains, as well as fo single station queueing systems.  The latest version of the queueing package can be downloaded from  http://www.moreno.marzolla.name/software/queueing/  This package requires GNU Octave; version 3.0.0 or later should work. The package contains the following directories:  inst/  Contains the Octave mscripts implementing all functions  provided by the queueing toolbox.  doc/  Contains the user documentation, which is automatically  generated from the texinfo strings embedded in the mscripts.  scripts/  This directory contains some scripts used to extract  documentation strings from the mfiles. The scripts here have  been taken almost verbatim from the GNU Octave distribution.  examples/  This directory contains demo functions which are automatically  extracted from the scripts included in the inst/  directory. The demo functions are put in this directory so  that they can be easily embedded into the package documentation.  test/  This directory contains the script used to execute all  tests embedded within functions in the inst/ directory.  broken/  This directory contains scripts which are currently known  not to work correctly, or which are workinprogress.  This package can be distributed according to the terms of the GNU General Public License, version 3 or later. See the file COPYING for details.  Modified: trunk/octaveforge/main/queueing/doc/Makefile ===================================================================  trunk/octaveforge/main/queueing/doc/Makefile 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/doc/Makefile 20120203 22:01:31 UTC (rev 9578) @@ 1,6 +1,6 @@ DOC=queueing CHAPTERS=summary.texi installation.texi markovchains.texi singlestation.texi queueingnetworks.texi conf.texi ack.texi contributing.texi gpl.texi gettingstarted.texi DISTFILES=$(wildcard *.txi) Makefile $(DOC).pdf $(DOC).html $(DOC).texi +DISTFILES=README $(DOC).pdf $(DOC).html $(DOC).texi .PHONY: clean Copied: trunk/octaveforge/main/queueing/doc/README (from rev 9577, trunk/octaveforge/main/queueing/README) ===================================================================  trunk/octaveforge/main/queueing/doc/README (rev 0) +++ trunk/octaveforge/main/queueing/doc/README 20120203 22:01:31 UTC (rev 9578) @@ 0,0 +1,52 @@ +=============================================================================== + The Octave queueing toolbox +=============================================================================== + +Copyright (C) 2008, 2009, 2010, 2011, 2012 +Moreno Marzolla <marzolla (at) cs.unibo.it> + +The queueing toolbox ("queueing", in short) is a collection of GNU +Octave scripts for numerical evaluation of queueing network +models. Open, closed and mixed networks are supported, with single or +multiple classes of customers. The queueing toolbox also provides +functions for steadystate and transient analysis of Markov chains, as +well as fo single station queueing systems. + +The latest version of the queueing package can be downloaded from + +http://www.moreno.marzolla.name/software/queueing/ + +This package requires GNU Octave; version 3.0.0 or later should work. +The package contains the following directories: + +inst/ + Contains the Octave mscripts implementing all functions + provided by the queueing toolbox. + +doc/ + Contains the user documentation, which is automatically + generated from the texinfo strings embedded in the mscripts. + +scripts/ + This directory contains some scripts used to extract + documentation strings from the mfiles. The scripts here have + been taken almost verbatim from the GNU Octave distribution. + +examples/ + This directory contains demo functions which are automatically + extracted from the scripts included in the inst/ + directory. The demo functions are put in this directory so + that they can be easily embedded into the package documentation. + +test/ + This directory contains the script used to execute all + tests embedded within functions in the inst/ directory. + +broken/ + This directory contains scripts which are currently known + not to work correctly, or which are workinprogress. + +This package can be distributed according to the terms of the GNU +General Public License, version 3 or later. See the file COPYING for +details. + Deleted: trunk/octaveforge/main/queueing/examples/demo_1_ctmc.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_ctmc.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_ctmc.m 20120203 22:01:31 UTC (rev 9578) @@ 1,3 +0,0 @@  Q = [ 1 1; \  1 1 ];  q = ctmc(Q) \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_ctmc_exps.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_ctmc_exps.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_ctmc_exps.m 20120203 22:01:31 UTC (rev 9578) @@ 1,16 +0,0 @@  lambda = 0.5;  N = 4;  birth = lambda*linspace(1,N1,N1);  death = zeros(1,N1);  Q = diag(birth,1)+diag(death,1);  Q = diag(sum(Q,2));  tt = linspace(0,10,100);  p0 = zeros(1,N); p0(1)=1;  L = ctmc_exps(Q,tt,p0);  plot( tt, L(:,1), ";State 1;", "linewidth", 2, \  tt, L(:,2), ";State 2;", "linewidth", 2, \  tt, L(:,3), ";State 3;", "linewidth", 2, \  tt, L(:,4), ";State 4 (absorbing);", "linewidth", 2);  legend("location","northwest");  xlabel("Time");  ylabel("Expected sojourn time"); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_ctmc_fpt.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_ctmc_fpt.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_ctmc_fpt.m 20120203 22:01:31 UTC (rev 9578) @@ 1,5 +0,0 @@  Q = [ 1.0 0.9 0.1; \  0.1 1.0 0.9; \  0.9 0.1 1.0 ];  M = ctmc_fpt(Q)  m = ctmc_fpt(Q,1,3) \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_ctmc_mtta.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_ctmc_mtta.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_ctmc_mtta.m 20120203 22:01:31 UTC (rev 9578) @@ 1,5 +0,0 @@  mu = 0.01;  death = [ 3 4 5 ] * mu;  Q = diag(death,1);  Q = diag(sum(Q,2));  t = ctmc_mtta(Q,[0 0 0 1]) \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_ctmc_taexps.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_ctmc_taexps.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_ctmc_taexps.m 20120203 22:01:31 UTC (rev 9578) @@ 1,16 +0,0 @@  lambda = 0.5;  N = 4;  birth = lambda*linspace(1,N1,N1);  death = zeros(1,N1);  Q = diag(birth,1)+diag(death,1);  Q = diag(sum(Q,2));  t = linspace(1e3,50,500);  p = zeros(1,N); p(1)=1;  M = ctmc_taexps(Q,t,p);  plot(t, M(:,1), ";State 1;", "linewidth", 2, \  t, M(:,2), ";State 2;", "linewidth", 2, \  t, M(:,3), ";State 3;", "linewidth", 2, \  t, M(:,4), ";State 4 (absorbing);", "linewidth", 2 );  legend("location","east");  xlabel("Time");  ylabel("Timeaveraged Expected sojourn time"); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_dtmc.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_dtmc.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_dtmc.m 20120203 22:01:31 UTC (rev 9578) @@ 1,14 +0,0 @@  a = 0.2;  b = 0.15;  P = [ 1a a; b 1b];  T = 0:14;  pp = zeros(2,length(T));  for i=1:length(T)  pp(:,i) = dtmc(P,T(i),[1 0]);  endfor  ss = dtmc(P); # compute steady state probabilities  plot( T, pp(1,:), "b+;p_0(t);", "linewidth", 2, \  T, ss(1)*ones(size(T)), "b;Steady State;", \  T, pp(2,:), "r+;p_1(t);", "linewidth", 2, \  T, ss(2)*ones(size(T)), "r;Steady State;" );  xlabel("Time Step"); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_dtmc_fpt.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_dtmc_fpt.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_dtmc_fpt.m 20120203 22:01:31 UTC (rev 9578) @@ 1,4 +0,0 @@  P = [ 0.0 0.9 0.1; \  0.1 0.0 0.9; \  0.9 0.1 0.0 ];  M = dtmc_fpt(P); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_qnclosed.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_qnclosed.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_qnclosed.m 20120203 22:01:31 UTC (rev 9578) @@ 1,27 +0,0 @@  P = [0 0.3 0.7; 1 0 0; 1 0 0]; # Transition probability matrix  S = [1 0.6 0.2]; # Average service times  m = ones(1,3); # All centers are singleserver  Z = 2; # External delay  N = 15; # Maximum population to consider   V = qnvisits(P); # Compute number of visits from P  D = V .* S; # Compute service demand from S and V  X_bsb_lower = X_bsb_upper = zeros(1,N);  X_ab_lower = X_ab_upper = zeros(1,N);  X_mva = zeros(1,N);  for n=1:N  [X_bsb_lower(n) X_bsb_upper(n)] = qnclosedbsb(n, D, Z);  [X_ab_lower(n) X_ab_upper(n)] = qnclosedab(n, D, Z);  [U R Q X] = qnclosed( n, S, V, m, Z );  X_mva(n) = X(1)/V(1);  endfor  close all;  plot(1:N, X_ab_lower,"g;Asymptotic Bounds;", \  1:N, X_bsb_lower,"k;Balanced System Bounds;", \  1:N, X_mva,"b;MVA;", "linewidth", 2, \  1:N, X_bsb_upper,"k", \  1:N, X_ab_upper,"g" );  axis([1,N,0,1]);  xlabel("Number of Requests n");  ylabel("System Throughput X(n)");  legend("location","southeast"); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_qnclosedmultimva.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_qnclosedmultimva.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_qnclosedmultimva.m 20120203 22:01:31 UTC (rev 9578) @@ 1,31 +0,0 @@  Ntot = 100; # total population size  b = linspace(0.1,0.9,10); # fractions of class1 requests  S = [20 80 31 14 23 12; \  90 30 33 20 14 7];  V = ones(size(S));  X1 = X1 = XX = zeros(size(b));  R1 = R2 = RR = zeros(size(b));  for i=1:length(b)  N = [fix(b(i)*Ntot) Ntotfix(b(i)*Ntot)];  # printf("[%3d %3d]\n", N(1), N(2) );  [U R Q X] = qnclosedmultimva( N, S, V );  X1(i) = X(1,1) / V(1,1);  X2(i) = X(2,1) / V(2,1);  XX(i) = X1(i) + X2(i);  R1(i) = dot(R(1,:), V(1,:));  R2(i) = dot(R(2,:), V(2,:));  RR(i) = Ntot / XX(i);  endfor  subplot(2,1,1);  plot(b, X1, "linewidth", 2, \  b, X2, "linewidth", 2, \  b, XX, "linewidth", 2 );  legend("location","south");  ylabel("Throughput");  subplot(2,1,2);  plot(b, R1, ";Class 1;", "linewidth", 2, \  b, R2, ";Class 2;", "linewidth", 2, \  b, RR, ";System;", "linewidth", 2 );  legend("location","south");  xlabel("Population mix \\beta for Class 1");  ylabel("Resp. Time"); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_qnclosedmultimvaapprox.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_qnclosedmultimvaapprox.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_qnclosedmultimvaapprox.m 20120203 22:01:31 UTC (rev 9578) @@ 1,5 +0,0 @@  S = [ 1, 1, 1, 1; 2, 1, 3, 1; 4, 2, 3, 3 ];  V = ones(3,4);  N = [10 5 1];  m = [1 0 1 1];  [U R Q X] = qnclosedmultimvaapprox(N,S,V,m); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_qnclosedsinglemva.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_qnclosedsinglemva.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_qnclosedsinglemva.m 20120203 22:01:31 UTC (rev 9578) @@ 1,14 +0,0 @@  S = [ 0.125 0.3 0.2 ];  V = [ 16 10 5 ];  N = 20;  m = ones(1,3);  Z = 4;  [U R Q X] = qnclosedsinglemva(N,S,V,m,Z);  X_s = X(1)/V(1); # System throughput  R_s = dot(R,V); # System response time  printf("\t Util Qlen RespT Tput\n");  printf("\t   \n");  for k=1:length(S)  printf("Dev%d\t%8.4f %8.4f %8.4f %8.4f\n", k, U(k), Q(k), R(k), X(k) );  endfor  printf("\nSystem\t %8.4f %8.4f %8.4f\n\n", NX_s*Z, R_s, X_s ); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_qnclosedsinglemvaapprox.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_qnclosedsinglemvaapprox.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_qnclosedsinglemvaapprox.m 20120203 22:01:31 UTC (rev 9578) @@ 1,23 +0,0 @@  S = [ 0.125 0.3 0.2 ];  V = [ 16 10 5 ];  N = 30;  m = ones(1,3);  Z = 4;  Xmva = Xapp = Rmva = Rapp = zeros(1,N);  for n=1:N  [U R Q X] = qnclosedsinglemva(n,S,V,m,Z);  Xmva(n) = X(1)/V(1);  Rmva(n) = dot(R,V);  [U R Q X] = qnclosedsinglemvaapprox(n,S,V,m,Z);  Xapp(n) = X(1)/V(1);  Rapp(n) = dot(R,V);  endfor  subplot(2,1,1);  plot(1:N, Xmva, ";Exact;", "linewidth", 2, 1:N, Xapp, "x;Approximate;", "markersize", 7);  legend("location","southeast");  ylabel("Throughput X(n)");  subplot(2,1,2);  plot(1:N, Rmva, ";Exact;", "linewidth", 2, 1:N, Rapp, "x;Approximate;", "markersize", 7);  legend("location","southeast");  ylabel("Response Time R(n)");  xlabel("Number of Requests n"); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_qnconvolution.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_qnconvolution.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_qnconvolution.m 20120203 22:01:31 UTC (rev 9578) @@ 1,13 +0,0 @@  k = [1 2 0];  K = sum(k); # Total population size  S = [ 1/0.8 1/0.6 1/0.4 ];  m = [ 2 3 1 ];  V = [ 1 .667 .2 ];  [U R Q X G] = qnconvolution( K, S, V, m );  p = [0 0 0]; # initialize p  # Compute the probability to have k(i) jobs at service center i  for i=1:3  p(i) = (V(i)*S(i))^k(i) / G(K+1) * \  (G(Kk(i)+1)  V(i)*S(i)*G(Kk(i)) );  printf("k(%d)=%d prob=%f\n", i, k(i), p(i) );  endfor \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_qnmmm.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_qnmmm.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_qnmmm.m 20120203 22:01:31 UTC (rev 9578) @@ 1,13 +0,0 @@  disp("This is figure 6.4 on p. 220 Bolch et al.");  rho = 0.9;  ntics = 21;  lambda = 0.9;  m = linspace(1,ntics,ntics);  mu = lambda./(rho .* m);  [U R Q X] = qnmmm(lambda, mu, m);  qlen = X.*(R1./mu);  plot(m,Q,"o",qlen,"*");  axis([0,ntics,0,25]);  legend("Jobs in the system","Queue Length","location","northwest");  xlabel("Number of servers (m)");  title("\lambda = 0.9, \mu = 0.9"); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_qnopensingle.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_qnopensingle.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_qnopensingle.m 20120203 22:01:31 UTC (rev 9578) @@ 1,6 +0,0 @@  lambda = 3;  V = [16 7 8];  S = [0.01 0.02 0.03];  [U R Q X] = qnopensingle( lambda, S, V );  R_s = dot(R,V) # System response time  N = sum(Q) # Average number in system \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_qnsolve.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_qnsolve.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_qnsolve.m 20120203 22:01:31 UTC (rev 9578) @@ 1,7 +0,0 @@  QQ = { qnmknode( "m/m/mfcfs", [0.2 0.1 0.1; 0.2 0.1 0.1] ), \  qnmknode( "/g/1ps", [0.4; 0.6] ), \  qnmknode( "/g/inf", [1; 2] ) };  V = [ 1 0.6 0.4; \  1 0.3 0.7 ];  N = [ 2 1 ];  [U R Q X] = qnsolve( "closed", N, QQ, V ); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_1_qnvisits.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_1_qnvisits.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_1_qnvisits.m 20120203 22:01:31 UTC (rev 9578) @@ 1,9 +0,0 @@  P = [ 0 0.4 0.6 0; \  0.2 0 0.2 0.6; \  0 0 0 1; \  0 0 0 0 ];  lambda = [0.1 0 0 0.3];  V = qnvisits(P,lambda);  S = [2 1 2 1.8];  m = [3 1 1 2];  [U R Q X] = qnopensingle( sum(lambda), S, V, m ); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_2_ctmc.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_2_ctmc.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_2_ctmc.m 20120203 22:01:31 UTC (rev 9578) @@ 1,14 +0,0 @@  a = 0.2;  b = 0.15;  Q = [ a a; b b];  T = linspace(0,14,50);  pp = zeros(2,length(T));  for i=1:length(T)  pp(:,i) = ctmc(Q,T(i),[1 0]);  endfor  ss = ctmc(Q); # compute steady state probabilities  plot( T, pp(1,:), "b;p_0(t);", "linewidth", 2, \  T, ss(1)*ones(size(T)), "b;Steady State;", \  T, pp(2,:), "r;p_1(t);", "linewidth", 2, \  T, ss(2)*ones(size(T)), "r;Steady State;" );  xlabel("Time"); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_2_ctmc_mtta.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_2_ctmc_mtta.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_2_ctmc_mtta.m 20120203 22:01:31 UTC (rev 9578) @@ 1,13 +0,0 @@  N = 100;  birth = death = ones(1,N1); birth(1) = death(N1) = 0;  Q = diag(birth,1)+diag(death,1);  Q = diag(sum(Q,2));  t = zeros(1,N/2);  initial_state = 1:(N/2);  for i=initial_state  p = zeros(1,N); p(i) = 1;  t(i) = ctmc_mtta(Q,p);  endfor  plot(initial_state,t,"+");  xlabel("Initial state");  ylabel("MTTA"); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_2_ctmc_taexps.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_2_ctmc_taexps.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_2_ctmc_taexps.m 20120203 22:01:31 UTC (rev 9578) @@ 1,34 +0,0 @@  sec = 1;  min = sec*60;  hour = 60*min;  day = 24*hour;   # state space enumeration {2, RC, RB, 1, 0}  a = 1/(10*min); # 1/a = duration of reboot (10 min)  b = 1/(30*sec); # 1/b = reconfiguration time (30 sec)  g = 1/(5000*hour); # 1/g = processor MTTF (5000 hours)  d = 1/(4*hour); # 1/d = processor MTTR (4 hours)  c = 0.9; # coverage  Q = [ 2*g 2*c*g 2*(1c)*g 0 0; \  0 b 0 b 0; \  0 0 a a 0; \  d 0 0 (g+d) g; \  0 0 0 d d];  p = ctmc(Q);  printf("System availability: %f\n",p(1)+p(4));  TT = linspace(1e5,1*day,101);  PP = ctmc_taexps(Q,TT,[1 0 0 0 0]);  A = At = Abart = zeros(size(TT));  A(:) = p(1) + p(4); # steadystate availability  for n=1:length(TT)  t = TT(n);  p = ctmc(Q,t,[1 0 0 0 0]);  At(n) = p(1) + p(4); # instantaneous availability  Abart(n) = PP(n,1) + PP(n,4); # interval base availability  endfor  semilogy(TT,A,";Steadystate;", \  TT,At,";Instantaneous;", \  TT,Abart,";Interval base;");  ax = axis();  ax(3) = 11e5;  axis(ax); \ No newline at end of file Deleted: trunk/octaveforge/main/queueing/examples/demo_3_ctmc.m ===================================================================  trunk/octaveforge/main/queueing/examples/demo_3_ctmc.m 20120203 12:07:15 UTC (rev 9577) +++ trunk/octaveforge/main/queueing/examples/demo_3_ctmc.m 20120203 22:01:31 UTC (rev 9578) @@ 1,26 +0,0 @@  sec = 1;  min = 60*sec;  hour = 60*min;  day = 24*hour;  year = 365*day;  # state space enumeration {2, RC, RB, 1, 0}  a = 1/(10*min); # 1/a = duration of reboot (10 min)  b = 1/(30*sec); # 1/b = reconfiguration time (30 sec)  g = 1/(5000*hour); # 1/g = processor MTTF (5000 hours)  d = 1/(4*hour); # 1/d = processor MTTR (4 hours)  c = 0.9; # coverage  Q = [ 2*g 2*c*g 2*(1c)*g 0 0; \  0 b 0 b 0; \  0 0 a a 0; \  d 0 0 (g+d) g; \  0 0 0 d d];  p = ctmc(Q);  A = p(1) + p(4);  printf("System availability %9.2f min/year\n",A*year/min);  printf("Mean time in RB state %9.2f min/year\n",p(3)*year/min);  printf("Mean time in RC state %9.2f min/year\n",p(2)*year/min);  printf("Mean time in 0 state %9.2f min/year\n",p(5)*year/min);  Q(3,:) = Q(5,:) = 0; # make states 3 and 5 absorbing  p0 = [1 0 0 0 0];  MTBF = ctmc_mtta(Q, p0) / hour;  printf("System MTBF %.2f hours\n",MTBF); \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. 
From: <paramaniac@us...>  20120203 12:07:29

Revision: 9577 http://octave.svn.sourceforge.net/octave/?rev=9577&view=rev Author: paramaniac Date: 20120203 12:07:15 +0000 (Fri, 03 Feb 2012) Log Message:  queueing: add new package for Moreno Marzolla Added Paths:  trunk/octaveforge/main/queueing/ trunk/octaveforge/main/queueing/COPYING trunk/octaveforge/main/queueing/DESCRIPTION trunk/octaveforge/main/queueing/DESCRIPTION.in trunk/octaveforge/main/queueing/INSTALL trunk/octaveforge/main/queueing/Makefile trunk/octaveforge/main/queueing/README trunk/octaveforge/main/queueing/broken/ trunk/octaveforge/main/queueing/broken/Makefile trunk/octaveforge/main/queueing/broken/blkdiagonalize.m trunk/octaveforge/main/queueing/broken/dtmc_period.m trunk/octaveforge/main/queueing/broken/lee_et_al_98.m trunk/octaveforge/main/queueing/broken/qnmmmk_alt.m trunk/octaveforge/main/queueing/broken/qnopenmultig.m trunk/octaveforge/main/queueing/broken/qnopensinglenexp.m trunk/octaveforge/main/queueing/doc/ trunk/octaveforge/main/queueing/doc/Makefile trunk/octaveforge/main/queueing/doc/ack.txi trunk/octaveforge/main/queueing/doc/contributing.txi trunk/octaveforge/main/queueing/doc/gettingstarted.txi trunk/octaveforge/main/queueing/doc/gpl.txi trunk/octaveforge/main/queueing/doc/installation.txi trunk/octaveforge/main/queueing/doc/markovchains.txi trunk/octaveforge/main/queueing/doc/queueing.html trunk/octaveforge/main/queueing/doc/queueing.pdf trunk/octaveforge/main/queueing/doc/queueing.texi trunk/octaveforge/main/queueing/doc/queueingnetworks.txi trunk/octaveforge/main/queueing/doc/singlestation.txi trunk/octaveforge/main/queueing/doc/summary.txi trunk/octaveforge/main/queueing/examples/ trunk/octaveforge/main/queueing/examples/Makefile trunk/octaveforge/main/queueing/examples/demo_1_ctmc.m trunk/octaveforge/main/queueing/examples/demo_1_ctmc_exps.m trunk/octaveforge/main/queueing/examples/demo_1_ctmc_fpt.m trunk/octaveforge/main/queueing/examples/demo_1_ctmc_mtta.m trunk/octaveforge/main/queueing/examples/demo_1_ctmc_taexps.m trunk/octaveforge/main/queueing/examples/demo_1_dtmc.m trunk/octaveforge/main/queueing/examples/demo_1_dtmc_fpt.m trunk/octaveforge/main/queueing/examples/demo_1_qnclosed.m trunk/octaveforge/main/queueing/examples/demo_1_qnclosedmultimva.m trunk/octaveforge/main/queueing/examples/demo_1_qnclosedmultimvaapprox.m trunk/octaveforge/main/queueing/examples/demo_1_qnclosedsinglemva.m trunk/octaveforge/main/queueing/examples/demo_1_qnclosedsinglemvaapprox.m trunk/octaveforge/main/queueing/examples/demo_1_qnconvolution.m trunk/octaveforge/main/queueing/examples/demo_1_qnmmm.m trunk/octaveforge/main/queueing/examples/demo_1_qnopensingle.m trunk/octaveforge/main/queueing/examples/demo_1_qnsolve.m trunk/octaveforge/main/queueing/examples/demo_1_qnvisits.m trunk/octaveforge/main/queueing/examples/demo_2_ctmc.m trunk/octaveforge/main/queueing/examples/demo_2_ctmc_mtta.m trunk/octaveforge/main/queueing/examples/demo_2_ctmc_taexps.m trunk/octaveforge/main/queueing/examples/demo_3_ctmc.m trunk/octaveforge/main/queueing/examples/grabdemo.m trunk/octaveforge/main/queueing/inst/ trunk/octaveforge/main/queueing/inst/Makefile trunk/octaveforge/main/queueing/inst/ctmc.m trunk/octaveforge/main/queueing/inst/ctmc_bd.m trunk/octaveforge/main/queueing/inst/ctmc_bd_solve.m trunk/octaveforge/main/queueing/inst/ctmc_exps.m trunk/octaveforge/main/queueing/inst/ctmc_fpt.m trunk/octaveforge/main/queueing/inst/ctmc_mtta.m trunk/octaveforge/main/queueing/inst/ctmc_solve.m trunk/octaveforge/main/queueing/inst/ctmc_taexps.m trunk/octaveforge/main/queueing/inst/dtmc.m trunk/octaveforge/main/queueing/inst/dtmc_check_P.m trunk/octaveforge/main/queueing/inst/dtmc_fpt.m trunk/octaveforge/main/queueing/inst/dtmc_solve.m trunk/octaveforge/main/queueing/inst/population_mix.m trunk/octaveforge/main/queueing/inst/qnammm.m trunk/octaveforge/main/queueing/inst/qnclosed.m trunk/octaveforge/main/queueing/inst/qnclosedab.m trunk/octaveforge/main/queueing/inst/qnclosedbsb.m trunk/octaveforge/main/queueing/inst/qnclosedgb.m trunk/octaveforge/main/queueing/inst/qnclosedmultimva.m trunk/octaveforge/main/queueing/inst/qnclosedmultimvaapprox.m trunk/octaveforge/main/queueing/inst/qnclosedpb.m trunk/octaveforge/main/queueing/inst/qnclosedsinglemva.m trunk/octaveforge/main/queueing/inst/qnclosedsinglemvaapprox.m trunk/octaveforge/main/queueing/inst/qnclosedsinglemvald.m trunk/octaveforge/main/queueing/inst/qncmva.m trunk/octaveforge/main/queueing/inst/qnconvolution.m trunk/octaveforge/main/queueing/inst/qnconvolutionld.m trunk/octaveforge/main/queueing/inst/qnjackson.m trunk/octaveforge/main/queueing/inst/qnmarkov.m trunk/octaveforge/main/queueing/inst/qnmg1.m trunk/octaveforge/main/queueing/inst/qnmh1.m trunk/octaveforge/main/queueing/inst/qnmix.m trunk/octaveforge/main/queueing/inst/qnmknode.m trunk/octaveforge/main/queueing/inst/qnmm1.m trunk/octaveforge/main/queueing/inst/qnmm1k.m trunk/octaveforge/main/queueing/inst/qnmminf.m trunk/octaveforge/main/queueing/inst/qnmmm.m trunk/octaveforge/main/queueing/inst/qnmmmk.m trunk/octaveforge/main/queueing/inst/qnmvablo.m trunk/octaveforge/main/queueing/inst/qnmvapop.m trunk/octaveforge/main/queueing/inst/qnopen.m trunk/octaveforge/main/queueing/inst/qnopenab.m trunk/octaveforge/main/queueing/inst/qnopenbsb.m trunk/octaveforge/main/queueing/inst/qnopenmulti.m trunk/octaveforge/main/queueing/inst/qnopensingle.m trunk/octaveforge/main/queueing/inst/qnsolve.m trunk/octaveforge/main/queueing/inst/qnvisits.m trunk/octaveforge/main/queueing/scripts/ trunk/octaveforge/main/queueing/scripts/Makefile trunk/octaveforge/main/queueing/scripts/gethelp.cc trunk/octaveforge/main/queueing/scripts/mkdoc trunk/octaveforge/main/queueing/scripts/mungetexi.cc trunk/octaveforge/main/queueing/scripts/pmva.l trunk/octaveforge/main/queueing/scripts/pmva.y trunk/octaveforge/main/queueing/scripts/test.pmva trunk/octaveforge/main/queueing/test/ trunk/octaveforge/main/queueing/test/Makefile trunk/octaveforge/main/queueing/test/fntests.m Added: trunk/octaveforge/main/queueing/COPYING ===================================================================  trunk/octaveforge/main/queueing/COPYING (rev 0) +++ trunk/octaveforge/main/queueing/COPYING 20120203 12:07:15 UTC (rev 9577) @@ 0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>; + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a programto make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on generalpurpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program nonfree. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyrightlike laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any nonsource +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or generalpurpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From AntiCircumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +nonpermissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying NonSource Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machinereadable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peertopeer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or nonconsumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other nonpermissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or nonpermissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peertopeer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a crossclaim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a nonexclusive, worldwide, royaltyfree +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the nonexercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>;. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>;. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/whynotlgpl.html>;. Added: trunk/octaveforge/main/queueing/DESCRIPTION ===================================================================  trunk/octaveforge/main/queueing/DESCRIPTION (rev 0) +++ trunk/octaveforge/main/queueing/DESCRIPTION 20120203 12:07:15 UTC (rev 9577) @@ 0,0 +1,16 @@ +Name: queueing +Version: 1.0.0 +Date: 20120203 +Author: Moreno Marzolla <marzolla@...> +Maintainer: Moreno Marzolla <marzolla@...> +Title: Queueing Networks and Markov chains analysis package for GNU Octave +Description: This package provides functions + for analyzing single station queueing systems, + Queueing Network and Markov chains. Open, closed and mixed + networks with single or multiple job classes are supported; + exact and approximate solution techniques are available. +Categories: Misc +Depends: octave (>= 3.0.0) +Autoload: yes +License: GPL version 3 or later +Url: http://www.moreno.marzolla.name/software/queueing/ Added: trunk/octaveforge/main/queueing/DESCRIPTION.in ===================================================================  trunk/octaveforge/main/queueing/DESCRIPTION.in (rev 0) +++ trunk/octaveforge/main/queueing/DESCRIPTION.in 20120203 12:07:15 UTC (rev 9577) @@ 0,0 +1,16 @@ +Name: PROGNAME +Version: VERSIONNUM +Date: VERSIONDATE +Author: Moreno Marzolla <marzolla@...> +Maintainer: Moreno Marzolla <marzolla@...> +Title: Queueing Networks and Markov chains analysis package for GNU Octave +Description: This package provides functions + for analyzing single station queueing systems, + Queueing Network and Markov chains. Open, closed and mixed + networks with single or multiple job classes are supported; + exact and approximate solution techniques are available. +Categories: Misc +Depends: octave (>= 3.0.0) +Autoload: yes +License: GPL version 3 or later +Url: http://www.moreno.marzolla.name/software/queueing/ Added: trunk/octaveforge/main/queueing/INSTALL ===================================================================  trunk/octaveforge/main/queueing/INSTALL (rev 0) +++ trunk/octaveforge/main/queueing/INSTALL 20120203 12:07:15 UTC (rev 9577) @@ 0,0 +1,167 @@ +This file documents the installation procedure of the `queueing' +toolbox. + + `queueing' is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License, version 3 or +later, as published by the Free Software Foundation. + + Note: This file (`INSTALL') is automatically generated from + `doc/installation.txi' in the `queueing' sources. Do not modify + this document directly, as changes will be lost. Modify the source + `doc/installation.txi' instead. + +1 Installing the queueing toolbox +********************************* + +1.1 Installation through Octave package management system +========================================================= + +The most recent version of `queueing' is 1.0.0 and can be downloaded +from + +`http://www.moreno.marzolla.name/software/queueing/queueing1.0.0.tar.gz'; + + To install `queueing' in the systemwide location, such that all +functions are automatically available when Octave starts, you can use +`pkg install' command. At the Octave prompt, type the following: + + octave:1> pkg install queueing1.0.0.tar.gz + + (Note: you may need to start Octave as root in order to allow the +installation to copy the files to the target locations). After this, +all functions will be readily available each time Octave starts, +without the need to tweak the search path. To uninstall `queueing', use +the `pkg uninstall queueing' command. + + If you do not have root access, you can do a local installation by +issuing the following command at the Octave prompt: + + octave:1> pkg install local queueing1.0.0.tar.gz + + This will install `queueing' within the user's home directory, and +the package will be available to that user only. *Note:* Octave version +3.2.3 as shipped with Ubuntu 10.04 seems to ignore `local' and always +tries to install the package on the system directory. + +1.2 Manual installation +======================= + +If you want to install `queueing' in a custom location, you can +download the source tarball from the URL above, and unpack it somewhere: + + tar xfz queueing1.0.0.tar.gz + cd queueing1.0.0/ + + Copy all `.m' files from the `inst/' directory to some target +location. Then, you can start Octave with the `p' option to add the +target location to the search path, so that Octave will find all +`queueing' functions automatically: + + octave p _/path/to/queueing_ + + For example, if all `queueing' mfiles are in `/usr/local/queueing', +you can start Octave as follows: + + octave p `/usr/local/queueing' + + If you want, you can add the following line to `~/.octaverc': + + addpath("_/path/to/queueing_"); + +so that the path `/usr/local/queueing' is automatically added to the +search path each time Octave is started, and you no longer need to +specify the `p' option on the command line. + +1.3 Content of the source distribution +====================================== + +The `queueing' source distribution contains the following +subdirectories: + +`doc/' + Documentation source. Most of the documentation is extracted from + the comment blocks of individual function files from the `inst/' + directory. + +`inst/' + This directory contains the mfiles which implement the various + Queueing Network algorithms provided by `queueing'. As a + notational convention, the names of source files containing + functions for Queueing Networks start with the `qn' prefix; the + name of source files containing functions for ContinuousTime + Markov Chains (CTMSs) start with the `ctmc' prefix, and the names + of files containing functions for DiscreteTime Markov Chains + (DTMCs) start with the `dtmc' prefix. + +`test/' + This directory contains the test functions used to invoke all + tests on all function files. + +`scripts/' + This directory contains some utility scripts mostly from GNU + Octave, which extract the documentation from the + speciallyformatted comments in the mfiles. + +`examples/' + This directory contains examples which are automatically extracted + from the `demo' blocks of the function files. + +`broken/' + This directory contains function files which are either not working + properly, or need additional testing before they can be moved to + the `inst/' directory. + + + The `queueing' package ships with a Makefile which can be used to +produce the documentation (in PDF and HTML format), and automatically +execute all function tests. Specifically, the following targets are +defined: + +`all' + Running `make' (or `make all') on the toplevel directory builds + the programs used to extract the documentation from the comments + embedded in the mfiles, and then produce the documentation in PDF + and HTML format (`doc/queueing.pdf' and `doc/queueing.html', + respectively). + +`check' + Running `make check' will execute all tests contained in the + mfiles. If you modify the code of any function in the `inst/' + directory, you should run the tests to ensure that no errors have + been introduced. You are also encouraged to contribute new tests, + especially for functions which are not adequately validated. + +`clean' +`distclean' +`dist' + The `make clean', `make distclean' and `make dist' commands are + used to clean up the source directory and prepare the distribution + archive in compressed tar format. + + +1.4 Using the queueing toolbox +============================== + +You can use all functions by simply invoking their name with the +appropriate parameters; the `queueing' package should display an error +message in case of missing/wrong parameters. You can display the help +text for any function using the `help' command. For example: + + octave:2> help qnmvablo + + prints the documentation for the `qnmvablo' function. Additional +information can be found in the `queueing' manual, which is available +in PDF format in `doc/queueing.pdf' and in HTML format in +`doc/queueing.html'. + + Within GNU Octave, you can also run the test and demo blocks +associated to the functions, using the `test' and `demo' commands +respectively. To run all the tests of, say, the `qnmvablo' function: + + octave:3> test qnmvablo +  PASSES 4 out of 4 tests + + To execute the demos of the `qnclosed' function, use the following: + + octave:4> demo qnclosed + Added: trunk/octaveforge/main/queueing/Makefile ===================================================================  trunk/octaveforge/main/queueing/Makefile (rev 0) +++ trunk/octaveforge/main/queueing/Makefile 20120203 12:07:15 UTC (rev 9577) @@ 0,0 +1,52 @@ +VERSIONNUM=1.0.0 +VERSIONDATE="20120203" +PROGNAME=queueing + +DISTNAME=$(PROGNAME)$(VERSIONNUM) +SUBDIRS=inst scripts examples doc test broken +DISTFILES=COPYING README Makefile DESCRIPTION DESCRIPTION.in INSTALL + +.PHONY: clean check + +ALL: DESCRIPTION doc/conf.texi + for d in $(SUBDIRS); do \ + $(MAKE) C $$d ALL; \ + done + +doc/conf.texi: + \rm f doc/conf.texi + echo "@set VERSION $(VERSIONNUM)" > doc/conf.texi + echo "@set VERSIONDATE $(VERSIONDATE)" >> doc/conf.texi + echo "@set top_srcdir " `pwd` >> doc/conf.texi + +DESCRIPTION: DESCRIPTION.in + cat DESCRIPTION.in  \ + sed "s/PROGNAME/$(PROGNAME)/g"  \ + sed "s/VERSIONNUM/$(VERSIONNUM)/g"  \ + sed "s/VERSIONDATE/$(VERSIONDATE)/g" > DESCRIPTION + +check: + $(MAKE) C test check + +clean: + for d in $(SUBDIRS); do \ + $(MAKE) C $$d clean; \ + done + \rm r f *~ *.tar.gz $(DISTNAME) + +distclean: clean + for d in $(SUBDIRS); do \ + $(MAKE) C $$d distclean; \ + done + \rm r f doc/conf.texi fname DESCRIPTION $(DISTNAME) $(DISTNAME).tar.gz + +dist: ALL + \rm r f $(DISTNAME) fname + mkdir $(DISTNAME) + echo "$(DISTNAME)" > fname + for d in $(SUBDIRS); do \ + mkdir p $(DISTNAME)/$$d; \ + $(MAKE) C $$d dist; \ + done + ln $(DISTFILES) $(DISTNAME)/ + tar cfz $(DISTNAME).tar.gz $(DISTNAME)/ Added: trunk/octaveforge/main/queueing/README ===================================================================  trunk/octaveforge/main/queueing/README (rev 0) +++ trunk/octaveforge/main/queueing/README 20120203 12:07:15 UTC (rev 9577) @@ 0,0 +1,52 @@ +=============================================================================== + The Octave queueing toolbox +=============================================================================== + +Copyright (C) 2008, 2009, 2010, 2011, 2012 +Moreno Marzolla <marzolla (at) cs.unibo.it> + +The queueing toolbox ("queueing", in short) is a collection of GNU +Octave scripts for numerical evaluation of queueing network +models. Open, closed and mixed networks are supported, with single or +multiple classes of customers. The queueing toolbox also provides +functions for steadystate and transient analysis of Markov chains, as +well as fo single station queueing systems. + +The latest version of the queueing package can be downloaded from + +http://www.moreno.marzolla.name/software/queueing/ + +This package requires GNU Octave; version 3.0.0 or later should work. +The package contains the following directories: + +inst/ + Contains the Octave mscripts implementing all functions + provided by the queueing toolbox. + +doc/ + Contains the user documentation, which is automatically + generated from the texinfo strings embedded in the mscripts. + +scripts/ + This directory contains some scripts used to extract + documentation strings from the mfiles. The scripts here have + been taken almost verbatim from the GNU Octave distribution. + +examples/ + This directory contains demo functions which are automatically + extracted from the scripts included in the inst/ + directory. The demo functions are put in this directory so + that they can be easily embedded into the package documentation. + +test/ + This directory contains the script used to execute all + tests embedded within functions in the inst/ directory. + +broken/ + This directory contains scripts which are currently known + not to work correctly, or which are workinprogress. + +This package can be distributed according to the terms of the GNU +General Public License, version 3 or later. See the file COPYING for +details. + Added: trunk/octaveforge/main/queueing/broken/Makefile ===================================================================  trunk/octaveforge/main/queueing/broken/Makefile (rev 0) +++ trunk/octaveforge/main/queueing/broken/Makefile 20120203 12:07:15 UTC (rev 9577) @@ 0,0 +1,14 @@ +DISTFILES=Makefile $(wildcard *.m) + +.PHONY: check dist clean + +ALL: + +dist: + ln $(DISTFILES) ../`cat ../fname`/broken/ + +clean: + \rm f *~ + +distclean: clean + Added: trunk/octaveforge/main/queueing/broken/blkdiagonalize.m ===================================================================  trunk/octaveforge/main/queueing/broken/blkdiagonalize.m (rev 0) +++ trunk/octaveforge/main/queueing/broken/blkdiagonalize.m 20120203 12:07:15 UTC (rev 9577) @@ 0,0 +1,151 @@ +## Copyright (C) 2008, 2009, 2010, 2011, 2012 Moreno Marzolla +## +## This file is part of the queueing toolbox. +## +## The queueing toolbox is free software: you can redistribute it and/or +## modify it under the terms of the GNU General Public License as +## published by the Free Software Foundation, either version 3 of the +## License, or (at your option) any later version. +## +## The queueing toolbox is distributed in the hope that it will be +## useful, but WITHOUT ANY WARRANTY; without even the implied warranty +## of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with the queueing toolbox. If not, see <http://www.gnu.org/licenses/>;. + +## * texinfo * +## +## @deftypefn {Function File} {[@var{T} @var{p}] =} blkdiagonalize (@var{M}) +## +## @strong{WARNING: this function has not been sufficiently tested} +## +## Given a square matrix @var{M}, return a new matrix @code{@var{T} = +## @var{M}(@var{p},@var{p})} such that @var{T} is in block triangular +## form. +## +## @strong{INPUTS} +## +## @table @var +## +## @item M +## +## Square matrix to be permuted in blocktriangular form +## +## @end table +## +## @strong{OUTPUTS} +## +## @table @var +## +## @item T +## +## The matrix @var{M} permuted in blocktriangular form +## +## @item p +## +## Vector representing the permutation. The matrix @var{T} +## can be derived as @code{@var{T} = @var{M}(@var{p},@var{p})} +## +## @end table +## +## @end deftypefn + +## Author: Moreno Marzolla <marzolla(at)cs.unibo.it> +## Web: http://www.moreno.marzolla.name/ + +function [T p] = blkdiagonalize( M ) + if ( nargin =! 1 ) + print_usage(); + endif + n = rows(M); + ( [n,n] == size(M) )  \ + error( "M must be a square matrix" ); + p = linspace(1,n,n); # identify permutation + T = M; + for i=1:n1 # loop over rows + ## find zero and nonzero elements in the ith row + zel = find(T(i,:)==0); + nzl = find(T(i,:)!=0); + zeroel = zel(zel>i); + nzeroel = nzl(nzl>i); + perm = [ 1:i nzeroel zeroel ]; + + ## Update permutation + p = p(perm); + ## Permute matrix + T = T(perm,perm); + endfor +endfunction +%!demo +%! P = [0 0.4 0 0 0.3 0 0 0.3 0; ... +%! 0.3 0 0 0 0 0 0 0.7 0; ... +%! 0 0 0 0 0 0.3 0 0 0.7; ... +%! 0 0 0 0 1 0 0 0 0; ... +%! 0.3 0 0 0 0 0 0.7 0 0; ... +%! 0 0 0.3 0 0 0 0 0 0.7; ... +%! 1.0 0 0 0 0 0 0 0 0; ... +%! 0 0 0 1.0 0 0 0 0 0; ... +%! 0 0 0.4 0 0 0.6 0 0 0]; +%! P = blkdiagonalize(P); +%! spy(P); + +%!demo +%! A = ones(3); +%! B = 2*ones(2); +%! C = 3*ones(3); +%! D = 4*ones(7); +%! E = 5*ones(2); +%! M = blkdiag(A, B, C, D, E); +%! n = rows(M); +%! spy(M); +%! printf("Press any key or wait 5 seconds..."); +%! pause(5); +%! p = randperm(n); +%! M = M(p,p); +%! spy(M); +%! printf("Scrambled matrix. Press any key or wait 5 seconds..."); +%! pause(5); +%! T = blkdiagonalize(M); +%! spy(T); +%! printf("Unscrambled matrix" ); + +%!xtest +%! A = ones(3); +%! B = 2*ones(2); +%! C = 3*ones(3); +%! D = 4*ones(7); +%! E = 5*ones(2); +%! M = blkdiag(A, B, C, D, E); +%! n = rows(M); +%! p = randperm(n); +%! Mperm = M(p,p); +%! T = blkdiagonalize(Mperm); +%! assert( T, M ); + +## Given a block diagonal matrix M, find the size of all blocks. b(i) is +## the size of ith along the diagonal. A zero matrix is considered to +## have a single block of size equal to the size of the matrix. +function b = findblocks(M) + n = rows(M); + (size(M) == [n,n])  \ + error("M must be a square matrix"); + b = []; + i=d=1; + while( d<n ) + bb = M(i:d,i:d); + z1 = M(i:d,d+1:n); + z2 = M(d+1:n,i:d); + if ( any(bb) && !any(z1) && !any(z2) ) + b = [b di+1]; + i=d+1; + d=i; + else + d++; + endif + endwhile + if (i<d) + b = [b di+1]; + endif +endfunction Added: trunk/octaveforge/main/queueing/broken/dtmc_period.m ===================================================================  trunk/octaveforge/main/queueing/broken/dtmc_period.m (rev 0) +++ trunk/octaveforge/main/queueing/broken/dtmc_period.m 20120203 12:07:15 UTC (rev 9577) @@ 0,0 +1,72 @@ +## Copyright (C) 2011, 2012 Moreno Marzolla +## +## This file is part of the queueing toolbox. +## +## The queueing toolbox is free software: you can redistribute it and/or +## modify it under the terms of the GNU General Public License as +## published by the Free Software Foundation, either version 3 of the +## License, or (at your option) any later version. +## +## The queueing toolbox is distributed in the hope that it will be +## useful, but WITHOUT ANY WARRANTY; without even the implied warranty +## of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with the queueing toolbox. If not, see <http://www.gnu.org/licenses/>;. + +## * texinfo * +## +## @deftypefn {Function File} {@var{p} =} dtmc_period (@var{P}) +## +## @cindex Markov chain, discretetime +## +## Compute the period @code{@var{p}(i)} of state @math{i}, for all +## states. The period is defined as the greatest common divisor +## of the number of steps after which a DTMC returns to the starting +## state. If state @math{i} is non recurrent, then @code{@var{p}(i) = 0}. +## +## @end deftypefn + +## Author: Moreno Marzolla <marzolla(at)cs.unibo.it> +## Web: http://www.moreno.marzolla.name/ + +function p = dtmc_period( P ) + + n = dtmc_check_P(P); # ensure P is a transition probability matrix + + period = zeros(n,n); # period(i,j) = 1 iff state i returns to itself after exactly j steps + + Pi = P; + + for j=1:n + d = (diag(Pi) > 0); ## d(i) = 1 iff state i returns to itself after j steps + period(:,j) = d; + Pi = Pi*P; + endfor + + p = zeros(1,n); + F = (find( any(period > 0, 2) )'); # F = set of recurrent states + for i=F + p(i) = gcd( find(period(i,:) > 0) ); + endfor +endfunction +%!test +%! P = [0 1 0; 0 0 1; 1 0 0]; # 1 > 2 > 3 > 1 +%! p = dtmc_period(P); +%! assert( p, [3 3 3] ); + +%!test +%! P = [1 0 0; 0 1 0; 0 0 1]; +%! p = dtmc_period(P); +%! assert( p, [1 1 1] ); + +%!test +%! P = [0 1 0; 0 0 1; 0 1 0]; # state 1 is non recurrent +%! p = dtmc_period(P); +%! assert( p, [0 2 2] ); + +%!test +%! P = [0 0 1 0; 0 0 0 1; 0 1 0 0; 0.5 0 0.5 0]; +%! p = dtmc_period(P); +%! assert( p, [1 1 1 1] ); Added: trunk/octaveforge/main/queueing/broken/lee_et_al_98.m ===================================================================  trunk/octaveforge/main/queueing/broken/lee_et_al_98.m (rev 0) +++ trunk/octaveforge/main/queueing/broken/lee_et_al_98.m 20120203 12:07:15 UTC (rev 9577) @@ 0,0 +1,1249 @@ +## Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Moreno Marzolla +## +## This file is part of the queueing toolbox. +## +## The queueing toolbox is free software: you can redistribute it and/or +## modify it under the terms of the GNU General Public License as +## published by the Free Software Foundation, either version 3 of the +## License, or (at your option) any later version. +## +## The queueing toolbox is distributed in the hope that it will be +## useful, but WITHOUT ANY WARRANTY; without even the implied warranty +## of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with the queueing toolbox. If not, see <http://www.gnu.org/licenses/>;. + +## * texinfo * +## +## @deftypefn {Function File} {@var{P} =} lee_et_al_98 ( @var{mu}, @var{mu0}, @var{C}, @var{r}, @var{blocking_type} ) +## +## @strong{WARNING: this implementation is not working yet} +## +## Implementation of the numerical algorithm for approximate solution of +## singleclass queueing networks with blocking. The algorithm is +## described in [1]. This is the implementation of Algorithm 1, p. 192 +## from the paper above, and can be used for cyclic networks. +## +## @strong{INPUTS} +## +## @table @var +## +## @item mu +## +## @code{@var{mu}(i)} is the service rate at service center @math{i}. +## This function aborts if @code{@var{mu}(i) <= 0} for some @math{i}. +## +## @item mu0 +## +## @code{@var{mu0}(i)} is the external arrival rate on service center +## @math{i}. If @code{@var{mu0}(i) <= 0} there is no external arrival on +## service center @math{i}. +## +## @item C +## +## @code{@var{C}(i)} is the capacity of service center @math{i}. The +## buffer size of service center @math{i} is @code{@var{C}(i)1}. This +## function aborts if @code{@var{C}(i) < 1} for some @math{i}. +## +## @item r +## +## @code{@var{r}(i,j)} is the routing probability from service center +## @math{i} to service center @math{j}, that is, the probability that a +## job which completed execution on service center @math{i} is routed to +## service center @math{j}. If @math{\sum_{j} r(i,j) < 1} for some +## @math{i}, then the exit probability of jobs from service center +## @math{i} is @math{( 1  \sum_{j} r(i,j) )}; this is the probability +## that a job leaves the system after completing service at service +## center @math{i}. +## +## @item blocking_type +## +## if @code{@var{blocking_type}(j)==0}, then Blockingafterservice +## (BAS) is assumed for service center @code{@var{S_u1}(j)}; if +## @code{@var{blocking_type}(j)!=0}, then Repetitiveservice blocking is +## assumed for service center @code{@var{S_u1}(j)}. Note that +## Repetitiveservice blocking can only be applied to saturated service +## centers (that is, @code{@var{blocking_type}(j)} can be set != 0 only +## if @code{@var{mu0}(j) > 0}). +## +## @end table +## +## @strong{OUTPUTS} +## +## @table @var +## +## @item P +## +## @code{@var{P}(i,n)} is the steady state probability that there are +## @math{n1} jobs on service center @math{i}. +## +## @end table +## +## @strong{ISSUES} +## +## This implementation makes heavy use of global variables. The reason +## is that there are are many structures which must be passed along to +## different functions. To avoid cluttering the function definitions +## with lot of extra parameters, we make use of global variables. +## +## This implementation makes heavy use of multidimensional arrays. +## Unfortunately, index of octave arrays always start from 1. This is an +## issue, as in many cases (e.g., @var{P_b}), one of the indexes is +## supposed to start from 0. Thus, pay extra attention about the range +## of indexes. +## +## The algorithm by Lee et al. [1] makes heavy use of summations. While +## in octave it is relatively easy to sum the elements of an array (or +## of a matrix), it is not so easy to make nested summations, especially +## if these summations cannot be reduced to matrix/vector +## multiplications. In this implementation, there are many places in +## which nested loops are used. This is inefficient and makes the code +## difficult to read, but again, my understanding is that there is no +## better way to do that. +## +## This implementation is NOT optimized for speed. DO NOT perform speed +## benchmark on this implementation! +## +## @strong{REFERENCES} +## +## @noindent [1] H.S. Lee, A. Bouhchouch, Y. Dallery and Y. Frein, +## @cite{Performance evaluation of open queueing networks with arbitrary +## configuration and finite buffers}, Annals of Operations Research +## 79(1998), 181206 +## +## @noindent [2] HyoSeong Lee; Stephen M. Pollock, @cite{Approximation +## Analysis of Open Acyclic Exponential Queueing Networks with +## Blocking}, Operations Research, Vol. 38, No. 6. (Nov.  Dec., 1990), +## pp. 11231134. +## +## @end deftypefn + +## Author: Moreno Marzolla <marzolla@...> +## Web: http://www.moreno.marzolla.name/ +## Created: 20071120 + +global mu; # mu(1,j) j=1..M is the service rate at S_j +global C; # C(1,j) j=1..M is the capacity of buffer B_j +global r; # r(i,j) i=1..M, j=1..M is the routing probability from S_i to S_j +global C_max; # Scalar representing the maximum value of C() +global N_max; # Scalar representing the maximum value of N() +global mu_u; # mu_u(i,j) i=1..N(j), j=1..M is the upstream service rate of S_u i(j) +global P_b; # P_b(i,n+1,j) is the probability that at service completion instant, the server S_ui(j) sees n other servers being blocked by S_d(j), n=0..N_j1 +global P_s; # P_s(j) is the probability that S_d(j) is starved at the service completion instant, j=1..M +global P; # P(n+1,j) is the steady state probability that T(j) is in state n, n=0,..C_j+N_j +global b_u; # bu_u(i,n+1,j) is the probability that n servers are blocked by S_d(j), including S_ui(j), n=1..N_j +global mu_d; # mu_d(j) is the service rate of S_d(j), j=1..M +global mu0; # mu0(j) is the external arrival rate to service center S_j, j=1..M. If S_j has no external arrival, then mu0(j) = 0 +global blocking_type; # array of integer: blocking_type(j) == 0 iff the blocking type of S_u1(j) is BAS, blocking_type(j) != 0 for repetitiveservice blocking + +## Exported constants +global epsilon = 1e5; # Maximum allowed error on throughput +global iter_count_max = 100; # Maximum number of iterations + +function result = lee_et_al_98( mu_, mu0_, C_, r_, blocking_type_ ) + + error( "*** The lee_et_al_98() function is currently BROKEN. Please do not use it ***" ); + + global mu; + global C; + global r; + global C_max; + global N_max; + global mu_u; + global P_b; + global P_s; + global P; + global b_u; + global mu_d; + global mu0; + global blocking_type; + + if ( nargin != 5 ) + print_usage(); + endif + + M = size(mu_, 2); ## Number of service centers + size(C_) == [1,M]  error( "lee_et_al_98()  parameter C must be a (1xM) vector" ); + size(r_) == [M,M]  error( "lee_et_al_98()  parameter r must be a (MxM) matrix" ); + size(mu0_) == [1,M]  error( "lee_et_al_98()  parameter mu0 must be a (1,M) vector" ); + all( C_ > 0 )  error( "lee_et_al_98()  parameter C must contain elements >0 only" ); + all( mu_ > 0 )  error( "lee_et_al_98()  parameter mu must contain elements >0 only" ); + size(blocking_type_) == [1,M]  error( "lee_et_al_98()  parameter blocking_type bust be a (1,M) vector" ); + + blocking_type = blocking_type_; + mu = [mu_ mu0_]; + mu0 = mu0_; + C = C_; + r = r_; + + ## Some constants + global epsilon; + global iter_count_max; + + ## Some variables + C_max = max(C); # Maximum buffer size + N_max = M+1; # M service centers plus one (optional) external source + mu_d = mu_; + P_b = zeros( N_max, N_max, M ); ## WARNING: the second index should start from 0, not 1!! + P_s = zeros( M ); + P = zeros( C_max+N_max+1, M ); ## WARNING: the first index should start from 0m not 1!! + b_u = zeros( M, N_max+1, M ); ## WARNING: the second index should start from 0, not 1!! + + mu_u = zeros( N_max, M ); + for j = 1:M + for i = 1:N(j) + k = f(i,j); + if ( is_saturated(i,j) ) + mu_u(i,j) = mu(k); + else + mu_u(i,j) = mu(k) * r(k,j); + endif + endfor + endfor + ## End initialization step + + ## Iteration step + iter_count = 1; + + do + + old_mu_u = mu_u; + old_mu_d = mu_d; + + for j=1:M # Begin iteration step + + P(1:C(j)+N(j)+1,j) = compute_P(j)'; + assert( sum(P(:,j)), 1, 1e4 ); + + ## + ## 1 Calculate mu_d(j) using (5) + ## + mu_d( j ) = compute_mu_d( j ); + + ## + ## 2 Calculate P_s(j) using (3) + ## + P_s( j ) = compute_P_s( j ); + + ## + ## 3 Calculate P_b i(n:j) using (4) for n=0:N_j1, i=1:N_j + ## + for i=1:N(j) + for n=1:N(j) + b_u(i,n+1,j) = compute_b_u(i,n,j); + endfor + endfor + for i=1:N(j) + for n=0:N(j)1 + P_b(i,n+1,j) = compute_P_b( i, n, j ); + endfor + ##assert( sum(P_b(i,:,j)), 1, 1e4 ); + endfor + + ## + ## 4 Calculate mu_u(i,k) using (7) for all k \in D_j where f(i,k)=j + ## + for k=D(j) + i = f_inverse_i(j,k); + assert(f(i,k)==j); + mu_u(i,k) = compute_mu_u(i,k); + endfor + + endfor # End iteration step + + err1 = abs( old_mu_d  mu_d ); + err2 = abs( old_mu_u  mu_u ); + iter_count++; + + until ( ( (err1 < epsilon) && (err2 < epsilon) ) +  (iter_count > iter_count_max) ); + + ## fprintf("Converged in %d iterations\n", iter_count ); + + ## Safety check: check that eq. (8) from [1] is satisfied + for j=1:M + for i=1:N(j) + k = f(i,j); + if ( k<=M ) + assert( compute_X_u(i,j), compute_X_d(k) * r(k,j), 1e4 ); + endif + endfor + endfor + ## End safety check + + ## Reshape the result, so that result(i,n) is P_i(n+1), the + ## steadystate probability that (n+1) customers are in service center + ## S_i, n=1..C(j)+1 + result = zeros( M, C_max+1 ); + for j=1:M + ## P_j = compute_P(j); + result(j,[1:C(j)]) = P([1:C(j)],j)'; + result(j,C(j)+1) = sum( P([C(j)+1:C(j)+N(j)+1],j) ); + endfor + +endfunction +%!test +%! source("lee_et_al_98.m"); # This is used to check internal functions + +############################################################################## +## Usage: result = lee_et_al_98_acyclic( mu, mu0, C, r, blocking_type ) +## +## This is Algorithm 2, p. 193 [1], and can be used for acyclic networks +## only. The parameters have the exact same meaning as in function +## lee_et_al_98(). +# function result = lee_et_al_98_acyclic( mu_, mu0_, C_, r_, blocking_type_ ) + +# global mu; # mu(1,j) j=1..M is the service rate at S_j +# global C; # C(1,j) j=1..M is the capacity of buffer B_j +# global r; # r(i,j) i=1..M, j=1..M is the routing probability from S_i to S_j +# global C_max; +# global N_max; +# global mu_u; # mu_u(i,j) i=1..N(j), j=1..M is the upstream service rate of S_u i(j) +# global P_b; +# global P_s; +# global P; +# global b_u; +# global mu_d; +# global mu0; +# global blocking_type; + +# blocking_type = blocking_type_; + +# M = size(mu_, 2); ## Number of service centers +# size(C_) == [1,M]  error( "lee_et_al_98()  parameter C must be a (1xM) vector" ); +# size(r_) == [M,M]  error( "lee_et_al_98()  parameter r must be a (MxM) matrix" ); +# size(mu0_) == [1,M]  error( "lee_et_al_98()  parameter mu0 must be a (1,M) vector" ); +# all( C_ > 0 )  error( "lee_et_al_98()  parameter C must contain elements >0 only" ); +# all( mu_ > 0 )  error( "lee_et_al_98()  parameter mu must contain elements >0 only" ); + +# mu = [mu_ mu0_]; +# mu0 = mu0_; +# C = C_; +# r = r_; + +# ## Some constants +# global epsilon; +# global iter_count_max; + +# ## Some constants +# C_max = max(C); # Maximum buffer size +# N_max = M+1; +# mu_d = mu_; +# P_b = zeros( M, N_max, M ); ## WARNING: the second index should start from 0, not 1!! +# P = zeros( C_max+N_max+1,M ); ## WARNING: the first index should start from 0m not 1!! +# mu_u = zeros( N_max, M ); +# P_s = zeros( M ); +# b_u = zeros( M, N_max+1, M ); ## WARNING: the second index should start from 0, not 1!! + +# for j = 1:M +# for i = 1:N(j) +# k=f(i,j); +# if ( is_saturated(i,j) ) +# mu_u(i,j) = mu(k); +# else +# mu_u(i,j) = mu(k) * r(k,j); +# endif +# endfor +# endfor + +# ## End initialization step + +# ## Iteration step +# iter_count = 1; + +# do + +# old_mu_u = mu_u; +# old_mu_d = mu_d; + +# ## +# ## Step 1 +# ## +# for j=1:M + +# P(1:C(j)+N(j)+1,j) = compute_P(j)'; + +# ## +# ## 1.1 Calculate P_s(j) using (3) +# ## +# P_s( j ) = compute_P_s( j ); + +# ## +# ## 1.2 Calculate mu_u(i,k) using (7) for all k \in D_j where f(i,k)=j +# ## +# for k=D(j) +# i = f_inverse_i(j,k); +# mu_u(i,k) = compute_mu_u(i,k); +# endfor +# endfor + +# ## +# ## Step 2 +# ## +# for j=M:1:1 + +# ##P(1:C(j)+N(j)+1,j) = compute_P(j)'; + +# ## +# ## 2.1 Calculate mu_d(j) using (5) +# ## +# mu_d(j) = compute_mu_d(j); + +# ## +# ## 2.2 Calculate P_b i(n:j) using (4) for n=0:N_j1, i=1:N_j +# ## +# for i=1:N(j) +# for n=1:N(j) +# b_u(i,n+1,j) = compute_b_u(i,n,j); +# endfor +# endfor +# for i=1:N(j) +# for n=0:N(j)1 +# P_b(i,n+1,j) = compute_P_b( i, n, j ); +# endfor +# endfor +# endfor + +# err1 = abs( old_mu_d  mu_d ); +# err2 = abs( old_mu_u  mu_u ); +# iter_count++; + +# until ( ( (err1 < epsilon) && (err2 < epsilon) )  (iter_count > iter_count_max) ); + +# fprintf("Converged in %d iterations\n", iter_count ); + +# result = zeros( M, C_max+1 ); +# for j=1:M +# ## P_j = compute_P(j); +# result(j,[1:C(j)]) = P([1:C(j)],j)'; +# result(j,C(j)+1) = sum( P([C(j)+1:C(j)+N(j)+1],j ) ); +# endfor + +# endfunction + + +############################################################################## +## usage: result = f( i, j ) +## +## f(i,j) is the (scalar) index of the ith upstream server directly linked to +## buffer B_j. This function is defined on p. 186 of [1]. Valid ranges +## for the parameters are j=1..M, i=1..N(j). This function aborts on +## parameters out of range. +function result = f( i, j ) + global r; # not modified + ( i>=1 && i <= N(j) )  error( "f() iindex out of bound" ); + ( j>=1 && j <= size(r,1))  error( "f() jindex out of bound" ); + result = U(j)(i); +endfunction +%!test +%! global r mu0; +%! r = [0 1 1 0; 0 0 1 1; 0 0 0 1; 1 0 0 0]; +%! mu0 = [1 0 1 0]; +%! assert( f(1,3), 7 ); +%! assert( f(2,3), 1 ); +%! assert( f(3,3), 2 ); + + +############################################################################## +## Usage: result = is_saturated( i,j ) +## +## Returns 1 iff S_u i(j) is a saturated server (i.e., if S_u i(j) +## denotes an external arrival). +function result = is_saturated(i,j) + global r mu0; + M = size(r,2); + if ( f(i,j) > M ) + assert( mu0(f(i,j)M) > 0 ); + assert( i == 1 ); + result = 1; + else + result = 0; + endif +endfunction +%!test +%! global r mu0; +%! r = [0 1 1 0; 0 0 1 1; 0 0 0 1; 1 0 0 0]; +%! mu0 = [1 0 1 0]; +%! assert( is_saturated(1,3), 1 ); +%! assert( is_saturated(1,1), 1 ); +%! assert( is_saturated(2,3), 0 ); +%! assert( is_saturated(3,3), 0 ); + + +############################################################################## +## usage: result = f_inverse_i( k, j ) +## +## Returns the (scalar) index i such that f(i,j) = k. That is, returns the +## "position" of server S_k in the list of upstream servers of S_j. +## Valid ranges for the parameters are k=1..M, j=1..M. This function +## aborts on parameters out of range. It also aborts if no index i +## exists such that f(i,j) = k. +function result = f_inverse_i( k, j ) + global r; # never modified + ( j>=1 && j<=size(r,1) )  error( "f_inverse_i()  j parameter out of range" ); + result = find( U(j) == k ); + ( !isempty(result) )  error( "f_inverse_i()  could not find inverse" ); + ( f(result,j) == k )  error( "f_inverse_i()  wrong result" ); +endfunction +%!test +%! global r mu0; +%! r = [0 1 1 0; 0 0 1 1; 0 0 0 1; 1 0 0 0]; +%! mu0 = [1 0 1 0]; +%! assert( f_inverse_i(7,3), 1 ); +%! assert( f_inverse_i(1,3), 2 ); +%! assert( f_inverse_i(2,3), 3 ); + + +############################################################################## +## usage: result = omega( n, j ) +## +## Computes the scalar value \Omega_n(j), as defined on [1] p. 188. This +## function examines the global variable blocking_type to determine +## which variant of \Omega_n should be computed, and returns the +## appropriate result. +function result = omega( n, j ) + if ( get_blocking_type(j) == 0 ) + result = omega_BAS( n, j ); + else + result = omega_RSB( n, j ); + endif +endfunction + + +############################################################################## +## usage: result = omega_prime( n, i, j ) +## +## Computes the scalar value \Omega^i_n(j), as defined on [1] p. 189. +## This function examines the global variable blocking_type to determine +## which variant of \Omega^i_n should be computed, and returns the +## appropriate result. +function result = omega_prime( n, i, j ) + if ( get_blocking_type(j) == 0 ) + result = omega_prime_BAS( n, i, j ); + else + result = omega_prime_RSB( n, i, j ); + endif +endfunction + + +############################################################################## +## usage: omega_BAS( n, j ) +## +## Computes \Omega_n according to the upper part of Fig. 5, p. 188 on +## [1]. This function implements the BlockingAfterService version of +## \Omega_n. Valid ranges for the parameter are n=0..N(j), j=1..M. This +## function aborts on parameters out of range. Note that \Omega_0 is +## defined to be 1, according to [2], p. 1125 +function result = omega_BAS( n, j ) + global mu_u; + + ( n>=0 && n<=N(j) )  error( "omega_BAS() n parameter is invalid" ); + ( j>=1 && j<=size(mu_u,2) )  error( "omega_BAS() j parameter is invalid" ); + + if ( n == 0 ) + result = 1; + else + combs = nchoosek( [1:N(j)], n ); + el = mu_u( :, j )'; # Gets the array of elements of the jth column + result = sum( prod( el( combs ), 2 ) ); + endif +endfunction +%!test +%! global mu_u r mu mu0; +%! M=3; +%! mu_u = 10*rand(M); # to amplify errors +%! r = ones(M); +%! mu = zeros(1,2*M); +%! mu0 = zeros(1,M); +%! expected_result = mu_u(1,2)*mu_u(2,2) + mu_u(1,2)*mu_u(3,2) + mu_u(2,2)*mu_u(3,2); +%! assert(omega_BAS(2,2), expected_result); +%! assert(omega_BAS(0,2),1); + + +############################################################################## +## usage: result = omega_prime_BAS( n, i, j ) +## +## Computes \Omega^i_n for BAS blocking, according to [1], p. 189. +function result = omega_prime_BAS( n, i, j ) + global mu_u; # not modified + + ( i>0 && i<=N(j) )  error( "omega_prime_BAS() iindex out of range" ); + ( j>0 && j<=size(mu_u,2) )  error( "omega_prime_BAS() jindex out of range" ); + ( n>=0 && n<N(j) )  error( "omega_prime_BAS() nindex out of range" ); + + if ( n == 0 ) + result = 1; + else + combs = nchoosek( [ 1:i1 , i+1:N(j)], n ); + el = mu_u( :, j )'; # Gets the array of elements of the jth column + result = sum( prod( el( combs ), 2 ) ); + endif +endfunction +%!test +%! global mu_u r mu mu0; +%! mu_u = 10*rand(3); # to aplify errors +%! mu = zeros(1,6); +%! mu0 = zeros(1,3); +%! r = ones(3); +%! M = 3; +%! assert(omega_prime_BAS(2,2,2), prod(mu_u([1,3],2)) ); +%! assert(omega_prime_BAS(2,1,2), prod(mu_u([2,3],2)) ); +%! assert( omega_prime_BAS(0,1,1), 1 ); + +%!test +%! global mu_u r mu mu0; +%! M=4; +%! mu_u = rand(M); +%! mu = zeros(1,2*M); +%! mu0 = zeros(1,M); +%! r = ones(M); +%! assert( omega_prime_BAS(3,1,3), prod([ mu_u(2,3) mu_u(3,3) mu_u(4,3) ]) ); + + +############################################################################## +## Usage: result = omega_RSB( n, j ) +## +## Computes \Omega_n for RepetitiveService blocking, according to [1], +## fig. 6 p. 188. +function result = omega_RSB( n, j ) + global mu_u; + + ( n>=0 && n<=N(j) )  error( "omega_RSB() n parameter is invalid" ); + ( j>0 && j<=size(mu_u,2) )  error( "omega_RSB() j parameter is invalid" ); + + if ( n == 0  n == N(j) ) ## FIEME??? + result = 1; + else + combs = nchoosek( [2:N(j)], n ); + el = (mu_u( :, j )'); # Gets the array of elements of the jth column + result = sum( prod( el( combs ), 2 ) ); + endif +endfunction +%!test +%! global mu_u r mu mu0; +%! M=4; +%! mu_u = rand(M); +%! mu = zeros(1,2*M); +%! mu0 = zeros(1,M); +%! r = ones(M); +%! tmp = mu_u(:,2)'; +%! expected_result = sum( prod( tmp( [ 2 3; 2 4; 3 4 ] ), 2 ) ); +%! assert(omega_RSB(2,2), expected_result); +%! assert(omega_RSB(0,2), 1); + + +############################################################################## +## Usage: result = omega_prima_RSB( n, i, j ) +## +## Computes \Omega^i_n for RepetitiveService blocking, according to +## [1], p. 189. Note the following assumption: we assume that +## omega_prime_RSB( i, B(j)1, j ) == 1, even if the value of +## omega_prime_RSB for this special case is not considered in [1]. +function result = omega_prime_RSB( n, i, j ) + global mu_u; + + ( i>0 && i<=N(j) )  error( "omega_prime_RSB() iindex out of range" ); + ( j>0 && j<=size(mu_u,2) )  error( "omega_prime_RSB() jindex out of range" ); + ( n>=0 && n<N(j) )  error( "omega_prime_RSB() nindex out of range" ); + + if ( n == 0  n == N(j)1 ) ## FIXME??? + result = 1; + else + combs = nchoosek( [ 2:i1 , i+1:N(j)], n ); + el = (mu_u( :, j )'); # Gets the array of elements of the jth column + result = sum( prod( el( combs ), 2 ) ); + endif +endfunction +%!test +%! global mu_u r mu mu0; +%! M=4; +%! mu_u = rand(M); +%! mu = zeros(1,2*M); +%! mu0 = zeros(1,M); +%! r = ones(M); +%! tmp = mu_u(:,2)'; +%! expected_result = mu_u(2,2)*mu_u(3,2) + mu_u(2,2)*mu_u(4,2) + mu_u(3,2)*mu_u(4,2); +%! assert(omega_prime_RSB(2,1,2), expected_result); +%! assert(omega_prime_RSB(2,2,2), mu_u(3,2)*mu_u(4,2) ); +%! assert(omega_prime_RSB(2,3,2), mu_u(2,2)*mu_u(4,2) ); +%! assert(omega_prime_RSB(0,1,2), 1); + +############################################################################## +## Usage: compute_mu_u(i,j) +## +## Uses eq (7) from [1] to compute \mu_u i (j), i=1..M, j=1..M. The +## result is a scalar value. WARNING: eq (7) is porbably wrong, as it is +## different from the one used in Lemma 1, p. 191 [1]. Here we use +## 1/mu_d(k) instead of 1/mu(k). +function result = compute_mu_u( i, j ) + global mu P_s r P_b mu_d mu_u; + + k = f(i,j); + assert( k<=size(r,1) ); + mu_star_k = sum( mu_u([1:N(k)],k) ); + +# result = r(k,j)/(P_s(k)/mu_star_k + 1/mu(k)  +# r(k,j)* +# sum( P_b(i,[1:N(j)],j) .* [1:N(j)]) / mu_d(j)); + + ## FIXME! Equation (7) is probably wrong. Check Lemma 1 p. 191 + result = r(k,j)/(P_s(k)/mu_star_k + 1/mu_d(k)  r(k,j)*sum( P_b(i,[1:N(j)],j) .* [1:N(j)])/mu_d(j)); +endfunction + + +############################################################################## +## Usage: result = compute_mu_d(j) +## +## Uses eq. (5) from [1] to compute \mu_d (j), j=1..M. The result is a +## scalar value. WARNING: Eq (5) is probably wrong: here we use sum( +## P_b(k,[1:N(m)],m) .* [1:N(m)] ) instead of sum( P_b(k,[1:N(j)],m) .* +## [1:N(j)] ). +function result = compute_mu_d( j ) + global mu_d P_b mu r; + + ( j>0 && j <= size(r,1))  error( "compute_mu_d()  j index out of bound" ); + + s = 0; + for m=D(j) + k = f_inverse_i(j,m); + ## s += r(j,m) * sum( P_b(k,[1:N(j)],m) .* [1:N(j)] ) / mu_d(m); + + ## FIXME: Cambiato in accordo alla tesi di Bovino + s += r(j,m) * sum( P_b(k,[1:N(m)],m) .* [1:N(m)] ) / mu_d(m); + endfor + result = 1/( 1/mu(j) + s ); + ## If j is an exit server, then result must be equal to mu(j) + if ( size( D(j), 2 ) == 0 ) + assert( result, mu(j) ); + endif +endfunction + + +############################################################################## +## Usage: result = compute_P_s(j) +## +## Uses eq. (3) from [1] to compute P_s(j), j=1..M. P_s(j) is the +## probability that S_d(j) is starved (i.e., is empty) at the service +## completion instant. +function result = compute_P_s( j ) + global r P; + #P = compute_P(j); + M = size(r,2); + (j>=1 && j<=M)  error( "compute_P_s()  j index out of bound" ); + result = P(2,j) / ( 1  P(1,j) ); +endfunction + + +############################################################################## +## Usage: result = compute_P(j) +## +## Computes P(n:j) by solving the appropriate birthdeath process. This +## function returns a (1 x C(j)+N(j)+1 ) vector, where result(i) == +## P(i+1,j), i = 1..C(j)+N(j)+1 +function result = compute_P( j ) + global C; + if ( get_blocking_type(j) == 0 ) + result = compute_P_BAS(j); + else + result = compute_P_RSB(j); + endif + ## Check that successive marginal probabilities for nonblocking + ## states are equal each other. This is stated in [2], p. 1126 + if ( C(j) >= 3 ) + for i=0:C(j)2 + assert( result(i+2)/result(i+1), result(i+3)/result(i+2), 1e4 ); + endfor + endif +endfunction + + +############################################################################## +## Usage: result = compute_P_BAS(j) +## +## Compute P(n,j) for each n=0..C(j)+N(j) by solving the birthdeath +## process. Returns a (1 x 1+C(j)+N(j)) vector +function result = compute_P_BAS( j ) + global mu_u mu_d C; + assert( get_blocking_type(j) == 0 ); + + ## Defines the transition probability matrix for the MC + mu_star_j = sum( mu_u([1:N(j)],j) ); + assert( mu_star_j, sum( mu_u(:,j) ) ); + + ## computes the steadystate probability + birth = zeros( 1, C(j)+N(j) ); + death = mu_d(j) * ones( 1, C(j)+N(j) ); + birth(1,[1:C(j)] ) = mu_star_j; + for i=1:N(j) + birth( 1, C(j)+i ) = i*omega_BAS(i,j)/omega_BAS(i1,j); + endfor + result = ctmc_bd_solve( birth, death ); +endfunction + + +############################################################################## +## Usage: result = compute_P_RSB( j ) +## +## Same as compute_P, for Repetitiveservice blocking +function result = compute_P_RSB( j ) + global mu_u mu_d C; + assert( get_blocking_type(j) != 0 ); + + ## Defines the transition probability matrix for the MC + mu_star_j = sum( mu_u([1:N(j)],j) ); + assert( mu_star_j, sum( mu_u(:,j) ) ); + + ## computes the steadystate probability + birth = zeros( 1, C(j)+N(j)1 ); + death = mu_d(j) * ones( 1, C(j)+N(j)1 ); + birth(1,[1:C(j)] ) = mu_star_j; + for i=1:N(j)1 + birth( 1, C(j)+i ) = i*omega_RSB(i,j)/omega_RSB(i1,j); + endfor + result = [ ctmc_bd_solve( birth, death ) 0 ]; +endfunction + + +############################################################################## +## Usage: result = compute_P_b( i, n, j ) +## +## Compute P_b i(n:j) using (4), where n=0..N(j)1, i=1..N(j), j=1..M +## The result is a scalar value. +function result = compute_P_b( i,n,j ) + global b_u C P; + + ( n >= 0 && n < N(j) )  error( "compute_P_b()  n index out of bound" ); + ( i >= 1 && i <= N(j) )  error( "compute_P_b()  i index out of bound" ); + ## P = compute_P(j); + M = size(C,2); + + result = ( P(C(j)+n+1,j)  b_u(i,n+1,j) ) / ( 1  sum( b_u( i, [2:(N(j)+1)], j ) ) ); + ## FIXME: the next seems necessary +# if ( get_blocking_type(j) == 1 && n == N(j)1 ) +# assert( result, 0 ); +# endif +endfunction + + +############################################################################## +## Usage: result = compute_b_u(i,n,j) +## +## Compute b_u i(n:j) using (1), i=1..M, n=0..N(j), j=1..M. The result +## is a single scalar element. According to [2], we let b_u i(0:j) = 0. +function result = compute_b_u(i,n,j) + global mu_u C P; + M = size( C,2 ); + ( i>0 && i<=M )  error( "compute_b_u()  i index out of bound" ); + ( j>0 && j<=M )  error( "compute_b_u()  j index out of bound" ); + ( n >= 0 && n <= N(j) )  error( "compute_b_u()  n index out of bound" ); + if ( n == 0 ) + result = 0; + else + ## P = compute_P( j ); + result = mu_u(i,j) * omega_prime( n1,i,j ) / omega(n,j) * P(C(j)+n+1,j); + endif + if ( get_blocking_type(j) == 1 && n == N(j) ) + assert( result, 0 ); + endif +endfunction + + +############################################################################## +## Usage: result = U( i ) +## +## Returns a vector of the ith element in the set U, that is, returns +## the index of the upstream servers for S_i, i=1..M +## +## @param r the MxM routing matrix +## +## @param mu0 the vector of external arrivals +function result = U( i ) + global r mu0; + M = size(r,2); + ( i>0 && i<=M )  error( "U()  i index out of bound" ); + result = find( r(:,i) > 0 )'; + if ( mu0( i ) > 0 ) + result = [ M+i result ]; + endif +endfunction +%!test +%! global r mu0; +%! r = [0 1 1 0; 0 0 1 1; 0 0 0 1; 1 0 0 0]; +%! mu0 = [1 0 1 0]; +%! assert( U(1), [5 4] ); +%! assert( U(3), [7 1 2] ); + + +############################################################################## +## Usage: result = D( i ) +## +## Given the routing matrix r, computes the downstream index set D_i. +## D_i is defined as the set of indexes of downstream servers directly +## connected with S_i. +function result = D( i ) + global r; + ( i>0 && i<=size(r,1) )  error( "D()  i index out of bound" ); + result = find( r(i,:) > 0 ); +endfunction +%!test +%! global r; +%! r = [0 1 1 0; 0 0 1 1; 0 0 0 1; 1 0 0 0]; +%! assert( D(2), [3 4] ); + + +############################################################################## +## Usage: result = N( i ) +## +## Returns a scalar representing the number of upstream servers of S_i, +## that is, returns the number of elements in U(i); i=1..M +function result = N( i ) + global r; + ( (i>0) && (i<=size(r,1)) )  error( "N()  i index out of bound" ); + result = size( U(i), 2 ); +endfunction +%!test +%! global r mu0; +%! r = [0 1 1 0; 0 0 1 1; 0 0 0 1; 1 0 0 0]; +%! mu0 = [1 0 1 0]; +%! assert( N(1), 2 ); +%! assert( N(3), 3 ); + + +############################################################################## +## Usage: result = get_blocking_type( j ) +## +## Returns the blocking type for server S_u1(j); result == 0 means BAS, +## result == 1 means RSB. +function result = get_blocking_type( j ) + global r mu0 blocking_type; + M = size(r,2); + ## If blocking_type(j) != 0 and mu0(j) > 0, then result == 1 + ## (RepetitiveService Blocking). Otherwise, result == 0 (BAS) + ( j >= 1 && j <= size(mu0,2) )  error( "get_blocking_type()  j \ + parameter out of bounds" ); + if ( f(1,j) <= M ) + result = 0; # nonsaturated servers are always BAS + return + endif + k = f(1,j)  M; + assert( mu0(k) > 0 ); + if ( blocking_type(k) != 0 ) + result = 1; # repetitiveservice blocking + else + result = 0; # BAS + endif +endfunction +%!test +%! global r mu0 blocking_type; +%! r = [0 1 1 0; 0 0 1 1; 0 0 0 1; 1 0 0 0]; +%! mu0 = [1 0 1 0]; +%! blocking_type = [1 0 1 0]; +%! assert( get_blocking_type(1), 1 ); +%! assert( get_blocking_type(2), 0 ); +%! assert( get_blocking_type(3), 1 ); +%! assert( get_blocking_type(4), 0 ); + +# %!test +# %! r = [0 0.35 0.35; 0 0 0.65; 0 0 0]; +# %! C = [ 2 2 3 ]; +# %! mu = [ 2 1.5 1 ]; +# %! mu0 = [ 1.2 0.3 0.2 ]; +# %! P1 = lee_et_al_98( mu, mu0, C, r, [ 1 1 1 ] ); +# %! P2 = lee_et_al_98_acyclic( mu, mu0, C, r, [ 1 1 1 ] ); +# %! assert( P1, P2, 1e4 ); + + +############################################################################## +## Usage: compute_X_u(i,j) +## +## Computes X_ui(j) using eq. (10) from Lee et al. [1] +function result = compute_X_u(i,j) + global P_b mu_d mu_u; + result = 1/( 1/mu_u(i,j) + 1/mu_d(j) * dot( P_b(i,[1:N(j)],j), [1:N(j)] ) ); +endfunction + + +############################################################################## +## Usage: compute_X_d(k) +## +## Computes X_d(k) using eq. (9) from Lee et al. [1] +function result = compute_X_d(k) + global P_s mu_d mu_u; + mu_star_k = sum(mu_u([1:N(k)],k)); + result = 1/( 1/mu_d(k) + P_s(k)/mu_star_k ); +endfunction + + +############################################################################## +## Usage: print_header() +## +## Prints the header used for the demo results +function print_header() + printf("%10s\t%5s\t%5s %5s\t%5s %5s %4s\n", \ + "Param", "Exact", "This", "Err%", "Paper", "Err%", "Res" ); +endfunction + + +############################################################################## +## Usage: compare( param, simulation, result, paper) +## +## This is a function used in the demos +## +## @param param The string representing the parameter name +## +## @param simulation The simulation result shown in the paper +## +## @param result The result computed by this implementation +## +## @param paper The result copmputed by the algorithm shown in the paper +function compare( param, simulation, result, paper ) + + err_res = ( result  simulation ) / simulation * 100; + err_pap = ( paper  simulation ) / simulation * 100; + tolerance = 1e3; + + if ( abs( result  paper ) < tolerance ) + test_result = "PASS"; + else + test_result = "FAIL"; + endif + printf("%10s\t%5.3f\t%5.3f %5.1f\t%5.3f %5.1f %4s\n", param, simulation, result, err_res, paper, err_pap, test_result ); + +endfunction + +############################################################################## +### +### Start "real" tests +### + +%!demo +%! disp("Table V, p. 1130 Lee & Pollock [2]"); +%! r = [ 0 0.4 0.4; \ +%! 0 0 0.7; \ +%! 0 0 0 ]; +%! C = [ 20 2 2 ]; +%! mu = [ 2 2 2 ]; +%! mu0 = [ 1.5 0 0 ]; +%! result = lee_et_al_98( mu, mu0, C, r, [ 1 0 0 ] ); +%! assert( get_blocking_type(1), 1 ); +%! assert( get_blocking_type(2), 0 ); +%! assert( get_blocking_type(3), 0 ); +%! assert( f(1,1), 4 ); +%! assert( f(1,2), 1 ); +%! assert( f(1,3), 1 ); +%! assert( f(2,3), 2 ); +%! print_header(); +%! compare( "P_1(0)", 0.1560, result(1,1), 0.1516 ); +%! compare( "P_1(1)", 0.1297, result(1,2), 0.1287 ); +%! compare( "P_1(2)", 0.1085, result(1,3), 0.1091 ); +%! compare( "P_1(3)", 0.0914, result(1,4), 0.0926 ); +%! compare( "P_1(4)", 0.0772, result(1,5), 0.0786 ); +%! compare( "P_1(5)", 0.0654, result(1,6), 0.0666 ); +%! compare( "P_2(0)", 0.6557, result(2,1), 0.6473 ); +%! compare( "P_2(1)", 0.2349, result(2,2), 0.2357 ); +%! compare( "P_2(2)", 0.1094, result(2,3), 0.1170 ); +%! compare( "P_3(0)", 0.4901, result(3,1), 0.4900 ); +%! compare( "P_3(1)", 0.2667, result(3,2), 0.2662 ); +%! compare( "P_3(2)", 0.2431, result(3,3), 0.2438 ); + +%!demo +%! disp("Table IV, p. 1130 Lee & Pollock [2]"); +%! r = [ 0 0.4 0.4; \ +%! 0 0 0.5; \ +%! 0 0 0 ]; +%! C = [ 1 1 1 ]; +%! mu = [ 1 1 1 ]; +%! mu0 = [ 3.0 0 0 ]; +%! result = lee_et_al_98( mu, mu0, C, r, [ 1 0 0 ] ); +%! print_header(); +%! compare( "P_1(0)", 0.2154, result(1,1), 0.2092 ); +%! compare( "P_1(1)", 0.7846, result(1,2), 0.7909 ); +%! compare( "P_2(0)", 0.7051, result(2,1), 0.6968 ); +%! compare( "P_2(1)", 0.2949, result(2,2), 0.3032 ); +%! compare( "P_3(0)", 0.6123, result(3,1), 0.6235 ); +%! compare( "P_3(1)", 0.3877, result(3,2), 0.3765 ); + +%!demo +%! disp("Table X first group, p 1132 Lee & Pollock [2]"); +%! r = [0 0.35 0.35; \ +%! 0 0 0.65; \ +%! 0 0 0 ]; +%! C = [ 5 4 3 ]; +%! mu = [ 1 1 1 ]; +%! mu0 = [ 2 0.2 0.1 ]; +%! result = lee_et_al_98( mu, mu0, C, r, [ 1 1 1 ] ) +%! print_header(); +%! compare( "P_1(5)", 0.558, result(1,6), 0.558 ); +%! compare( "P_2(4)", 0.074, result(2,5), 0.074 ); +%! compare( "P_3(3)", 0.279, result(3,4), 0.282 ); + +%!demo +%! disp("Table X, second group, p. 1132 Lee & Pollock [2]"); +%! r = [0 0.35 0.35; \ +%! 0 0 0.65; \ +%! 0 0 0 ]; +%! C = [ 2 2 3 ]; +%! mu = [ 2 1.5 1 ]; +%! mu0 = [ 1.2 0.3 0.2 ]; +%! result = lee_et_al_98( mu, mu0, C, r, [ 1 1 1 ] ) +%! print_header(); +%! compare( "P_1(2)", 0.269, result(1,3), 0.272 ); +%! compare( "P_2(2)", 0.193, result(2,3), 0.206 ); +%! compare( "P_3(3)", 0.374, result(3,4), 0.391 ); + +%!demo +%! disp("Table 1 first group, p. 195 Lee & al. [1]"); +%! r = [0 1 0; \ +%! 0 0 1; \ +%! 0.1 0 0 ]; +%! C = [ 2 2 2 ]; +%! mu = [ 1 1 1 ]; +%! mu0 = [ 1 0 0 ]; +%! result = lee_et_al_98( mu, mu0, C, r, [ 1 0 0 ] ) +%! print_header(); +%! compare( "P_1(0)", 0.206, result(1,1), 0.210 ); +%! compare( "P_1(2)", 0.458, result(1,3), 0.483 ); +%! compare( "P_2(0)", 0.265, result(2,1), 0.287 ); +%! compare( "P_2(2)", 0.450, result(2,3), 0.452 ); +%! compare( "P_3(0)", 0.376, result(3,1), 0.389 ); +%! compare( "P_3(2)", 0.334, result(3,3), 0.335 ); + +%!demo +%! disp("Table 1, second group, p. 195 Lee & al. [1]"); +%! r = [0 1 0; \ +%! 0 0 1; \ +%! 0.1 0 0 ]; +%! C = [ 1 1 1 ]; +%! mu = [ 1.5 1.5 1.5 ]; +%! mu0 = [ 1 0 0 ]; +%! result = lee_et_al_98( mu, mu0, C, r, [ 1 0 0 ] ) +%! print_header(); +%! compare( "P_1(0)", 0.510, result(1,1), 0.478 ); +%! compare( "P_1(1)", 0.490, result(1,2), 0.522 ); +%! compare( "P_2(0)", 0.526, result(2,1), 0.532 ); +%! compare( "P_2(1)", 0.474, result(2,2), 0.468 ); +%! compare( "P_3(0)", 0.610, result(3,1), 0.620 ); +%! compare( "P_3(1)", 0.390, result(3,2), 0.380 ); + +%!demo +%! disp("Table 2, first group, p. 196 Lee & al. [1]"); +%! r = [0 0.2 0.2 0.3; \ +%! 0 0 0.6 0.3; \ +%! 0 0 0 0.8; \ +%! 0.1 0 0 0 ]; +%! C = [ 1 1 1 1 ]; +%! mu = [ 1 0.5 0.5 1 ]; +%! mu0 = [ 1 0.2 0.2 0 ]; +%! result = lee_et_al_98( mu, mu0, C, r, [ 1 1 1 0 ] ) +%! print_header(); +%! compare( "P_1(0)", 0.364, result(1,1), 0.338 ); +%! compare( "P_1(1)", 0.636, result(1,2), 0.662 ); +%! compare( "P_2(0)", 0.490, result(2,1), 0.477 ); +%! compare( "P_2(1)", 0.510, result(2,2), 0.523 ); +%! compare( "P_3(0)", 0.389, result(3,1), 0.394 ); +%! compare( "P_3(1)", 0.611, result(3,2), 0.606 ); +%! compare( "P_4(0)", 0.589, result(4,1), 0.589 ); +%! compare( "P_4(1)", 0.411, result(4,2), 0.411 ); + +%!demo +%! disp("Table 3, left column, p. 197 Lee & al. [1]"); +%! r = [0 0.3 0 0 0.3 0 0 0.4; \ +%! 0 0 1 0 0 0 0 0; \ +%! 0 0 0 1 0 0 0 0; \ +%! 0 0.1 0 0 0 0 0 0.9; \ +%! 0 0 0 0 0 1 0 0; \ +%! 0 0 0 0 0 0 1 0; \ +%! 0 0 0 0 0.1 0 0 0.9; \ +%! 0 0 0 0 0 0 0 0 ]; +%! C = [ 2 2 2 2 2 2 2 2 ]; +%! mu = [ 1.5 1 1 1 1 1 1 1.5 ]; +%! mu0 = [ 1 0.2 0 0 0.2 0 0 0 ]; +%! result = lee_et_al_98( mu, mu0, C, r, [ 0 0 0 0 0 0 0 0] ) +%! global mu_d; +%! assert( mu_d(8), mu(8) ); +%! print_header(); +%! compare( "P_1(0)", 0.220, result(1,1), 0.221 ); +%! compare( "P_1(2)", 0.547, result(1,3), 0.539 ); +%! compare( "P_2(0)", 0.434, result(2,1), 0.426 ); +%! compare( "P_2(2)", 0.306, result(2,3), 0.309 ); +%! compare( "P_3(0)", 0.415, result(3,1), 0.406 ); +%! compare( "P_3(2)", 0.315, result(3,3), 0.318 ); +%! compare( "P_4(0)", 0.377, result(4,1), 0.373 ); +%! compare( "P_4(2)", 0.348, result(4,3), 0.352 ); +%! compare( "P_5(0)", 0.434, result(5,1), 0.426 ); +%! compare( "P_5(2)", 0.305, result(5,3), 0.309 ); +%! compare( "P_6(0)", 0.416, result(6,1), 0.406 ); +%! compare( "P_6(2)", 0.315, result(6,3), 0.318 ); +%! compare( "P_7(0)", 0.376, result(7,1), 0.373 ); +%! compare( "P_7(2)", 0.363, result(7,3), 0.352 ); +%! compare( "P_8(0)", 0.280, result(8,1), 0.274 ); +%! compare( "P_8(2)", 0.492, result(8,3), 0.492 ); + +############################################################################## +## +## This is the first bunch of tests. Here we compare the result from the +## Lee et al. algorithm with those obtained from the (exact) MVA for +## open, single class networks. Assuming that there is enough buffer +## space in the original network, the result from Lee et al and MVA +## should be almost exactly the same. + +%!test +%! #printf("Simple tandem network with enough buffer space"); +%! r = [ 0 1 0; \ +%! 0 0 1; \ +%! 0.1 0 0]; +%! C = 20 * ones(1,3); +%! mu=[ 2 2 2 ]; +%! mu0=[ 1 0 0 ]; +%! result = lee_et_al_98( mu, mu0, C, r, [1 0 0] ); +%! Q_lee = zeros(1,3); +%! [U R Q_mva] = qnopen( 1, 1 ./ mu, qnvisits(r, mu0) ); +%! for i=1:3 +%! Q_lee(i) = dot( result(i,:), [0:C(i)] ); +%! #printf("Q(%d) Lee=%5.3f MVA=%5.3f\n", i, Q_lee(i), Q_mva(i) ); +%! assert( Q_lee(i), Q_mva(i), 1e4 ); +%! endfor + +%!test +%! #printf("Table 2, third group, p. 196 Lee & al. [1], enough buffer space"); +%! r = [0 0.2 0.2 0.3; \ +%! 0 0 0.6 0.3; \ +%! 0 0 0 0.8; \ +%! 0.1 0 0 0 ]; +%! C = 20*ones(1,4); +%! mu = [ 2 1 1 2 ]; +%! mu0 = [ 1 0.2 0.2 0 ]; +%! result = lee_et_al_98( mu, mu0, C, r, [ 1 1 1 0 ] ); +%! Q_lee = zeros(1,4); +%! [U R Q_mva] = qnopen( 1, 1 ./ mu, qnvisits(r, mu0 ) ); +%! for i=1:4 +%! Q_lee(i) = dot( result(i,:), [0:C(i)] ); +%! #printf("Q(%d) Lee=%5.3f MVA=%5.3f\n", i, Q_lee(i), Q_mva(i) ); +%! assert( Q_lee(i), Q_mva(i), 1e2 ); +%! endfor + +%!test +%! #printf("Table 3, right column, p. 197 Lee & al. [1], enough buffer space"); +%! r = [0 0.3 0 0 0.3 0 0 0.4; \ +%! 0 0 1 0 0 0 0 0; \ +%! 0 0 0 1 0 0 0 0; \ +%! 0 0.1 0 0 0 0 0 0.9; \ +%! 0 0 0 0 0 1 0 0; \ +%! 0 0 0 0 0 0 1 0; \ +%! 0 0 0 0 0.1 0 0 0.9; \ +%! 0 0 0 0 0 0 0 0 ]; +%! C = 20*ones(1,8); +%! mu = [ 2 1.5 1.5 1.5 1.5 1.5 1.5 2 ]; +%! mu0 = [ 1 0.2 0 0 0.2 0 0 0 ]; +%! result = lee_et_al_98( mu, mu0, C, r, [0 0 0 0 0 0 0 0] ); +%! Q_lee = zeros(1,8); +%! [U R Q_mva] = qnopen( 1, 1./ mu, qnvisits(r, mu0) ); +%! for i=1:8 +%! Q_lee(i) = dot( result(i,:), [0:C(i)] ); +%! #printf("Q(%d) Lee=%5.3f MVA=%5.3f\n", i, Q_lee(i), Q_mva(i) ); +%! assert( Q_lee(i), Q_mva(i), 1e2 ); +%! endfor + + Added: trunk/octaveforge/main/queueing/broken/qnmmmk_alt.m ===================================================================  trunk/octaveforge/main/queueing/broken/qnmmmk_alt.m (rev 0) +++ trunk/octaveforge/main/queueing/broken/qnmmmk_alt.m 20120203 12:07:15 UTC (rev 9577) @@ 0,0 +1,162 @@ +## Copyright (C) 2009 Dmitry Kolesnikov +## +## This file is part of the queueing toolbox. +## +## The queueing toolbox is free software: you can redistribute it and/or +## modify it under the terms of the GNU General Public License as +## published by the Free Software Foundation, either version 3 of the +## License, or (at your option) any later version. +## +## The queueing toolbox is distributed in the hope that it will be +## useful, but WITHOUT ANY WARRANTY; without even the implied warranty +## of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with the queueing toolbox. If not, see <http://www.gnu.org/licenses/>;. + +## * texinfo * +## +## @deftypefn {Function File} {[@var{U} @var{R} @var{Q} @var{X} @var{p0} @var{pK}] =} qnmmmk_alt (@var{lambda}, @var{mu}, @var{m}, @var{K} ) +## +## @cindex @math{M/M/m/K} system +## +## Compute utilization, response time, average number of requests and +## throughput for a @math{M/M/m/K} finite capacity system. In a +## @math{M/M/m/K} queue there are @math{m \geq 1} service centers. At any +## moment, at most @math{K} requests can be in the system, @math{K +## \geq m}. +## +## @iftex +## +## The steadystate probability @math{\pi_k} that there are @math{k} +## jobs in the system, @math{0 \leq k \leq K} can be expressed as: +## +## @tex +## $$ +## \pi_k = \cases{ \displaystyle{{\rho^k \over k!} \pi_0} & if $0 \leq k \leq m$;\cr +## \displaystyle{{\rho^m \over m!} \left( \rho \over m \right)^{km} \pi_0} & if $m < k \leq K$\cr} +## $$ +## @end tex +## +## where @math{\rho = \lambda/\mu} is the offered load. The probability +## @math{\pi_0} that the system is empty can be computed by considering +## that all probabilities must sum to one: @math{\sum_{k=0}^K \pi_k = 1}, +## which gives: +## +## @tex +## $$ +## \pi_0 = \left[ \sum_{k=0}^m {\rho^k \over k!} + {\rho^m \over m!} \sum_{k=m+1}^K \left( {\rho \over m}\right)^{km} \right]^{1} +## $$ +## @end tex +## +## @end iftex +## +## @strong{INPUTS} +## +## @table @var +## +## @item lambda +## +## Arrival rate (jobs/@math{s}, @code{@var{lambda}>0}). +## +## @item mu +## +## Service rate (jobs/@math{s}, @code{@var{mu}>0}). +## +## @item m +## +## Number of servers (@code{@var{m}>=1}). +## +## @item k +## +## Maximum number of requests allowed in the system (@code{@var{k} >= @var{m}}). +## +## @end table +## +## @strong{OUTPUTS} +## +## @table @var +## +## @item U +## +## Service center utilization +## +## @item R +## +## Service center response time +## +## @item Q +## +## Average number of requests in the system +## +## @item X +## +## Service center throughput +## +## @item p0 +## +## Probability that there are no requests in the system. +## +## @item pK +## +## Probability that there are @math{K} requests in the system (i.e., +## probability that the system is full). +## +## @end table +## +## @var{lambda}, @var{mu}, @var{m} and @var{K} can be vectors of the +## same size. In this case, the results will be vectors as well. +## +## @seealso{qnmm1,qnmminf,qnmmm} +## +## @end deftypefn + +## Author: Dmitry Kolesnikov +function [U R Q X p0 pm pk] = qnmmmk_alt( lambda, mu, m, k) + if ( nargin != 4 ) + print_usage(); + endif + [err lambda mu m k] = common_size( lambda, mu, m, k ); + if ( err ) + error( "Parameters are not of common size" ); + endif + @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. 