No BSD License  

Highlights from
MatPlanWDM v0.5

image thumbnail
from MatPlanWDM v0.5 by Pablo Pavon MariƱo
Educational network planning tool for the RWA problem in WDM networks (MILP and heuristic based)

nextPendingEvent.m
%>>>nextPendingEvent 
%This function extracts the next event from the list of pending
%events giving the parameters of this event. 
%
%>>>The input is:
%
% 1) listOfPendingEvents: list of pending events where the first column is
%    the type of event, the second column is the arrived/end time of the flow
%    and the third column is the serial number of the flow.
%
%>>>The outputs are:
%
% 1) eventType: type of event belonging to the next pending event. If Its an 
%    arrived event, eventType is '0'. If Its an end event, eventType is '1'.
%
% 2) eventTime: arrived/end time belonging to the next pending event.
%
% 3) serialNumber: serial number of the next flow.
%


function [eventType , eventTime , serialNumber] = nextPendingEvent(listOfPendingEvents)

if isempty(listOfPendingEvents)
    error('There arent any pending events');
else
    eventType=listOfPendingEvents(1,1);
    eventTime=listOfPendingEvents(1,2);    
    serialNumber=listOfPendingEvents(1,3);
end

Contact us