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