No BSD License  

Highlights from
MatPlanWDM v0.5

image thumbnail

MatPlanWDM v0.5

by

 

29 Jan 2007 (Updated )

Educational network planning tool for the RWA problem in WDM networks (MILP and heuristic based)

calculateDynamicNetMetrics (dynStat)
%>>>calculateDynamicNetMetrics
%This function is in charge of calculating the average temporal value of
%several statistics.

%>>>The inputs are:
%
% 1) dynStat: a structure containing the weighted sum of the statistics
%    that we save to calculate the average temporal when the simulation 
%    finishes.
%
%>>>The outputs are:
%
% 1) dynStatisticsOutput: is a structure containing the temporal average 
%    of the statistics acumulated. 
%


function [dynStatisticsOutput] = calculateDynamicNetMetrics (dynStat)

%Statistics Calculation
if(dynStat.lostFlows+dynStat.carriedFlows~=0)
    dynStat.blockingProbability=dynStat.lostFlows/(dynStat.lostFlows+dynStat.carriedFlows);
    dynStat.percentOfBlockedTraffic=dynStat.lostTraffic/(dynStat.lostTraffic+dynStat.carriedTraffic);
end

if(dynStat.elapsedTime~=0)

    dynStat.NrUsedTransmittersPerNode = dynStat.NrUsedTransmittersPerNode/dynStat.elapsedTime;
    dynStat.NrUsedReceiversPerNode = dynStat.NrUsedReceiversPerNode/dynStat.elapsedTime;
    dynStat.NrUsedWavelengthsPerFiber = dynStat.NrUsedWavelengthsPerFiber/dynStat.elapsedTime;
    dynStat.NrUsedPhysHops = dynStat.NrUsedPhysHops/dynStat.elapsedTime;
    dynStat.linkTraffic = dynStat.linkTraffic/dynStat.elapsedTime;
    dynStat.offeredTraffic = dynStat.offeredTraffic/dynStat.elapsedTime;
    dynStat.carriedPhysTraffic = dynStat.carriedPhysTraffic/dynStat.elapsedTime;
    dynStat.carriedVirtTraffic = dynStat.carriedVirtTraffic/dynStat.elapsedTime;
    dynStat.averPhysicalHops = dynStat.averPhysicalHops/dynStat.elapsedTime;
    dynStat.averVirtualHops = dynStat.averVirtualHops/dynStat.elapsedTime;
    dynStat.singleHopTraffic = dynStat.singleHopTraffic/dynStat.elapsedTime;
    dynStat.networkCongestion = dynStat.networkCongestion/dynStat.elapsedTime;
    dynStat.totalNrOfUsedWavelengths = dynStat.totalNrOfUsedWavelengths/dynStat.elapsedTime;
    dynStat.maximumLinkLoadinNrLightpaths = dynStat.maximumLinkLoadinNrLightpaths/dynStat.elapsedTime;
    dynStat.messagePropagationDelay = dynStat.messagePropagationDelay/dynStat.elapsedTime;
    dynStat.totalNrOfUsedConverters = dynStat.totalNrOfUsedConverters/dynStat.elapsedTime;
    dynStat.NrUsedConvertersPerNode = dynStat.NrUsedConvertersPerNode/dynStat.elapsedTime;
    dynStat.averNrUsedConverPerLP = dynStat.averNrUsedConverPerLP/dynStat.elapsedTime;
    
end

dynStatisticsOutput=dynStat;

Contact us