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)

initializationMILPVariablesScript.m
N=max(max(phys.linkTable));
M=size(phys.linkTable,1);
WMAX = max(phys.numberWavelengthPerFiber);

NUMBERLINKWAVELENGTHS = sum (phys.numberWavelengthPerFiber); % sum of the wavelengths in each links
NUMBERINGRESSEGRESSNODEPAIRS = N*N;
NUMBERVARIABLES_PIJMW = NUMBERLINKWAVELENGTHS * NUMBERINGRESSEGRESSNODEPAIRS;
NUMBERVARIABLES_FIJSD = NUMBERINGRESSEGRESSNODEPAIRS*NUMBERINGRESSEGRESSNODEPAIRS;
NUMBERVARIABLES =  NUMBERVARIABLES_PIJMW + NUMBERVARIABLES_FIJSD;

MWPOSITIONSOFTHELINKWAVELENGTHS = cell (1,M);
MWPOSITION = -1 * ones (M,WMAX);
MWINITIALANDENDPOSITIONOFLINK = zeros (M,2);

counterPosition_mw = 1;
for m=1:M
    MWINITIALANDENDPOSITIONOFLINK (m,1) = counterPosition_mw;
    for w=1:phys.numberWavelengthPerFiber(m)
        MWPOSITION (m,w) = counterPosition_mw;
        MWPOSITIONSOFTHELINKWAVELENGTHS{m} = [MWPOSITIONSOFTHELINKWAVELENGTHS{m} counterPosition_mw];
        counterPosition_mw = counterPosition_mw + 1;        
    end
    MWINITIALANDENDPOSITIONOFLINK (m,2) = counterPosition_mw - 1;
end

MWPOSITIONSOFTHENODE_INCOMING = cell (N,WMAX);
MWPOSITIONSOFTHENODE_OUTGOING = cell (N,WMAX);
for i=1:N
    for w=1:WMAX
        for m = phys.incomingLinksToNode{i}
            if (MWPOSITION (m,w) ~= -1) % if link m has no wavelength w => -1
                MWPOSITIONSOFTHENODE_INCOMING{i,w} = [MWPOSITIONSOFTHENODE_INCOMING{i,w} MWPOSITION(m,w)];
            end
        end
        for m = phys.outgoingLinksFromNode{i}
            if (MWPOSITION (m,w) ~= -1) % if link m has no wavelength w => -1
                MWPOSITIONSOFTHENODE_OUTGOING{i,w} = [MWPOSITIONSOFTHENODE_OUTGOING{i,w} MWPOSITION(m,w)];
            end
        end        
    end
end

Contact us