Causes group to change its formation to a specified one. The formation is changed when the group leader passes through this block.

The figure below illustrates all supported group formations. Swarms move on the upper line, chains - in the middle one, fronts in the bottom one.

Demo model: Pedestrian Groups


Formation of the group: swarm, front, or chain.
Name: groupFormation
Set new value dynamically: set_groupFormation(new value)
Valid values:
pedGroupFormation.GROUP_FORMATION_SWARM - swarm
pedGroupFormation.GROUP_FORMATION_CHAIN - chain
pedGroupFormation.GROUP_FORMATION_FRONT - front
On enter [code]
Code executed when a pedestrian enters the block.
Local variable: ped - the pedestrian
On exit [code]
Code executed when a pedestrian exits the block.
Local variable: ped - the pedestrian
On formation changes [code]
Code executed right after changing the formation of the group.
Local variables:
PedGroup group - the group of pedestrians
GroupFormation formation - new formation


long countPeds() - Returns total number of pedestrians passed through this block.

long countGroups() - Returns number of groups passed through this block.


The input port.
The output port.