changeset 9795:68a3034a60cf octave-forge

misc fixes
author mmarzolla
date Tue, 20 Mar 2012 21:41:38 +0000
parents fbfec02115f0
children 9cee8406ccad
files main/queueing/doc/references.txi main/queueing/inst/ctmc.m main/queueing/inst/ctmc_exps.m
diffstat 3 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/main/queueing/doc/references.txi	Tue Mar 20 21:22:35 2012 +0000
+++ b/main/queueing/doc/references.txi	Tue Mar 20 21:41:38 2012 +0000
@@ -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}
--- a/main/queueing/inst/ctmc.m	Tue Mar 20 21:22:35 2012 +0000
+++ b/main/queueing/inst/ctmc.m	Tue Mar 20 21:41:38 2012 +0000
@@ -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; \
--- a/main/queueing/inst/ctmc_exps.m	Tue Mar 20 21:22:35 2012 +0000
+++ b/main/queueing/inst/ctmc_exps.m	Tue Mar 20 21:41:38 2012 +0000
@@ -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
 ##