SelectOutputOut

We provide you with two blocks for routing agents to different flowchart branches: SelectOutput and SelectOutput5.

Using SelectOutputIn and SelectOutputOut blocks you can create one large quasi-block SelectOutput with the required number of exits. You create it by adding one SelectOutputIn and the required number of SelectOutputOut blocks. These blocks should not be connected together graphically.

SelectOutputOut blocks should refer to SelectOutputIn in their parameters. SelectOutputIn should be configured to route agents to the "connected" SelectOutputOut blocks depending on the probabilities.

To implement a custom routing to N flowchart branches, do the following:

1. Create one SelectOutputIn block
2. Add the required number of SelectOutputOut blocks.
3. In each SelectOutputOut block, specify the name of the SelectOutputIn block that serves as the input
4. Define the routing principle. There are two alternative options:

a) In SelectOutputIn properties, choose Select output: By explicit choice, and specify the expression returning the SelectOutputOut block in the property below

b) In SelectOutputIn properties, choose Select output: With probabilities in SelectOutputOut blocks, and specify probabilities for each SelectOutputOut block.

The following simple model demonstrates how to implement both cases.

Demo model: SelectOutputN

Parameters

Agent type [dynamic]
The type of the agents exiting this block. This agent type is referred to below as T.
Default value: Agent
SelectOutputIn block
The block SelectOutputIn that composes a quasi multi-exit SelectOutput together with this and other SelectOutputOut blocks.
Probability [0..1], when applicable [dynamic]
Applies when in the referred SelectOutputIn block Select output is set to With probabilities in SelectOuputOut blocks. Expression used to evaluate the probability that the current agent will exit via this SelectOutputOut block. The probability value should be in the [0..1] range.
Value type: double
Local variable: agent - the agent
Actions
On exit (true) [code]
Code executed when the agent exits the object.
Local variable: agent - the agent

Ports

out
The output port.