# PedSelectOutput

Routes the incoming pedestrians to one of several (up to five) processes depending on specified ratios or conditions. Each process has to be defined with its own flowchart connected to one of the block's output ports.

Routing according conditions works as follows: first, Condition 1 is checked. If it is true, pedestrian leaves the block via the first output port. Otherwise, next condition is evaluated, checking, whether the pedestrian should leave the block via the port out2, and so on. If no one from the defined conditions is true, ped leaves the block via the last port out5.

Routing according probabilities works in the following way: if, e.g. Probability 1 is 5, Probability 2 is 1 and Probability 3 is 4, pedestrians will use these three ports with average probabilities 0.5 , 0.1 0.4.

You are not ought to define all five chance ratios or all four conditions. If you want to route pedestrians to, say, only one of two ports, you will need to define only two corresponding parameters.

### Parameters

Use:
Defines, whether output port is chosen according to defined Probabilities or Conditions.
Syntax: boolean useConditions
Probability 1, 2, ... 5 [dynamic]
[Visible if Use: Probabilities] Ratio of pedestrian flow that exits the block via the port out1, out2, ...
Value type: double
Local variable: ped - the pedestrian
Condition 1, 2, ... 5 [dynamic]
[Visible if Use: Conditions] Condition, checking whether pedestrian should leave this block via out1, out2, ... port. If the Condition 1 is true, pedestrian leaves the block via out1, if not, Condition 2 is checked. If Condition 2 is true, pedestrian leaves the block via out2, if not, the next condition is checked, and so on. If none conditions are met, the pedestrian leaves the block via the last out5 port.
Value type: boolean
Local variable: ped - the pedestrian
Actions
On enter [code]
Code executed when the pedestrian enters the block.
Local variable: ped - the pedestrian
On exit 1, 2, ... 5 [code]
Code executed when the pedestrian exits the block via port out1, out2, ... .
Local variable: ped - the pedestrian

### Ports

in
The input port.
out1, out2, out3, out4, out5
Output ports.