AnyLogic
Expand
Font size

PedGroupChangeFormation

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.

Parameters

Formation
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

Actions

On enter
Code executed when a pedestrian enters the block.
Local variable: ped — the pedestrian
On exit
Code executed when a pedestrian exits the block.
Local variable: ped — the pedestrian
On formation changes
Code executed right after changing the formation of the group.
Local variables:
PedGroup group — the group of pedestrians
GroupFormation formation — mew formation

Functions

Function Description
long countPeds() Returns total number of pedestrians passed through this block.
long countGroups() Returns number of groups passed through this block.

Ports

in

The input port.

out

The output port.

How can we improve this article?