Class: matlab.DiscreteEventSystem
Package: matlab

Create entity generate event




event=eventGenerate(storageID,tag,delay,priority) creates an event to generate an entity. You can then schedule this event by returning it as the output argument when implementing an event action method, such as entry.

Input Arguments

expand all

Index of the storage element, where a new entity will be generated.

Custom tag of this entity generate event.

Time delay between current simulation time and the time the entity will be generated.

Positive integer value indicating system priority of the new entity. A smaller numeric value indicates a higher priority.

Output Arguments

expand all

Event that generates an new entity in the specified storage element.


expand all

Define entity generation event in storage element 3.

function event = setupEvents(obj) 
    % Define an entity generation event
    % - A new entity shall be created in storage element 3
    % - The event has a custom tag 'seed'
    % - The event shall be executed 0.5 second later
    % - The new entity shall be initialized with a priority of 200
    event = obj.eventGenerate(3, 'seed', 0.5, 200);

Introduced in R2016a