Main Content

Entity Batch Splitter

Split batch entities

  • Entity Batch Splitter block

Libraries:
SimEvents

Description

The Entity Batch Splitter block splits a batched entity into its individual entities and outputs each entity through the output port. A batched entity is the output of the Entity Batch Creator block.

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

Examples

Ports

Input

expand all

Input entity port for entities entering the block.

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 block.

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

Number of entities that have arrived at the block.

Dependencies

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

Data Types: double

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 still in the block that have yet to depart.

Dependencies

To enable this port, click the Statistics tab and select the box labeled Number of entities remaining to depart, rem.

Data Types: double

Selecting this check box outputs the value 1 for a pending entity in the block, and 0 otherwise.

Dependencies

To enable this port, select the Statistics > Pending entity in block, pe.

Data Types: double

Parameters

expand all

Specify the behavior of the entity on certain events. For example, the Entry action is called when the entity enters the block. To customize actions when entities enter, exit, or are unbatched or blocked, enter MATLAB code in the Entry action, Exit action, Unbatch action, or Blocked action field of the Event actions tab. For more information about event actions, see Events and Event Actions. For an example, see Manage Entities Using Event Actions

Programmatic Use

Block Parameter: EntryAction, UnbatchAction, ExitAction, BlockedAction
Type: character vector
Values: MATLAB code
Default: ''

Number of entities that have arrived at the block.

Programmatic Use

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

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

Programmatic Use

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

Outputs the number of entities still in the block that have yet to depart.

Programmatic Use

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

Indicates whether an entity that is yet to depart is present in the block. The value is 1 for a pending entity, and 0 otherwise.

Programmatic Use

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

Version History

Introduced in R2016b