Educational network planning tool for the RWA problem in WDM networks (MILP and heuristic based)
% Usage: [flowTable] = trans_trafficMatrix2flowTable(traff_trafficMatrix)
% Abstract: This function converts a "traffic matrix" into a "flow table".
% We translate the information about the traffic flows from the first
% format to the second one.
% o In:
% traff_trafficMatrix(NxN): Average traffic flow offered between node
% pairs. The Traffic Matrix is a two-dimensional matrix with N (N:
% number of nodes) rows and N columns. An entry(s,d) means the average
% traffic flow from node 's' to node 'd', expressed in Gbps. The main
% diagonal is full of 0s.
% o Out:
% . flowTable(F,3): F-by-3 matrix. First column de ingress node, second
% the egress node, third the traffic offered = traffic carried in Gbps.
function [flowTable] = trans_trafficMatrix2flowTable(traff_trafficMatrix)
if (nargin==0), help trans_trafficMatrix2flowTable;return, end %help calling
if (nargin~=1), error('1: Incorrect number of arguments.'),end %Number of input arguments different of 1
flowTable=[sourceNode destinationNode averageFlow];