Create entity forward event
creates an event to forward an entity from the current location to a new location. You
can then schedule this event by returning it as the output argument when implementing an
event action method, such as
locationType— Location type
Type of the new location. Specify
the new location is a storage element of the discrete-event system.
'output' if you want the entity to exit
from an output port of the discrete-event system.
locationIndex— Location index
Index of the new location. If location type is
it indicates the index of a storage element. If location type is
it indicates the index of an output port.
Time delay between current simulation time and the time the entity will be forwarded.
Event that forwards the entity in current event action context to a new location.
Define an event that forwards the current entity to storage.
function [entity,events] = entry(obj,storage,entity,src) % Define an event that forwards the current entity to storage % element 2. Event shall be scheduled to execute 0.8 second later. event1 = obj.eventForward('storage', 2, 0.8); % Define an event that forwards the current entity to output port 1. % Event shall be scheduled to execute at current simulation clock time. event2 = obj.eventForward('output', 1, 0); % Define events as event1 and event2 events = [event1, event2]; end