Documentation

Entity Queue

Enqueue entities

Library

Basic

Description

This block stores entities in a queue, based on order of arrival or priority. The entity at the head of the queue departs when the downstream block is ready to accept it.

Parameters

Capacity

Specify the capacity of the queue.

Queue type

Choose the type of queue. Select FIFO for a first-in-first-out queue. Select LIFO for a last-in-first-out queue. Select Priority to store the entities in order of their priority.

Entity arrival source

Choose the source of arrival for the entities. Select Multicast to receive entities broadcast from Entity Multicast blocks.

Multicast tag

Specify the tag when accepting entities broadcast via multicast sources. This parameter is visible when you set Entity arrival source to Multicast.

Priority source

Specify which attribute of the entity determines its priority. This parameter is visible when you set Queue type to Priority.

Sorting direction

Choose the direction of sorting entities based on priority. Specify 'ascending' if you want entities with smaller key values to appear in front of the queue. Specify 'descending' if you want entities with greater key values to appear in front of the queue.

Event actions

Specify the behavior of the entity in certain events. Define the behavior in the Event action parameter. For example, the Generate action is called after an entity is generated.

Event action

Define the behavior for the event action specified in Event actions.

Number of entities departed, d

Outputs the number of entities that have departed the block.

Number of entities in block, n

Outputs the number of entities present in the block, which have yet to depart.

Average wait, w

Outputs the average wait time for entities in the block.

Average queue length, l

Outputs the average length of the entity queue.

Introduced in R2016a

Was this topic helpful?