AnyLogic
Expand
Font size

PedEnter

Accepts pedestrians generated somewhere (e.g. in some other pedestrian flowchart, that the pedestrians exited via PedExit block) at input port, assigns their physical parameters and injects pedestrians into the simulated environment at specified location.

This block also can be used to organize groups from sequence of pedestrians on input port. Allows defining multiple criteria for groups creation — group size, form, groups arrival rate, pedestrians interarrival delay, etc.

Also, this block can be used to change pedestrian parameters like speed, color, diameter, etc.

Parameters

Appears at
Here you choose whether you define the place where pedestrians appear with a line, a point, or a node.
Get value: locationType
Default value: PedEnter.LOCATION_LINE
Valid values:
PedEnter.LOCATION_LINE
PedEnter.LOCATION_POINT
PedEnter.LOCATION_NODE
Target line
[Visible if Appears at: line]
Target line, where pedestrians appear.
Value type: TargetLine
Local variable: ped — the pedestrian
Level
[Visible if Appears at: point (x,y)]
Level, where pedestrians appear.
Value type: Level
Local variable: ped — the pedestrian.
X, Y
[Visible if Target is point (x,y)]
X (Y) coordinate of the point where pedestrians appear.
Value type: double
Local variable: ped — the pedestrian
Node
[Visible if Appears at: node]
Polygonal node or rectangular node, where pedestrians appear.
Value type: AreaNode
Local variable: ped — the pedestrian
Comfortable speed
Speed which is comfortable for the pedestrian. In the absence of external factors pedestrian will move with this speed.
Value type: double
Default value: uniform(0.5,1) meters per second
Local variable: ped — the pedestrian
Initial speed
Initial speed of the pedestrian.
Value type: double
Default value: uniform(0.3, 0.7) meters per second
Local variable: ped — the pedestrian
Diameter
Diameter of the pedestrian.
Value type: double
Default value: uniform(0.4, 0.5) meters
Local variable: ped — the pedestrian

Groups

Create groups
If the checkbox is selected, this block will create groups of pedestrians.
Syntax: boolean createGroups
New group is created
[Visible if Create groups is selected]
Defines how groups are created: whether a group is created when the specified group size is reached (on size reached), or when the specified timeout expires (on timeout), or when delay between pedestrian arrivals exceeds the specified gap value (on time gap).
Get value: groupingMode
Set new value dynamically: set_groupingMode(new value)
Valid values:
PedEnter.GROUPING_MODE_SIZE_REACHED
PedEnter.GROUPING_MODE_TIMEOUT
PedEnter.GROUPING_MODE_TIME_GAP
Group size
[Visible if Create groups is selected and New group is created: on size reached]
Size of newly created group (number of pedestrians making up one group). If you leave the default value here, groups containing 2 and 3 pedestrians will be created with equal probabilities.
Value type: int
Default value: uniform_discr( 2, 3 )
Local variable: leader — the leader of the group
Group assembly time
[Visible if Create groups is selected and New group is created: on timeout]
Time given for group creation. When this timeout elapses, the group creation is finished and next group starts forming.
Value type: double
Maximum gap between members
[Visible if Create groups is selected and New group is created: on time gap]
Maximum pedestrian interarrival time, for them to be collected in one group. In case pedestrian interarrival time exceeds this value, new group is created.
Value type: double
Default value: 2 seconds
Group formation
[Visible if Create groups is selected]
Form of the group: swarm, front, or chain.
Get value: groupFormation
Set new value dynamically: set_groupFormation(new value)
Valid values:
GROUP_FORMATION_SWARM — swarm
GROUP_FORMATION_CHAIN — chain
GROUP_FORMATION_FRONT — front
Group behavior in services
[Visible if Create groups is selected]
Here you can define how the groups of pedestrians created by this block behave while passing the services (if some other behavior is not defined in the block PedService).
All group members are serviced individually — Each member of the group should be serviced individually. The example of such a service: turnstiles.
Only one group member is serviced, others wait in a queue — The example: a family buying cinema tickets at the counter. All the family members wait in a queue to choose the seats together, but only one of them — the head of the family pays and gets serviced.
Only one group member is serviced, others wait in a waiting area — The example: a tourist group buying museum tickets. The tourists do not wait in the queue, they just wait in a separate area (modeled by a network node) for their tour guide to buy the tickets for the whole group.
Get value: serviceGroupBehavior
Set new value dynamically: set_serviceGroupBehavior(new value)
Valid values:
PedEnter.SGB_INDIVIDUAL_SERVING
PedEnter.SGB_ONE_MEMBER_IS_SERVED_OTHERS_WAIT_IN_QUEUE
PedEnter.SGB_ONE_MEMBER_IS_SERVED_OTHERS_WAIT_IN_AREA
Cancelling a pedestrian cancels the group
[Visible if Create groups is selected]
If the checkbox is selected (true), canceling command for one pedestrian will cancel it for all pedestrians from his group.
Syntax: boolean solidCancelling

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 begin grouping
Code executed when the first member of a new group enters the block.
Local variables:
leader — the leader of the current group
PedGroup group — the group being currently created
On end grouping
Code executed when the group assembly is finished.
Local variables:
leader — the leader of the current group
PedGroup group — the just assembled group

Functions

Function Description
long countPeds() Returns the total number of pedestrians passed through this block.
long countGroups() Returns the number of created groups (including the group which is currently being created).
int size() Returns the number of pedestrians that are currently inside the block.
void take(Agent ped) Inserts the given agent in the process flow by outputting it from the out port.
Agent remove(Agent agent) Removes the specified agent from the block.

Ports

in

The input port.

out

The output port.

How can we improve this article?