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)

physXMLfileTextReport.m
%designMetadataTextReport;

function textReport = physXMLfileTextReport(metadata , phys)

% metadata = struct('title', [''], 'author', [''], 'date', [''], 'multihourPlanning', [''], 'planningAlgorithmFile', [''], 'planningAlgorithmParametersString', [''], ....
%     'flowGeneratorFile', [''], 'flowGeneratorParametersString', [''], 'trafficMatrixFile', [''], 'description', ['']);
% 
% phys = struct('N',[], 'M', [], 'nodeName', [], 'nodesPlaceMatrix',[],'nodePopulation',[], 'nodeTimezone', [],...
%     'nodeLevel',[], 'numberTxPerNode',[],'numberRxPerNode',[],'numberTWCPerNode',[],...
%     'linkTable',[], 'linkLengthInKm',[], 'numberWavelengthPerFiber',[],'levelMatrix',[],...
%     'lightpathCapacity',[],'incomingLinksToNode',[],'outgoingLinksFromNode',[],...
%     'distancesMatrix', []);

generalTextReport={
    ['##### PHYSICAL TOPOLOGY XML FILE REPORT #####']; ...
    [''];...
    ['- METADATA INFO: ']; ...
    ['Title: ', metadata.title ]; ...
    ['Author: ', metadata.author]; ...
    ['Date: ', metadata.date];...
    ['Multihour Planning: ', metadata.multihourPlanning];...
    ['Planning Algorithm File: ', metadata.planningAlgorithmFile];...
    ['Planning Algorithm Parameters String: ', metadata.planningAlgorithmParametersString];...
    ['Traffic Matrix File: ', metadata.trafficMatrixFile];...
    ['Flow Generator File: ', metadata.flowGeneratorFile];...
    ['Flow Generator Parameters String: ', metadata.flowGeneratorParametersString];...
    ['Description: ', metadata.description];...
    [''];...
    ['- PHYS INFO: ']; ...
    [' Nr of Nodes: ', num2str(phys.N) ]; ...
    [' Nr of Fibre Links: ', num2str(phys.M) ]; ...
    [' Nr of Node Levels: ', num2str(size(phys.levelMatrix,1)) ]; ...
    };

nodeTextReport = {
    [''];...
    [' NODES:'];...
    [' Column 1: Node ID'];...
    [' (Column 2: Node Name) (Optional)'];...
    [' Column 3: Node Position(X,Y)'];...
    [' Column 4: Node Population'];...
    [' Column 5: Node Timezone'];...
    [' Column 6: Node Level'];...
    [' Column 7: Nr Available TXs'];...
    [' Column 8: Nr Available RXs'];...
    [' Column 9: Nr Available TWCs'];...
    };
for nodeID=1:phys.N,
    nodeInfo = [phys.nodesPlaceMatrix(nodeID,1:2) phys.nodePopulation(nodeID) phys.nodeTimezone(nodeID) ...
        phys.nodeLevel(nodeID) phys.numberTxPerNode(nodeID) phys.numberRxPerNode(nodeID) phys.numberTWCPerNode(nodeID)];
    stringNodes = {[ sprintf( ' %2d ',nodeID)  sprintf( '%-10s', phys.nodeName{nodeID})   sprintf( ' (%4.2f,%4.2f) %7.0f %2.0f %1.0f %1.0f %1.0f %1.0f',nodeInfo)]};
    nodeTextReport=vertcat(nodeTextReport , stringNodes);
end    
    
linkTextReport={
    [''];...
    [' FIBRE LINKS:'];...
    [' Column 1: Fibre Link ID'];...
    [' Column 2: Origin Node ID'];...
    [' Column 3: Destination Node ID'];...
    [' Column 4: Link Length (Km)'];...
    [' Column 5: Nr Available Wavelengths'];...
    };
for linkID=1:phys.M,
    linkInfo = [phys.linkTable(linkID,1:2) phys.linkLengthInKm(linkID) phys.numberWavelengthPerFiber(linkID)];
    stringLink = {[ sprintf( ' %2d',linkID) sprintf( ' %2d %2d %4.0f %2d',linkInfo)]};
    linkTextReport=vertcat(linkTextReport , stringLink);
end  

lpCapacityReport={
    [''];...
    [' Lightpath Capacity (Gbps): ', num2str(phys.lightpathCapacity) ]; ...
    };

levelMatrixReport={
    [''];...
    [' LEVEL MATRIX:'];...
    [num2str(phys.levelMatrix)];...
    };
 textReport=vertcat( generalTextReport , nodeTextReport , linkTextReport , lpCapacityReport , levelMatrixReport);

Contact us