Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Entity Splitter

Divide composite entity into component entities

Library

Entity Management

Description

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

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.

Complete or Partial Splitting

The Split entity when parameter affects the circumstances under which the block accepts an entity to split. Choices are in the table.

Parameter ValueDescription
All entity output ports are not blockedThe block accepts an entity to split only when all component entities would be able to depart immediately.
Any entity output port is not blockedThe block accepts an entity to split when at least one component entity would be able to depart immediately.

Departure of Component Entities

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 next table.

Parameter ValueDescriptionExample
OUT1 portEach 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 robinEach 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.
EquiprobableEach 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 ValueDescription
Discard entityThe block discards the component entity that is supposed to depart through the newly blocked entity output port.
Warn and discard entityThe 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.
ErrorThe simulation halts with an error message.

Ports

Entity Input Ports

LabelDescription
INPort 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

LabelDescription
OUT1, OUT2, OUT3, and so onEntity 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

LabelDescriptionTime of Update When Statistic Is OnOrder of Update
#aNumber of entities that have arrived at this block since the start of the simulation.After entity arrival1
#dNumber of entities that have departed from this block since the start of the simulation.After entity departure2

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.

Dialog Box

Entity Splitter Tab

Number of entity output ports

Determines how many entity output ports the block has.

Split entity when

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.

Departure port precedence

Determines the start of the sequence in which the block outputs the component entities, each time the block splits an entity.

Initial seed

A nonnegative integer that initializes the random number generator used to determine the output sequence. You see this field only if you set Departure port precedence to Equiprobable.

If number of component entities does not match number of entity output ports

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.

If an output port becomes blocked during split

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. You see this field only if you set Split entity when to All entity output ports are not blocked.

Statistics Tab

Number of entities arrived

Allows you to use the signal output port labeled #a.

Number of entities departed

Allows you to use the signal output port labeled #d.

Was this topic helpful?