No BSD License  

Highlights from
WDM Network Blocking Computation Toolbox

image thumbnail

WDM Network Blocking Computation Toolbox

by

 

21 Apr 2004 (Updated )

Blocking computation in WDM Networks for three different types of constraints.

p_l.m
function varargout=p_l(varargin)
%P_L Compute distibution of "busy" wavelengths on a n-hop path.
%   P_L on set of links connected in tandem is computed according
%   to [1] - no and full conversion, [2] and [3] - limited conversion.
%
%   [PROB]=P_L(L,C,K,D,METHOD) computes blocking stored in PROB, where L is
%   the vector of arrivals (loads) on every link in tandem, C is the number
%   of wavelength channels, D is the degree of wavelength conversion (if
%   choosed), K is the number of busy wavelengths and METHOD is the type of
%   conversion (for details see help P_M), where: 
%       1 - no conversion,
%       2 - full conversion,
%       3 - limited conversion.
%   
%   When METHOD is different than 3 than D can be empty (D will be ommited
%   during computation).
%
%   See also COMPUTE_BLOCKING_BIRMAN, COMPUTE_BLOCKING_KOVACEVIC, P_M.
%   
%   References:
%       [1] Milan Kovacevi, Anthony Acampora, "Benefits of Wavelength
%       translation in All-Optical Clear Channel Networks", IEEE Journal on 
%       Selected Areas in Communications, vol. 14, June 1996
%       [2] Tushar Tripathi, Kumar N. Sivarajan, "Computing Approximate
%       Blocking Probabilities in Wavelength Routed All_optical Networks
%       with Limited-Range Wavelength Conversion", IEEE Journal on
%       Selected Areas in Communications, vol. 18, October 2000
%       [3] Przemyslaw Pawelczak, "Traffic Engineering in All-Optical
%       Networks", M.Sc. thesis, Wroclaw University of Technology, Poland

%   Copyright 2003-2004 Przemyslaw Pawelczak
%   E-mail: przemyslaw_pawelczak@idg.com.pl
%   Wroclaw University of Technology, Poland
%   $Revision: 1.0 $  $Date: 2004/05/08 15:03:12 $

%If no D specified then it will be i.e. "1"
if nargin==4
    varargin{5}=varargin{4};
    varargin{4}=1;
end

%Exeption handling
message=nargchk(4,5,nargin);
testing_int=[varargin{2},varargin{3},varargin{4},varargin{5}];
if ~isempty(message)
    error('MATLAB:P_M:NumberOfInputArguments',...
        message);
end 
if find(isnan(testing_int))
    error('MATLAB:P_M:ArgumentType',...
        'Arguments must be numbers.');
end
%Check if VARARGIN are positive integers
if sum([testing_int<0,fix(testing_int)~=testing_int,testing_int(3)>3])~=0
    error('MATLAB:P_M:ArgumentType',...
        'Wrong type of arguments.');
end

%Change string into number (for all number arguments)
for k=1:4
    if isstr(varargin{k})==1
        varargin{k}=str2num(varargin{k});
    end
end

%Give names to input arguments
L=varargin{1};
C=varargin{2};
K=varargin{3};
D=varargin{4};
Method=varargin{5};

%Two possibilities
if length(L)==1
    varargout{1}=erlang_b(L,C,C);
else
    %implementation of (2), (3) and (4) from [1]:
    %q_k(n)=sum(i=0,W)sum(j=0,W)R(W-k|W-i,W-j)*q_k(n-1)*p_j(n)
    q=[];
    p=[];
    for i=0:C
        q=[q,erlang_b(L(1),C,i)];
    end 
    for l=2:length(L)
        p=[];
        q_former=[];
        for j=0:C
            p=[p,erlang_b(L(l),C,j)];
        end 
        for k=0:K
            q_k=[];
            for i=0:C
                for j=0:C
                    %Use p_m here
                    q_k=[q_k,p_m(C-k,[C-i,C-j],C,D,Method)*q(i+1)*p(j+1)];
                end
            end
            q_former=[q_former,sum(q_k)];
        end
        q=q_former;
    end
    varargout{1}=q(length(q));
end

Contact us