Output copies of entity
This block outputs a copy of the arriving entity through each entity output port that is not blocked. You specify the number of copies that the block makes, using the Number of entity output ports parameter.
When the block replicates an entity that is subject to a timeout, all departing entities share the same expiration time; that is, the timeout events corresponding to all departing entities share the same scheduled event time. Logistically, the block cancels the timeout event of the arriving entity and schedules new timeout events for the departing entities. For more details about timeout events, see Role of Timeouts in SimEvents Models and Use Timeouts to Limit Entity Queueing Time.
The Replicate entity when parameter affects the circumstances under which the block accepts an entity to replicate. Choices are in the table below.
|The block accepts an entity to replicate only when all entity output ports are connected to available ports of subsequent blocks.|
|The block accepts an entity to replicate when at least one entity output port is connected to an available port of a subsequent block.|
If you connect multiple copies of this block, you can implement logical combinations of the parameter values in the table.
Each time the block replicates an entity, the copies depart in a sequence whose start is determined by the Departure port precedence parameter. Choices are in the table below.
|Each time the block replicates an entity, the copies depart via entity output ports OUT1, OUT2, OUT3,..., in that sequence.||The sequence of departures is always OUT1, OUT2, OUT3,... throughout the simulation.|
|Each time the block replicates an entity, the first copy departs via the port after the one that received preference on the last such occasion. The remaining copies depart via the subsequent ports in turn.||On a block with three entity output ports, the first time the block replicates an entity, the copies depart in the sequence OUT1, OUT2, OUT3. The second time, the copies depart in the sequence OUT2, OUT3, OUT1. The third time, the copies depart in the sequence OUT3, OUT1, OUT2. The fourth time is analogous to the first time, and so on.|
|Each time the block replicates an entity, the first copy 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 copies depart via the subsequent ports in turn.||On a block with four entity output ports, if the random number is three, then the copies depart in the sequence OUT3, OUT4, OUT1, OUT2. If the random number is two on the next such occasion, then the copies 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 replicated entity based on its departure port and then advances all replicated entities along a merged path to a FIFO Queue block. At each replication occurrence during the simulation, the Departure port precedence parameter determines the sequence of the replicated 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 replication parameter to determine how the block responds. Choices are in the table below.
|The block discards the entity that is supposed to depart through the newly blocked entity output port.|
|The block issues a warning message in the MATLAB® Command Window, and discards the entity that is supposed to depart through the newly blocked entity output port.|
|The simulation halts with an error message.|
Entity Input Ports
|IN||Port for arriving entities.|
Entity Output Ports
|OUT1, OUT2, OUT3, and so on||Port for departing entities, which are copies of the arriving entity. The Number of entity output ports parameter determines how many of these entity input 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 each 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; that is, the maximum number of copies the block makes for each arriving entity.
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 copies, each time the block replicates an entity.
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
Determines whether the block issues a message when a replicated
entity is unable to depart because an output port becomes blocked
during the replication process. You see this field only if you set Replicate
entity when to
All entity output ports are
These parameters determine whether the block produces data at signal output ports or omits those ports. For descriptions of the data and ports, see the preceding table, "Signal Output Ports".
Allows you to use the signal output port labeled #a.
Allows you to use the signal output port labeled #d.