Iterating in Discrete Event System
Afficher commentaires plus anciens
Hi,
can somone show me how I can iterate over a FIFO storage and forward the entiyty which entered first. I´m iterating over a storage using function [entity, event, next] = entityIterate how can I tell the allgorithm to forward the entity with a specific attribute which has the longest waiting time to a specific output. I´ve coded it like this but the problem is that it´s forwards the first entity it found (the one which entered last) but I need it to forward the one who entered first:
function [entity, event, next] = entityIterate(obj,~,entity,~,~)
event=obj.initEventArray;
if entity.data.Attribute==1
event=obj.eventForward('output',3,0);
next=false;
else
next=true;
end
Réponses (0)
Catégories
En savoir plus sur General Applications dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!