Split batch entities
SimEvents
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.
port_1
— Input batch entityInput entity port for entities entering the block.
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 block.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| Boolean
| enumerated
| bus
| fixed point
port_a
— Number of entities arrivedNumber of entities that have arrived at the block.
To enable this port, click the Statistics tab and select the box labeled Number of entities arrived, a.
Data Types: double
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_rem
— Number of entities remaining in the blockNumber of entities still in the block that have yet to depart.
To enable this port, click the Statistics tab and select the box labeled Number of entities remaining to depart, rem.
Data Types: double
port_pe
— Pending entity in blockSelecting this check box outputs the value 1
for a
pending entity in the block, and 0
otherwise.
To enable this port, select the Statistics > Pending entity in block, pe.
Data Types: double
Event actions
— Specify the event actionEntry
(default) | Unbatch
| Exit
| Blocked
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
Block Parameter:
EntryAction, UnbatchAction, ExitAction,
BlockedAction |
Type: character vector |
Values: MATLAB code |
Default:
'' |
Number of entities arrived, a
— Outputs the number of entities that have arrived at the blockoff
(default) |
on
Number of entities that have arrived at the block.
Block Parameter:
NumberOfEntitiesArrived |
Type: character vector |
Values: 'on'
| 'off' |
Default:
'off' |
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:
NumberOfEntitiesDeparted |
Type: character vector |
Values: 'on'
| 'off' |
Default:
'off' |
Number of entities remaining to depart, rem
— Outputs the number of entities that remain in the blockoff
(default) |
on
Outputs the number of entities still in the block that have yet to depart.
Block Parameter:
NumberOfEntitiesWaitingToDepart |
Type: character vector |
Values: 'on'
| 'off' |
Default:
'off' |
Pending entity in block, pe
— Pending entitiesoff
(default) | on
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.
Block Parameter:
PendingEntity |
Type: character vector |
Values: 'on'
| 'off' |
Default:
'off' |