Store entities
SimEvents
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.
Port_1
— Input entityInput entity port for entities entering the storage.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| Boolean
| enumerated
| bus
| fixed point
Port_1
— Output entityOutput entity port for entities exiting the storage.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| Boolean
| enumerated
| bus
| fixed point
Port_d
— Number of entities that have departed the blockNumber of entities that have departed the block.
To enable this port, click the Statistics tab and select the box labeled Number of entities departed, d.
Data Types: double
Port_n
— Number of entities that have not yet departed the blockNumber of entities that have not yet departed the block.
To enable this port, click the Statistics tab and select the box labeled Number of entities in block, n.
Data Types: double
Port_w
— Average wait time for entities in the blockAverage wait time for entities in the block.
To enable this port, click the Statistics tab and select the box labeled Average wait, w.
Data Types: double
Port_l
— Average store sizeAverage size of the store.
To enable this port, click the Statistics tab and select the box labeled Average store size, l.
Data Types: double
Port_ex
— Number of entities extractedNumber of entities that are pulled out of this block.
To enable this port, click the Statistics tab and select the box labeled Number of entities extracted, ex.
Data Types: double
Capacity
— Specify the capacity of the storage25
(default) | scalarSpecify the maximum number of entities contained in the storage.
Block Parameter:
Capacity |
Type: character vector |
Values: '25'
| scalar |
Default:
'25' |
Number of entities departed, d
— Outputs the number of entities that have departed the blockoff
(default) |
on
Selecting this check box outputs the number of entities that have exited the block.
Block Parameter:
NumberEntitiesDeparted |
Type: character vector |
Values: 'on'
| 'off' |
Default:
'off' |
Number of entities in block, n
— Outputs the number of entities present in the block, which have yet to departoff
(default) |
on
Selecting this check box outputs the number of entities present in the block, which have yet to depart.
Block Parameter:
NumberEntitiesInBlock |
Type: character vector |
Values: 'on'
| 'off' |
Default:
'off' |
Average wait, w
— Outputs the average wait timeoff
(default) |
on
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.
Block Parameter:
AverageWait |
Type: character vector |
Values: 'on'
| 'off' |
Default:
'off' |
Average store size, l
— Outputs the average store sizeoff
(default) |
on
Accumulated time-weighted average store size. Store size is the number of entities stored in the block. The block computes average store size by:
Multiplying the store size by its duration to calculate time-weighted store size
Summing up all time-weighted store sizes and averaging them over total time
For more information, see Interpret SimEvents Models Using Statistical Analysis.
Block Parameter:
AverageStoreSize |
Type: character vector |
Values: 'on'
| 'off' |
Default:
'off' |
Number of entities extracted, ex
— Number of entities extracted from this blockoff
(default) | on
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.
Block Parameter:
NumEntitiesExtracted |
Type: character vector |
Values: 'on'
| 'off' |
Default:
'off' |
Composite Entity Creator | Composite Entity Splitter | Discrete Event Chart | Entity Input Switch | Entity Multicast | Entity Output Switch | Entity Queue | Entity Replicator | Entity Selector | Entity Server