| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → SimEvents |
| Contents | Index |
| Learn more about SimEvents |
Routing
This block accepts entities through any entity input port and outputs them through a single entity output port. You specify the number of entity input ports using the Number of entity input ports parameter.
If multiple entities arrive at the Path Combiner block simultaneously while the entity output port is not blocked, then the sequence in which the entities depart depends on the sequence of departure events from blocks that precede the Path Combiner block. For more information, see Managing Simultaneous Events. For an example, see the "No blockage" case in Connecting Multiple Queues to the Output Switch and note the dependence on generation event priority values. Even if the departure time is the same for multiple entities, the sequence might affect the system's behavior. For example, if the entities advance to a queue, the departure sequence determines their positions in the queue.
The Input port precedence parameter indicates how the block determines which entity input port to notify first, whenever the entity output port changes its status from blocked to unblocked. The first notified port is the first port to become available to an arriving entity. Choices for the Input port precedence parameter are described in the following table. For an example illustrating when this parameter is significant, see Combining Entity Paths.
| Input Port Precedence | Action when Entity Output Port Becomes Unblocked | Example for Block with Four Entity Input Ports |
|---|---|---|
| IN1 port | Notify entity input ports IN1, IN2, IN3,... until either an entity arrives or all ports are notified. | Throughout the simulation, the sequence of notifications is always IN1, IN2, IN3, IN4. |
| Equiprobable | Notify a random entity input port. All are equally likely and the Initial seed parameter initializes the random number generator. If this does not result in an entity arrival, notify the subsequent ports in turn until either an entity arrives or all ports are notified. | If the random number is three, notify the ports in the sequence IN3, IN4, IN1, IN2. If the random number is two on the next such occasion, notify the ports in the sequence IN2, IN3, IN4, IN1. |
| Round robin | Notify the port next to the one through which the last departing entity arrived. The IN1 port is considered "next to" the last entity input port on the block. If this does not result in an entity arrival, notify the subsequent ports in turn until either an entity arrives or all ports are notified. | An entity arrives through the IN2 port and advances to a Single Server block. Meanwhile, entities attempt to arrive at the Path Combiner block. When the server becomes available, the Path Combiner block notifies the ports in the sequence IN3, IN4, IN1, IN2. The sequence starts with IN3 because it is next to IN2, which is the port through which the last departing entity arrived. |
| From signal port p | Notify the port whose index is the value of the p input signal. If this does not result in an entity arrival, notify the subsequent ports in turn until either an entity arrives or all ports are notified. | If the value of the p signal is three, notify the ports in the sequence IN3, IN4, IN1, IN2. If p is two on the next such occasion, notify the ports in the sequence IN2, IN3, IN4, IN1. |
Entity Input Ports
| Label | Description |
|---|---|
| IN1, IN2, IN3, and so on | Port for arriving entities. The Number of entity input ports parameter determines how many of these entity input ports the block has. |
Signal Input Ports
| Label | Description |
|---|---|
| p | Index of the entity input port that the block makes available first, upon an event that changes the entity output port from blocked to unblocked. Values are 1, 2, 3,..., Number of entity input ports. You see this port only if you set Input port precedence to From signal port p. |
Entity Output Ports
| Label | Description |
|---|---|
| OUT | Port for departing entities. |
Signal Output Ports
| Label | Description | Time of Update When Statistic Is On | Order of Update |
|---|---|---|---|
| #d | Number of entities that have departed from this block since the start of the simulation. | After entity departure | 2 |
| last | Index of the input port through which the last entity arrived. The initial value is 0. After an entity has arrived and departed, values are 1, 2, 3,..., Number of entity input ports. | After entity departure | 1 |
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 input ports the block has. This parameter must be a literal value, not a variable or an expression requiring evaluation.

Determines which entity input port the block makes available first, upon an event that changes the entity output port from blocked to unblocked.
A nonnegative integer that initializes the random number generator used to select an entity input port for first notification about status changes. You see this field only if you set Input port precedence to Equiprobable.
Select this option to prioritize the event that updates the port precedence explicitly, relative to other simultaneous events in the simulation. If you do not select this option, the event has priority SYS1 on the event calendar. For details, see Choosing How to Resolve Simultaneous Signal Updates. You see this field only if you set Switching criterion to From signal port p.
The priority of the event that updates the port precedence, relative to other simultaneous events in the simulation. For details, see Specifying Event Priorities to Resolve Simultaneous Signal Updates. You see this field only if you set Switching criterion to From signal port p and select Resolve simultaneous signal updates according to event priority.
These parameters determine whether certain ports produce data throughout the simulation, produce data only when you stop or pause the simulation, or are omitted from the block. For descriptions of the affected ports, see the preceding table, "Signal Output Ports".

Controls the presence and behavior of the signal output port labeled #d.
Controls the presence and behavior of the signal output port labeled last.
![]() | Output Switch | Priority Queue | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |