AnyLogic
Expand
Font size

PedChangeLevel

Moves pedestrian flow from their current level to the new level.

Parameters

Exit line on current level
Target line where pedestrians leave their current level. This target line should belong to the level the pedestrians leave.
Value type: TargetLine
Local variable: ped — the pedestrian
Entry line on new level
Target line where pedestrians enter new level. This target line should belong to the level the pedestrians enter.
Value type: TargetLine
Local variable: ped — the pedestrian

Advanced

Reach tolerance
Defines range, at which pedestrian should enclose to its destination. In cases of target line distance to any point of this line is assumed.
Syntax: double reachTolerance
Default value: 0.25 meters

Actions

On enter
Code executed when the pedestrian enters the block.
Local variable: ped — the pedestrian
On exit level
Code executed when the pedestrian exits its current level.
Local variables:
ped — the pedestrian
Level level — the level the pedestrian exits
On enter level
Code executed when the pedestrian enters the new level.
Local variables:
ped — the pedestrian
Level level — new level the pedestrian enters
On cancel
Code executed when the pedestrian exits the block via ccl port.
Local variable: ped — the pedestrian
On remove
Code executed when a pedestrian is intentionally removed from this block by calling the block's function remove().
Local variable: ped — the pedestrian

Functions

Function Description
long countPeds() Returns the total number of pedestrians passed through this block.
int size() Returns the number of pedestrians inside the block.
boolean contains(Agent ped) Returns true if the specified pedestrian is currently inside the block, and false otherwise.
void cancel(Agent ped) Causes the specified pedestrian to leave the block immediately via ccl port.
void cancelAll() Causes all pedestrians to leave the block immediately via ccl port.
Set<Agent> getPeds() Returns a non-modifiable collection of pedestrians currently located in this block.

Ports

in

The input port.

out

The output port.

ccl

The output port for pedestrians leaving the block because of the "cancel" event (caused by a call of either cancel() or cancelAll() function).

How can we improve this article?