| SimEvents® | ![]() |
Entity Management
This block divides a composite entity into its components and outputs the component entities through each entity output port that is not blocked. A composite entity is an entity that the Entity Combiner block creates using the Retain structure in departing entity option. In a typical pairing, the number of entity input ports of the Entity Combiner block equals the number of entity output ports of the Entity Splitter block.
Timeout events, if any, corresponding to the composite entity are canceled during the splitting operation.
Note If you want identical copies of an arriving entity to advance along multiple entity paths, use the Replicate block instead of the Entity Splitter block. The Replicate block copies entities without regard to their structure. |
Attributes and timers from the original component entities (that combined to form the composite entity) are present in the component entities that depart from this block. The values of the attributes and timers might have changed between the combining and splitting operations.
If the composite entity acquired a new attribute or a new timer between the combining and splitting operations, then it is not present in the component entities that depart from this block.
The Split entity when parameter affects the circumstances under which the block accepts an entity to split. Choices are in the table below.
| Parameter Value | Description |
|---|---|
| All entity output ports are not blocked | The block accepts an entity to split only when all component entities would be able to depart immediately. |
| Any entity output port is not blocked | The block accepts an entity to split when at least one component entity would be able to depart immediately. |
Each time the block splits an entity, the component entities depart in a sequence whose start is determined by the Departure port precedence parameter. Choices are in the table below.
| Parameter Value | Description | Example |
|---|---|---|
| OUT1 port | Each time the block splits an entity, the component entities depart via entity output ports OUT1, OUT2, OUT3,..., in that sequence. | The sequence of departures is always OUT1, OUT2, OUT3,... throughout the simulation. |
| Round robin | Each time the block splits an entity, the first component entity departs via the port after the one that received preference on the last such occasion. The remaining component entities depart via the subsequent ports in turn. | On a block with three entity output ports, the first time the block splits an entity, the component entities depart in the sequence OUT1, OUT2, OUT3. The second time, the component entities depart in the sequence OUT2, OUT3, OUT1. The third time, the component entities depart in the sequence OUT3, OUT1, OUT2. The fourth time is analogous to the first time, and so on. |
| Equiprobable | Each time the block splits an entity, the first component entity departs via a randomly selected entity output port. All entity output ports are equally likely to be selected and the Initial seed parameter initializes the random number generation process. The remaining component entities depart via the subsequent ports in turn. | On a block with four entity output ports, if the random number is three, then the component entities depart in the sequence OUT3, OUT4, OUT1, OUT2. If the random number is two on the next such occasion, then the component entities depart in the sequence OUT2, OUT3, OUT4, OUT1. |
An example in which the choice of Departure port precedence parameter is relevant is a model that sets an attribute on each component entity based on its departure port and then advances all component entities along a merged path to a FIFO Queue block. At each splitting occurrence during the simulation, the Departure port precedence parameter determines the sequence of the component entities in the queue.
In some cases, a departure through one entity output port causes another entity output port to become newly blocked. For example, this could happen if two entity output ports connect to a Path Combiner block, which in turn connects to a Single Server block whose service time is nonzero. Use the If an output port becomes blocked during split parameter to determine how the block responds. Choices are in the table below.
| Parameter Value | Description |
|---|---|
| Discard entity | The block discards the component entity that is supposed to depart through the newly blocked entity output port. |
| Warn and discard entity | The block issues a warning message in the MATLAB® Command Window, and discards the component entity that is supposed to depart through the newly blocked entity output port. |
| Error | The simulation halts with an error message. |
Entity Input Ports
| Label | Description |
|---|---|
| IN | Port for arriving entities, which must be composite entities created by the Entity Combiner block using the Retain structure in departing entity option. |
Entity Output Ports
| Label | Description |
|---|---|
| OUT1, OUT2, OUT3, etc. | Entity ports through which component entities depart. The entity that departs via the OUTN port corresponds to the entity that arrived at the INN entity input port of the corresponding Entity Combiner block. The Number of entity output ports parameter determines how many of these entity output ports the block has. |
Signal Output Ports
| Label | Description | Time of Update When Statistic Is On | Order of Update |
|---|---|---|---|
| #a | Number of entities that have arrived at this block since the start of the simulation. | After entity arrival | 1 |
| #d | Number of entities that have departed from this block since the start of the simulation. | After entity departure | 2 |
The initial output value, which is in effect from the start of the simulation until the first update by the block, is 0 for all signals.

Determines how many entity output ports the block has. This parameter must be a literal value, not a variable or an expression requiring evaluation.
Determines whether the block is available to arriving entities whenever at least one entity output port is not blocked, or only when all entity output ports are not blocked.
Determines the start of the sequence in which the block outputs the component entities, each time the block splits an entity.
A nonnegative integer that initializes the random number generator used to determine the output sequence. This field appears only if you set Departure port precedence to Equiprobable.
Determines whether the block issues a message when the number of component entities in the arriving composite entity does not equal the number of entity output ports of this block. "Continue" means that the block ignores any extra entity output ports and discards any extra component entities.
Determines whether the block issues a message when a component entity is unable to depart because an output port becomes blocked during the splitting process. This field appears only if you set Split entity when to All entity output ports are not blocked.

Controls the presence and behavior of the signal output port labeled #a.
Controls the presence and behavior of the signal output port labeled #d.
See Example: Managing Data in Composite Entities.
![]() | Entity Sink | Entity-Based Function-Call Event Generator | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |