This list is closed, nobody may subscribe to it.
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
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(2) |
2016 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(4) |
Jun
(8) |
Jul
(2) |
Aug
(5) |
Sep
(9) |
Oct
|
Nov
|
Dec
|
From: <sla...@us...> - 2012-03-20 02:03:44
|
Revision: 9973 http://octave.svn.sourceforge.net/octave/?rev=9973&view=rev Author: slackydeb Date: 2012-03-20 02:03:37 +0000 (Tue, 20 Mar 2012) Log Message: ----------- ga: add devel folder Thanks to Carn?\195?\171 Draug for clarification on package dirs structure. Reference: http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/control/devel/INFO?revision=7804&view=markup Added Paths: ----------- trunk/octave-forge/main/ga/devel/ trunk/octave-forge/main/ga/devel/INFO Added: trunk/octave-forge/main/ga/devel/INFO =================================================================== --- trunk/octave-forge/main/ga/devel/INFO (rev 0) +++ trunk/octave-forge/main/ga/devel/INFO 2012-03-20 02:03:37 UTC (rev 9973) @@ -0,0 +1,3 @@ +The folder "devel" and its content is ignored by "pkg install". The +folder is intended for draft code and other stuff which is not +suitable for "normal" users. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-03-19 21:31:54
|
Revision: 9972 http://octave.svn.sourceforge.net/octave/?rev=9972&view=rev Author: mmarzolla Date: 2012-03-19 21:31:47 +0000 (Mon, 19 Mar 2012) Log Message: ----------- new example in documentation Modified Paths: -------------- trunk/octave-forge/main/queueing/doc/markovchains.txi trunk/octave-forge/main/queueing/inst/dtmc.m trunk/octave-forge/main/queueing/inst/dtmc_fpt.m trunk/octave-forge/main/queueing/inst/dtmc_mtta.m Modified: trunk/octave-forge/main/queueing/doc/markovchains.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-03-19 16:31:21 UTC (rev 9971) +++ trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-03-19 21:31:47 UTC (rev 9972) @@ -140,12 +140,79 @@ @noindent @strong{EXAMPLE} +This example is from [GrSn97]. Let us consider a maze with nine rooms, +as shown in the following figure + @example @group -@verbatiminclude @value{top_srcdir}/examples/demo_1_dtmc.m ++-----+-----+-----+ +| | | | +| 1 2 3 | +| | | | ++- -+- -+- -+ +| | | | +| 4 5 6 | +| | | | ++- -+- -+- -+ +| | | | +| 7 8 9 | +| | | | ++-----+-----+-----+ @end group @end example +A mouse is placed in one of the rooms and can wander around. At each +step, the mouse moves to one of the neighboring rooms with equal +probability: if it is in room 1, it van move to room 2 and 4 with +probability 1/2. If the mouse is in room 8, it can move to either 7, 5 +or 9 with probability 1/3. + +The transition probability @math{\bf P} from room @math{i} to room +@math{j} is the following: + +@iftex +@tex +$$ {\bf P} = +\pmatrix{ 0 & 1/2 & 0 & 1/2 & 0 & 0 & 0 & 0 & 0 \cr + 1/3 & 0 & 1/3 & 0 & 1/3 & 0 & 0 & 0 & 0 \cr + 0 & 1/2 & 0 & 0 & 0 & 1/2 & 0 & 0 & 0 \cr + 1/3 & 0 & 0 & 0 & 1/3 & 0 & 1/3 & 0 & 0 \cr + 0 & 1/4 & 0 & 1/4 & 0 & 1/4 & 0 & 1/4 & 0 \cr + 0 & 0 & 1/3 & 0 & 1/3 & 0 & 0 & 0 & 1/3 \cr + 0 & 0 & 0 & 1/2 & 0 & 0 & 0 & 1/2 & 0 \cr + 0 & 0 & 0 & 0 & 1/3 & 0 & 1/3 & 0 & 1/3 \cr + 0 & 0 & 0 & 0 & 0 & 1/2 & 0 & 1/2 & 0 } +$$ +@end tex +@end iftex +@ifnottex +@example +@group + / 0 1/2 0 1/2 0 0 0 0 0 \ + | 1/3 0 1/3 0 1/3 0 0 0 0 | + | 0 1/2 0 0 0 1/2 0 0 0 | + | 1/3 0 0 0 1/3 0 1/3 0 0 | + P = | 0 1/4 0 1/4 0 1/4 0 1/4 0 | + | 0 0 1/3 0 1/3 0 0 0 1/3 | + | 0 0 0 1/2 0 0 0 1/2 0 | + | 0 0 0 0 1/3 0 1/3 0 1/3 | + \ 0 0 0 0 0 1/2 0 1/2 0 / +@end group +@end example +@end ifnottex + +The stationary state occupancy probability vector can be computed +using the following code: + +@example +@c @group +@verbatiminclude @value{top_srcdir}/examples/demo_1_dtmc.m +@c @end group + @result{} 0.083333 0.125000 0.083333 0.125000 + 0.166667 0.125000 0.083333 0.125000 + 0.083333 +@end example + @c @node Birth-death process (DTMC) @subsection Birth-death process @@ -325,6 +392,30 @@ @end example @end ifnottex +According to the definition above, @math{M_{i,i} = 0}. We arbitrarily +redefine @math{M_{i,i}} to be the @emph{mean recurrence time} +@math{r_i} for state @math{i}, that is the average number of +transitions needed to return to state @math{i} starting from +it. @math{r_i} is defined as: + +@iftex +@tex +$$ r_i = {1 \over \pi_i} $$ +@end tex +@end iftex +@ifnottex +@example +@group + 1 +r_i = ----- + \pi_i +@end group +@end example +@end ifnottex + +@noindent where @math{\pi_i} is the stationary probability of visiting state +@math{i}. + @DOCSTRING(dtmc_fpt) @c Modified: trunk/octave-forge/main/queueing/inst/dtmc.m =================================================================== --- trunk/octave-forge/main/queueing/inst/dtmc.m 2012-03-19 16:31:21 UTC (rev 9971) +++ trunk/octave-forge/main/queueing/inst/dtmc.m 2012-03-19 21:31:47 UTC (rev 9972) @@ -156,7 +156,36 @@ %! p = dtmc(P); %! assert( p, [.0625 .25 .375 .25 .0625], 10*eps ); +## "Rat maze" problem (p. 441 of [GrSn97]); +%!test +%! P = zeros(9,9); +%! P(1,[2 4]) = 1/2; +%! P(2,[1 5 3]) = 1/3; +%! P(3,[2 6]) = 1/2; +%! P(4,[1 5 7]) = 1/3; +%! P(5,[2 4 6 8]) = 1/4; +%! P(6,[3 5 9]) = 1/3; +%! P(7,[4 8]) = 1/2; +%! P(8,[7 5 9]) = 1/3; +%! P(9,[6 8]) = 1/2; +%! p = dtmc(P); +%! assert( p, [1/12 1/8 1/12 1/8 1/6 1/8 1/12 1/8 1/12], 10*eps ); + %!demo +%! P = zeros(9,9); +%! P(1,[2 4] ) = 1/2; +%! P(2,[1 5 3] ) = 1/3; +%! P(3,[2 6] ) = 1/2; +%! P(4,[1 5 7] ) = 1/3; +%! P(5,[2 4 6 8]) = 1/4; +%! P(6,[3 5 9] ) = 1/3; +%! P(7,[4 8] ) = 1/2; +%! P(8,[7 5 9] ) = 1/3; +%! P(9,[6 8] ) = 1/2; +%! p = dtmc(P); +%! disp(p) + +%!demo %! a = 0.2; %! b = 0.15; %! P = [ 1-a a; b 1-b]; Modified: trunk/octave-forge/main/queueing/inst/dtmc_fpt.m =================================================================== --- trunk/octave-forge/main/queueing/inst/dtmc_fpt.m 2012-03-19 16:31:21 UTC (rev 9971) +++ trunk/octave-forge/main/queueing/inst/dtmc_fpt.m 2012-03-19 21:31:47 UTC (rev 9972) @@ -73,8 +73,7 @@ error("Cannot compute first passage times for absorbing chains"); endif - ## Source: - ## http://www.cs.virginia.edu/~gfx/Courses/2006/DataDriven/bib/texsyn/Chapter11.pdf + ## Source [GrSn97] w = dtmc(P); # steady state probability vector W = repmat(w,N,1); ## Z = (I - P + W)^-1 where W is the matrix where each row is the @@ -100,8 +99,7 @@ %! M = dtmc_fpt(P); %! assert( diag(M)', 1./p, 1e-8 ); -## Example on p. 461 of -## http://www.cs.virginia.edu/~gfx/Courses/2006/DataDriven/bib/texsyn/Chapter11.pdf +## Example on p. 461 of [GrSn97] %!test %! P = [ 0 1 0 0 0; \ %! .25 .0 .75 0 0; \ @@ -127,6 +125,21 @@ %! endfor %! endfor +## "Rat maze" problem (p. 453 of [GrSn97]); +%!test +%! P = zeros(9,9); +%! P(1,[2 4]) = .5; +%! P(2,[1 5 3]) = 1/3; +%! P(3,[2 6]) = .5; +%! P(4,[1 5 7]) = 1/3; +%! P(5,[2 4 6 8]) = 1/4; +%! P(6,[3 5 9]) = 1/3; +%! P(7,[4 8]) = .5; +%! P(8,[7 5 9]) = 1/3; +%! P(9,[6 8]) = .5; +%! M = dtmc_fpt(P); +%! assert( M(1:9 != 5,5)', [6 5 6 5 5 6 5 6], 10*eps ); + %!demo %! P = [ 0.0 0.9 0.1; \ %! 0.1 0.0 0.9; \ Modified: trunk/octave-forge/main/queueing/inst/dtmc_mtta.m =================================================================== --- trunk/octave-forge/main/queueing/inst/dtmc_mtta.m 2012-03-19 16:31:21 UTC (rev 9971) +++ trunk/octave-forge/main/queueing/inst/dtmc_mtta.m 2012-03-19 21:31:47 UTC (rev 9972) @@ -112,8 +112,8 @@ ## Source: Grinstead, Charles M.; Snell, J. Laurie (July 1997). "Ch. ## 11: Markov Chains". Introduction to Probability. American ## Mathematical Society. ISBN 978-0821807491. + ## http://www.cs.virginia.edu/~gfx/Courses/2006/DataDriven/bib/texsyn/Chapter11.pdf - ## http://www.cs.virginia.edu/~gfx/Courses/2006/DataDriven/bib/texsyn/Chapter11.pdf tmpN = inv(eye(k) - P(tr,tr)); # matrix N = (I-Q)^-1 N(tr,tr) = tmpN; R = P(tr,ab); @@ -154,8 +154,7 @@ %! assert( B(3,1), 0.5, 10*eps ); %! assert( B(3,5), 0.5, 10*eps ); -## Example on p. 422 of -## http://www.cs.virginia.edu/~gfx/Courses/2006/DataDriven/bib/texsyn/Chapter11.pdf +## Example on p. 422 of [GrSn97] %!test %! P = dtmc_bd([0 .5 .5 .5 .5], [.5 .5 .5 .5 0]); %! [t N B] = dtmc_mtta(P); @@ -230,3 +229,19 @@ %! text(f*1.1,0.2,["Mean Time to Absorption (" num2str(f) ")"]); %! xlabel("Step number (n)"); %! title("Probability of finishing the game before step n"); + +## "Rat maze" problem (p. 453 of [GrSn97]); +%!test +%! P = zeros(9,9); +%! P(1,[2 4]) = .5; +%! P(2,[1 5 3]) = 1/3; +%! P(3,[2 6]) = .5; +%! P(4,[1 5 7]) = 1/3; +%! P(5,:) = 0; P(5,5) = 1; +%! P(6,[3 5 9]) = 1/3; +%! P(7,[4 8]) = .5; +%! P(8,[7 5 9]) = 1/3; +%! P(9,[6 8]) = .5; +%! t = dtmc_mtta(P); +%! assert( t, [6 5 6 5 0 5 6 5 6], 10*eps ); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-03-19 16:31:30
|
Revision: 9971 http://octave.svn.sourceforge.net/octave/?rev=9971&view=rev Author: mmarzolla Date: 2012-03-19 16:31:21 +0000 (Mon, 19 Mar 2012) Log Message: ----------- bug fix in the examples Modified Paths: -------------- trunk/octave-forge/main/queueing/inst/ctmc_exps.m Modified: trunk/octave-forge/main/queueing/inst/ctmc_exps.m =================================================================== --- trunk/octave-forge/main/queueing/inst/ctmc_exps.m 2012-03-19 16:16:49 UTC (rev 9970) +++ trunk/octave-forge/main/queueing/inst/ctmc_exps.m 2012-03-19 16:31:21 UTC (rev 9971) @@ -152,10 +152,9 @@ %!demo %! lambda = 0.5; %! N = 4; -%! birth = lambda*linspace(1,N-1,N-1); -%! death = zeros(1,N-1); -%! Q = diag(birth,1)+diag(death,-1); -%! Q -= diag(sum(Q,2)); +%! b = lambda*[1:N-1]; +%! d = zeros(size(b)); +%! Q = ctmc_bd(b,d); %! t = linspace(0,10,100); %! p0 = zeros(1,N); p0(1)=1; %! L = zeros(length(t),N); @@ -173,10 +172,9 @@ %!demo %! lambda = 0.5; %! N = 4; -%! birth = lambda*linspace(1,N-1,N-1); -%! death = 0*birth; -%! Q = diag(birth,1)+diag(death,-1); -%! Q -= diag(sum(Q,2)); +%! b = lambda*[1:N-1]; +%! d = zeros(size(b)); +%! Q = ctmc_bd(b,d); %! p0 = zeros(1,N); p0(1)=1; %! L = ctmc_exps(Q,p0); %! disp(L); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-03-19 16:16:58
|
Revision: 9970 http://octave.svn.sourceforge.net/octave/?rev=9970&view=rev Author: paramaniac Date: 2012-03-19 16:16:49 +0000 (Mon, 19 Mar 2012) Log Message: ----------- control-devel: calculate initial state vector Modified Paths: -------------- trunk/octave-forge/extra/control-devel/devel/test_slident.m trunk/octave-forge/extra/control-devel/src/slident.cc Modified: trunk/octave-forge/extra/control-devel/devel/test_slident.m =================================================================== --- trunk/octave-forge/extra/control-devel/devel/test_slident.m 2012-03-19 15:35:53 UTC (rev 9969) +++ trunk/octave-forge/extra/control-devel/devel/test_slident.m 2012-03-19 16:16:49 UTC (rev 9970) @@ -2031,7 +2031,7 @@ rcond = 0.0; tol = -1.0; -[a, b, c, d, q, ry, s, k] = slident (Y, U, nobr, meth, alg, jobd, batch, conct, ctrl, rcond, tol) +[a, b, c, d, q, ry, s, k, x0] = slident (Y, U, nobr, meth, alg, jobd, batch, conct, ctrl, rcond, tol) ae = [ 0.8924 0.3887 0.1285 0.1716 @@ -2077,23 +2077,27 @@ -figure (1) -plot (Y) +% figure (1) +% plot (Y) P = ss (a, b, c, d, 1); -figure (2) -lsim (P, U) -%lsim (P, U, [], x0) % initial values dependent on realization, IB01BD != IB01CD +% figure (2) +% lsim (P, U) +% lsim (P, U, [], x0) % initial values dependent on realization, IB01BD != IB01CD -[y, t] = lsim (P, U); +% [y, t] = lsim (P, U); +[y, t] = lsim (P, U, [], x0); + figure (3) plot (t, Y, 'b', t, y, 'r') legend ('y measured', 'y simulated', 'location', 'southeast') -axis tight +%axis tight +% print -depsc2 ident.eps + %n %sv Modified: trunk/octave-forge/extra/control-devel/src/slident.cc =================================================================== --- trunk/octave-forge/extra/control-devel/src/slident.cc 2012-03-19 15:35:53 UTC (rev 9969) +++ trunk/octave-forge/extra/control-devel/src/slident.cc 2012-03-19 16:16:49 UTC (rev 9970) @@ -561,7 +561,6 @@ // ldwork = max (ldwork_a, ldwork_b, ldwork_c) -/* // arguments in char jobx0 = 'X'; char comuse = 'U'; @@ -571,57 +570,19 @@ int ldv = max (1, n); ColumnVector x0 (n); - Matrix (ldv, n); + Matrix v (ldv, n); // workspace int liwork_c = n; // if JOBX0 = 'X' and COMUSE <> 'C' int ldwork_c; - - ldwork_c = ldw1 + n*( n + m + l ) + max (5*n, ldw1, min (ldw2, ldw3)) - - - // I can't find a definition for parameter 't' - -C The length of the array DWORK. -C LDWORK >= 2, if JOBX0 = 'N' and COMUSE <> 'C', or -C if max( N, M ) = 0. -C Otherwise, -C LDWORK >= LDW1 + N*( N + M + L ) + -C max( 5*N, LDW1, min( LDW2, LDW3 ) ), -C where, if COMUSE = 'C', then -C LDW1 = 2, if M = 0 or JOB = 'B', -C LDW1 = 3, if M > 0 and JOB = 'D', -C LDWa = t*L*(r + 1) + max( N + max( d, f ), 6*r ), -C LDW2 = LDWa, if M = 0 or JOB = 'B', -C LDW2 = max( LDWa, t*L*(r + 1) + 2*M*M + 6*M ), -C if M > 0 and JOB = 'D', -C LDWb = (b + r)*(r + 1) + -C max( q*(r + 1) + N*N*M + c + max( d, f ), 6*r ), -C LDW3 = LDWb, if M = 0 or JOB = 'B', -C LDW3 = max( LDWb, (b + r)*(r + 1) + 2*M*M + 6*M ), -C if M > 0 and JOB = 'D', -C r = N*M + a, -C a = 0, if JOBX0 = 'N', -C a = N, if JOBX0 = 'X'; -C b = 0, if JOB = 'B', -C b = L*M, if JOB = 'D'; -C c = 0, if JOBX0 = 'N', -C c = L*N, if JOBX0 = 'X'; -C d = 0, if JOBX0 = 'N', -C d = 2*N*N + N, if JOBX0 = 'X'; -C f = 2*r, if JOB = 'B' or M = 0, -C f = M + max( 2*r, M ), if JOB = 'D' and M > 0; -C q = b + r*L; -C and, if JOBX0 = 'X' and COMUSE <> 'C', then -C LDW1 = 2, -C LDW2 = t*L*(N + 1) + 2*N + max( 2*N*N, 4*N ), -C LDW3 = N*(N + 1) + 2*N + max( q*(N + 1) + 2*N*N + L*N, -C 4*N ), -C q = N*L. -C For good performance, LDWORK should be larger. + int t = nsmp; + + int ldw1_c = 2; + int ldw2_c = t*l*(n + 1) + 2*n + max (2*n*n, 4*n); + int ldw3_c = n*(n + 1) + 2*n + max (n*l*(n + 1) + 2*n*n + l*n, 4*n); + ldwork_c = ldw1_c + n*( n + m + l ) + max (5*n, ldw1_c, min (ldw2_c, ldw3_c)); - OCTAVE_LOCAL_BUFFER (int, iwork_c, liwork_c); OCTAVE_LOCAL_BUFFER (double, dwork_c, ldwork_c); @@ -632,7 +593,7 @@ // SLICOT routine IB01CD F77_XFCN (ib01cd, IB01CD, - (jobx0, comuse, job***, + (jobx0, comuse, jobbd, n, m, l, nsmp, a.fortran_vec (), lda, @@ -676,7 +637,7 @@ error_msg ("ident", info_c, 2, err_msg_c); warning_msg ("ident", iwarn_c, 6, warn_msg_c); -*/ + // return values retval(0) = a; @@ -689,7 +650,7 @@ retval(6) = s; retval(7) = k; - //retval(8) = x0; + retval(8) = x0; //retval(0) = octave_value (n); //retval(1) = r; //retval(2) = sv; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-03-19 15:36:04
|
Revision: 9969 http://octave.svn.sourceforge.net/octave/?rev=9969&view=rev Author: mmarzolla Date: 2012-03-19 15:35:53 +0000 (Mon, 19 Mar 2012) Log Message: ----------- improved documentation Modified Paths: -------------- trunk/octave-forge/main/queueing/doc/markovchains.txi Modified: trunk/octave-forge/main/queueing/doc/markovchains.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-03-19 12:27:55 UTC (rev 9968) +++ trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-03-19 15:35:53 UTC (rev 9969) @@ -84,13 +84,13 @@ We denote with @math{{\bf \pi}(n) = \left(\pi_1(n), \pi_2(n), @dots{}, \pi_N(n) \right)} the @emph{state occupancy probability vector} at step @math{n}. @math{\pi_i(n)} denotes the probability that the system is -in state @math{i} at step @math{n}. +in state @math{i} after @math{n} transitions. Given the transition probability matrix @math{\bf P} and the initial -state occupancy probability vector @math{{\bf \pi}(0) = \left(\pi_1(0), -\pi_2(0), @dots{}, \pi_N(0)\right)} at step 0, the state occupancy -probability vector @math{{\bf \pi}(n)} at step @math{n} can be -computed as: +state occupancy probability vector @math{{\bf \pi}(0) = +\left(\pi_1(0), \pi_2(0), @dots{}, \pi_N(0)\right)}, the state +occupancy probabilities @math{{\bf \pi}(n)} after @math{n} transitions +can easily be computed as: @iftex @tex @@ -107,11 +107,34 @@ Under certain conditions, there exists a @emph{stationary state occupancy probability} @math{{\bf \pi} = \lim_{n \rightarrow +\infty} -{\bf \pi}(n)}, which is independent from the initial state occupancy -@math{{\bf \pi}(0)}. The stationary state occupancy probability vector -@math{\bf \pi} satisfies @math{{\bf \pi} = {\bf \pi} {\bf P}} -and @math{\sum_{i=1}^N \pi_i = 1} +{\bf \pi}(n)}, which is independent from the initial occupancy +@math{{\bf \pi}(0)}. The stationary vector @math{\bf \pi} can be +computed as the solution of the following linear system: +@iftex +@tex +$$ +\left\{ \eqalign{ +{\bf \pi P} & = {\bf \pi} \cr +{\bf \pi 1}^T & = 1 +} \right. +$$ +@end tex +@end iftex +@ifnottex +@example +@group +/ +| \pi P = \pi +| \pi 1^T = 1 +\ +@end group +@end example +@end ifnottex + +@noindent where @math{\bf 1} is the row vector of ones, and @math{( \cdot )^T} +the transpose operator. + @c @DOCSTRING(dtmc) @@ -137,7 +160,7 @@ matrix @math{\bf P} and an integer @math{n @geq{} 0}, we let @math{L_i(n)} be the the expected number of visits to state @math{i} during the first @math{n} transitions. The vector @math{{\bf L}(n) = -( L_1(n), L_2(n), @dots{}, L_N(n) )} is defined as: +( L_1(n), L_2(n), @dots{}, L_N(n) )} is defined as @iftex @tex @@ -179,17 +202,15 @@ @end example @end ifnottex -@noindent where we suppose that the first @math{t} states are transient -and the last @math{r} states are absorbing. +@noindent where the first @math{t} states are transient +and the last @math{r} states are absorbing. The matrix @math{{\bf N} = +({\bf I} - {\bf Q})^{-1}} is called the @emph{fundamental matrix}; +@math{N(i,j)} represents the expected number of times that the process +is in the @math{j}-th transient state if it is started in the +@math{i}-th transient state. If we reshape @math{\bf N} to the size of +@math{\bf P} (filling missing entries with zeros), we have that, for +absorbing chains @math{{\bf L} = {\bf \pi}(0){\bf N}}. -The matrix @math{{\bf N} = ({\bf I} - {\bf Q})^{-1}} is called the -@emph{fundamental matrix}; @math{N(i,j)} represents the expected -number of times that the process is in the @math{j}-th transient state -if it is started in the @math{i}-th transient state. If we reshape -@math{\bf N} to the size of @math{\bf P} (filling missing entries with -zeros), we have that, for absorbing chains @math{{\bf L} = {\bf -\pi}(0){\bf N}}. - @DOCSTRING(dtmc_exps) @c @@ -202,6 +223,43 @@ @node Mean time to absorption (DTMC) @subsection Mean Time to Absorption +The @emph{mean time to absorption} is defined as the average number of +transitions which are required to reach an absorbing state, starting +from a transient state (or given an initial state occupancy +probability vector @math{{\bf \pi}(0)} ). + +Let @math{{\bf t}_i} be the expected number of steps before being +absorbed in any absorbing state, starting from state @math{i}. Vector +@math{\bf t} can be easiliy computed from the fundamental matrix +@math{\bf N} (@pxref{Expected number of visits (DTMC)}) as + +@iftex +@tex +$$ {\bf t} = {\bf 1 N} $$ +@end tex +@end iftex +@ifnottex +@example +t = 1 N +@end example +@end ifnottex + +We can define a matrix @math{{\bf B} = [ B_{i, j} ]} such that +@math{B_{i, j}} is the probability of being absorbed in state +@math{j}, starting from transient state @math{i}. Again, using +the fundamental matrix @math{\bf N} and @math{\bf R}, we have + +@iftex +@tex +$$ {\bf B} = {\bf N R} $$ +@end tex +@end iftex +@ifnottex +@example +B = N R +@end example +@end ifnottex + @DOCSTRING(dtmc_mtta) @c @@ -230,6 +288,43 @@ @end example @end ifnottex +To compute @math{{\bf M} = [ M_{i, j}]} a different formulation is +used. Let @math{\bf W} be the @math{N \times N} matrix having each +row equal to the steady-state probability vector @math{\bf \pi} for +@math{\bf P}; let @math{\bf I} be the @math{N \times N} identity +matrix. Define matrix @math{\bf Z} as follows: + +@iftex +@tex +$$ {\bf Z} = \left( {\bf I} - {\bf P} + {\bf W} \right)^{-1} $$ +@end tex +@end iftex +@ifnottex +@example +@group + -1 +Z = (I - P + W) +@end group +@end example +@end ifnottex + +@noindent Then, we have that + +@iftex +@tex +$$ M_{i, j} = {Z_{j, j} - Z_{i, j} \over \pi_j} $$ +@end tex +@end iftex +@ifnottex +@example +@group + Z_jj - Z_ij +M_ij = ----------- + \pi_j +@end group +@end example +@end ifnottex + @DOCSTRING(dtmc_fpt) @c @@ -303,9 +398,30 @@ @emph{stationary state occupancy probability} @math{{\bf \pi} = \lim_{t \rightarrow +\infty} {\bf \pi}(t)}, which is independent from the initial state occupancy @math{{\bf \pi}(0)}. The stationary state -occupancy probability vector @math{\bf \pi} satisfies -@math{{\bf \pi} {\bf Q} = {\bf 0}} and @math{\sum_{i=1}^N \pi_i = 1}. +occupancy probability vector @math{\bf \pi} can be computed as the +solution of the following linear system: +@iftex +@tex +$$ +\left\{ \eqalign{ +{\bf \pi Q} & = {\bf 0} \cr +{\bf \pi 1}^T & = 1 +} \right. +$$ +@end tex +@end iftex +@ifnottex +@example +@group +/ +| \pi Q = 0 +| \pi 1^T = 1 +\ +@end group +@end example +@end ifnottex + @DOCSTRING(ctmc) @noindent @strong{EXAMPLE} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-03-19 12:28:05
|
Revision: 9968 http://octave.svn.sourceforge.net/octave/?rev=9968&view=rev Author: mmarzolla Date: 2012-03-19 12:27:55 +0000 (Mon, 19 Mar 2012) Log Message: ----------- documentation improvements Modified Paths: -------------- trunk/octave-forge/main/queueing/doc/markovchains.txi trunk/octave-forge/main/queueing/inst/ctmc_bd.m trunk/octave-forge/main/queueing/inst/dtmc_bd.m Modified: trunk/octave-forge/main/queueing/doc/markovchains.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-03-19 09:34:32 UTC (rev 9967) +++ trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-03-19 12:27:55 UTC (rev 9968) @@ -39,7 +39,8 @@ @iftex @tex -$$P\left(X_{n+1} = x_{n+1}\ |\ X_n = x_n, X_{n-1} = x_{n-1}, \ldots, X_0 = x_0 \right) = P\left(X_{n+1} = x_{n+1}\ |\ X_n = x_n\right)$$ +$$\eqalign{P\left(X_{n+1} = x_{n+1}\ |\ X_n = x_n, X_{n-1} = x_{n-1}, \ldots, X_0 = x_0 \right) \cr +& = P\left(X_{n+1} = x_{n+1}\ |\ X_n = x_n\right)}$$ @end tex @end iftex @ifnottex @@ -52,10 +53,10 @@ The evolution of a Markov chain with finite state space @math{@{1, 2, @dots{}, N@}} can be fully described by a stochastic matrix @math{{\bf -P}(n) = P_{i,j}(n)} such that @math{P_{i, j}(n) = P( X_{n+1} = j\ |\ +P}(n) = [ P_{i,j}(n) ]} such that @math{P_{i, j}(n) = P( X_{n+1} = j\ |\ X_n = i )}. If the Markov chain is homogeneous (that is, the transition probability matrix @math{{\bf P}(n)} is time-independent), -we can simply write @math{{\bf P} = P_{i, j}}, where @math{P_{i, j} = +we can simply write @math{{\bf P} = [P_{i, j}]}, where @math{P_{i, j} = P( X_{n+1} = j\ |\ X_n = i )} for all @math{n=0, 1, @dots{}}. The transition probability matrix @math{\bf P} must satisfy the @@ -244,7 +245,8 @@ @iftex @tex -$$P(X_{t_{n+1}} = x_{n+1}\ |\ X(t_n) = x_n, X(t_{n-1}) = x_{n-1}, \ldots, X(t_0) = x_0) = P(X(t_{n+1}) = x_{n+1}\ |\ X(t_n) = x_n)$$ +$$\eqalign{P(X(t_{n+1}) = x_{n+1}\ |\ X(t_n) = x_n, X(t_{n-1}) = x_{n-1}, \ldots, X(t_0) = x_0) \cr +&= P(X(t_{n+1}) = x_{n+1}\ |\ X(t_n) = x_n)}$$ @end tex @end iftex @ifnottex @@ -255,8 +257,9 @@ @emph{infinitesimal generator matrix} @math{{\bf Q} = [Q_{i,j}]} such that for each @math{i \neq j}, @math{Q_{i, j}} is the transition rate from state @math{i} to state @math{j}. The elements @math{Q_{i, i}} -must be defined in such a way that the infinitesimal generator matrix -@math{\bf Q} satisfies the property @math{\sum_{j=1}^N Q_{i, j} = 0}. +qre defined as @math{Q_{i, i} = - \sum_{j \neq i} Q_{i, j}}, such that +matrix @math{\bf Q} satisfies the property that, for all @math{i}, +@math{\sum_{j=1}^N Q_{i, j} = 0}. @DOCSTRING(ctmc_check_Q) @@ -373,8 +376,8 @@ @end ifnottex @noindent where @math{{\bf \pi}(t) = {\bf \pi}(0) \exp({\bf Q}t)} is -the state occupancy probability at time @math{t}; @math{\exp({\bf A})} -is the matrix exponential of @math{\bf A}. +the state occupancy probability at time @math{t}; @math{\exp({\bf Q}t)} +is the matrix exponential of @math{{\bf Q}t}. @DOCSTRING(ctmc_exps) Modified: trunk/octave-forge/main/queueing/inst/ctmc_bd.m =================================================================== --- trunk/octave-forge/main/queueing/inst/ctmc_bd.m 2012-03-19 09:34:32 UTC (rev 9967) +++ trunk/octave-forge/main/queueing/inst/ctmc_bd.m 2012-03-19 12:27:55 UTC (rev 9968) @@ -17,37 +17,51 @@ ## -*- texinfo -*- ## -## @deftypefn {Function File} {@var{Q} =} ctmc_bd (@var{birth}, @var{death}) +## @deftypefn {Function File} {@var{Q} =} ctmc_bd (@var{b}, @var{d}) ## ## @cindex Markov chain, continuous time ## @cindex Birth-death process ## -## Returns the @math{N \times N} infinitesimal generator matrix @math{Q} -## for a birth-death process with given rates. +## Returns the infinitesimal generator matrix @math{Q} for a continuous +## birth-death process over state space @math{1, 2, @dots{}, N}. +## @code{@var{b}(i)} is the transition rate from state @math{i} to +## @math{i+1}, and @code{@var{d}(i)} is the transition rate from state +## @math{i+1} to state @math{i}, @math{i=1, 2, @dots{}, N-1}. ## -## @strong{INPUTS} +## Matrix @math{\bf Q} is therefore defined as: ## -## @table @var +## @iftex +## @tex +## $$ \pmatrix{ -\lambda_1 & \lambda_1 & & & & \cr +## \mu_1 & -(\mu_1 + \lambda_2) & \lambda_2 & & \cr +## & \mu_2 & -(\mu_2 + \lambda_3) & \lambda_3 & & \cr +## \cr +## & & \ddots & \ddots & \ddots & & \cr +## \cr +## & & & \mu_{N-2} & -(\mu_{N-2}+\lambda_{N-1}) & \lambda_{N-1} \cr +## & & & & \mu_{N-1} & -\mu_{N-1} } +## $$ +## @end tex +## @noindent where @math{\lambda_i} and @math{\mu_i} are the birth and +## death rates, respectively. +## @end iftex +## @ifnottex +## @example +## @group +## / \ +## | -b(1) b(1) | +## | d(1) -(d(1)+b(2)) b(2) | +## | d(2) -(d(2)+b(3)) b(3) | +## | | +## | ... ... ... | +## | | +## | d(N-2) -(d(N-2)+b(N-1)) b(N-1) | +## | d(N-1) -d(N-1) | +## \ / +## @end group +## @end example +## @end ifnottex ## -## @item birth -## Vector with @math{N-1} elements, where @code{@var{birth}(i)} is the -## transition rate from state @math{i} to state @math{i+1}. -## -## @item death -## Vector with @math{N-1} elements, where @code{@var{death}(i)} is the -## transition rate from state @math{i+1} to state @math{i}. -## -## @end table -## -## @strong{OUTPUTS} -## -## @table @var -## -## @item Q -## Infinitesimal generator matrix for the birth-death process. -## -## @end table -## ## @end deftypefn ## Author: Moreno Marzolla <marzolla(at)cs.unibo.it> Modified: trunk/octave-forge/main/queueing/inst/dtmc_bd.m =================================================================== --- trunk/octave-forge/main/queueing/inst/dtmc_bd.m 2012-03-19 09:34:32 UTC (rev 9967) +++ trunk/octave-forge/main/queueing/inst/dtmc_bd.m 2012-03-19 12:27:55 UTC (rev 9968) @@ -17,68 +17,83 @@ ## -*- texinfo -*- ## -## @deftypefn {Function File} {@var{P} =} dtmc_bd (@var{birth}, @var{death}) +## @deftypefn {Function File} {@var{P} =} dtmc_bd (@var{b}, @var{d}) ## ## @cindex Markov chain, discrete time ## @cindex Birth-death process ## -## Returns the @math{N \times N} transition probability matrix @math{P} -## for a birth-death process with given rates. +## Returns the transition probability matrix @math{P} for a discrete +## birth-death process over state space @math{1, 2, @dots{}, N}. +## @code{@var{b}(i)} is the transition probability from state +## @math{i} to @math{i+1}, and @code{@var{d}(i)} is the transition +## probability from state @math{i+1} to state @math{i}, @math{i=1, 2, +## @dots{}, N-1}. ## -## @strong{INPUTS} +## Matrix @math{\bf P} is therefore defined as: ## -## @table @var +## @iftex +## @tex +## $$ \pmatrix{ (1-\lambda_1) & \lambda_1 & & & & \cr +## \mu_1 & (1 - \mu_1 - \lambda_2) & \lambda_2 & & \cr +## & \mu_2 & (1 - \mu_2 - \lambda_3) & \lambda_3 & & \cr +## \cr +## & & \ddots & \ddots & \ddots & & \cr +## \cr +## & & & \mu_{N-2} & (1 - \mu_{N-2}-\lambda_{N-1}) & \lambda_{N-1} \cr +## & & & & \mu_{N-1} & (1-\mu_{N-1}) } +## $$ +## @end tex +## @noindent where @math{\lambda_i} and @math{\mu_i} are the birth and +## death probabilities, respectively. +## @end iftex +## @ifnottex +## @example +## @group +## / \ +## | 1-b(1) b(1) | +## | d(1) (1-d(1)-b(2)) b(2) | +## | d(2) (1-d(2)-b(3)) b(3) | +## | | +## | ... ... ... | +## | | +## | d(N-2) (1-d(N-2)-b(N-1)) b(N-1) | +## | d(N-1) 1-d(N-1) | +## \ / +## @end group +## @end example +## @end ifnottex ## -## @item birth -## Vector with @math{N-1} elements, where @code{@var{birth}(i)} is the -## transition probability from state @math{i} to state @math{i+1}. -## -## @item death -## Vector with @math{N-1} elements, where @code{@var{death}(i)} is the -## transition probability from state @math{i+1} to state @math{i}. -## -## @end table -## -## @strong{OUTPUTS} -## -## @table @var -## -## @item P -## Transition probability matrix for the birth-death process. -## -## @end table -## ## @end deftypefn ## Author: Moreno Marzolla <marzolla(at)cs.unibo.it> ## Web: http://www.moreno.marzolla.name/ -function P = dtmc_bd( birth, death ) +function P = dtmc_bd( b, d ) if ( nargin != 2 ) print_usage(); endif - ( isvector( birth ) && isvector( death ) ) || \ + ( isvector( b ) && isvector( d ) ) || \ usage( "birth and death must be vectors" ); - birth = birth(:); # make birth a column vector - death = death(:); # make death a column vector - size_equal( birth, death ) || \ + b = b(:); # make b a column vector + d = d(:); # make d a column vector + size_equal( b, d ) || \ usage( "birth and death vectors must have the same length" ); - all( birth >= 0 ) || \ + all( b >= 0 ) || \ usage( "birth probabilities must be >= 0" ); - all( death >= 0 ) || \ + all( d >= 0 ) || \ usage( "death probabilities must be >= 0" ); - all( ([birth; 0] + [0; death]) <= 1 ) || \ - usage( "Inconsistent birth/death probabilities"); - ## builds the infinitesimal generator matrix - P = diag( birth, 1 ) + diag( death, -1 ); + all( ([b; 0] + [0; d]) <= 1 ) || \ + usage( "d(i)+b(i+1) must be <= 1"); + + P = diag( b, 1 ) + diag( d, -1 ); P += diag( 1-sum(P,2) ); endfunction %!test %! birth = [.5 .5 .3]; %! death = [.6 .2 .3]; -%! fail("dtmc_bd(birth,death)","Inconsistent"); +%! fail("dtmc_bd(birth,death)","must be"); %!demo %! birth = [ .2 .3 .4 ]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-03-19 09:34:41
|
Revision: 9967 http://octave.svn.sourceforge.net/octave/?rev=9967&view=rev Author: jpicarbajal Date: 2012-03-19 09:34:32 +0000 (Mon, 19 Mar 2012) Log Message: ----------- geometry: further clenaing of PKG* Modified Paths: -------------- trunk/octave-forge/main/geometry/PKG_ADD Modified: trunk/octave-forge/main/geometry/PKG_ADD =================================================================== --- trunk/octave-forge/main/geometry/PKG_ADD 2012-03-19 09:33:33 UTC (rev 9966) +++ trunk/octave-forge/main/geometry/PKG_ADD 2012-03-19 09:34:32 UTC (rev 9967) @@ -12,7 +12,7 @@ arch = cstrcat (octave_config_info ("canonical_host_type"), "-", octave_config_info ("api_version")); if strcmp (arch , pp{end}) - dirname = [strcat(filesep(),{pp{1:end-1}}){:}] + dirname = [strcat(filesep(),{pp{1:end-1}}){:}]; pkg_folder = strsplit (pkg_folder,filesep (), true); pkg_folder = [strcat(filesep(),{pkg_folder{1:end-1}}){:}]; end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-03-19 09:33:44
|
Revision: 9966 http://octave.svn.sourceforge.net/octave/?rev=9966&view=rev Author: jpicarbajal Date: 2012-03-19 09:33:33 +0000 (Mon, 19 Mar 2012) Log Message: ----------- geometry: further cleaning PKG* Modified Paths: -------------- trunk/octave-forge/main/geometry/PKG_ADD trunk/octave-forge/main/geometry/PKG_DEL Modified: trunk/octave-forge/main/geometry/PKG_ADD =================================================================== --- trunk/octave-forge/main/geometry/PKG_ADD 2012-03-19 09:30:27 UTC (rev 9965) +++ trunk/octave-forge/main/geometry/PKG_ADD 2012-03-19 09:33:33 UTC (rev 9966) @@ -1,6 +1,6 @@ %1 dirlist = {"geom2d","io","polygons2d","shape2d","octclip", "graphs"}; -dirname = fileparts (canonicalize_file_name (mfilename ("fullpath"))) +dirname = fileparts (canonicalize_file_name (mfilename ("fullpath"))); pp = strsplit (dirname,filesep (), true); %% Check if prefix was used @@ -13,7 +13,6 @@ "-", octave_config_info ("api_version")); if strcmp (arch , pp{end}) dirname = [strcat(filesep(),{pp{1:end-1}}){:}] -% dirname = [pkg("prefix") filesep() pp{end-1}] pkg_folder = strsplit (pkg_folder,filesep (), true); pkg_folder = [strcat(filesep(),{pkg_folder{1:end-1}}){:}]; end Modified: trunk/octave-forge/main/geometry/PKG_DEL =================================================================== --- trunk/octave-forge/main/geometry/PKG_DEL 2012-03-19 09:30:27 UTC (rev 9965) +++ trunk/octave-forge/main/geometry/PKG_DEL 2012-03-19 09:33:33 UTC (rev 9966) @@ -13,7 +13,6 @@ "-", octave_config_info ("api_version")); pp = strsplit (dirname,filesep (), true); if strcmp(arch , pp{end}) - %dirname = [strcat(filesep(),{pp{1:end-1}}){:}] dirname = [pkg("prefix") filesep() pp{end-1}]; pkg_folder = strsplit (pkg_folder,filesep (), true); pkg_folder = [strcat(filesep(),{pkg_folder{1:end-1}}){:}]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-03-19 09:30:38
|
Revision: 9965 http://octave.svn.sourceforge.net/octave/?rev=9965&view=rev Author: jpicarbajal Date: 2012-03-19 09:30:27 +0000 (Mon, 19 Mar 2012) Log Message: ----------- geometry: removing keyboard from PKG* Modified Paths: -------------- trunk/octave-forge/main/geometry/PKG_ADD trunk/octave-forge/main/geometry/PKG_DEL Modified: trunk/octave-forge/main/geometry/PKG_ADD =================================================================== --- trunk/octave-forge/main/geometry/PKG_ADD 2012-03-19 02:48:56 UTC (rev 9964) +++ trunk/octave-forge/main/geometry/PKG_ADD 2012-03-19 09:30:27 UTC (rev 9965) @@ -1,6 +1,6 @@ %1 dirlist = {"geom2d","io","polygons2d","shape2d","octclip", "graphs"}; -dirname = fileparts (canonicalize_file_name (mfilename ("fullpath"))); +dirname = fileparts (canonicalize_file_name (mfilename ("fullpath"))) pp = strsplit (dirname,filesep (), true); %% Check if prefix was used @@ -12,7 +12,8 @@ arch = cstrcat (octave_config_info ("canonical_host_type"), "-", octave_config_info ("api_version")); if strcmp (arch , pp{end}) - dirname = [strcat(filesep(),{pp{1:end-1}}){:}]; + dirname = [strcat(filesep(),{pp{1:end-1}}){:}] +% dirname = [pkg("prefix") filesep() pp{end-1}] pkg_folder = strsplit (pkg_folder,filesep (), true); pkg_folder = [strcat(filesep(),{pkg_folder{1:end-1}}){:}]; end @@ -22,6 +23,7 @@ for ii=1:length (dirlist) addpath ( [ pkg_folder filesep() dirlist{ii}],"-end") endfor + else %% Testing warning("geometry:Devel","Adding path for testing."); Modified: trunk/octave-forge/main/geometry/PKG_DEL =================================================================== --- trunk/octave-forge/main/geometry/PKG_DEL 2012-03-19 02:48:56 UTC (rev 9964) +++ trunk/octave-forge/main/geometry/PKG_DEL 2012-03-19 09:30:27 UTC (rev 9965) @@ -13,7 +13,8 @@ "-", octave_config_info ("api_version")); pp = strsplit (dirname,filesep (), true); if strcmp(arch , pp{end}) - dirname = [strcat(filesep(),{pp{1:end-1}}){:}]; + %dirname = [strcat(filesep(),{pp{1:end-1}}){:}] + dirname = [pkg("prefix") filesep() pp{end-1}]; pkg_folder = strsplit (pkg_folder,filesep (), true); pkg_folder = [strcat(filesep(),{pkg_folder{1:end-1}}){:}]; end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-03-19 02:49:02
|
Revision: 9964 http://octave.svn.sourceforge.net/octave/?rev=9964&view=rev Author: carandraug Date: 2012-03-19 02:48:56 +0000 (Mon, 19 Mar 2012) Log Message: ----------- chk_spreadsheet_support: small syntax bugfix (missing comma) Modified Paths: -------------- trunk/octave-forge/main/io/inst/chk_spreadsheet_support.m Modified: trunk/octave-forge/main/io/inst/chk_spreadsheet_support.m =================================================================== --- trunk/octave-forge/main/io/inst/chk_spreadsheet_support.m 2012-03-19 02:20:48 UTC (rev 9963) +++ trunk/octave-forge/main/io/inst/chk_spreadsheet_support.m 2012-03-19 02:48:56 UTC (rev 9964) @@ -173,7 +173,7 @@ end %if if (dbug), fprintf ('Java support OK\n'); end %if catch - error ('No Java support found: %s.' lasterr); + error ('No Java support found: %s.', lasterr); end %try_catch if (dbug), fprintf ('\nChecking javaclasspath for .jar class libraries needed for spreadsheet I/O...:\n'); end %if This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-03-19 02:20:54
|
Revision: 9963 http://octave.svn.sourceforge.net/octave/?rev=9963&view=rev Author: carandraug Date: 2012-03-19 02:20:48 +0000 (Mon, 19 Mar 2012) Log Message: ----------- chk_spreadsheet_support: make error message more helpful on why java is failing Modified Paths: -------------- trunk/octave-forge/main/io/inst/chk_spreadsheet_support.m Modified: trunk/octave-forge/main/io/inst/chk_spreadsheet_support.m =================================================================== --- trunk/octave-forge/main/io/inst/chk_spreadsheet_support.m 2012-03-19 00:54:13 UTC (rev 9962) +++ trunk/octave-forge/main/io/inst/chk_spreadsheet_support.m 2012-03-19 02:20:48 UTC (rev 9963) @@ -173,7 +173,7 @@ end %if if (dbug), fprintf ('Java support OK\n'); end %if catch - error ('No Java support found.'); + error ('No Java support found: %s.' lasterr); end %try_catch if (dbug), fprintf ('\nChecking javaclasspath for .jar class libraries needed for spreadsheet I/O...:\n'); end %if This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sla...@us...> - 2012-03-19 00:54:19
|
Revision: 9962 http://octave.svn.sourceforge.net/octave/?rev=9962&view=rev Author: slackydeb Date: 2012-03-19 00:54:13 +0000 (Mon, 19 Mar 2012) Log Message: ----------- ga: reduce number of generations in a test of ga The high number of generations does not look strictly needed. Modified Paths: -------------- trunk/octave-forge/main/ga/inst/ga.m Modified: trunk/octave-forge/main/ga/inst/ga.m =================================================================== --- trunk/octave-forge/main/ga/inst/ga.m 2012-03-19 00:54:00 UTC (rev 9961) +++ trunk/octave-forge/main/ga/inst/ga.m 2012-03-19 00:54:13 UTC (rev 9962) @@ -159,7 +159,7 @@ # TODO: structure/add tests below -%!test x = ga (struct ("fitnessfcn", @rastriginsfcn, "nvars", 2, "options", gaoptimset ("FitnessLimit", 1e-7, "Generations", 1000))); +%!test x = ga (struct ("fitnessfcn", @rastriginsfcn, "nvars", 2, "options", gaoptimset ("FitnessLimit", 1e-7, "Generations", 200))); %!test x = ga (struct ("fitnessfcn", @(x) rastriginsfcn (x(1:2)) + ((x(3) ** 2) - (cos (2 * pi * x(3))) + 1) + (x(4) ** 2), "nvars", 4, "options", gaoptimset ("EliteCount", 5, "FitnessLimit", 1e-7, "PopInitRange", [-2; 2], "PopulationSize", 200))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sla...@us...> - 2012-03-19 00:54:06
|
Revision: 9961 http://octave.svn.sourceforge.net/octave/?rev=9961&view=rev Author: slackydeb Date: 2012-03-19 00:54:00 +0000 (Mon, 19 Mar 2012) Log Message: ----------- ga: polish unit tests of ga Modified Paths: -------------- trunk/octave-forge/main/ga/inst/ga.m Modified: trunk/octave-forge/main/ga/inst/ga.m =================================================================== --- trunk/octave-forge/main/ga/inst/ga.m 2012-03-19 00:41:01 UTC (rev 9960) +++ trunk/octave-forge/main/ga/inst/ga.m 2012-03-19 00:54:00 UTC (rev 9961) @@ -157,6 +157,7 @@ %! "options", gaoptimset ()); %! x = ga (problem); +# TODO: structure/add tests below %!test x = ga (struct ("fitnessfcn", @rastriginsfcn, "nvars", 2, "options", gaoptimset ("FitnessLimit", 1e-7, "Generations", 1000))); @@ -187,4 +188,4 @@ %!test ga (struct ("fitnessfcn", @rastriginsfcn, "nvars", 2, "options", gaoptimset ("Generations", 10, "Vectorized", "on"))); -%!xtest ga (struct ("fitnessfcn", @rastriginsfcn, "nvars", 2, "options", gaoptimset ("Generations", 10, "UseParallel", "always"))); +%!#xtest ga (struct ("fitnessfcn", @rastriginsfcn, "nvars", 2, "options", gaoptimset ("Generations", 10, "UseParallel", "always"))); TODO This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sla...@us...> - 2012-03-19 00:41:07
|
Revision: 9960 http://octave.svn.sourceforge.net/octave/?rev=9960&view=rev Author: slackydeb Date: 2012-03-19 00:41:01 +0000 (Mon, 19 Mar 2012) Log Message: ----------- ga: fix dummy demo Modified Paths: -------------- trunk/octave-forge/main/ga/inst/demo_ga.m Modified: trunk/octave-forge/main/ga/inst/demo_ga.m =================================================================== --- trunk/octave-forge/main/ga/inst/demo_ga.m 2012-03-19 00:34:25 UTC (rev 9959) +++ trunk/octave-forge/main/ga/inst/demo_ga.m 2012-03-19 00:41:01 UTC (rev 9960) @@ -21,9 +21,9 @@ ## Author: Luca Favatella <sla...@gm...> ## Created: March 2012 -## Version: 0.0.3 +## Version: 0.0.4 -demo ga_demo +demo demo_ga %!demo This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sla...@us...> - 2012-03-19 00:34:31
|
Revision: 9959 http://octave.svn.sourceforge.net/octave/?rev=9959&view=rev Author: slackydeb Date: 2012-03-19 00:34:25 +0000 (Mon, 19 Mar 2012) Log Message: ----------- ga: polish code Modified Paths: -------------- trunk/octave-forge/main/ga/inst/ga.m trunk/octave-forge/main/ga/inst/rastriginsfcn.m Modified: trunk/octave-forge/main/ga/inst/ga.m =================================================================== --- trunk/octave-forge/main/ga/inst/ga.m 2012-03-19 00:34:11 UTC (rev 9958) +++ trunk/octave-forge/main/ga/inst/ga.m 2012-03-19 00:34:25 UTC (rev 9959) @@ -115,7 +115,7 @@ endfunction -## number of arguments +## number of input arguments %!shared f, nvars %! f = @rastriginsfcn; %! nvars = 2; @@ -125,8 +125,10 @@ %!error x = ga (f, nvars, [], [], []) %!error x = ga (f, nvars, [], [], [], [], []) %!error x = ga (f, nvars, [], [], [], [], [], [], @(x) [[], []], gaoptimset (), []) -# TODO: test number of output arguments +## number of output arguments +# TODO + ## type of arguments # TODO # TODO: test that each field in the user-specified "problem" structure is checked Modified: trunk/octave-forge/main/ga/inst/rastriginsfcn.m =================================================================== --- trunk/octave-forge/main/ga/inst/rastriginsfcn.m 2012-03-19 00:34:11 UTC (rev 9958) +++ trunk/octave-forge/main/ga/inst/rastriginsfcn.m 2012-03-19 00:34:25 UTC (rev 9959) @@ -34,9 +34,11 @@ endfunction -## number of arguments +## number of input arguments %!error y = rastriginsfcn () %!error y = rastriginsfcn ([0, 0], "other argument") + +## number of output arguments %!error [y1, y2] = rastriginsfcn ([0, 0]) ## type of arguments This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sla...@us...> - 2012-03-19 00:34:17
|
Revision: 9958 http://octave.svn.sourceforge.net/octave/?rev=9958&view=rev Author: slackydeb Date: 2012-03-19 00:34:11 +0000 (Mon, 19 Mar 2012) Log Message: ----------- ga: polish gaoptimset Modified Paths: -------------- trunk/octave-forge/main/ga/inst/gaoptimset.m Modified: trunk/octave-forge/main/ga/inst/gaoptimset.m =================================================================== --- trunk/octave-forge/main/ga/inst/gaoptimset.m 2012-03-19 00:33:59 UTC (rev 9957) +++ trunk/octave-forge/main/ga/inst/gaoptimset.m 2012-03-19 00:34:11 UTC (rev 9958) @@ -21,7 +21,8 @@ ## @strong{Inputs} ## @table @var ## @item param -## Parameter to set. Unspecified parameters are set to their default values; specifying no parameters is allowed. +## Parameter to set. Unspecified parameters are set to their default +## values; specifying no parameters is allowed. ## @item value ## Value of @var{param}. ## @end table @@ -60,7 +61,7 @@ ## @end deftypefn ## Author: Luca Favatella <sla...@gm...> -## Version: 4.4.6 +## Version: 4.4.7 function options = gaoptimset (varargin) if ((nargout != 1) || @@ -86,21 +87,35 @@ endfunction -%!error gaoptimset ("Generations", 123) -%!error [a, b] = gaoptimset ("Generations", 123) - +## number of input arguments %!error options = gaoptimset ("odd number of arguments") %!error options = gaoptimset ("Generations", 123, "odd number of arguments") +## number of output arguments +%!error gaoptimset ("Generations", 123) +%!error [a, b] = gaoptimset ("Generations", 123) +## type of arguments +# TODO %!#error options = gaoptimset ("Vectorized", "bad value") # TODO: fix %!#error options = gaoptimset ("UseParallel", "bad value") # TODO: fix +# TODO: structure/add tests below %!assert (getfield (gaoptimset ("Generations", 123), "Generations"), 123) %!test -%! options = gaoptimset ("EliteCount", 1, "FitnessLimit", 1e-7, "Generations", 1000, "PopInitRange", [-5; 5], "PopulationSize", 200); +%! options = gaoptimset ("EliteCount", 1, +%! "FitnessLimit", 1e-7, +%! "Generations", 1000, +%! "PopInitRange", [-5; 5], +%! "PopulationSize", 200); %! %! ## "CrossoverFraction" is not specified, so gaoptimset should put the default value: testing this too -%! assert ([(getfield (options, "CrossoverFraction")); (getfield (options, "EliteCount")); (getfield (options, "FitnessLimit")); (getfield (options, "Generations")); (getfield (options, "PopInitRange")); (getfield (options, "PopulationSize"))], [0.8; 1; 1e-7; 1000; [-5; 5]; 200]) \ No newline at end of file +%! assert ([(getfield (options, "CrossoverFraction")); +%! (getfield (options, "EliteCount")); +%! (getfield (options, "FitnessLimit")); +%! (getfield (options, "Generations")); +%! (getfield (options, "PopInitRange")); +%! (getfield (options, "PopulationSize"))], +%! [0.8; 1; 1e-7; 1000; [-5; 5]; 200]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sla...@us...> - 2012-03-19 00:34:05
|
Revision: 9957 http://octave.svn.sourceforge.net/octave/?rev=9957&view=rev Author: slackydeb Date: 2012-03-19 00:33:59 +0000 (Mon, 19 Mar 2012) Log Message: ----------- ga: add unit test for ga Modified Paths: -------------- trunk/octave-forge/main/ga/inst/ga.m Modified: trunk/octave-forge/main/ga/inst/ga.m =================================================================== --- trunk/octave-forge/main/ga/inst/ga.m 2012-03-19 00:33:47 UTC (rev 9956) +++ trunk/octave-forge/main/ga/inst/ga.m 2012-03-19 00:33:59 UTC (rev 9957) @@ -129,6 +129,7 @@ ## type of arguments # TODO +# TODO: test that each field in the user-specified "problem" structure is checked ## flawless execution with right arguments %!shared f, nvars @@ -148,7 +149,11 @@ %!test x = ga (f, nvars, [], [], [], [], [], [], @(x) [[], []]); %!test x = ga (f, nvars, [], [], [], [], [], [], @nonlcon); %!test x = ga (f, nvars, [], [], [], [], [], [], @(x) [[], []], gaoptimset ()); -# TODO: %!test x = ga (problem); +%!test # TODO: convert to error after implementing private ga-specific createOptimProblem. All fields in the user-specified structure should be checked +%! problem = struct ("fitnessfcn", @rastriginsfcn, +%! "nvars", 2, +%! "options", gaoptimset ()); +%! x = ga (problem); %!test x = ga (struct ("fitnessfcn", @rastriginsfcn, "nvars", 2, "options", gaoptimset ("FitnessLimit", 1e-7, "Generations", 1000))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sla...@us...> - 2012-03-19 00:33:53
|
Revision: 9956 http://octave.svn.sourceforge.net/octave/?rev=9956&view=rev Author: slackydeb Date: 2012-03-19 00:33:47 +0000 (Mon, 19 Mar 2012) Log Message: ----------- ga: add comments to ga unit tests Modified Paths: -------------- trunk/octave-forge/main/ga/inst/ga.m Modified: trunk/octave-forge/main/ga/inst/ga.m =================================================================== --- trunk/octave-forge/main/ga/inst/ga.m 2012-03-19 00:33:34 UTC (rev 9955) +++ trunk/octave-forge/main/ga/inst/ga.m 2012-03-19 00:33:47 UTC (rev 9956) @@ -130,6 +130,7 @@ ## type of arguments # TODO +## flawless execution with right arguments %!shared f, nvars %! f = @rastriginsfcn; %! nvars = 2; @@ -147,6 +148,7 @@ %!test x = ga (f, nvars, [], [], [], [], [], [], @(x) [[], []]); %!test x = ga (f, nvars, [], [], [], [], [], [], @nonlcon); %!test x = ga (f, nvars, [], [], [], [], [], [], @(x) [[], []], gaoptimset ()); +# TODO: %!test x = ga (problem); %!test x = ga (struct ("fitnessfcn", @rastriginsfcn, "nvars", 2, "options", gaoptimset ("FitnessLimit", 1e-7, "Generations", 1000))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sla...@us...> - 2012-03-19 00:33:41
|
Revision: 9955 http://octave.svn.sourceforge.net/octave/?rev=9955&view=rev Author: slackydeb Date: 2012-03-19 00:33:34 +0000 (Mon, 19 Mar 2012) Log Message: ----------- ga: add TODO comment Modified Paths: -------------- trunk/octave-forge/main/ga/inst/ga.m Modified: trunk/octave-forge/main/ga/inst/ga.m =================================================================== --- trunk/octave-forge/main/ga/inst/ga.m 2012-03-18 22:53:36 UTC (rev 9954) +++ trunk/octave-forge/main/ga/inst/ga.m 2012-03-19 00:33:34 UTC (rev 9955) @@ -125,6 +125,7 @@ %!error x = ga (f, nvars, [], [], []) %!error x = ga (f, nvars, [], [], [], [], []) %!error x = ga (f, nvars, [], [], [], [], [], [], @(x) [[], []], gaoptimset (), []) +# TODO: test number of output arguments ## type of arguments # TODO This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cd...@us...> - 2012-03-18 22:53:42
|
Revision: 9954 http://octave.svn.sourceforge.net/octave/?rev=9954&view=rev Author: cdf Date: 2012-03-18 22:53:36 +0000 (Sun, 18 Mar 2012) Log Message: ----------- reduce randomness of test Modified Paths: -------------- trunk/octave-forge/extra/nurbs/inst/nrbbasisfun.m Modified: trunk/octave-forge/extra/nurbs/inst/nrbbasisfun.m =================================================================== --- trunk/octave-forge/extra/nurbs/inst/nrbbasisfun.m 2012-03-18 22:27:44 UTC (rev 9953) +++ trunk/octave-forge/extra/nurbs/inst/nrbbasisfun.m 2012-03-18 22:53:36 UTC (rev 9954) @@ -125,6 +125,8 @@ %! aux1 = linspace(0,1,m); aux2 = linspace(0,1,n); %! nrb = nrbkntins (nrb, {aux1(2:end-1), aux2(2:end-1)}); %! u = rand (1, 30); v = rand (1, 10); +%! u = u - min (u); u = u / max (u); +%! v = v - min (v); v = v / max (v); %! [B, N] = nrbbasisfun ({u, v}, nrb); %! assert (sum(B, 2), ones(300, 1), 1e-6) %! assert (all (all (B<=1)), true) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sla...@us...> - 2012-03-18 22:27:50
|
Revision: 9953 http://octave.svn.sourceforge.net/octave/?rev=9953&view=rev Author: slackydeb Date: 2012-03-18 22:27:44 +0000 (Sun, 18 Mar 2012) Log Message: ----------- ga: enable unit test for ga Define test function without using "endfunction" in order to support Octave 3.4. Modified Paths: -------------- trunk/octave-forge/main/ga/inst/ga.m Modified: trunk/octave-forge/main/ga/inst/ga.m =================================================================== --- trunk/octave-forge/main/ga/inst/ga.m 2012-03-18 22:20:41 UTC (rev 9952) +++ trunk/octave-forge/main/ga/inst/ga.m 2012-03-18 22:27:44 UTC (rev 9953) @@ -132,10 +132,9 @@ %!shared f, nvars %! f = @rastriginsfcn; %! nvars = 2; -#%!function [C, Ceq] = nonlcon (x) -#%! C = []; -#%! Ceq = []; -#%!endfunction +%!function [C, Ceq] = nonlcon (x) +%! C = []; +%! Ceq = []; %!test x = ga (f, nvars); %!test x = ga (f, nvars, [], []); %!test x = ga (f, nvars, ones (3, nvars), ones (3, 1)); @@ -145,7 +144,7 @@ %!test x = ga (f, nvars, [], [], [], [], - Inf (1, nvars), Inf (1, nvars)); %!test x = ga (f, nvars, [], [], [], [], - ones (1, nvars), ones (1, nvars)); %!test x = ga (f, nvars, [], [], [], [], [], [], @(x) [[], []]); -#%!test x = ga (f, nvars, [], [], [], [], [], [], @nonlcon); +%!test x = ga (f, nvars, [], [], [], [], [], [], @nonlcon); %!test x = ga (f, nvars, [], [], [], [], [], [], @(x) [[], []], gaoptimset ()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <prn...@us...> - 2012-03-18 22:20:48
|
Revision: 9952 http://octave.svn.sourceforge.net/octave/?rev=9952&view=rev Author: prnienhuis Date: 2012-03-18 22:20:41 +0000 (Sun, 18 Mar 2012) Log Message: ----------- Minor help text changes (get_first_help_sentence compatibility) Modified Paths: -------------- trunk/octave-forge/main/io/inst/object2json.m Modified: trunk/octave-forge/main/io/inst/object2json.m =================================================================== --- trunk/octave-forge/main/io/inst/object2json.m 2012-03-18 21:03:48 UTC (rev 9951) +++ trunk/octave-forge/main/io/inst/object2json.m 2012-03-18 22:20:41 UTC (rev 9952) @@ -22,7 +22,6 @@ function json = object2json (object) - % function json = object2json (object) % Returns a valid json string that will describe object; the string will % be in a compact form (no spaces or line breaks). % This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-03-18 21:03:57
|
Revision: 9951 http://octave.svn.sourceforge.net/octave/?rev=9951&view=rev Author: mmarzolla Date: 2012-03-18 21:03:48 +0000 (Sun, 18 Mar 2012) Log Message: ----------- improvements to the documentation Modified Paths: -------------- trunk/octave-forge/main/queueing/doc/gettingstarted.txi trunk/octave-forge/main/queueing/doc/markovchains.txi trunk/octave-forge/main/queueing/doc/queueingnetworks.txi trunk/octave-forge/main/queueing/doc/references.txi trunk/octave-forge/main/queueing/inst/dtmc_taexps.m trunk/octave-forge/main/queueing/inst/qnmarkov.m Modified: trunk/octave-forge/main/queueing/doc/gettingstarted.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/gettingstarted.txi 2012-03-18 18:24:04 UTC (rev 9950) +++ trunk/octave-forge/main/queueing/doc/gettingstarted.txi 2012-03-18 21:03:48 UTC (rev 9951) @@ -51,7 +51,7 @@ routing of jobs within the network is described with a @emph{routing probability matrix} @math{P}. Specifically, a request completing service at center @math{i} is enqueued at center @math{j} with -probability @math{P_{ij}}. Let us assume the following routing +probability @math{P_{i, j}}. Let us assume the following routing probability matrix: @iftex @@ -106,7 +106,7 @@ @iftex @tex $$ -V_j = \sum_{i=1}^K V_i P_{ij} +V_j = \sum_{i=1}^K V_i P_{i, j} $$ @end tex @end iftex @@ -117,7 +117,7 @@ @end ifnottex We can compute @math{V_k} from the routing probability matrix -@math{P_{ij}} using the @command{qnvisits} function: +@math{P_{i, j}} using the @command{qnvisits} function: @example @group @@ -250,7 +250,7 @@ @iftex @tex $$ -V_j = P_{0j} + \sum_{i=1}^K V_i P_{ij} +V_j = P_{0, j} + \sum_{i=1}^K V_i P_{i, j} $$ @end tex @end iftex @@ -260,12 +260,12 @@ @end example @end ifnottex -where @math{P_{0j}} is the probability of an external arrival to +where @math{P_{0, j}} is the probability of an external arrival to center @math{j}. This can be computed as: @tex $$ -P_{0j} = {\lambda_j \over \sum_{i=1}^K \lambda_i } +P_{0, j} = {\lambda_j \over \sum_{i=1}^K \lambda_i } $$ @end tex Modified: trunk/octave-forge/main/queueing/doc/markovchains.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-03-18 18:24:04 UTC (rev 9950) +++ trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-03-18 21:03:48 UTC (rev 9951) @@ -39,7 +39,7 @@ @iftex @tex -$$P(X_{n+1} = x_{n+1}\ |\ X_n = x_n, X_{n-1} = x_{n-1}, \ldots, X_0 = x_0) = P(X_{n+1} = x_{n+1}\ |\ X_n = x_n)$$ +$$P\left(X_{n+1} = x_{n+1}\ |\ X_n = x_n, X_{n-1} = x_{n-1}, \ldots, X_0 = x_0 \right) = P\left(X_{n+1} = x_{n+1}\ |\ X_n = x_n\right)$$ @end tex @end iftex @ifnottex @@ -56,7 +56,7 @@ X_n = i )}. If the Markov chain is homogeneous (that is, the transition probability matrix @math{{\bf P}(n)} is time-independent), we can simply write @math{{\bf P} = P_{i, j}}, where @math{P_{i, j} = -P( X_{n+1} = j\ |\ X_n = i )} for all @math{n=0, 1, 2, @dots{}}. +P( X_{n+1} = j\ |\ X_n = i )} for all @math{n=0, 1, @dots{}}. The transition probability matrix @math{\bf P} must satisfy the following two properties: (1) @math{P_{i, j} @geq{} 0} for all @@ -80,14 +80,14 @@ @node State occupancy probabilities (DTMC) @subsection State occupancy probabilities -We denote with @math{{\bf \pi}(n) = (\pi_1(n), \pi_2(n), @dots{}, -\pi_N(n) )} the @emph{state occupancy probability vector} at step +We denote with @math{{\bf \pi}(n) = \left(\pi_1(n), \pi_2(n), @dots{}, +\pi_N(n) \right)} the @emph{state occupancy probability vector} at step @math{n}. @math{\pi_i(n)} denotes the probability that the system is in state @math{i} at step @math{n}. Given the transition probability matrix @math{\bf P} and the initial -state occupancy probability vector @math{{\bf \pi}(0) = (\pi_1(0), -\pi_2(0), @dots{}, \pi_N(0))} at step 0, the state occupancy +state occupancy probability vector @math{{\bf \pi}(0) = \left(\pi_1(0), +\pi_2(0), @dots{}, \pi_N(0)\right)} at step 0, the state occupancy probability vector @math{{\bf \pi}(n)} at step @math{n} can be computed as: @@ -136,7 +136,7 @@ matrix @math{\bf P} and an integer @math{n @geq{} 0}, we let @math{L_i(n)} be the the expected number of visits to state @math{i} during the first @math{n} transitions. The vector @math{{\bf L}(n) = -(L_1(n), L_2(n), @dots{}, L_N(n))} is defined as: +( L_1(n), L_2(n), @dots{}, L_N(n) )} is defined as: @iftex @tex @@ -239,7 +239,7 @@ A stochastic process @math{@{X(t), t @geq{} 0@}} is a continuous-time Markov chain if, for all integers @math{n}, and for any sequence -@math{t_0, t_1 , \ldots , t_n, t_{n+1}} such that @math{t_0 < t_1 < +@math{t_0, t_1 , \ldots, t_n, t_{n+1}} such that @math{t_0 < t_1 < \ldots < t_n < t_{n+1}}, we have @iftex @@ -333,7 +333,7 @@ Given a @math{N} state continuous-time Markov Chain with infinitesimal generator matrix @math{\bf Q}, we define the vector @math{{\bf L}(t) = -(L_1(t), L_2(t), \ldots L_N(t))} such that @math{L_i(t)} is the +(L_1(t), L_2(t), \ldots, L_N(t))} such that @math{L_i(t)} is the expected sojourn time in state @math{i} during the interval @math{[0,t)}, assuming that the initial occupancy probability at time 0 was @math{{\bf \pi}(0)}. @math{{\bf L}(t)} can be expressed as the Modified: trunk/octave-forge/main/queueing/doc/queueingnetworks.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/queueingnetworks.txi 2012-03-18 18:24:04 UTC (rev 9950) +++ trunk/octave-forge/main/queueing/doc/queueingnetworks.txi 2012-03-18 21:03:48 UTC (rev 9951) @@ -110,12 +110,13 @@ service, and the instant at which service finishes and the request moves to another queue (or exits the system). -@item P_{ij} -Routing probability matrix. @math{{\bf P} = P_{ij}} is a @math{K \times -K} matrix such that @math{P_{ij}} is the probability that a request -completing service at server @math{i} will move directly to server -@math{j}, The probability that a request leaves the system after service -at service center @math{i} is @math{1-\sum_{j=1}^K P_{ij}}. +@item P_{i, j} +Routing probability matrix. @math{{\bf P} = P_{i, j}} is a @math{K +\times K} matrix such that @math{P_{i, j}} is the probability that a +request completing service at server @math{i} will move directly to +server @math{j}, The probability that a request leaves the system +after service at service center @math{i} is @math{1-\sum_{j=1}^K P_{i, +j}}. @item V_i Average number of visits. @math{V_i} is the average number of visits to @@ -172,30 +173,48 @@ @iftex @tex -$V_j = P_{0 j} + \sum_{i=1}^K V_i P_{i j}$ +$$ V_j = P_{0, j} + \sum_{i=1}^K V_i P_{i, j} $$ @end tex @end iftex @ifnottex @example -V == P0 + V*P; +@group + K + ___ + \ +V_j = P_(0, j) + > V_i P_(i, j) + /___ + i=1 +@end group @end example @end ifnottex -@noindent where @math{P_{0 j}} is the probability that an external +@noindent where @math{P_{0, j}} is the probability that an external arrival goes to service center @math{j}. If @math{\lambda_j} is the external arrival rate to service center @math{j}, and @math{\lambda = \sum_j \lambda_j} is the overall external arrival rate, then -@math{P_{0 j} = \lambda_j / \lambda}. +@math{P_{0, j} = \lambda_j / \lambda}. For closed models, the visit ratios satisfy the following equation: @iftex @tex -$V_j = \sum_{i=1}^K V_i P_{i j}$ +$$\eqalign{V_1 & = 1 \cr + V_j & = \sum_{i=1}^K V_i P_{i, j}} $$ @end tex @end iftex @ifnottex @example + +V_1 = 1 + + K + ___ + \ +V_j = > V_i P_(i, j) + /___ + i=1 + V(1) == 1 && V == V*P; @end example @end ifnottex @@ -204,46 +223,46 @@ In multiple class QN models, we assume that there exist @math{C} different classes of requests. Each request from class @math{c} spends -on average time @math{S_{ck}} in service at service center @math{k}. For -open models, we denote with @math{{\bf \lambda} = \lambda_{ck}} the -arrival rates, where @math{\lambda_{ck}} is the external arrival rate of -class @math{c} customers at service center @math{k}. For closed models, -we denote with @math{{\bf N} = (N_1, N_2, \ldots N_C)} the population -vector, where @math{N_c} is the number of class @math{c} requests in the -system. +on average time @math{S_{c, k}} in service at service center +@math{k}. For open models, we denote with @math{{\bf \lambda} = +\lambda_{ck}} the arrival rates, where @math{\lambda_{c, k}} is the +external arrival rate of class @math{c} customers at service center +@math{k}. For closed models, we denote with @math{{\bf N} = (N_1, N_2, +\ldots, N_C)} the population vector, where @math{N_c} is the number of +class @math{c} requests in the system. The transition probability matrix for these kind of networks will be a -@math{C \times K \times C \times K} matrix @math{{\bf P} = -P_{risj}} such that @math{P_{risj}} is the probability that a -class @math{r} request which completes service at center @math{i} will -join server @math{j} as a class @math{s} request. +@math{C \times K \times C \times K} matrix @math{{\bf P} = P_{r, i, s, j}} +such that @math{P_{r, i, s, j}} is the probability that a class +@math{r} request which completes service at center @math{i} will join +server @math{j} as a class @math{s} request. -Model input and outputs can be adjusted by adding additional -indexes for the customer classes. +Model input and outputs can be adjusted by adding additional indexes +for the customer classes. @noindent @strong{Model Inputs} @table @math -@item \lambda_{ci} +@item \lambda_{c, i} External arrival rate of class-@math{c} requests to service center @math{i} @item \lambda -Overall external arrival rate to the whole system: @math{\lambda = \sum_c \sum_i \lambda_{ci}} +Overall external arrival rate to the whole system: @math{\lambda = \sum_c \sum_i \lambda_{c, i}} -@item S_{ci} -Average service time. @math{S_{ci}} is the average service time on service -center @math{i} for class @math{c} requests. +@item S_{c, i} +Average service time. @math{S_{c, i}} is the average service time on +service center @math{i} for class @math{c} requests. -@item P_{risj} -Routing probability matrix. @math{{\bf P} = P_{risj}} is a @math{C -\times K \times C \times K} matrix such that @math{P_{risj}} is the -probability that a class @math{r} request which completes service at -server @math{i} will move to server @math{j} as a class @math{s} +@item P_{r, i, s, j} +Routing probability matrix. @math{{\bf P} = P_{r, i, s, j}} is a @math{C +\times K \times C \times K} matrix such that @math{P_{r, i, s, j}} is +the probability that a class @math{r} request which completes service +at server @math{i} will move to server @math{j} as a class @math{s} request. -@item V_{ci} -Average number of visits. @math{V_{ci}} is the average number of visits +@item V_{c, i} +Average number of visits. @math{V_{c, i}} is the average number of visits of class @math{c} requests to the service center @math{i}. @end table @@ -252,23 +271,23 @@ @table @math -@item U_{ci} +@item U_{c, i} Utilization of service center @math{i} by class @math{c} requests. The utilization is defined as the fraction of time in which the resource is busy (i.e., the server is processing requests). -@item R_{ci} +@item R_{c, i} Average response time experienced by class @math{c} requests on service center @math{i}. The average response time is defined as the average time between the arrival of a customer in the queue, and the completion of service. -@item Q_{ci} +@item Q_{c, i} Average number of class @math{c} requests on service center @math{i}. This includes both the requests in the queue, and the request being served. -@item X_{ci} +@item X_{c, i} Throughput of service center @math{i} for class @math{c} requests. The throughput is defined as the rate of completion of class @math{c} requests. @@ -283,7 +302,7 @@ Utilization of service center @math{i}: @iftex @tex -$U_i = \sum_{c=1}^C U_{ci}$ +$U_i = \sum_{c=1}^C U_{c, i}$ @end tex @end iftex @ifnottex @@ -294,7 +313,7 @@ System response time for class @math{c} requests: @iftex @tex -$R_c = \sum_{i=1}^K R_{ci} V_{ci}$ +$R_c = \sum_{i=1}^K R_{c, i} V_{c, i}$ @end tex @end iftex @ifnottex @@ -305,7 +324,7 @@ Average number of class @math{c} requests in the system: @iftex @tex -$Q_c = \sum_{i=1}^K Q_{ci}$ +$Q_c = \sum_{i=1}^K Q_{c, i}$ @end tex @end iftex @ifnottex @@ -316,7 +335,7 @@ Class @math{c} throughput: @iftex @tex -$X_c = X_{c1} / V_{c1}$ +$X_c = X_{c, 1} / V_{c, 1}$ @end tex @end iftex @ifnottex @@ -325,12 +344,13 @@ @end table -We can define the visit ratios @math{V_{sj}} for class @math{s} +We can define the visit ratios @math{V_{s, j}} for class @math{s} customers at service center @math{j} as follows: @iftex @tex -$V_{sj} = \sum_{r=1}^C \sum_{i=1}^K V_{ri} P_{risj},\ V_{s1} = 1$ +$$ \eqalign{ V_{s, j} & = \sum_{r=1}^C \sum_{i=1}^K V_{r, i} P_{r, i, s, j} \cr + V_{s, 1} & = 1} $$ @end tex @end iftex @ifnottex @@ -343,7 +363,7 @@ @iftex @tex -$V_{sj} = P_{0sj} + \sum_{r=1}^C \sum_{i=1}^K V_{ri} P_{risj}$ +$$V_{s, j} = P_{0, s, j} + \sum_{r=1}^C \sum_{i=1}^K V_{r, i} P_{r, i, s, j}$$ @end tex @end iftex @ifnottex @@ -352,12 +372,12 @@ @end group @end ifnottex -@noindent where @math{P_{0sj}} is the probability that an external +@noindent where @math{P_{0, s, j}} is the probability that an external arrival goes to service center @math{j} as a class-@math{s} request. -If @math{\lambda_{sj}} is the external arrival rate of class @math{s} -requests to service center @math{j}, and @math{\lambda = \sum_s \sum_j -\lambda_{sj}} is the overall external arrival rate to the whole system, -then @math{P_{0sj} = \lambda_{sj} / \lambda}. +If @math{\lambda_{s, j}} is the external arrival rate of class +@math{s} requests to service center @math{j}, and @math{\lambda = +\sum_s \sum_j \lambda_{s, j}} is the overall external arrival rate to +the whole system, then @math{P_{0, s, j} = \lambda_{s, j} / \lambda}. @c @c @@ -405,11 +425,11 @@ requests in 0.2. Note that service times are class-independent; @item Node 2 is a @math{-/G/1}--PS node, with service times -@math{S_{12} = 0.4} for class 1, and @math{S_{22} = 0.6} for class 2 +@math{S_{1, 2} = 0.4} for class 1, and @math{S_{2, 2} = 0.6} for class 2 requests; @item Node 3 is a @math{-/G/\infty} node (delay center), with service -times @math{S_{13}=1} and @math{S_{23}=2} for class 1 and 2 +times @math{S_{1, 3}=1} and @math{S_{2, 3}=2} for class 1 and 2 respectively. @end itemize @@ -491,14 +511,14 @@ @end itemize We define the @emph{joint probability vector} @math{\pi(k_1, k_2, -\ldots k_N)} as the steady-state probability that there are @math{k_i} -requests at service center @math{i}, for all @math{i=1,2, \ldots N}. +\ldots, k_N)} as the steady-state probability that there are @math{k_i} +requests at service center @math{i}, for all @math{i=1, 2, \ldots, N}. Jackson networks have the property that the joint probability is the product of the marginal probabilities @math{\pi_i}: @iftex @tex -$$ \pi(k_1, k_2, \ldots k_N) = \prod_{i=1}^N \pi_i(k_i) $$ +$$ \pi(k_1, k_2, \ldots, k_N) = \prod_{i=1}^N \pi_i(k_i) $$ @end tex @end iftex @ifnottex @@ -532,7 +552,7 @@ @iftex @tex -$$ \pi(k_1, k_2, \ldots k_K) = {1 \over G(N)} \prod_{i=1}^N F_i(k_i) $$ +$$ \pi(k_1, k_2, \ldots, k_K) = {1 \over G(N)} \prod_{i=1}^N F_i(k_i) $$ @end tex @end iftex @ifnottex @@ -544,14 +564,14 @@ @end example @end ifnottex -Here @math{\pi(k_1, k_2, \ldots k_K)} is the joint probability of -having @math{k_i} requests at node @math{i}, for all @math{i=1,2, -\ldots K}. +Here @math{\pi(k_1, k_2, \ldots, k_K)} is the joint probability of +having @math{k_i} requests at node @math{i}, for all @math{i=1, 2, +\ldots, K}. The @emph{convolution algorithms} computes the normalization constants -@math{G = (G(0), G(1), \ldots G(N))} for single-class, closed networks +@math{{\bf G} = \left(G(0), G(1), \ldots, G(N)\right)} for single-class, closed networks with @math{N} requests. The normalization constants are returned as -vector @code{@var{G}=[@var{G}(1), @var{G}(2), ... @var{G}(N+1)]} where +vector @code{@var{G}=[@var{G}(1), @var{G}(2), @dots{} @var{G}(N+1)]} where @code{@var{G}(i+1)} is the value of @math{G(i)} (remember that Octave uses 1-base vectors). The normalization constant can be used to compute all performance measures of interest (utilization, average @@ -574,14 +594,14 @@ The normalization constant @math{G} can be used to compute the steady-state probabilities for a closed single class product-form Queueing Network with @math{K} nodes. Let @code{@var{k}=[@math{k_1, -k_2, @dots{} k_K}]} be a valid population vector. Then, the +k_2, @dots{}, k_K}]} be a valid population vector. Then, the steady-state probability @code{@var{p}(i)} to have @code{@var{k}(i)} requests at service center @math{i} can be computed as: @iftex @tex $$ -p_i(k_i) = {(V_i S_i)^{k_i} \over G(K)} \left(G(K-k_i) - V_i S_i G(K-k_i-1)\right), \quad i=1,2, \ldots K +p_i(k_i) = {(V_i S_i)^{k_i} \over G(K)} \left(G(K-k_i) - V_i S_i G(K-k_i-1)\right), \quad i=1, 2, \ldots, K $$ @end tex @end iftex @@ -841,7 +861,7 @@ @noindent @strong{NOTE} Given a network with @math{K} service centers, @math{C} job classes and -population vector @math{{\bf N}=(N_1, N_2, \ldots N_C)}, the MVA +population vector @math{{\bf N}=(N_1, N_2, \ldots, N_C)}, the MVA algorithm requires space @math{O(C \prod_i (N_i + 1))}. The time complexity is @math{O(CK\prod_i (N_i + 1))}. This implementation is slightly more space-efficient (see details in the code). While the space @@ -1085,7 +1105,7 @@ @iftex @tex -$V_j = P_{0 j} + \sum_{i=1}^K V_i P_{i j}$ +$$V_j = P_{0, j} + \sum_{i=1}^K V_i P_{i, j}$$ @end tex @end iftex @ifnottex @@ -1094,17 +1114,18 @@ @end example @end ifnottex -@noindent where @math{P_{0 j}} is the probability that an external +@noindent where @math{P_{0, j}} is the probability that an external arrival goes to service center @math{j}. If @math{\lambda_j} is the external arrival rate to service center @math{j}, and @math{\lambda = \sum_j \lambda_j} is the overall external arrival rate, then -@math{P_{0 j} = \lambda_j / \lambda}. +@math{P_{0, j} = \lambda_j / \lambda}. For closed networks, the visit ratios satisfy the following equation: @iftex @tex -$V_j = \sum_{i=1}^K V_i P_{i j},\ V_1 = 1$ +$$\eqalign{ V_j & = \sum_{i=1}^K V_i P_{i, j} \cr + V_1 & = 1 }$$ @end tex @end iftex @ifnottex @@ -1114,12 +1135,13 @@ @end ifnottex The definitions above can be extended to multiple class networks as -follows. We define the visit ratios @math{V_{sj}} for class @math{s} +follows. We define the visit ratios @math{V_{s, j}} for class @math{s} customers at service center @math{j} as follows: @iftex @tex -$V_{sj} = \sum_{r=1}^C \sum_{i=1}^K V_{ri} P_{risj},\ V_{s1} = 1$ +$$\eqalign{ V_{s, j} & = \sum_{r=1}^C \sum_{i=1}^K V_{r, i} P_{r, i, s, j} \cr + V_{s, 1} & = 1 }$$ @end tex @end iftex @ifnottex @@ -1133,7 +1155,7 @@ @iftex @tex -$V_{sj} = P_{0sj} + \sum_{r=1}^C \sum_{i=1}^K V_{ri} P_{risj}$ +$$V_{s, j} = P_{0, s, j} + \sum_{r=1}^C \sum_{i=1}^K V_{r, i} P_{r, i, s, j}$$ @end tex @end iftex @ifnottex @@ -1142,12 +1164,12 @@ @end group @end ifnottex -@noindent where @math{P_{0sj}} is the probability that an external +@noindent where @math{P_{0, s, j}} is the probability that an external arrival goes to service center @math{j} as a class-@math{s} request. -If @math{\lambda_{sj}} is the external arrival rate of class @math{s} +If @math{\lambda_{s, j}} is the external arrival rate of class @math{s} requests to service center @math{j}, and @math{\lambda = \sum_s \sum_j -\lambda_{sj}} is the overall external arrival rate to the whole system, -then @math{P_{0sj} = \lambda_{sj} / \lambda}. +\lambda_{s, j}} is the overall external arrival rate to the whole system, +then @math{P_{0, s, j} = \lambda_{s, j} / \lambda}. @DOCSTRING(qnvisits) @@ -1172,7 +1194,7 @@ 80-355.pdf} Note that the slightly different problem of generating all tuples -@math{k_1, k_2, \ldots k_N} such that @math{\sum_i k_i = k} and +@math{k_1, k_2, \ldots, k_N} such that @math{\sum_i k_i = k} and @math{k_i} are nonnegative integers, for some fixed integer @math{k @geq{} 0} has been described in S. Santini, @cite{Computing the Indices for a Complex Summation}, unpublished report, available at Modified: trunk/octave-forge/main/queueing/doc/references.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/references.txi 2012-03-18 18:24:04 UTC (rev 9950) +++ trunk/octave-forge/main/queueing/doc/references.txi 2012-03-18 21:03:48 UTC (rev 9951) @@ -27,14 +27,17 @@ @item [Aky88] Ian F. Akyildiz, @cite{Mean Value Analysis for Blocking Queueing Networks}, IEEE Transactions on Software Engineering, vol. 14, n. 2, -april 1988, pp. 418--428. @url{http://dx.doi.org/10.1109/32.4663} +april 1988, pp. 418--428. DOI @uref{http://dx.doi.org/10.1109/32.4663, 10.1109/32.4663} @item [Bar79] Y. Bard, @cite{Some Extensions to Multiclass Queueing Network Analysis}, proc. 4th Int. Symp. on Modelling and Performance Evaluation of Computer Systems, feb. 1979, pp. 51--62. -@item [RGMT98] +@item [BCMP75] +Forest Baskett, K. Mani Chandy, Richard R. Muntz, and Fernando G. Palacios. 1975. @cite{Open, Closed, and Mixed Networks of Queues with Different Classes of Customers}. J. ACM 22, 2 (April 1975), 248—260, DOI @uref{http://doi.acm.org/10.1145/321879.321887, 10.1145/321879.321887} + +@item [BGMT98] G. Bolch, S. Greiner, H. de Meer and K. Trivedi, @cite{Queueing Networks and Markov Chains: Modeling and Performance Evaluation with Computer Science Applications}, Wiley, @@ -44,20 +47,25 @@ Jeffrey P. Buzen, @cite{Computational Algorithms for Closed Queueing Networks with Exponential Servers}, Communications of the ACM, volume 16, number 9, september 1973, -pp. 527--531. @url{http://doi.acm.org/10.1145/362342.362345} +pp. 527--531. DOI @uref{http://doi.acm.org/10.1145/362342.362345, 10.1145/362342.362345} @item [CMS08] G. Casale, R. R. Muntz, G. Serazzi, @cite{Geometric Bounds: a Non-Iterative Analysis Technique for Closed Queueing Networks}, IEEE Transactions on Computers, 57(6):780-794, -June 2008. @url{http://doi.ieeecomputersociety.org/10.1109/TC.2008.37} +June 2008. DOI @uref{http://doi.ieeecomputersociety.org/10.1109/TC.2008.37, 10.1109/TC.2008.37} @item [GrSn97] -Charles M. Grinstead, J. Laurie Snell, (July 1997). Introduction to -Probability. American Mathematical Society. ISBN 978-0821807491 +Charles M. Grinstead, J. Laurie Snell, (July 1997). @cite{Introduction +to Probability}. American Mathematical Society. ISBN 978-0821807491; +this excellent textbook is @uref{http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/amsbook.mac.pdf, available in PDF format} +and can be used under the terms of the @uref{http://www.gnu.org/copyleft/fdl.html, GNU Free Documentation License (FDL)} +@item [Jac04] +James R. Jackson, @cite{Jobshop-Like Queueing Systems}, Vol. 50, No. 12, Ten Most Influential Titles of "Management Science's" First Fifty Years (Dec., 2004), pp. 1796-1802, @uref{http://www.jstor.org/stable/30046149, available online} + @item [Jai91] -R. Jain , @cite{The Art of Computer Systems Performance Analysis}, +R. Jain, @cite{The Art of Computer Systems Performance Analysis}, Wiley, 1991, p. 577. @item [HsLa87] @@ -69,7 +77,7 @@ Edward D. Lazowska, John Zahorjan, G. Scott Graham, and Kenneth C. Sevcik, @cite{Quantitative System Performance: Computer System Analysis Using Queueing Network Models}, Prentice Hall, -1984. @url{http://www.cs.washington.edu/homes/lazowska/qsp/}. +1984. @uref{http://www.cs.washington.edu/homes/lazowska/qsp/, available online}. @item [ReKo76] M. Reiser, H. Kobayashi, @cite{On The Convolution Algorithm for @@ -77,31 +85,33 @@ SIGMETRICS Conference on Computer Performance Modeling Measurement and Evaluation (Cambridge, Massachusetts, United States, March 29--31, 1976). SIGMETRICS '76. ACM, New York, NY, -pp. 109--117. @url{http://doi.acm.org/10.1145/800200.806187} +pp. 109--117. DOI @uref{http://doi.acm.org/10.1145/800200.806187, 10.1145/800200.806187} @item [ReLa80] M. Reiser and S. S. Lavenberg, @cite{Mean-Value Analysis of Closed Multichain Queuing Networks}, Journal of the ACM, vol. 27, n. 2, April -1980, pp. 313--322. @url{http://doi.acm.org/10.1145/322186.322195} +1980, pp. 313--322. DOI @uref{http://doi.acm.org/10.1145/322186.322195, 10.1145/322186.322195} +@item [Sch79] +P. Schweitzer, @cite{Approximate Analysis of Multiclass Closed Networks of +Queues}, Proc. Int. Conf. on Stochastic Control and Optimization, jun +1979, pp. 25—29 + @item [Sch81] Herb Schwetman, @cite{Some Computational -Aspects of Queueing Network Models}, Technical Report CSD-TR-354, +Aspects of Queueing Network Models}, @uref{http://www.cs.purdue.edu/research/technical_reports/1980/TR%2080-354.pdf, Technical Report CSD-TR-354}, Department of Computer Sciences, Purdue University, feb, 1981 (revised). -@url{http://www.cs.purdue.edu/research/technical_reports/1980/TR%2080-354.pdf} @item [Sch82] Herb Schwetman, @cite{Implementing the Mean Value Algorithm for the -Solution of Queueing Network Models}, Technical Report CSD-TR-355, -Department of Computer Sciences, Purdue University, feb 15, 1982, -available at -@url{http://www.cs.purdue.edu/research/technical_reports/1980/TR%2080-355.pdf} +Solution of Queueing Network Models}, @uref{http://www.cs.purdue.edu/research/technical_reports/1980/TR%2080-355.pdf, Technical Report CSD-TR-355}, +Department of Computer Sciences, Purdue University, feb 15, 1982. @item [ZaWo81] Zahorjan, J. and Wong, E. @cite{The solution of separable queueing network models using mean value analysis}. SIGMETRICS Perform. Eval. Rev. 10, 3 (Sep. 1981), 80-85. DOI -@url{http://doi.acm.org/10.1145/1010629.805477} +DOI @uref{http://doi.acm.org/10.1145/1010629.805477, 10.1145/1010629.805477} @end table Modified: trunk/octave-forge/main/queueing/inst/dtmc_taexps.m =================================================================== --- trunk/octave-forge/main/queueing/inst/dtmc_taexps.m 2012-03-18 18:24:04 UTC (rev 9950) +++ trunk/octave-forge/main/queueing/inst/dtmc_taexps.m 2012-03-18 21:03:48 UTC (rev 9951) @@ -35,7 +35,7 @@ ## Infinitesimal generator matrix. @code{@var{Q}(i,j)} is the transition ## rate from state @math{i} to state @math{j}, ## @math{1 @leq{} i \neq j @leq{} N}. The -## matrix @var{Q} must also satisfy the condition @math{\sum_{j=1}^N Q_{ij} = 0} +## matrix @var{Q} must also satisfy the condition @math{\sum_{j=1}^N Q_{i, j} = 0} ## ## @item t ## Time. If omitted, the results are computed until absorption. Modified: trunk/octave-forge/main/queueing/inst/qnmarkov.m =================================================================== --- trunk/octave-forge/main/queueing/inst/qnmarkov.m 2012-03-18 18:24:04 UTC (rev 9950) +++ trunk/octave-forge/main/queueing/inst/qnmarkov.m 2012-03-18 21:03:48 UTC (rev 9951) @@ -54,14 +54,14 @@ ## ## @item Average service times are load-independent. ## -## @item @math{P_{ij}} is the probability that requests completing +## @item @math{P_{i, j}} is the probability that requests completing ## execution at center @math{i} are transferred to ## center @math{j}, @math{i \neq j}. For open networks, a request may leave the system -## from any node @math{i} with probability @math{1-\sum_j P_{ij}}. +## from any node @math{i} with probability @math{1-\sum_j P_{i, j}}. ## ## @item Blocking type is Repetitive-Service (RS). Service ## center @math{j} is @emph{saturated} if the number of requests is equal -## to its capacity @code{C_j}. Under the RS blocking discipline, +## to its capacity @math{C_j}. Under the RS blocking discipline, ## a request completing service at center @math{i} which is being ## transferred to a saturated server @math{j} is put back at the end of ## the queue of @math{i} and will receive service again. Center @math{i} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-03-18 18:24:10
|
Revision: 9950 http://octave.svn.sourceforge.net/octave/?rev=9950&view=rev Author: mmarzolla Date: 2012-03-18 18:24:04 +0000 (Sun, 18 Mar 2012) Log Message: ----------- fixed typos in documentation Modified Paths: -------------- trunk/octave-forge/main/queueing/doc/markovchains.txi trunk/octave-forge/main/queueing/inst/ctmc.m trunk/octave-forge/main/queueing/inst/dtmc.m trunk/octave-forge/main/queueing/inst/dtmc_exps.m Modified: trunk/octave-forge/main/queueing/doc/markovchains.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-03-18 16:09:48 UTC (rev 9949) +++ trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-03-18 18:24:04 UTC (rev 9950) @@ -35,7 +35,7 @@ @dots{}}. The sequence @math{X_0, X_1, @dots{}, X_n, @dots{}} is a @emph{stochastic process} with discrete time @math{0, 1, 2, @dots{}}. A @emph{Markov chain} is a stochastic process @math{@{X_n, -n=0, 1, 2, @dots{}@}} which satisfies the following Marrkov property: +n=0, 1, 2, @dots{}@}} which satisfies the following Markov property: @iftex @tex @@ -46,7 +46,7 @@ @math{P(X_{n+1} = x_{n+1} | X_n = x_n, X_{n-1} = x_{n-1}, ..., X_0 = x_0) = P(X_{n+1} = x_{n+1} | X_n = x_n)} @end ifnottex -@noindent which means that the probability that the system is in +@noindent which means that the probability that the system is in a particular state at time @math{n+1} only depends on the state the system was at time @math{n}. @@ -60,7 +60,7 @@ The transition probability matrix @math{\bf P} must satisfy the following two properties: (1) @math{P_{i, j} @geq{} 0} for all -@math{i, j}, and (2) @math{\sum_{j=1}^N P_{i,j} = 1}. +@math{i, j}, and (2) @math{\sum_{j=1}^N P_{i,j} = 1}. @c @DOCSTRING(dtmc_check_P) @@ -70,8 +70,8 @@ * Birth-death process (DTMC):: * Expected number of visits (DTMC):: * Time-averaged expected sojourn times (DTMC):: +* Mean time to absorption (DTMC):: * First passage times (DTMC):: -* Mean time to absorption (DTMC):: @end menu @c @@ -134,7 +134,7 @@ Given a @math{N} state discrete-time Markov chain with transition matrix @math{\bf P} and an integer @math{n @geq{} 0}, we let -@math{L-I(n)} be the the expected number of visits to state @math{i} +@math{L_i(n)} be the the expected number of visits to state @math{i} during the first @math{n} transitions. The vector @math{{\bf L}(n) = (L_1(n), L_2(n), @dots{}, L_N(n))} is defined as: @@ -156,8 +156,8 @@ @end example @end ifnottex -@noindent where @math{{\bf \pi}(i) = {\bf \pi}(0){\bf P}^i} is the state occupancy probability -after @math{i} transitions. +@noindent where @math{{\bf \pi}(i) = {\bf \pi}(0){\bf P}^i} is the state +occupancy probability after @math{i} transitions. If @math{\bf P} is absorbing, we can rearrange the states to rewrite @math{\bf P} as: @@ -186,7 +186,7 @@ number of times that the process is in the @math{j}-th transient state if it is started in the @math{i}-th transient state. If we reshape @math{\bf N} to the size of @math{\bf P} (filling missing entries with -zeros), we have that, for abrosbing chains @math{{\bf L} = {\bf +zeros), we have that, for absorbing chains @math{{\bf L} = {\bf \pi}(0){\bf N}}. @DOCSTRING(dtmc_exps) @@ -198,17 +198,23 @@ @DOCSTRING(dtmc_taexps) @c +@node Mean time to absorption (DTMC) +@subsection Mean Time to Absorption + +@DOCSTRING(dtmc_mtta) + +@c @node First passage times (DTMC) @subsection First Passage Times -The First Passage Time @math{M_{i j}} is defined as the average +The First Passage Time @math{M_{i, j}} is defined as the average number of transitions needed to visit state @math{j} for the first time, starting from state @math{i}. Matrix @math{\bf M} satisfies the property that @iftex @tex -$$ M_{i j} = 1 + \sum_{k \neq j} P_{i k} M_{k j}$$ +$$ M_{i, j} = 1 + \sum_{k \neq j} P_{i, k} M_{k, j}$$ @end tex @end iftex @ifnottex @@ -217,24 +223,17 @@ ___ \ M_ij = 1 + > P_ij * M_kj - /___ - k!=j + /___ + k!=j @end group @end example @end ifnottex -@c @DOCSTRING(dtmc_fpt) @c -@node Mean time to absorption (DTMC) -@subsection Mean Time to Absorption - -@DOCSTRING(dtmc_mtta) - @c @c -@c @node Continuous-Time Markov Chains @section Continuous-Time Markov Chains @@ -257,7 +256,7 @@ that for each @math{i \neq j}, @math{Q_{i, j}} is the transition rate from state @math{i} to state @math{j}. The elements @math{Q_{i, i}} must be defined in such a way that the infinitesimal generator matrix -@math{\bf Q} satisfies the property @math{\sum_{j=1}^N Q_{i,j} = 0}. +@math{\bf Q} satisfies the property @math{\sum_{j=1}^N Q_{i, j} = 0}. @DOCSTRING(ctmc_check_Q) @@ -301,7 +300,7 @@ @emph{stationary state occupancy probability} @math{{\bf \pi} = \lim_{t \rightarrow +\infty} {\bf \pi}(t)}, which is independent from the initial state occupancy @math{{\bf \pi}(0)}. The stationary state -occupancy probability vector @math{\bf \pi} satisfies +occupancy probability vector @math{\bf \pi} satisfies @math{{\bf \pi} {\bf Q} = {\bf 0}} and @math{\sum_{i=1}^N \pi_i = 1}. @DOCSTRING(ctmc) @@ -337,8 +336,8 @@ (L_1(t), L_2(t), \ldots L_N(t))} such that @math{L_i(t)} is the expected sojourn time in state @math{i} during the interval @math{[0,t)}, assuming that the initial occupancy probability at time -0 was @math{{\bf \pi}(0)}. @math{{\bf L}(t)} is the solution of -the following differential equation: +0 was @math{{\bf \pi}(0)}. @math{{\bf L}(t)} can be expressed as the +solution of the following differential equation: @iftex @tex @@ -367,14 +366,15 @@ @example @group / t -L(t) = | pi(u) du - / u=0 +L(t) = | pi(u) du + / 0 @end group @end example @end ifnottex @noindent where @math{{\bf \pi}(t) = {\bf \pi}(0) \exp({\bf Q}t)} is -the state occupancy probability at time @math{t}. +the state occupancy probability at time @math{t}; @math{\exp({\bf A})} +is the matrix exponential of @math{\bf A}. @DOCSTRING(ctmc_exps) @@ -384,7 +384,7 @@ rate from state @math{i} to state @math{i+1} is @math{\lambda_i = i \lambda} (@math{i=1, 2, 3}), with @math{\lambda = 0.5}. The following code computes the expected sojourn time in state @math{i}, -given the initial occupancy probability @math{{\bf \pi}_0=(1,0,0,0)}. +given the initial occupancy probability @math{{\bf \pi}_0=(1,0,0,0)}. @example @group Modified: trunk/octave-forge/main/queueing/inst/ctmc.m =================================================================== --- trunk/octave-forge/main/queueing/inst/ctmc.m 2012-03-18 16:09:48 UTC (rev 9949) +++ trunk/octave-forge/main/queueing/inst/ctmc.m 2012-03-18 18:24:04 UTC (rev 9950) @@ -41,7 +41,7 @@ ## Infinitesimal generator matrix. @var{Q} is a @math{N \times N} square ## matrix where @code{@var{Q}(i,j)} is the transition rate from state ## @math{i} to state @math{j}, for @math{1 @leq{} i \neq j @leq{} N}. -## Transition rates must be nonnegative, and @math{\sum_{j=1}^N Q_{i j} = 0} +## Transition rates must be nonnegative, and @math{\sum_{j=1}^N Q_{i, j} = 0} ## ## @item t ## Time at which to compute the transient probability Modified: trunk/octave-forge/main/queueing/inst/dtmc.m =================================================================== --- trunk/octave-forge/main/queueing/inst/dtmc.m 2012-03-18 16:09:48 UTC (rev 9949) +++ trunk/octave-forge/main/queueing/inst/dtmc.m 2012-03-18 18:24:04 UTC (rev 9950) @@ -42,7 +42,7 @@ ## @item P ## @code{@var{P}(i,j)} is the transition probability from state @math{i} ## to state @math{j}. @var{P} must be an irreducible stochastic matrix, -## which means that the sum of each row must be 1 (@math{\sum_{j=1}^N P_{i j} = 1}), and the rank of +## which means that the sum of each row must be 1 (@math{\sum_{j=1}^N P_{i, j} = 1}), and the rank of ## @var{P} must be equal to its dimension. ## ## @item n Modified: trunk/octave-forge/main/queueing/inst/dtmc_exps.m =================================================================== --- trunk/octave-forge/main/queueing/inst/dtmc_exps.m 2012-03-18 16:09:48 UTC (rev 9949) +++ trunk/octave-forge/main/queueing/inst/dtmc_exps.m 2012-03-18 18:24:04 UTC (rev 9950) @@ -34,12 +34,12 @@ ## ## @item n ## Number of steps during which the expected number of visits are -## computed (@math{@var{n} @geq{} 0}). If @code{@var{n}=0}, simply -## returns @var{p0}. If @code{@var{n} > 0}, returns the expected number -## of visits after exactly @var{n} transitions. +## computed (@math{@var{n} @geq{} 0}). If @code{@var{n}=0}, returns +## @var{p0}. If @code{@var{n} > 0}, returns the expected number of +## visits after exactly @var{n} transitions. ## ## @item p0 -## Initial state occupancy probability +## Initial state occupancy probability. ## ## @end table ## @@ -51,7 +51,8 @@ ## When called with two arguments, @code{@var{L}(i)} is the expected ## number of visits to transient state @math{i} before absorption. When ## called with three arguments, @code{@var{L}(i)} is the expected number -## of visits to state @math{i} during the first @var{n} transitions. +## of visits to state @math{i} during the first @var{n} transitions, +## given initial occupancy probability @var{p0}. ## ## @end table ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <prn...@us...> - 2012-03-18 16:09:55
|
Revision: 9949 http://octave.svn.sourceforge.net/octave/?rev=9949&view=rev Author: prnienhuis Date: 2012-03-18 16:09:48 +0000 (Sun, 18 Mar 2012) Log Message: ----------- Texinfo header fixes (get_first_help_sentence compatibility) Modified Paths: -------------- trunk/octave-forge/main/io/inst/io_ods_testscript.m trunk/octave-forge/main/io/inst/io_xls_testscript.m trunk/octave-forge/main/io/inst/object2json.m trunk/octave-forge/main/io/inst/odsfinfo.m Modified: trunk/octave-forge/main/io/inst/io_ods_testscript.m =================================================================== --- trunk/octave-forge/main/io/inst/io_ods_testscript.m 2012-03-18 16:05:16 UTC (rev 9948) +++ trunk/octave-forge/main/io/inst/io_ods_testscript.m 2012-03-18 16:09:48 UTC (rev 9949) @@ -14,7 +14,7 @@ ## along with Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. -## Check proper operation of ODS spreadsheet scripts +## (Internal function) Check proper operation of ODS spreadsheet scripts. ## Before running, a character variable 'intf' should be initialized with ## a value of 'otk', 'jod', or 'uno'. Modified: trunk/octave-forge/main/io/inst/io_xls_testscript.m =================================================================== --- trunk/octave-forge/main/io/inst/io_xls_testscript.m 2012-03-18 16:05:16 UTC (rev 9948) +++ trunk/octave-forge/main/io/inst/io_xls_testscript.m 2012-03-18 16:09:48 UTC (rev 9949) @@ -14,7 +14,7 @@ ## along with Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. -## Check proper operation of XLS spreadsheet scripts. +## (Internal function) Check proper operation of XLS spreadsheet scripts. ## Before running, a character variable 'intf' should be initialized with ## a value of 'com', 'poi', 'jxl', 'oxs', or 'uno'. Modified: trunk/octave-forge/main/io/inst/object2json.m =================================================================== --- trunk/octave-forge/main/io/inst/object2json.m 2012-03-18 16:05:16 UTC (rev 9948) +++ trunk/octave-forge/main/io/inst/object2json.m 2012-03-18 16:09:48 UTC (rev 9949) @@ -23,8 +23,8 @@ function json = object2json (object) % function json = object2json (object) - % This function returns a valid json string that will describe object - % The string will be in a compact form (i.e. no spaces or line breaks) + % Returns a valid json string that will describe object; the string will + % be in a compact form (no spaces or line breaks). % % It will map simple octave values this way: % function handles: string with the name of the function Modified: trunk/octave-forge/main/io/inst/odsfinfo.m =================================================================== --- trunk/octave-forge/main/io/inst/odsfinfo.m 2012-03-18 16:05:16 UTC (rev 9948) +++ trunk/octave-forge/main/io/inst/odsfinfo.m 2012-03-18 16:09:48 UTC (rev 9949) @@ -17,7 +17,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} [@var{filetype}] = odsfinfo (@var{filename} [, @var{reqintf}]) ## @deftypefnx {Function File} [@var{filetype}, @var{sh_names}] = odsfinfo (@var{filename} [, @var{reqintf}]) -## Query an OpenOffice_org spreadsheet file @var{filename} (with .ods +## Query an OpenOffice_org spreadsheet file @var{filename} (with ods ## suffix) for some info about its contents. ## ## If @var{filename} is a recognizable OpenOffice.org spreadsheet file, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |