Main Content

Entity Store

Store entities

  • Entity Store block

Libraries:
SimEvents

Description

The Entity Store block serves as a container or bin to store unordered entities. The entities are ready to leave the block immediately provided they are accepted by the next block. The Entity Store block attempts to forward an entity immediately upon its arrival. If the attempt fails, the block puts the entity in a pending state. The entity can then leave when the next block can start accepting it.

To customize actions when entities enter, exit, or are blocked, enter MATLAB® code in the Entry action, Exit action, or Blocked action field of the Event actions tab.

Examples

Ports

Input

expand all

Input entity port for entities entering the storage.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | Boolean | enumerated | bus | fixed point

Output

expand all

Output entity port for entities exiting the storage.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | Boolean | enumerated | bus | fixed point

Number of entities that have departed the block.

Dependencies

To enable this port, click the Statistics tab and select the box labeled Number of entities departed, d.

Data Types: double

Number of entities that have not yet departed the block.

Dependencies

To enable this port, click the Statistics tab and select the box labeled Number of entities in block, n.

Data Types: double

Average wait time for entities in the block.

Dependencies

To enable this port, click the Statistics tab and select the box labeled Average wait, w.

Data Types: double

Average size of the store.

Dependencies

To enable this port, click the Statistics tab and select the box labeled Average store size, l.

Data Types: double

Number of entities that are pulled out of this block.

Dependencies

To enable this port, click the Statistics tab and select the box labeled Number of entities extracted, ex.

Data Types: double

Parameters

expand all

Specify the maximum number of entities contained in the storage.

Programmatic Use

Block Parameter: Capacity
Type: character vector
Values: '25' | scalar
Default: '25'

Selecting this check box outputs the number of entities that have exited the block.

Programmatic Use

Block Parameter: NumberEntitiesDeparted
Type: character vector
Values: 'on' | 'off'
Default: 'off'

Selecting this check box outputs the number of entities present in the block, which have yet to depart.

Programmatic Use

Block Parameter: NumberEntitiesInBlock
Type: character vector
Values: 'on' | 'off'
Default: 'off'

Sum of the wait times for entities departing the block divided by their total number. Wait time is the duration between the Entity Store block entry and exit of an entity. For more information, see Interpret SimEvents Models Using Statistical Analysis.

Programmatic Use

Block Parameter: AverageWait
Type: character vector
Values: 'on' | 'off'
Default: 'off'

Accumulated time-weighted average store size. Store size is the number of entities stored in the block. The block computes average store size by:

  1. Multiplying the store size by its duration to calculate time-weighted store size

  2. Summing up all time-weighted store sizes and averaging them over total time

For more information, see Interpret SimEvents Models Using Statistical Analysis.

Programmatic Use

Block Parameter: AverageStoreSize
Type: character vector
Values: 'on' | 'off'
Default: 'off'

Outputs the number of extracted entities which are pulled out from this block by the Entity Find block. When an entity is extracted, Number of entities departed, d, Number of entities in block, n, Average wait, w, and Average store size, l statistics are updated accordingly. For more information about finding and extracting entities, see Find and Extract Entities in SimEvents Models.

Programmatic Use

Block Parameter: NumEntitiesExtracted
Type: character vector
Values: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2018a