From: <mma...@us...> - 2012-03-20 16:20:18
|
Revision: 9979 http://octave.svn.sourceforge.net/octave/?rev=9979&view=rev Author: mmarzolla Date: 2012-03-20 16:20:06 +0000 (Tue, 20 Mar 2012) Log Message: ----------- code restructuring Modified Paths: -------------- trunk/octave-forge/main/queueing/doc/references.txi trunk/octave-forge/main/queueing/inst/ctmc.m trunk/octave-forge/main/queueing/inst/ctmc_check_Q.m trunk/octave-forge/main/queueing/inst/ctmc_fpt.m trunk/octave-forge/main/queueing/inst/ctmc_mtta.m trunk/octave-forge/main/queueing/inst/dtmc.m Modified: trunk/octave-forge/main/queueing/doc/references.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/references.txi 2012-03-20 14:03:24 UTC (rev 9978) +++ trunk/octave-forge/main/queueing/doc/references.txi 2012-03-20 16:20:06 UTC (rev 9979) @@ -108,6 +108,11 @@ 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. +@items [Tij03] +H. C. Tijms, @cite{A first course in stochastic models}, +John Wiley and Sons, 2003, ISBN 0471498807, ISBN 9780471498803, +DOI @uref{http://dx.doi.org/10.1002/047001363X, 10.1002/047001363X} + @item [ZaWo81] Zahorjan, J. and Wong, E. @cite{The solution of separable queueing network models using mean value analysis}. SIGMETRICS Modified: trunk/octave-forge/main/queueing/inst/ctmc.m =================================================================== --- trunk/octave-forge/main/queueing/inst/ctmc.m 2012-03-20 14:03:24 UTC (rev 9978) +++ trunk/octave-forge/main/queueing/inst/ctmc.m 2012-03-20 16:20:06 UTC (rev 9979) @@ -48,7 +48,7 @@ ## ## @item p0 ## @code{@var{p0}(i)} is the probability that the system -## is in state @math{i} at time 0 . +## is in state @math{i} at time 0. ## ## @end table ## @@ -74,9 +74,7 @@ function q = ctmc( Q, t, p0 ) - persistent epsilon = 10*eps; - - if ( nargin < 1 || nargin > 3 ) + if ( nargin != 1 && nargin != 3 ) print_usage(); endif @@ -85,22 +83,17 @@ ( N>0 ) || \ usage(err); - if ( nargin > 1 ) + if ( nargin == 1 ) + q = __ctmc_steady_state( Q ); + else ( isscalar(t) && t>=0 ) || \ usage("t must be nonnegative"); - endif - if ( nargin > 2 ) - ( isvector(p0) && length(p0) == N && all(p0>=0) && abs(sum(p0)-1.0)<epsilon ) || \ + ( isvector(p0) && length(p0) == N && all(p0>=0) && abs(sum(p0)-1.0)<N*eps ) || \ usage( "p0 must be a probability vector" ); + p0 = p0(:)'; # make p0 a row vector - else - p0 = ones(1,N) / N; - endif - if ( nargin == 1 ) - q = __ctmc_steady_state( Q ); - else q = __ctmc_transient(Q, t, p0 ); endif @@ -198,6 +191,32 @@ %! q = ctmc(Q, 100, [1 0]); %! assert( qlim, q, 1e-5 ); +## Example on p. 172 of [Tij03] +%!test +%! ll = 0.1; +%! mu = 100; +%! eta = 5; +%! Q = zeros(9,9); +%! ## 6--1, 7=sleep2 8=sleep1 9=crash +%! Q(6,5) = 6*ll; +%! Q(5,4) = 5*ll; +%! Q(4,3) = 4*ll; +%! Q(3,2) = 3*ll; +%! Q(2,1) = 2*ll; +%! Q(2,7) = mu; +%! Q(1,9) = ll; +%! Q(1,8) = mu; +%! Q(8,9) = ll; +%! Q(7,8) = 2*ll; +%! Q(7,6) = eta; +%! Q(8,6) = eta; +%! Q -= diag(sum(Q,2)); +%! q0 = zeros(1,9); q0(6) = 1; +%! q = ctmc(Q,10,q0); +%! assert( q(9), 0.000504, 1e-6 ); +%! q = ctmc(Q,2,q0); +%! assert( q, [3.83e-7 1.938e-4 0.0654032 0.2216998 0.4016008 0.3079701 0.0030271 0.0000998 5e-6], 1e-5 ); + %!demo %! Q = [ -1 1; \ %! 1 -1 ]; Modified: trunk/octave-forge/main/queueing/inst/ctmc_check_Q.m =================================================================== --- trunk/octave-forge/main/queueing/inst/ctmc_check_Q.m 2012-03-20 14:03:24 UTC (rev 9978) +++ trunk/octave-forge/main/queueing/inst/ctmc_check_Q.m 2012-03-20 16:20:06 UTC (rev 9979) @@ -33,7 +33,7 @@ function [result err] = ctmc_check_Q( Q ) - persistent epsilon = 10*eps; + persistent epsilon = 100*eps; if ( nargin != 1 ) print_usage(); @@ -46,7 +46,7 @@ return; endif - if (any(Q(~logical(eye(size(Q))))<0) || \ # there is any negavite non-diagonal element + if (any(Q(~logical(eye(size(Q))))<0) || \ # there is any negative non-diagonal element norm( sum(Q,2), "inf" ) > epsilon ) err = "Q is not an infinitesimal generator matrix"; return; Modified: trunk/octave-forge/main/queueing/inst/ctmc_fpt.m =================================================================== --- trunk/octave-forge/main/queueing/inst/ctmc_fpt.m 2012-03-20 14:03:24 UTC (rev 9978) +++ trunk/octave-forge/main/queueing/inst/ctmc_fpt.m 2012-03-20 16:20:06 UTC (rev 9979) @@ -79,16 +79,15 @@ error(err); if ( nargin == 1 ) - M = zeros(N,N); + result = zeros(N,N); for j=1:N QQ = Q; QQ(j,:) = 0; # make state j absorbing for i=1:N p0 = zeros(1,N); p0(i) = 1; - M(i,j) = ctmc_mtta(QQ,p0); + result(i,j) = ctmc_mtta(QQ,p0); endfor endfor - result = M; else (isscalar(i) && i>=1 && j<=N) || usage("i must be an integer in the range 1..%d", N); (isvector(j) && all(j>=1) && all(j<=N)) || usage("j must be an integer or vector with elements in 1..%d", N); @@ -112,13 +111,3 @@ %! Q -= diag(sum(Q,2)); %! M = ctmc_fpt(Q); %! assert( all(diag(M) < 10*eps) ); - -%!xtest -%! Q = unifrnd(0.1,0.9,10,10); -%! Q -= diag(sum(Q,2)); -%! m = ctmc_fpt(Q,1,3); - -%!xtest -%! Q = unifrnd(0.1,0.9,10,10); -%! Q -= diag(sum(Q,2)); -%! m = ctmc_fpt(Q,1,[3 5 6]); Modified: trunk/octave-forge/main/queueing/inst/ctmc_mtta.m =================================================================== --- trunk/octave-forge/main/queueing/inst/ctmc_mtta.m 2012-03-20 14:03:24 UTC (rev 9978) +++ trunk/octave-forge/main/queueing/inst/ctmc_mtta.m 2012-03-20 16:20:06 UTC (rev 9979) @@ -127,3 +127,5 @@ %! plot(initial_state,t,"+"); %! xlabel("Initial state"); %! ylabel("MTTA"); + + Modified: trunk/octave-forge/main/queueing/inst/dtmc.m =================================================================== --- trunk/octave-forge/main/queueing/inst/dtmc.m 2012-03-20 14:03:24 UTC (rev 9978) +++ trunk/octave-forge/main/queueing/inst/dtmc.m 2012-03-20 16:20:06 UTC (rev 9979) @@ -46,7 +46,8 @@ ## @var{P} must be equal to its dimension. ## ## @item n -## Step at which to compute the transient probability +## Number of transitions after which compute the state occupancy probabilities +## (@math{n=0, 1, @enddots{}}) ## ## @item p0 ## @code{@var{p0}(i)} is the probability that at step 0 the system @@ -63,7 +64,7 @@ ## @code{@var{p}(i)} is the steady-state probability that the system is ## in state @math{i}. @var{p} satisfies the equations @math{p = p{\bf P}} and @math{\sum_{i=1}^N p_i = 1}. If this function is invoked ## with three arguments, @code{@var{p}(i)} is the marginal probability -## that the system is in state @math{i} at step @var{n}, +## that the system is in state @math{i} after @var{n} transitions, ## given the initial probabilities @code{@var{p0}(i)} that the initial state is ## @math{i}. ## @@ -74,11 +75,9 @@ ## Author: Moreno Marzolla <marzolla(at)cs.unibo.it> ## Web: http://www.moreno.marzolla.name/ -function q = dtmc( P, n, p0 ) +function p = dtmc( P, n, p0 ) - persistent epsilon = 10*eps; - - if ( nargin < 1 || nargin > 3 ) + if ( nargin != 1 && nargin != 3 ) print_usage(); endif @@ -86,29 +85,24 @@ ( N>0 ) || \ usage( err ); - - if ( nargin > 1 ) + + if ( nargin == 1 ) + p = __dtmc_steady_state( P ); + else ( isscalar(n) && n>=0 ) || \ usage( "n must be >=0" ); - endif - if ( nargin > 2 ) - ( isvector(p0) && length(p0) == N && all(p0>=0) && abs(sum(p0)-1.0)<epsilon ) || \ + ( isvector(p0) && length(p0) == N && all(p0>=0) && abs(sum(p0)-1.0)<N*eps ) || \ usage( "p0 must be a probability vector" ); - p0 = p0(:)'; # make q0 a row vector - else - p0 = ones(1,N) / N; - endif - if ( nargin == 1 ) - q = __dtmc_steady_state( P ); - else - q = __dtmc_transient(P, n, p0); + p0 = p0(:)'; # make p0 a row vector + + p = __dtmc_transient(P, n, p0); endif endfunction ## Helper function, compute steady-state probability -function q = __dtmc_steady_state( P ) +function p = __dtmc_steady_state( P ) N = rows(P); A = P-eye(N); A(:,N) = 1; # add normalization condition @@ -116,25 +110,25 @@ warning( "dtmc(): P is reducible" ); b = [ zeros(1,N-1) 1 ]; - q = b/A; + p = b/A; endfunction ## Helper function, compute transient probability -function q = __dtmc_transient( P, n, p0 ) - q = p0*P^n; +function p = __dtmc_transient( P, n, p0 ) + p = p0*P^n; endfunction %!test %! P = [0.75 0.25; 0.5 0.5]; -%! q = dtmc(P); -%! assert( q*P, q, 1e-5 ); -%! assert( q, [0.6666 0.3333], 1e-4 ); +%! p = dtmc(P); +%! assert( p*P, p, 1e-5 ); +%! assert( p, [0.6666 0.3333], 1e-4 ); %!test %! #Example 2.11 p. 44 Bolch et al. %! P = [0.5 0.5; 0.5 0.5]; -%! q = dtmc(P); -%! assert( q, [0.5 0.5], 1e-3 ); +%! p = dtmc(P); +%! assert( p, [0.5 0.5], 1e-3 ); %!test %! fail("dtmc( [1 1 1; 1 1 1] )", "square"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-03-20 21:41:44
|
Revision: 9981 http://octave.svn.sourceforge.net/octave/?rev=9981&view=rev Author: mmarzolla Date: 2012-03-20 21:41:38 +0000 (Tue, 20 Mar 2012) Log Message: ----------- misc fixes Modified Paths: -------------- trunk/octave-forge/main/queueing/doc/references.txi trunk/octave-forge/main/queueing/inst/ctmc.m trunk/octave-forge/main/queueing/inst/ctmc_exps.m Modified: trunk/octave-forge/main/queueing/doc/references.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/references.txi 2012-03-20 21:22:35 UTC (rev 9980) +++ trunk/octave-forge/main/queueing/doc/references.txi 2012-03-20 21:41:38 UTC (rev 9981) @@ -108,7 +108,7 @@ 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. -@items [Tij03] +@item [Tij03] H. C. Tijms, @cite{A first course in stochastic models}, John Wiley and Sons, 2003, ISBN 0471498807, ISBN 9780471498803, DOI @uref{http://dx.doi.org/10.1002/047001363X, 10.1002/047001363X} Modified: trunk/octave-forge/main/queueing/inst/ctmc.m =================================================================== --- trunk/octave-forge/main/queueing/inst/ctmc.m 2012-03-20 21:22:35 UTC (rev 9980) +++ trunk/octave-forge/main/queueing/inst/ctmc.m 2012-03-20 21:41:38 UTC (rev 9981) @@ -216,6 +216,10 @@ %! assert( q(9), 0.000504, 1e-6 ); %! q = ctmc(Q,2,q0); %! assert( q, [3.83e-7 1.938e-4 0.0654032 0.2216998 0.4016008 0.3079701 0.0030271 0.0000998 5e-6], 1e-5 ); +%! # Compute probability that no shuttle needs to leave during 10 years +%! Q(7,:) = Q(8,:) = 0; # make states 7 and 8 absorbing +%! q = ctmc(Q,10,q0); +%! assert( 1-sum(q(7:9)), 0.3901, 1e-4 ); %!demo %! Q = [ -1 1; \ Modified: trunk/octave-forge/main/queueing/inst/ctmc_exps.m =================================================================== --- trunk/octave-forge/main/queueing/inst/ctmc_exps.m 2012-03-20 21:22:35 UTC (rev 9980) +++ trunk/octave-forge/main/queueing/inst/ctmc_exps.m 2012-03-20 21:41:38 UTC (rev 9981) @@ -40,7 +40,7 @@ ## condition @math{\sum_{j=1}^N Q_{ij} = 0}. ## ## @item t -## Time +## If given, compute the expected sojourn times in @math{[0,t]} ## ## @item p ## Initial occupancy probability vector; @code{@var{p}(i)} is the @@ -57,9 +57,9 @@ ## If this function is called with three arguments, @code{@var{L}(i)} is ## the expected time spent in state @math{i} during the interval ## @math{[0,t]}. If this function is called with two arguments -## @code{@var{L}(i)} is either the expected time spent in state @math{i} until -## absorption (if @math{i} is a transient state), or zero -## (if @var{i} is an absorbing state). +## @code{@var{L}(i)} is either the expected time spent in state @math{i} +## until absorption (if @math{i} is a transient state), or zero (if +## @var{i} is an absorbing state). ## ## @end table ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-03-26 10:33:00
|
Revision: 10065 http://octave.svn.sourceforge.net/octave/?rev=10065&view=rev Author: mmarzolla Date: 2012-03-26 10:32:49 +0000 (Mon, 26 Mar 2012) Log Message: ----------- fixed version number to allow installation of the development version Modified Paths: -------------- trunk/octave-forge/main/queueing/DESCRIPTION trunk/octave-forge/main/queueing/Makefile trunk/octave-forge/main/queueing/doc/INSTALL Modified: trunk/octave-forge/main/queueing/DESCRIPTION =================================================================== --- trunk/octave-forge/main/queueing/DESCRIPTION 2012-03-26 09:28:30 UTC (rev 10064) +++ trunk/octave-forge/main/queueing/DESCRIPTION 2012-03-26 10:32:49 UTC (rev 10065) @@ -1,6 +1,6 @@ Name: queueing -Version: 1.X.0 -Date: 2012-03-XX +Version: 1.1.0 +Date: 2012-03-26 Author: Moreno Marzolla <mar...@cs...> Maintainer: Moreno Marzolla <mar...@cs...> Title: Queueing networks and Markov chains analysis package for GNU Octave Modified: trunk/octave-forge/main/queueing/Makefile =================================================================== --- trunk/octave-forge/main/queueing/Makefile 2012-03-26 09:28:30 UTC (rev 10064) +++ trunk/octave-forge/main/queueing/Makefile 2012-03-26 10:32:49 UTC (rev 10065) @@ -1,5 +1,5 @@ -VERSIONNUM=1.X.0 -VERSIONDATE="2012-03-XX" +VERSIONNUM=1.1.0 +VERSIONDATE="2012-03-26" PROGNAME=queueing DISTNAME=$(PROGNAME)-$(VERSIONNUM) Modified: trunk/octave-forge/main/queueing/doc/INSTALL =================================================================== --- trunk/octave-forge/main/queueing/doc/INSTALL 2012-03-26 09:28:30 UTC (rev 10064) +++ trunk/octave-forge/main/queueing/doc/INSTALL 2012-03-26 10:32:49 UTC (rev 10065) @@ -16,7 +16,7 @@ 1.1 Installation through Octave package management system ========================================================= -The most recent version of `queueing' is 1.X.0 and can be downloaded +The most recent version of `queueing' is 1.1.0 and can be downloaded from Octave-Forge `http://octave.sourceforge.net/queueing/' @@ -37,13 +37,13 @@ octave:1>pkg list queueing Package Name | Version | Installation directory --------------+---------+----------------------- - queueing *| 1.X.0 | /home/moreno/octave/queueing-1.X.0 + queueing *| 1.1.0 | /home/moreno/octave/queueing-1.1.0 Alternatively, you can first download `queueing' from Octave-Forge; then, to install the package in the system-wide location issue this command at the Octave prompt: - octave:1> pkg install _queueing-1.X.0.tar.gz_ + octave:1> pkg install _queueing-1.1.0.tar.gz_ (you may need to start Octave as root in order to allow the installation to copy the files to the target locations). After this, @@ -52,7 +52,7 @@ If you do not have root access, you can do a local install using: - octave:1> pkg install -local queueing-1.X.0.tar.gz + octave:1> pkg install -local queueing-1.1.0.tar.gz This will install `queueing' within your home directory, and the package will be available to your user only. *Note:* Octave version @@ -69,8 +69,8 @@ If you want to manually install `queueing' in a custom location, you can download the tarball and unpack it somewhere: - tar xvfz queueing-1.X.0.tar.gz - cd queueing-1.X.0/queueing/ + tar xvfz queueing-1.1.0.tar.gz + cd queueing-1.1.0/queueing/ Copy all `.m' files from the `inst/' directory to some target location. Then, start Octave with the `-p' option to add the target This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-04-05 14:34:53
|
Revision: 10147 http://octave.svn.sourceforge.net/octave/?rev=10147&view=rev Author: mmarzolla Date: 2012-04-05 14:34:42 +0000 (Thu, 05 Apr 2012) Log Message: ----------- Documentation fixes Modified Paths: -------------- trunk/octave-forge/main/queueing/NEWS trunk/octave-forge/main/queueing/doc/Makefile Modified: trunk/octave-forge/main/queueing/NEWS =================================================================== --- trunk/octave-forge/main/queueing/NEWS 2012-04-05 14:32:41 UTC (rev 10146) +++ trunk/octave-forge/main/queueing/NEWS 2012-04-05 14:34:42 UTC (rev 10147) @@ -1,4 +1,5 @@ Summary of important user-visible changes for queueing-1.1.0 +------------------------------------------------------------------------------ ** Function ctmc_exps() can now compute the expected sojourn time until absorption for absorming CTMC @@ -15,10 +16,3 @@ ** The following deprecated functions have been removed: ctmc_bd_solve(), ctmc_solve(), dtmc_solve() - - -Summary of important user-visible changes for queueing-1.0.0 ------------------------------------------------------------------------------- - -** First release of the queueing package - Modified: trunk/octave-forge/main/queueing/doc/Makefile =================================================================== --- trunk/octave-forge/main/queueing/doc/Makefile 2012-04-05 14:32:41 UTC (rev 10146) +++ trunk/octave-forge/main/queueing/doc/Makefile 2012-04-05 14:34:42 UTC (rev 10147) @@ -1,6 +1,6 @@ DOC=queueing CHAPTERS=$(patsubst %.txi,%.texi,$(wildcard *.txi)) -DISTFILES=README INSTALL $(DOC).pdf $(DOC).html +DISTFILES=README INSTALL $(DOC).pdf $(DOC).html $(DOC).texi $(CHAPTERS) .PHONY: clean dist This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-04-05 18:30:00
|
Revision: 10149 http://octave.svn.sourceforge.net/octave/?rev=10149&view=rev Author: mmarzolla Date: 2012-04-05 18:29:54 +0000 (Thu, 05 Apr 2012) Log Message: ----------- Preparing for release Modified Paths: -------------- trunk/octave-forge/main/queueing/DESCRIPTION trunk/octave-forge/main/queueing/Makefile Modified: trunk/octave-forge/main/queueing/DESCRIPTION =================================================================== --- trunk/octave-forge/main/queueing/DESCRIPTION 2012-04-05 15:08:14 UTC (rev 10148) +++ trunk/octave-forge/main/queueing/DESCRIPTION 2012-04-05 18:29:54 UTC (rev 10149) @@ -1,6 +1,6 @@ Name: queueing Version: 1.1.0 -Date: 2012-03-26 +Date: 2012-04-05 Author: Moreno Marzolla <mar...@cs...> Maintainer: Moreno Marzolla <mar...@cs...> Title: Queueing networks and Markov chains analysis package for GNU Octave Modified: trunk/octave-forge/main/queueing/Makefile =================================================================== --- trunk/octave-forge/main/queueing/Makefile 2012-04-05 15:08:14 UTC (rev 10148) +++ trunk/octave-forge/main/queueing/Makefile 2012-04-05 18:29:54 UTC (rev 10149) @@ -1,5 +1,5 @@ VERSIONNUM=1.1.0 -VERSIONDATE="2012-03-26" +VERSIONDATE="2012-04-05" PROGNAME=queueing DISTNAME=$(PROGNAME)-$(VERSIONNUM) @@ -52,4 +52,7 @@ ln $(DISTFILES) $(PROGNAME)/ tar cfz $(DISTNAME).tar.gz $(PROGNAME)/ uuencode $(DISTNAME).tar.gz < $(DISTNAME).tar.gz > $(DISTNAME).tar.gz.uue + ~/src/octave-3.6.1/run-octave -q --eval "pkg load generate_html; pkg install -local $(DISTNAME).tar.gz; generate_package_html ('queueing', 'queueing-html', 'octave-forge'); pkg uninstall $(PROGNAME)" + tar cfz $(PROGNAME)-html.tar.gz $(PROGNAME)-html + uuencode $(PROGNAME)-html.tar.gz < $(PROGNAME)-html.tar.gz > $(PROGNAME)-html.tar.gz.uue This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-04-05 18:59:52
|
Revision: 10150 http://octave.svn.sourceforge.net/octave/?rev=10150&view=rev Author: mmarzolla Date: 2012-04-05 18:59:46 +0000 (Thu, 05 Apr 2012) Log Message: ----------- Preparing for release Modified Paths: -------------- trunk/octave-forge/main/queueing/DESCRIPTION trunk/octave-forge/main/queueing/DESCRIPTION.in trunk/octave-forge/main/queueing/doc/queueing.html trunk/octave-forge/main/queueing/doc/queueing.pdf Modified: trunk/octave-forge/main/queueing/DESCRIPTION =================================================================== --- trunk/octave-forge/main/queueing/DESCRIPTION 2012-04-05 18:29:54 UTC (rev 10149) +++ trunk/octave-forge/main/queueing/DESCRIPTION 2012-04-05 18:59:46 UTC (rev 10150) @@ -13,7 +13,7 @@ and continuous-time Markov chains can be computed (state occupancy probabilities, mean time to absorption, time-averaged sojourn times). Categories: Misc -Depends: octave (>= 3.0.0) +Depends: octave (>= 3.2.3) Autoload: yes License: GPL version 3 or later Url: http://www.moreno.marzolla.name/software/queueing/ Modified: trunk/octave-forge/main/queueing/DESCRIPTION.in =================================================================== --- trunk/octave-forge/main/queueing/DESCRIPTION.in 2012-04-05 18:29:54 UTC (rev 10149) +++ trunk/octave-forge/main/queueing/DESCRIPTION.in 2012-04-05 18:59:46 UTC (rev 10150) @@ -13,7 +13,7 @@ and continuous-time Markov chains can be computed (state occupancy probabilities, mean time to absorption, time-averaged sojourn times). Categories: Misc -Depends: octave (>= 3.0.0) +Depends: octave (>= 3.2.3) Autoload: yes License: GPL version 3 or later Url: http://www.moreno.marzolla.name/software/queueing/ Modified: trunk/octave-forge/main/queueing/doc/queueing.html =================================================================== --- trunk/octave-forge/main/queueing/doc/queueing.html 2012-04-05 18:29:54 UTC (rev 10149) +++ trunk/octave-forge/main/queueing/doc/queueing.html 2012-04-05 18:59:46 UTC (rev 10150) @@ -1424,11 +1424,14 @@ — Function File: <var>p</var> = <b>ctmc</b> (<var>Q, t. p0</var>)<var><a name="index-ctmc-31"></a></var><br> <blockquote> <p><a name="index-Markov-chain_002c-continuous-time-32"></a><a name="index-Continuous-time-Markov-chain-33"></a><a name="index-Markov-chain_002c-state-occupancy-probabilities-34"></a><a name="index-Stationary-probabilities-35"></a> -With a single argument, compute the stationary state occupancy +Compute stationary or transient state occupancy probabilities +for a continuous-time Markov chain. + + <p>With a single argument, compute the stationary state occupancy probability vector <var>p</var>(1), <small class="dots">...</small>, <var>p</var>(N) for a -Continuous-Time Markov Chain with infinitesimal generator matrix -<var>Q</var> of size N \times N. With three arguments, compute the -state occupancy probabilities <var>p</var>(1), <small class="dots">...</small>, <var>p</var>(N) at time +continuous-time Markov chain with N \times N infinitesimal +generator matrix <var>Q</var>. With three arguments, compute the state +occupancy probabilities <var>p</var>(1), <small class="dots">...</small>, <var>p</var>(N) at time <var>t</var>, given initial state occupancy probabilities <var>p0</var> at time 0. @@ -1682,6 +1685,7 @@ for i=1:length(t) M(i,:) = ctmc_taexps(Q,t(i),p); endfor + clf; plot(t, M(:,1), ";State 1;", "linewidth", 2, \ t, M(:,2), ";State 2;", "linewidth", 2, \ t, M(:,3), ";State 3;", "linewidth", 2, \ Modified: trunk/octave-forge/main/queueing/doc/queueing.pdf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-04-06 10:01:08
|
Revision: 10164 http://octave.svn.sourceforge.net/octave/?rev=10164&view=rev Author: mmarzolla Date: 2012-04-06 10:01:00 +0000 (Fri, 06 Apr 2012) Log Message: ----------- added full documentation sources Modified Paths: -------------- trunk/octave-forge/main/queueing/Makefile trunk/octave-forge/main/queueing/doc/INSTALL trunk/octave-forge/main/queueing/doc/Makefile trunk/octave-forge/main/queueing/doc/README trunk/octave-forge/main/queueing/doc/installation.txi trunk/octave-forge/main/queueing/doc/markovchains.txi trunk/octave-forge/main/queueing/doc/queueing.html trunk/octave-forge/main/queueing/doc/queueing.pdf trunk/octave-forge/main/queueing/doc/queueing.texi trunk/octave-forge/main/queueing/doc/queueingnetworks.txi Removed Paths: ------------- trunk/octave-forge/main/queueing/examples/ Modified: trunk/octave-forge/main/queueing/Makefile =================================================================== --- trunk/octave-forge/main/queueing/Makefile 2012-04-06 07:44:33 UTC (rev 10163) +++ trunk/octave-forge/main/queueing/Makefile 2012-04-06 10:01:00 UTC (rev 10164) @@ -18,7 +18,7 @@ \rm -f doc/conf.texi echo "@set VERSION $(VERSIONNUM)" > doc/conf.texi echo "@set VERSIONDATE $(VERSIONDATE)" >> doc/conf.texi - echo "@set top_srcdir " `pwd` >> doc/conf.texi + echo "@c @set top_srcdir " `pwd` >> doc/conf.texi DESCRIPTION: DESCRIPTION.in cat DESCRIPTION.in | \ @@ -33,7 +33,7 @@ for d in $(SUBDIRS); do \ $(MAKE) -C $$d $(MAKECMDGOALS); \ done - \rm -r -f *~ $(DISTNAME).tar.gz $(DISTNAME).tar.gz.uue $(PROGNAME) + \rm -r -f *~ $(DISTNAME).tar.gz $(DISTNAME).tar.gz.uue $(PROGNAME) $(PROGNAME)-html.tar.gz $(PROGNAME)-html.tar.gz.uue $(PROGNAME)-html distclean: clean for d in $(SUBDIRS); do \ Modified: trunk/octave-forge/main/queueing/doc/INSTALL =================================================================== --- trunk/octave-forge/main/queueing/doc/INSTALL 2012-04-06 07:44:33 UTC (rev 10163) +++ trunk/octave-forge/main/queueing/doc/INSTALL 2012-04-06 10:01:00 UTC (rev 10164) @@ -1,4 +1,4 @@ -This file documents the installation procedure of the `queueing' +This file documents the installation procedure of the Octave `queueing' toolbox. `queueing' is free software; you can redistribute it and/or modify @@ -6,9 +6,9 @@ later, as published by the Free Software Foundation. Note: This file (`INSTALL') is automatically generated from - `doc/installation.txi' in the `queueing' sources. Do not modify - this document directly, as changes will be lost. Modify the source - `doc/installation.txi' instead. + `doc/installation.txi' in the `queueing' subversion sources. Do + not modify this document directly, as changes will be lost. Modify + the source `doc/installation.txi' instead. 1 Installing the queueing toolbox ********************************* @@ -21,12 +21,13 @@ `http://octave.sourceforge.net/queueing/' - The package Web page is + Additional information can be found at `http://www.moreno.marzolla.name/software/queueing/' If you have a recent version of GNU Octave and a network connection, -you can install `queueing' directly from the prompt using this command: +you can install `queueing' directly from Octave command prompt using +this command: octave:1> pkg install -forge queueing @@ -55,11 +56,11 @@ octave:1> pkg install -local queueing-1.1.0.tar.gz This will install `queueing' within your home directory, and the -package will be available to your user only. *Note:* Octave version +package will be available to your user only. Note that Octave version 3.2.3 as shipped with Ubuntu 10.04 seems to ignore `-local' and always tries to install the package on the system directory. - To remove `queueing' you can use + To remove `queueing' simply use octave:1> pkg uninstall queueing @@ -92,79 +93,7 @@ search path each time Octave is started, and you no longer need to specify the `-p' option on the command line. -1.3 Content of the source distribution -====================================== - -The source code of the latest version of the `queueing' package can be -found in the Subversion repository at the URL: - -`http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/queueing/' - - The source distribution contains the following directories (some of -which are not included in the installation tarball): - -`doc/' - Documentation source. Most of the documentation is extracted from - the comment blocks of individual function files from the `inst/' - directory. - -`inst/' - This directory contains the m-files which implement the various - Queueing Network algorithms provided by `queueing'. As a - notational convention, the names of source files containing - functions for Queueing Networks start with the `qn' prefix; the - name of source files containing functions for Continuous-Time - Markov Chains (CTMSs) start with the `ctmc' prefix, and the names - of files containing functions for Discrete-Time Markov Chains - (DTMCs) start with the `dtmc' prefix. - -`test/' - This directory contains the test functions used to invoke all - tests on all function files. - -`scripts/' - This directory contains some utility scripts mostly from GNU - Octave, which extract the documentation from the - specially-formatted comments in the m-files. - -`examples/' - This directory contains examples which are automatically extracted - from the `demo' blocks of the function files. - -`devel/' - This directory contains function files which are either not working - properly, or need additional testing before they are moved to the - `inst/' directory. - - - The `queueing' package ships with a Makefile which can be used to -produce the documentation (in PDF and HTML format), and automatically -execute all function tests. Specifically, the following targets are -defined: - -`all' - Running `make' (or `make all') on the top-level directory builds - the programs used to extract the documentation from the comments - embedded in the m-files, and then produce the documentation in PDF - and HTML format (`doc/queueing.pdf' and `doc/queueing.html', - respectively). - -`check' - Running `make check' will execute all tests contained in the - m-files. If you modify the code of any function in the `inst/' - directory, you should run the tests to ensure that no errors have - been introduced. You are also encouraged to contribute new tests, - especially for functions which are not adequately validated. - -`clean' -`distclean' -`dist' - The `make clean', `make distclean' and `make dist' commands are - used to clean up the source directory and prepare the distribution - archive in compressed tar format. - - -1.4 Using the queueing toolbox +1.3 Using the queueing toolbox ============================== You can use all functions by simply invoking their name with the Modified: trunk/octave-forge/main/queueing/doc/Makefile =================================================================== --- trunk/octave-forge/main/queueing/doc/Makefile 2012-04-06 07:44:33 UTC (rev 10163) +++ trunk/octave-forge/main/queueing/doc/Makefile 2012-04-06 10:01:00 UTC (rev 10164) @@ -1,6 +1,6 @@ DOC=queueing CHAPTERS=$(patsubst %.txi,%.texi,$(wildcard *.txi)) -DISTFILES=README INSTALL $(DOC).pdf $(DOC).html +DISTFILES=README INSTALL $(DOC).pdf $(DOC).html $(DOC).texi $(CHAPTERS) $(wildcard demo_*.texi) .PHONY: clean dist @@ -26,17 +26,20 @@ $(DOC).info: $(DOC).texi $(CHAPTERS) -$(MAKEINFO) $< -%.texi: %.txi DOCSTRINGS +%.texi: %.txi DOCSTRINGS DEMOS ../scripts/munge-texi -d DOCSTRINGS < $< > $@ DOCSTRINGS: $(wildcard ../inst/*.m) (cd ../scripts; ./mkdoc ../inst) > DOCSTRINGS || \rm -f DOCSTRINGS +DEMOS: + octave -q grabdemo.m ../inst/ && touch DEMOS + dist: ln $(DISTFILES) ../`cat ../fname`/doc/ clean: - \rm -f *.fns *.pdf *.aux *.log *.dvi *.out *.info *.html *.ky *.tp *.toc *.vr *.cp *.fn *.pg *.op *.au *.aus *.cps x.log *~ DOCSTRINGS $(CHAPTERS) ../INSTALL + \rm -f *.fns *.pdf *.aux *.log *.dvi *.out *.info *.html *.ky *.tp *.toc *.vr *.cp *.fn *.pg *.op *.au *.aus *.cps x.log *~ DOCSTRINGS DEMOS $(CHAPTERS) ../INSTALL demo_*.texi distclean: clean Modified: trunk/octave-forge/main/queueing/doc/README =================================================================== --- trunk/octave-forge/main/queueing/doc/README 2012-04-06 07:44:33 UTC (rev 10163) +++ trunk/octave-forge/main/queueing/doc/README 2012-04-06 10:01:00 UTC (rev 10164) @@ -10,48 +10,18 @@ models. Open, closed and mixed networks are supported, with single or multiple classes of customers. The queueing toolbox also provides functions for steady-state and transient analysis of Markov chains, as -well as fo single station queueing systems. +well as for single station queueing systems. The Web page of the queueing toolbox is http://www.moreno.marzolla.name/software/queueing/ -The latest version can be downloaded from Octave-forge +The latest version can be downloaded from Octave forge http://octave.sourceforge.net/ -This package requires GNU Octave; version 3.0.0 or later should work. -The package contains the following directories (note that some of -these are only available in the SVN repository, and are not included -in the tarball published on Octave-forge): +This package requires GNU Octave; version 3.2.3 or later should work. -inst/ - Contains the Octave m-scripts implementing all functions - provided by the queueing toolbox. - -doc/ - Contains the user documentation, which is automatically - generated from the texinfo strings embedded in the m-scripts. - -scripts/ - Contains some scripts used to extract documentation strings - from the m-files. The scripts here have been taken almost - verbatim from the GNU Octave distribution. - -examples/ - Contains demo functions which are automatically extracted from - the scripts included in the inst/ directory. The demo - functions are put in this directory so that they can be - embedded into the package documentation. - -test/ - Contains the script used to execute all tests embedded within - functions in the inst/ directory. - -devel/ - Contains scripts which are currently under development, and - therefore should not be used. - The Octave queueing toolbox is distributed under the terms of the GNU General Public License, version 3 or later. See the file COPYING for details. Modified: trunk/octave-forge/main/queueing/doc/installation.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/installation.txi 2012-04-06 07:44:33 UTC (rev 10163) +++ trunk/octave-forge/main/queueing/doc/installation.txi 2012-04-06 10:01:00 UTC (rev 10164) @@ -22,8 +22,8 @@ @ifset INSTALLONLY @include conf.texi -This file documents the installation procedure of the @code{queueing} -toolbox. +This file documents the installation procedure of the Octave +@code{queueing} toolbox. @code{queueing} is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3 @@ -31,9 +31,9 @@ @quotation Note This file (@file{INSTALL}) is automatically generated from -@file{doc/installation.txi} in the @code{queueing} sources. Do not -modify this document directly, as changes will be lost. Modify the -source @file{doc/installation.txi} instead. +@file{doc/installation.txi} in the @code{queueing} subversion sources. +Do not modify this document directly, as changes will be lost. Modify +the source @file{doc/installation.txi} instead. @end quotation @end ifset @@ -44,7 +44,7 @@ @menu * Installation through Octave package management system:: * Manual installation:: -* Content of the source distribution:: +* Development sources:: * Using the queueing toolbox:: @end menu @@ -60,13 +60,13 @@ @url{http://octave.sourceforge.net/queueing/} -The package Web page is +Additional information can be found at @url{http://www.moreno.marzolla.name/software/queueing/} If you have a recent version of GNU Octave and a network connection, -you can install @code{queueing} directly from the prompt using this -command: +you can install @code{queueing} directly from Octave command prompt +using this command: @example octave:1> @kbd{pkg install -forge queueing} @@ -103,12 +103,11 @@ @end example This will install @code{queueing} within your home directory, and the -package will be available to your user only. @strong{Note:} Octave -version 3.2.3 as shipped with Ubuntu 10.04 seems to ignore -@code{-local} and always tries to install the package on the system -directory. +package will be available to your user only. Note that Octave version +3.2.3 as shipped with Ubuntu 10.04 seems to ignore @code{-local} and +always tries to install the package on the system directory. -To remove @code{queueing} you can use +To remove @code{queueing} simply use @example octave:1> @kbd{pkg uninstall queueing} @@ -159,18 +158,24 @@ @c @c -@node Content of the source distribution -@section Content of the source distribution +@ifclear INSTALLONLY +@node Development sources +@section Development sources -The source code of the latest version of the @code{queueing} -package can be found in the Subversion repository at the URL: +The source code of the @code{queueing} package can be found in the +Subversion repository at the URL: @url{http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/queueing/} -The source distribution contains the following directories (some of -which are not included in the installation tarball): +The source distribution contains additional development files which +are not present in the installation tarball. This section briefly +describes the content of the source tree. This is only relevant for +developers who want to modify the code or documentation; normal users +of the @code{queueing} package don't need +The source distribution contains the following directories: + @table @file @item doc/ Documentation source. Most of the documentation is extracted from the @@ -236,6 +241,8 @@ @end table +@end ifclear + @c @c @c Modified: trunk/octave-forge/main/queueing/doc/markovchains.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-04-06 07:44:33 UTC (rev 10163) +++ trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-04-06 10:01:00 UTC (rev 10164) @@ -205,7 +205,7 @@ @example @c @group -@verbatiminclude @value{top_srcdir}/examples/demo_1_dtmc.m +@verbatiminclude demo_1_dtmc.texi @c @end group @result{} 0.083333 0.125000 0.083333 0.125000 0.166667 0.125000 0.083333 0.125000 @@ -519,7 +519,7 @@ @example @group -@verbatiminclude @value{top_srcdir}/examples/demo_1_ctmc.m +@verbatiminclude demo_1_ctmc.texi @result{} q = 0.50000 0.50000 @end group @end example @@ -595,7 +595,7 @@ @example @group -@verbatiminclude @value{top_srcdir}/examples/demo_1_ctmc_exps.m +@verbatiminclude demo_1_ctmc_exps.texi @end group @end example @@ -611,7 +611,7 @@ @example @group -@verbatiminclude @value{top_srcdir}/examples/demo_1_ctmc_taexps.m +@verbatiminclude demo_1_ctmc_taexps.texi @end group @end example @@ -670,7 +670,7 @@ @example @group -@verbatiminclude @value{top_srcdir}/examples/demo_1_ctmc_mtta.m +@verbatiminclude demo_1_ctmc_mtta.texi @result{} t = 78.333 @end group @end example Modified: trunk/octave-forge/main/queueing/doc/queueing.html =================================================================== --- trunk/octave-forge/main/queueing/doc/queueing.html 2012-04-06 07:44:33 UTC (rev 10163) +++ trunk/octave-forge/main/queueing/doc/queueing.html 2012-04-06 10:01:00 UTC (rev 10164) @@ -44,7 +44,7 @@ <ul> <li><a href="#Installation-through-Octave-package-management-system">2.1 Installation through Octave package management system</a> <li><a href="#Manual-installation">2.2 Manual installation</a> -<li><a href="#Content-of-the-source-distribution">2.3 Content of the source distribution</a> +<li><a href="#Development-sources">2.3 Development sources</a> <li><a href="#Using-the-queueing-toolbox">2.4 Using the queueing toolbox</a> </li></ul> <li><a name="toc_Getting-Started" href="#Getting-Started">3 Introduction and Getting Started</a> @@ -302,7 +302,7 @@ <ul class="menu"> <li><a accesskey="1" href="#Installation-through-Octave-package-management-system">Installation through Octave package management system</a> <li><a accesskey="2" href="#Manual-installation">Manual installation</a> -<li><a accesskey="3" href="#Content-of-the-source-distribution">Content of the source distribution</a> +<li><a accesskey="3" href="#Development-sources">Development sources</a> <li><a accesskey="4" href="#Using-the-queueing-toolbox">Using the queueing toolbox</a> </ul> @@ -321,13 +321,13 @@ <p><a href="http://octave.sourceforge.net/queueing/">http://octave.sourceforge.net/queueing/</a> - <p>The package Web page is + <p>Additional information can be found at <p><a href="http://www.moreno.marzolla.name/software/queueing/">http://www.moreno.marzolla.name/software/queueing/</a> <p>If you have a recent version of GNU Octave and a network connection, -you can install <code>queueing</code> directly from the prompt using this -command: +you can install <code>queueing</code> directly from Octave command prompt +using this command: <pre class="example"> octave:1> <kbd>pkg install -forge queueing</kbd> </pre> @@ -356,19 +356,18 @@ <pre class="example"> octave:1> <kbd>pkg install -local queueing-1.1.0.tar.gz</kbd> </pre> <p>This will install <code>queueing</code> within your home directory, and the -package will be available to your user only. <strong>Note:</strong> Octave -version 3.2.3 as shipped with Ubuntu 10.04 seems to ignore -<code>-local</code> and always tries to install the package on the system -directory. +package will be available to your user only. Note that Octave version +3.2.3 as shipped with Ubuntu 10.04 seems to ignore <code>-local</code> and +always tries to install the package on the system directory. - <p>To remove <code>queueing</code> you can use + <p>To remove <code>queueing</code> simply use <pre class="example"> octave:1> <kbd>pkg uninstall queueing</kbd> </pre> <div class="node"> <a name="Manual-installation"></a> <p><hr> -Next: <a rel="next" accesskey="n" href="#Content-of-the-source-distribution">Content of the source distribution</a>, +Next: <a rel="next" accesskey="n" href="#Development-sources">Development sources</a>, Previous: <a rel="previous" accesskey="p" href="#Installation-through-Octave-package-management-system">Installation through Octave package management system</a>, Up: <a rel="up" accesskey="u" href="#Installation">Installation</a> @@ -403,7 +402,7 @@ longer need to specify the <samp><span class="option">-p</span></samp> option on the command line. <div class="node"> -<a name="Content-of-the-source-distribution"></a> +<a name="Development-sources"></a> <p><hr> Next: <a rel="next" accesskey="n" href="#Using-the-queueing-toolbox">Using the queueing toolbox</a>, Previous: <a rel="previous" accesskey="p" href="#Manual-installation">Manual installation</a>, @@ -411,16 +410,21 @@ </div> -<h3 class="section">2.3 Content of the source distribution</h3> +<h3 class="section">2.3 Development sources</h3> -<p>The source code of the latest version of the <code>queueing</code> -package can be found in the Subversion repository at the URL: +<p>The source code of the <code>queueing</code> package can be found in the +Subversion repository at the URL: <p><a href="http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/queueing/">http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/queueing/</a> - <p>The source distribution contains the following directories (some of -which are not included in the installation tarball): + <p>The source distribution contains additional development files which +are not present in the installation tarball. This section briefly +describes the content of the source tree. This is only relevant for +developers who want to modify the code or documentation; normal users +of the <code>queueing</code> package don't need + <p>The source distribution contains the following directories: + <dl> <dt><samp><span class="file">doc/</span></samp><dd>Documentation source. Most of the documentation is extracted from the comment blocks of individual function files from the <samp><span class="file">inst/</span></samp> @@ -478,7 +482,7 @@ <div class="node"> <a name="Using-the-queueing-toolbox"></a> <p><hr> -Previous: <a rel="previous" accesskey="p" href="#Content-of-the-source-distribution">Content of the source distribution</a>, +Previous: <a rel="previous" accesskey="p" href="#Development-sources">Development sources</a>, Up: <a rel="up" accesskey="u" href="#Installation">Installation</a> </div> Modified: trunk/octave-forge/main/queueing/doc/queueing.pdf =================================================================== (Binary files differ) Modified: trunk/octave-forge/main/queueing/doc/queueing.texi =================================================================== --- trunk/octave-forge/main/queueing/doc/queueing.texi 2012-04-06 07:44:33 UTC (rev 10163) +++ trunk/octave-forge/main/queueing/doc/queueing.texi 2012-04-06 10:01:00 UTC (rev 10164) @@ -38,13 +38,13 @@ @strong{See also:} \args\. @end macro -@macro examplefile{file} -@example -@group -@verbatiminclude @value{top_srcdir}/examples/\file\ -@end group -@end example -@end macro +@c @macro examplefile{file} +@c @example +@c @group +@c @verbatiminclude @value{top_srcdir}/examples/\file\ +@c @end group +@c @end example +@c @end macro @ifinfo @format Modified: trunk/octave-forge/main/queueing/doc/queueingnetworks.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/queueingnetworks.txi 2012-04-06 07:44:33 UTC (rev 10163) +++ trunk/octave-forge/main/queueing/doc/queueingnetworks.txi 2012-04-06 10:01:00 UTC (rev 10164) @@ -439,7 +439,7 @@ follows: @example -@verbatiminclude @value{top_srcdir}/examples/demo_1_qnsolve.m +@verbatiminclude demo_1_qnsolve.texi @end example @@ -606,7 +606,7 @@ @end iftex @example -@verbatiminclude @value{top_srcdir}/examples/demo_1_qnconvolution.m +@verbatiminclude demo_1_qnconvolution.texi @print{} k(1)=1 prob=0.17975 @print{} k(2)=2 prob=0.48404 @print{} k(3)=0 prob=0.52779 @@ -719,7 +719,7 @@ @noindent @strong{EXAMPLE} @example -@verbatiminclude @value{top_srcdir}/examples/demo_1_qnopensingle.m +@verbatiminclude demo_1_qnopensingle.texi @print{} R_s = 1.4062 @print{} N = 4.2186 @end example @@ -769,7 +769,7 @@ @noindent @strong{EXAMPLE} @example -@verbatiminclude @value{top_srcdir}/examples/demo_1_qnclosedsinglemva.m +@verbatiminclude demo_1_qnclosedsinglemva.texi @end example @@ -1088,7 +1088,7 @@ @noindent @strong{EXAMPLE} @example -@verbatiminclude @value{top_srcdir}/examples/demo_1_qnclosed.m +@verbatiminclude demo_1_qnclosed.texi @end example @DOCSTRING(qnopen) @@ -1175,7 +1175,7 @@ @noindent @strong{EXAMPLE} @example -@verbatiminclude @value{top_srcdir}/examples/demo_1_qnvisits.m +@verbatiminclude demo_1_qnvisits.texi @end example @subsection Other utility functions This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-04-06 10:02:57
|
Revision: 10165 http://octave.svn.sourceforge.net/octave/?rev=10165&view=rev Author: mmarzolla Date: 2012-04-06 10:02:50 +0000 (Fri, 06 Apr 2012) Log Message: ----------- Fixed build Modified Paths: -------------- trunk/octave-forge/main/queueing/Makefile Added Paths: ----------- trunk/octave-forge/main/queueing/doc/grabdemo.m Modified: trunk/octave-forge/main/queueing/Makefile =================================================================== --- trunk/octave-forge/main/queueing/Makefile 2012-04-06 10:01:00 UTC (rev 10164) +++ trunk/octave-forge/main/queueing/Makefile 2012-04-06 10:02:50 UTC (rev 10165) @@ -3,7 +3,7 @@ PROGNAME=queueing DISTNAME=$(PROGNAME)-$(VERSIONNUM) -SUBDIRS=inst scripts examples doc test devel +SUBDIRS=inst scripts doc test devel DISTFILES=COPYING NEWS DESCRIPTION DISTSUBDIRS=inst doc Added: trunk/octave-forge/main/queueing/doc/grabdemo.m =================================================================== --- trunk/octave-forge/main/queueing/doc/grabdemo.m (rev 0) +++ trunk/octave-forge/main/queueing/doc/grabdemo.m 2012-04-06 10:02:50 UTC (rev 10165) @@ -0,0 +1,77 @@ +## Copyright (C) 2005, 2006, 2007 David Bateman +## Modifications Copyright (C) 2009 Moreno Marzolla +## +## This file is part of qnetworks. It is based on the fntests.m +## script included in GNU Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## <http://www.gnu.org/licenses/>. + +clear all; + +global fundirs; + +if (nargin == 1) + xdir = argv(){1}; +else + xdir = "../inst/"; +endif + +srcdir = canonicalize_file_name (xdir); +fundirs = {srcdir}; + +function print_file_name (nm) + filler = repmat (".", 1, 55-length (nm)); + printf (" %s %s", nm, filler); +endfunction + +function y = hasdemo (f) + fid = fopen (f); + str = fscanf (fid, "%s"); + fclose (fid); + y = findstr (str, "%!demo"); +endfunction + +function dump_demo( fname, code, idx ) + if ( !idx) + return; + endif + printf("%d demos found\n", length(idx)-1 ); + [dd nn ee vv] = fileparts(fname); + for i=2:length(idx) + demoname = [ "demo_" num2str(i-1) "_" nn ".texi" ]; + fid = fopen( demoname, "wt" ); + fprintf(fid,"%s",code(idx(i-1)+1:idx(i)-1)); + fclose(fid); + endfor +endfunction + +for j=1:length(fundirs) + d = fundirs{j}; + lst = dir (d); + for i = 1:length (lst) + nm = lst(i).name; + if ((length (nm) > 3 && strcmp (nm((end-2):end), ".cc")) + || (length (nm) > 2 && strcmp (nm((end-1):end), ".m"))) + f = fullfile (d, nm); + ## Only run if it contains %!demo + if (hasdemo (f)) + tmp = strrep (f, [srcdir, "/"], ""); + print_file_name (tmp); + [code, idx] = test (f, "grabdemo" ); + dump_demo( nm, code, idx ); + endif + endif + endfor +endfor This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-04-06 16:07:03
|
Revision: 10168 http://octave.svn.sourceforge.net/octave/?rev=10168&view=rev Author: mmarzolla Date: 2012-04-06 16:06:56 +0000 (Fri, 06 Apr 2012) Log Message: ----------- removed obsolete script directory Modified Paths: -------------- trunk/octave-forge/main/queueing/Makefile Added Paths: ----------- trunk/octave-forge/main/queueing/devel/pmva.l trunk/octave-forge/main/queueing/devel/pmva.y trunk/octave-forge/main/queueing/devel/test.pmva trunk/octave-forge/main/queueing/doc/grabhelp.m Removed Paths: ------------- trunk/octave-forge/main/queueing/scripts/ Modified: trunk/octave-forge/main/queueing/Makefile =================================================================== --- trunk/octave-forge/main/queueing/Makefile 2012-04-06 16:04:05 UTC (rev 10167) +++ trunk/octave-forge/main/queueing/Makefile 2012-04-06 16:06:56 UTC (rev 10168) @@ -3,7 +3,7 @@ PROGNAME=queueing DISTNAME=$(PROGNAME)-$(VERSIONNUM) -SUBDIRS=inst scripts doc test devel +SUBDIRS=inst doc test devel DISTFILES=COPYING NEWS DESCRIPTION DISTSUBDIRS=inst doc Copied: trunk/octave-forge/main/queueing/devel/pmva.l (from rev 10137, trunk/octave-forge/main/queueing/scripts/pmva.l) =================================================================== --- trunk/octave-forge/main/queueing/devel/pmva.l (rev 0) +++ trunk/octave-forge/main/queueing/devel/pmva.l 2012-04-06 16:06:56 UTC (rev 10168) @@ -0,0 +1,78 @@ +/**************************************************************************** + * + * pmva.l + * + * Lexer for the PMVA notation. + * + * Copyright (C) 2011 Moreno Marzolla + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + ****************************************************************************/ + +/* + * See pmva.y for details + */ +%{ +#include "stdio.h" +#include "pmva.h" +#include "y.tab.h" +int linenum=1; +%} + +DIGITS [0-9]+ +ID [a-zA-Z][A-Za-z0-9_]* +WS [ \t]+ +LF [\r\n] +FLOAT {DIGITS}?\.{DIGITS} +INT {DIGITS} + +%% + +{WS} /* nothing to do */ +{LF} { linenum++; } +classes { return TOK_CLASSES; } +servers { return TOK_SERVERS; } +routing { return TOK_ROUTING; } +network { return TOK_NETWORK; } +end { return TOK_END; } +FCFS { return TOK_FCFS; } +PS { return TOK_PS; } +IS { return TOK_IS; } +LI { return TOK_LI; } +MS { return TOK_MS; } +LD { return TOK_LD; } +POP { return TOK_POP; } +MVA { return TOK_MVA; } +ASYMP { return TOK_ASYMP; } +"=>" { return TOK_ARROW; } +{FLOAT} { return TOK_FLOAT; } +{INT} { yylval.ival = atoi(yytext); return TOK_INT; } +{ID} { + if ((yylval.id=malloc(yyleng+1)) == NULL) { + fprintf(stderr, "malloc() failed for id*\n"); + exit(1); + } + strncpy(yylval.id, yytext, yyleng); + yylval.id[yyleng] = '\0'; + return TOK_ID; + } +. { return yytext[0]; } + +%% +int yywrap( void ) +{ +return 1; +} + Copied: trunk/octave-forge/main/queueing/devel/pmva.y (from rev 10137, trunk/octave-forge/main/queueing/scripts/pmva.y) =================================================================== --- trunk/octave-forge/main/queueing/devel/pmva.y (rev 0) +++ trunk/octave-forge/main/queueing/devel/pmva.y 2012-04-06 16:06:56 UTC (rev 10168) @@ -0,0 +1,271 @@ +/**************************************************************************** + * + * pmva.y + * + * This grammar recognizes the PMVA notation for describing + * queueing network models. This file is part of the queueing toolbox. + * + * Copyright (C) 2011, 2012 Moreno Marzolla + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + ****************************************************************************/ + +/* + * PMVA (Purdue Mean Value Analysis program) is described in + * Jeff Brumfield, "PMVA - Purdue Mean Value Analysis Program User's Guide" + * Technical Report CSD-TR-383, april 1981, Purdue University: + * + * http://docs.lib.purdue.edu/cgi/viewcontent.cgi?article=1309&context=cstech + * + * This file contains a grammar for PMVA, according to the specification + * above. At the moment, this grammar is only used to implement a parser + * which does absolutely nothing (apart recognizing PMVA models). + * Eventually, this grammar will evolve in a suitable software tool + * for generating an Octave model suitable for analysis with + * the queueing toolbox. + */ +%{ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "pmva.h" + +extern int linenum; +extern FILE *yyin, *yyout; + +#define YYERROR_VERBOSE 1 +%} + +%union{ + int ival; + float fval; + char* id; +}; + +%token <id> TOK_ID +%token <ival> TOK_INT +%token <fval> TOK_FLOAT +%token TOK_CLASSES +%token TOK_SERVERS +%token TOK_ROUTING +%token TOK_FCFS +%token TOK_PS +%token TOK_IS +%token TOK_LCFS +%token TOK_LI +%token TOK_MS +%token TOK_LD +%token TOK_ARROW +%token TOK_NETWORK +%token TOK_END +%token TOK_MVA +%token TOK_ASYMP +%token TOK_POP + +%left ',' +%left TOK_ARROW + +%% /* The grammar follows */ + +input: /* empty */ +| TOK_NETWORK ';' blocks TOK_END ';' solution_block +; + +blocks: /* empty */ +| blocks block +; + +block: TOK_CLASSES class_list ';' +| TOK_SERVERS server_list ';' +| TOK_ROUTING routing_node_list ';' +; + +class_list: /* empty */ +| TOK_ID { push_class($1); } +| class_list ',' TOK_ID { push_class($3); } +; + +server_list: /* empty */ +| server +| server_list ',' server +; + +server: TOK_ID { push_server($1); } queueing_discipline server_type service_times +; + +queueing_discipline: /* empty (assume FCFS) */ +| TOK_FCFS { server_list->queueing_discipline = FCFS; } +| TOK_PS { server_list->queueing_discipline = PS; } +| TOK_IS { server_list->queueing_discipline = IS; printf("m(%d) = -1;\n", n_servers); } +| TOK_LCFS { server_list->queueing_discipline = LCFS; } +; + +server_type: { printf("m(%d) = 1;\n", n_servers); } /* if not specified, assume LI */ +| TOK_LI { server_list->server_type = LI; printf("m(%d) = 1;\n", n_servers); } +| TOK_MS TOK_INT { server_list->server_type = MS; server_list->num_servers = $2; printf("m(%d) = %d;\n", n_servers, $2); } +| TOK_LD { server_list->server_type = LD; printf("m(%d) = 1;\n", n_servers); } +; + +service_times: service_time_spec +| service_times service_time_spec +; + +service_time_spec: class_name visit_ratio service_time +; + +class_name: /* empty */ { if (n_classes > 1) { printf("Class spwcified for server %s must be given for multiclass networks\n", server_list->name); exit(-1); } } +| TOK_ID '=' +; + +visit_ratio: /* empty */ +| '[' TOK_FLOAT ']' +; + +service_time: TOK_FLOAT +| '(' serv_time_list ')' +; + +serv_time_list: TOK_FLOAT +| serv_time_list ',' TOK_FLOAT +; + +routing_node_list: /* empty */ +| nonempty_routing_spec +| routing_node_list ',' nonempty_routing_spec +; + +nonempty_routing_spec: node_list +| nonempty_routing_spec TOK_ARROW node_list +; + +node_list: TOK_ID opt_class_name opt_routing_prob +| node_list TOK_ID opt_class_name opt_routing_prob +; + +opt_class_name: /* empty */ +| '/' TOK_ID +; + +opt_routing_prob: /* empty */ +| '(' TOK_FLOAT ')' +; + +solution_block: /* empty */ +| TOK_ASYMP ';' +| TOK_MVA pop_description ';' +; + +pop_description: TOK_POP '=' TOK_INT +| TOK_POP '=' '(' pop_list ')' +; + +pop_list: TOK_INT +| pop_list ',' TOK_INT +; + +%% + +server_node_t* server_list = 0; +class_node_t* class_list = 0; + +int n_servers = 0; +int n_classes = 0; + +/* + * Push a new server in front of the server list. Return the new head + * of the list (the global variable server_list is also updated to + * point to the newly created object). The caller transfers ownership + * of the pointer name. + */ +server_node_t* push_server( const char* name ) +{ + server_node_t* server = malloc( sizeof(server_node_t) ); + server->id = ++n_servers; + server->name = name; + server->queueing_discipline = FCFS; + server->server_type = LI; + server->num_servers = 1; + server->next = server_list; + server_list = server; + printf("servers{%d} = \"%s\";\n", n_servers, name ); + return server; +} + +class_node_t* push_class( const char* name ) +{ + class_node_t* class = malloc( sizeof(class_node_t) ); + class->id = ++n_classes; + class->name = name; + class->next = class_list; + class_list = class; + printf("classes{%d}=\"%s\";\n", n_classes, name); + return class; +} + +void dump_server_list( void ) +{ + server_node_t* server = server_list; + while ( server ) { + printf("[%d] %s ",server->id, server->name); + + switch ( server->server_type ) { + case LI: printf("LI "); break; + case LD: printf("LD "); break; + case MS: printf("MS %d ", server->num_servers); break; + default: printf("Unrecognized server type %d\n", server->server_type); + exit(-1); + } + + switch ( server->queueing_discipline ) { + case FCFS: printf("FCFS "); break; + case PS: printf("PS "); break; + case LCFS: printf("LCFS "); break; + case IS: printf("IS "); break; + default: printf("Unrecognized queueing discipline %d\n", server->queueing_discipline ); + exit(-1); + } + printf("\n"); + server = server->next; + } +} + +void dump_class_list( void ) +{ + class_node_t* class = class_list; + while( class ) { + printf("[%d] %s\n", class->id, class->name ); + class = class->next; + } +} + +void yyerror(char const *s) +{ + fprintf(stderr, "line %d, %s\n", linenum, s); + /*fprintf(stderr, "%s: (Error) line %d: %s\n", nomefile, linea, s); */ +} + +int main( int argc, char **argv ) +{ + int res; + ++argv, --argc; /* skip over program name */ + if ( argc > 0 ) + yyin = fopen( argv[0], "r" ); + else + yyin = stdin; + + res = yyparse(); + /* dump_server_list(); + dump_class_list(); */ +} Copied: trunk/octave-forge/main/queueing/devel/test.pmva (from rev 10137, trunk/octave-forge/main/queueing/scripts/test.pmva) =================================================================== --- trunk/octave-forge/main/queueing/devel/test.pmva (rev 0) +++ trunk/octave-forge/main/queueing/devel/test.pmva 2012-04-06 16:06:56 UTC (rev 10168) @@ -0,0 +1,15 @@ +network; +classes A, B, C; +classes D, E, F; +servers terminals IS LI 1.0; +servers cpu2 PS MS 2 BATCH=20.0; +servers + terminals IS LI 4.0, + cpu PS LI 0.025, + disk FCFS LI 0.050, + tape FCFS LI 0.150, + cpu2 PS MS 2 BATCH=0.064 INTERACTIVE=(0.4 , 0.4, 0.3), + disk2 FCFS LD ALL=(0.0250, 0.0225, 0.0214, 0.0208); +routing + terminals/FOO => cpu / BAR (0.9) disk / BAZ (0.1) => tape / ID; +end; Added: trunk/octave-forge/main/queueing/doc/grabhelp.m =================================================================== --- trunk/octave-forge/main/queueing/doc/grabhelp.m (rev 0) +++ trunk/octave-forge/main/queueing/doc/grabhelp.m 2012-04-06 16:06:56 UTC (rev 10168) @@ -0,0 +1,68 @@ +## Copyright (C) 2012 Moreno Marzolla +## +## This file is part of the queueing toolbox. +## +## The queueing toolbox is free software: you can redistribute it and/or +## modify it under the terms of the GNU General Public License as +## published by the Free Software Foundation, either version 3 of the +## License, or (at your option) any later version. +## +## The queueing toolbox is distributed in the hope that it will be +## useful, but WITHOUT ANY WARRANTY; without even the implied warranty +## of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with the queueing toolbox. If not, see <http://www.gnu.org/licenses/>. + +## Usage: +## +## octave -q grabhelp.m ../inst/ +## +## scans all .m files in the given directory (e.g., ../inst/). For each +## file f, dump the help text to f.texi. The given directory must be in +## Octave search path, otherwise no help text can be located. + +clear all; + +global fundirs; + +if (nargin != 1) + usage("grebhelp.m [script_path]"); +endif + +xdir = argv(){1}; +srcdir = canonicalize_file_name (xdir); +fundirs = {srcdir}; + +for j=1:length(fundirs) + d = fundirs{j}; + lst = dir (d); + for i = 1:length (lst) + nm = lst(i).name; + [pp ff ss] = fileparts(nm); + if ( strcmp(ss, ".m") ) + text = get_help_text(ff); + if ( !isempty(text) ) + texiname = [ff ".texi"]; + printf("%s -> %s\n", ff, texiname); + fid = fopen(texiname, "wt"); + fprintf(fid,"@c -*- texinfo -*-\n\n@c Copyright (C) 2012 Moreno Marzolla\n@c This file is part of the queueing toolbox, a Queueing Networks\n@c analysis package for GNU Octave. The queueing toolbox is distributed\n@c under the terms of the GNU General Public License version 3 or later\n\n@c This file is automatically generated from %s\n@c All modifications to this file will be lost\n\n", + nm); + + ## from __makeinfo__.m in Octave + + ## Formatting in m-files has an extra space at the beginning of + ## every line. Remove these unwanted spaces if present. First + ## text char is "\n" delim. + text = strrep (text, "\n ", "\n"); + + ## Texinfo crashes if @end tex does not appear first on the line. + text = regexprep (text, '^ +@end tex', '@end tex', 'lineanchors'); + + fprintf(fid, "%s\n", text); + fclose(fid); + endif + endif + endfor +endfor This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-04-06 16:54:38
|
Revision: 10171 http://octave.svn.sourceforge.net/octave/?rev=10171&view=rev Author: mmarzolla Date: 2012-04-06 16:54:31 +0000 (Fri, 06 Apr 2012) Log Message: ----------- Restructuring documentation dir Modified Paths: -------------- trunk/octave-forge/main/queueing/Makefile trunk/octave-forge/main/queueing/doc/Makefile Added Paths: ----------- trunk/octave-forge/main/queueing/doc/demos/Makefile trunk/octave-forge/main/queueing/doc/help/Makefile Modified: trunk/octave-forge/main/queueing/Makefile =================================================================== --- trunk/octave-forge/main/queueing/Makefile 2012-04-06 16:16:17 UTC (rev 10170) +++ trunk/octave-forge/main/queueing/Makefile 2012-04-06 16:54:31 UTC (rev 10171) @@ -5,7 +5,7 @@ DISTNAME=$(PROGNAME)-$(VERSIONNUM) SUBDIRS=inst doc test devel DISTFILES=COPYING NEWS DESCRIPTION -DISTSUBDIRS=inst doc +DISTSUBDIRS=inst doc doc/demos doc/help .PHONY: clean check Modified: trunk/octave-forge/main/queueing/doc/Makefile =================================================================== --- trunk/octave-forge/main/queueing/doc/Makefile 2012-04-06 16:16:17 UTC (rev 10170) +++ trunk/octave-forge/main/queueing/doc/Makefile 2012-04-06 16:54:31 UTC (rev 10171) @@ -1,6 +1,7 @@ DOC=queueing CHAPTERS=$(wildcard *.texi) -DISTFILES=README INSTALL $(DOC).pdf $(DOC).html $(DOC).texi $(CHAPTERS) demos/ help/ +DISTFILES=README INSTALL $(DOC).pdf $(DOC).html $(DOC).texi $(CHAPTERS) +SUBDIRS=demos help .PHONY: clean dist @@ -16,26 +17,32 @@ -$(MAKEINFO) -D INSTALLONLY \ --no-validate --no-headers --no-split --output INSTALL $< -$(DOC).html: $(DOC).texi $(CHAPTERS) DEMOS HELP +$(DOC).html: $(DOC).texi $(CHAPTERS) demos/DONE help/DONE -$(MAKEINFO) --html --no-split $(DOC).texi -$(DOC).pdf: $(DOC).texi $(CHAPTERS) DEMOS HELP +$(DOC).pdf: $(DOC).texi $(CHAPTERS) demos/DONE help/DONE texi2pdf -o $(DOC).pdf $(DOC).texi -$(DOC).info: $(DOC).texi $(CHAPTERS) DEMOS HELP +$(DOC).info: $(DOC).texi $(CHAPTERS) demos/DONE help/DONE -$(MAKEINFO) $(DOC).texi -DEMOS: - cd demos && octave -p ../../inst/ -q ../grabdemo.m ../../inst/ && touch ../DEMOS +demos/DONE: + $(MAKE) -C demos -HELP: - cd help && octave -p ../../inst/ -q ../grabhelp.m ../../inst/ && touch ../HELP +help/DONE: + $(MAKE) -C help dist: ln $(DISTFILES) ../`cat ../fname`/doc/ clean: - \rm -f *.fns *.pdf *.aux *.log *.dvi *.out *.info *.html *.ky *.tp *.toc *.vr *.cp *.fn *.pg *.op *.au *.aus *.cps x.log *~ demos/*.texi help/*.texi DOCSTRINGS DEMOS HELP INSTALL + for d in $(SUBDIRS); do \ + $(MAKE) -C $$d $(MAKECMDGOALS); \ + done + \rm -f *.fns *.pdf *.aux *.log *.dvi *.out *.info *.html *.ky *.tp *.toc *.vr *.cp *.fn *.pg *.op *.au *.aus *.cps x.log *~ DOCSTRINGS DEMOS HELP INSTALL distclean: clean + for d in $(SUBDIRS); do \ + $(MAKE) -C $$d $(MAKECMDGOALS); \ + done Added: trunk/octave-forge/main/queueing/doc/demos/Makefile =================================================================== --- trunk/octave-forge/main/queueing/doc/demos/Makefile (rev 0) +++ trunk/octave-forge/main/queueing/doc/demos/Makefile 2012-04-06 16:54:31 UTC (rev 10171) @@ -0,0 +1,13 @@ +DISTFILES=$(wildcard *.texi) + +ALL: + octave -p ../../inst/ -q ../grabdemo.m ../../inst/ && touch DONE + +dist: + ln $(DISTFILES) ../../`cat ../../fname`/doc/demos + +clean: + \rm -f *.texi *~ DONE + +distclean: clean + Added: trunk/octave-forge/main/queueing/doc/help/Makefile =================================================================== --- trunk/octave-forge/main/queueing/doc/help/Makefile (rev 0) +++ trunk/octave-forge/main/queueing/doc/help/Makefile 2012-04-06 16:54:31 UTC (rev 10171) @@ -0,0 +1,13 @@ +DISTFILES=$(wildcard *.texi) + +ALL: + octave -p ../../inst/ -q ../grabhelp.m ../../inst/ && touch DONE + +dist: + ln $(DISTFILES) ../../`cat ../../fname`/doc/help + +clean: + \rm -f *.texi *~ DONE + +distclean: clean + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mma...@us...> - 2012-04-22 13:55:45
|
Revision: 10310 http://octave.svn.sourceforge.net/octave/?rev=10310&view=rev Author: mmarzolla Date: 2012-04-22 13:55:38 +0000 (Sun, 22 Apr 2012) Log Message: ----------- fixed documentation bugs Modified Paths: -------------- trunk/octave-forge/main/queueing/doc/markovchains.txi trunk/octave-forge/main/queueing/inst/ctmc_exps.m Modified: trunk/octave-forge/main/queueing/doc/markovchains.txi =================================================================== --- trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-04-22 08:37:24 UTC (rev 10309) +++ trunk/octave-forge/main/queueing/doc/markovchains.txi 2012-04-22 13:55:38 UTC (rev 10310) @@ -583,6 +583,33 @@ the state occupancy probability at time @math{t}; @math{\exp({\bf Q}t)} is the matrix exponential of @math{{\bf Q}t}. +If there are absorbing states, we can define the vector @emph{expected +sojourn times until absorption} @math{{\bf L}(\infty)}, where for each +transient state @math{i}, @math{L_i(\infty)} is the expected total +time spent in state @math{i} until absorption, assuming that the +system started with a given state occupancy probability vector +@math{{\bf \pi}(0)}. Let @math{\tau} be the set of transient (i.e., +non absorbing) states; let @math{{\bf Q}_\tau} be the restriction of +@math{\bf Q} to the transient substates only. Similarly, let +@math{{\bf \pi}_\tau(0)} be the restriction of the initial probability +vector @math{{\bf \pi}(0)} to transient states @math{\tau}. + +The expected time to absorption @math{{\bf L}_\tau(\infty)} is defined as +the solution of the following equation: + +@iftex +@tex +$$ {\bf L}_\tau(\infty){\bf Q}_\tau = -{\bf \pi}_\tau(0) $$ +@end tex +@end iftex +@ifnottex +@example +@group +L_T( inf ) Q_T = -pi_T(0) +@end group +@end example +@end ifnottex + @GETHELP{ctmc_exps} @noindent @strong{EXAMPLE} @@ -621,32 +648,6 @@ @node Mean time to absorption (CTMC) @subsection Mean Time to Absorption -If we consider a Markov Chain with absorbing states, it is possible to -define the @emph{expected time to absorption} as the expected time -until the system goes into an absorbing state. More specifically, let -us suppose that @math{A} is the set of transient (i.e., non-absorbing) -states of a CTMC with @math{N} states and infinitesimal generator -matrix @math{\bf Q}. The expected time to absorption @math{{\bf -L}_A(\infty)} is defined as the solution of the following equation: - -@iftex -@tex -$$ {\bf L}_A(\infty){\bf Q}_A = -{\bf \pi}_A(0) $$ -@end tex -@end iftex -@ifnottex -@example -@group -L_A( inf ) Q_A = -pi_A(0) -@end group -@end example -@end ifnottex - -@noindent where @math{{\bf Q}_A} is the restriction of matrix @math{\bf Q} to -only states in @math{A}, and @math{{\bf \pi}_A(0)} is the initial -state occupancy probability at time 0, restricted to states in -@math{A}. - @GETHELP{ctmc_mtta} @noindent @strong{EXAMPLE} Modified: trunk/octave-forge/main/queueing/inst/ctmc_exps.m =================================================================== --- trunk/octave-forge/main/queueing/inst/ctmc_exps.m 2012-04-22 08:37:24 UTC (rev 10309) +++ trunk/octave-forge/main/queueing/inst/ctmc_exps.m 2012-04-22 13:55:38 UTC (rev 10310) @@ -24,10 +24,10 @@ ## @cindex Expected sojourn time ## ## With three arguments, compute the expected times @code{@var{L}(i)} -## spent in each state @math{i} during the time interval -## @math{[0,t]}, assuming that the state occupancy probabilities -## at time 0 are @var{p}. With two arguments, compute the expected time -## @code{@var{L}(i)} spent in each state @math{i} until absorption. +## spent in each state @math{i} during the time interval @math{[0,t]}, +## assuming that the initial occupancy vector is @var{p}. With two +## arguments, compute the expected time @code{@var{L}(i)} spent in each +## transient state @math{i} until absorption. ## ## @strong{INPUTS} ## @@ -57,9 +57,9 @@ ## If this function is called with three arguments, @code{@var{L}(i)} is ## the expected time spent in state @math{i} during the interval ## @math{[0,t]}. If this function is called with two arguments -## @code{@var{L}(i)} is either the expected time spent in state @math{i} -## until absorption (if @math{i} is a transient state), or zero (if -## @var{i} is an absorbing state). +## @code{@var{L}(i)} is the expected time spent in transient state +## @math{i} until absorption; if state @math{i} is absorbing, +## @code{@var{L}(i)} is zero. ## ## @end table ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |