# HG changeset patch # User mmarzolla # Date 1369339977 0 # Node ID 550c163c90e0c9a22f23f90f2a457722231e697f # Parent 0fa62b47e5cb1c3973f0023d52faef2b199c93e0 Fixed computation of utilization in qncmmva diff -r 0fa62b47e5cb -r 550c163c90e0 main/queueing/ChangeLog --- a/main/queueing/ChangeLog Tue May 21 20:04:43 2013 +0000 +++ b/main/queueing/ChangeLog Thu May 23 20:12:57 2013 +0000 @@ -1,3 +1,9 @@ +2013-05-XX Moreno Marzolla + + * Version 1.2.2 released + * Fixed bug in qncmmva: utilization for M/M/m centers, m>1, was not correctly scaled to [0,1] + * Added warning to qncsmva to inform user about potential loss of accuracy due to load-dependent servers + 2013-02-05 Moreno Marzolla * Version 1.2.1 released diff -r 0fa62b47e5cb -r 550c163c90e0 main/queueing/doc/INSTALL --- a/main/queueing/doc/INSTALL Tue May 21 20:04:43 2013 +0000 +++ b/main/queueing/doc/INSTALL Thu May 23 20:12:57 2013 +0000 @@ -16,7 +16,7 @@ 1.1 Installation through Octave package management system ========================================================= -The most recent version of `queueing' is 1.2.0 and can be downloaded +The most recent version of `queueing' is 1.2.1 and can be downloaded from Octave-Forge `http://octave.sourceforge.net/queueing/' @@ -48,7 +48,7 @@ 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.2.0.tar.gz_ + octave:1> pkg install _queueing-1.2.1.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 @@ -57,7 +57,7 @@ If you do not have root access, you can do a local install using: - octave:1> pkg install -local queueing-1.2.0.tar.gz + octave:1> pkg install -local queueing-1.2.1.tar.gz Note: Octave version 3.2.3 as shipped with Ubuntu 10.04 LTS seems to ignore `-local' and always tries to install the @@ -70,7 +70,7 @@ octave:1>pkg list queueing Package Name | Version | Installation directory --------------+---------+----------------------- - queueing | 1.2.0 | /home/moreno/octave/queueing-1.2.0 + queueing | 1.2.1 | /home/moreno/octave/queueing-1.2.1 4. Starting from version 1.1.1, `queueing' is no longer automatically loaded on Octave startup. To make the functions available for use, @@ -94,8 +94,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.2.0.tar.gz - cd queueing-1.2.0/queueing/ + tar xvfz queueing-1.2.1.tar.gz + cd queueing-1.2.1/queueing/ Copy all `.m' files from the `inst/' directory to some target location. Then, start Octave with the `-p' option to add the target diff -r 0fa62b47e5cb -r 550c163c90e0 main/queueing/inst/qncmmva.m --- a/main/queueing/inst/qncmmva.m Tue May 21 20:04:43 2013 +0000 +++ b/main/queueing/inst/qncmmva.m Thu May 23 20:12:57 2013 +0000 @@ -133,11 +133,13 @@ ## @table @var ## ## @item U -## If @math{k} is a FCFS, LCFS-PR or PS node, then @code{@var{U}(c,k)} -## is the class @math{c} utilization at center -## @math{k}. If @math{k} is an IS node, then @code{@var{U}(c,k)} is the -## class @math{c} @emph{traffic intensity} at center @math{k}, -## defined as @code{@var{U}(c,k) = @var{X}(c,k)*@var{S}(c,k)}. +## If @math{k} is a FCFS, LCFS-PR or PS node (@code{@var{m}(k) @geq{} +## 1}), then @code{@var{U}(c,k)} is the class @math{c} utilization at +## center @math{k}, @math{0 @leq{} U(c,k) @leq{} 1}. If @math{k} is an +## IS node, then @code{@var{U}(c,k)} is the class @math{c} @emph{traffic +## intensity} at center @math{k}, defined as @code{@var{U}(c,k) = +## @var{X}(c,k)*@var{S}(c,k)}. In this case the value of +## #code{@var{U}(c,k)} may be greater than one. ## ## @item R ## @code{@var{R}(c,k)} is the class @math{c} response time at @@ -427,7 +429,7 @@ endwhile Q = Q_next; endfor - U = diag(X)*D; # U(c,k) = X(c)*D(c,k) + U = diag(X)*D ./ max(1,m); # U(c,k) = X(c)*D(c,k) Q = diag(X)*(R.*V); X = diag(X)*V; endfunction diff -r 0fa62b47e5cb -r 550c163c90e0 main/queueing/inst/qncsmva.m --- a/main/queueing/inst/qncsmva.m Tue May 21 20:04:43 2013 +0000 +++ b/main/queueing/inst/qncsmva.m Thu May 23 20:12:57 2013 +0000 @@ -71,11 +71,12 @@ ## @table @var ## ## @item U -## If @math{k} is a FCFS, LCFS-PR or PS node (@code{@var{m}(k) == 1}), -## then @code{@var{U}(k)} is the utilization of center @math{k}. If -## @math{k} is an IS node (@code{@var{m}(k) < 1}), then -## @code{@var{U}(k)} is the @emph{traffic intensity} defined as -## @code{@var{X}(k)*@var{S}(k)}. +## If @math{k} is a FCFS, LCFS-PR or PS node (@code{@var{m}(k) @geq{} +## 1}), then @code{@var{U}(k)} is the utilization of center @math{k}, +## @math{0 @leq{} U(k) @leq{} 1}. If @math{k} is an IS node +## (@code{@var{m}(k) < 1}), then @code{@var{U}(k)} is the @emph{traffic +## intensity} defined as @code{@var{X}(k)*@var{S}(k)}. In this case the +## value of @code{@var{U}(k)} may be greater than one. ## ## @item R ## @code{@var{R}(k)} is the response time at center @math{k}. @@ -176,6 +177,18 @@ U(i_single) = X(i_single) .* S(i_single); U(i_delay) = X(i_delay) .* S(i_delay); U(i_multi) = X(i_multi) .* S(i_multi) ./ m(i_multi); + + if ( (any(U(i_multi)<-1000*eps) || any(U(i_multi)>1+1000*eps)) && any(m>1) ) + warning("qn:numerical-instability", + ["****\n" \ + "Some utilizations for M/M/1 or M/M/m centers are outside the\n" \ + "valid range [0,1]. Since the network contains multiple-server nodes\n" \ + "he problem is likely due to numerical instability of the Mean\n" \ + "Value Analysis algorithm. Note that this is an intrinsic problem\n" \ + "of MVA, not of the implementation used in this toolbox.\n" \ + "****\n"]); + endif + endfunction #{