The Switch block directs the flow of an entity through a simulation model. You define switch cases on the Switch block. The case names must be unique, and each switch case must have an integer value (called the switch value) associated with it. When an entity enters a Switch block, the block calculates the switch value to be used for the entity. Depending on the Switch block configuration, the block either attempts to extract the switch value from an attribute in the entity or pulls it from the InSwitchValue port. After the switch value is acquired, the Switch block searches the cases in its Cases table until it finds a case with the same switch value. The entity is then pushed out the entity out port associated with the matching case. If a match is not found, the entity is sent out the OutDefault port.
Input entity port for entities to enter the Switch block.
Output entity port for entities that do not match a switch case defined for the Switch block.
Output entity port for entities that cannot leave using the other output entity ports.
Input integer port for the switch value to be used for the next entity, if the Switch block is configured to obtain the switch value from this port rather than from an entity attribute.
Adds a new switch case to the Cases table with a default Name and Value. You can edit the Name and Value of the switch case directly in the table. The case names and values used by a Switch block must be unique.
Deletes the selected switch case from the Cases table.
If you select the Port option, the Switch block pulls the switch value from the InSwitchValue port. If you select the Entity option, you must also supply the name of an attribute in the Entity Attribute field. The Switch block attempts to extract the switch value from the appropriate attribute on the entity.
All values in the Cases table are saved to the Switch block and any entity output ports are created or deleted as needed.