Accept entities from selected entity input port
This block selects exactly one entity input port for potential arrivals. The selected entity input port can change during the simulation. When one entity input port becomes selected, all others become unavailable.
The possible rules the block uses for selecting an entity input port, as well as the corresponding values of the Switching criterion parameter in the dialog box, are listed in the table below.
|Switching criterion Value||Description|
|Round robin||At the beginning of the simulation, IN1 is selected. After each departure, the block selects the entity input port next to the last selected port. After exhausting all entity input ports, the block returns to the first one, IN1.|
|Equiprobable||At the beginning of the simulation and after each departure, the block randomly chooses which entity input port is selected for the next arrival. All entity input ports are equally likely. The Initial seed parameter initializes the random number generation process.|
|From signal port p||Selecting this option creates an additional signal input port, labeled p. The signal at this port must have integer values between 1 and the Number of entity input ports parameter value. The block detects changes in this integer value and selects the corresponding entity input port for future arriving entities.|
Tip If multiple entity input ports of the Input Switch block are on entity paths that come from a single block having multiple entity output ports, then you should include a storage block in each of those paths.
For example, instead of connecting two entity output ports of an Entity Splitter block directly to two entity input ports of an Input Switch block, you should insert a storage block in each of the two paths.
Entity Input Ports
|IN1, IN2, IN3, and so on||Ports for potential entity arrivals. At any given time, one input port is selected and the others are unavailable. The Number of entity input ports parameter determines how many of these entity input ports the block has.|
Signal Input Ports
|p||Index of the entity input port that is available. Values are 1, 2, 3,..., Number of entity input ports. This signal must be an event-based signal. You see this port only if you set Switching criterion to From signal port p.|
Entity Output Ports
|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 that was available the last time an entity departed. The initial value is 0. After an entity has 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.
The rule that determines which entity input port is selected for receiving entities.
A nonnegative integer that initializes the random number generator used to select an entity input port. You see this field only if you set Switching criterion to Equiprobable.
Select this option to prioritize the port-selection event 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 Resolve Simultaneous Signal Updates. You see this field only if you set Switching criterion to From signal port p.
The priority of the port-selection event, relative to other simultaneous events in the simulation. For details, see Specify 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 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".