eventIterate

Class: matlab.DiscreteEventSystem
Package: matlab

Create entity iterate event

Syntax

event=eventIterate(storageID,tag,priority)

Description

event=eventIterate(storageID,tag,priority) creates an event to repeatedly process entities of a storage element. You can then schedule this event by returning it as the output argument when implementing an event action method, such as exit.

Input Arguments

expand all

Index of a storage element. Entities inside this storage element will be iterated.

Custom tag of this entity iterate event.

Priority of the entity iterate event. This value must be a positive integer, where a smaller value indicates a higher event priority.

Output Arguments

expand all

Event that processes entities of a specific storage element.

Examples

expand all

Define an event to iterate entities of a storage element..

function event = exit(obj,storage,entity,dst)
    % Define an event to iterate entities of a storage element
    % - The event is regarding to storage element 2
    % - The event has a custom tag 'search'
    % - The event shall be executed at current simulation clock time
    % - The event has a priority of 10 (a smaller numeric value
    %   indicates a higher event priority) 
    event = obj.eventIterate(2, 'search', 10);
end

Introduced in R2016a