PedChangeGround


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

Parameters

Exit line on current ground [dynamic]
Target line where pedestrians leave their current ground. This target line should belong to the ground the pedestrians leave.
Value type: TargetLine
Local variable: ped - the pedestrian
Entry line on new ground [dynamic]
Target line where pedestrians enter new ground. This target line should belong to the ground 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]
Code executed when the pedestrian enters the block.
Local variable: ped - the pedestrian
On exit ground [code]
Code executed when the pedestrian exits its current ground.
Local variables: ped - the pedestrian
                          Ground ground - the ground the pedestrian exits. 
On enter ground [code]
Code executed when the pedestrian enters the new ground.
Local variables: ped - the pedestrian
                          Ground ground - new ground the pedestrian enters.
On cancel [code]
Code executed when the pedestrian exits the block via ccl port.
Local variable: ped - the pedestrian
On remove [code]
Code executed when a pedestrian is intentionally removed from this block by calling the pedestrian's function remove(). This code is automatically executed after the remove() function call.
Local variable:
ped - the pedestrian

Functions

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

int size() - Returns 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.