Category: Discrete Events
Represents a queue element (delay) in discrete event simulation.
syQueue(InputValue, DelayTime, TimeNow, [NumberOfServers], [ConveyorBelt], [Dispersion])
The syQueue function syntax has the following arguments:
- InputValue: required. The input events that should be processed.
- ServiceTime: required. Service time for each event.
- TimeNow: required. Reference to a cell with syClock().
- NumberOfServers: optional. Number of parallel servers that can process the input, unlimited (infinite) if ommited.
- ConveyorBelt: optional. True if served items should change the delay time too, if it changes for incoming items. False if ommited.
- Dispersion: optional. Static or stochastic delay time: 0 - static, 1 - exponential dispersion with DelayTime as rate (lambda), k - Erlang dispersion with DelayTime as rate (lambda). 0 if ommited.
Return value are events exiting the queue in the last time interval.
InputValue is interpreted as the number of events in the last time interval that were spotted on the element's input coming into the syQueue. Typically, these events are arriving from syScheduler() event generator, or another syQueue element.
Internally, syQueue element consists of a waiting line and one or more servers. DelayTime represents the time (in assumed time units) that takes the server to process the event. One event is being processed by one server, so if there are more servers (NumberOfServers > 1), they can process events in parallel.
If we set Dispersion to some integer value, DelayTime becomes stochastic, in this case we are dealing with Monte Carlo simulation. Dispersion is regarded as k, the shape of the distribution, and DelayTime as rate (lamda) parameter of Erlang distribution.
Setting ConveryorBelt to True means that if the DelayTime changes from timestep to timestep, the change is respected also by events that are already being served by the servers, not only by those that are waiting. Setting this parameter together with Dispersion > 0 is not possible.
The return value represents the number of events that came out of the syQueue in the last time interval.
syQueue has additional outputs which can be accessed by syQueueOutput() element.
syQueue(A3,1,A1)- Events coming from element in cell A3 will be delayed for one time unit. NumberOfServers is infinite, so no event will wait in the waiting line.
syQueue(A3,5,A1,1)- Events coming from element in cell A3 will be delayed for five time units. There is only one server, so events will have wait in the waiting line, if the server is not available.