Causes pedestrians to go to the specified location and wait there for a specified period of time.
Location
can be
defined by a target line,
area or a point with given
coordinates. If the location is area,
you can specify exact waiting points inside it using attractors. Attractors are
locations within the area,
which will attract pedestrians during their stay.
Pedestrians can wait for some
specified amount of time,
calculated from different events (e.g. reaching waiting point, entering
the area, or even manually), or until the
user manual calls
the block function free().
Demo model: Pedestrian Attractors
long countPeds() - Returns total number of pedestrians passed through this block.
Attractor
getRandomAttractor(AreaNode
areaNode)
- Returns the random attractor inside the specified area.
Attractor getFreeAttractor(AreaNode
areaNode)
- Returns the free attractor inside the specified area.
void
free(Agent ped)-
Interrupts command for the specified pedestrian and causes it
to
exit using
OUT port. "On exit" callback is called for each pedestrian
leaving
the block.
void freeAll()- Interrupts
command for all pedestrians and
causes them to exit using OUT port. "On exit"
callback is
called
for each pedestrian leaving the block.
void
cancel(Agent ped)-
Interrupts command for the specified pedestrian and causes it
to
exit using
CCL port. "On cancel" callback is called for
each pedestrian
leaving
the block.
void cancelAll()- Interrupts command for all pedestrians and causes them to exit using CCL port. "On cancel" callback is called for each pedestrian leaving the block.
void activate(Agent ped) - Causes delay timer to start for the specified pedestrian. Available only if Delay starts when User calls activate() function.
int size() - Returns the number of pedestrians in this object.
boolean contains(Agent ped)
- Returns true
if pedestrian is
inside the
object.
Set<Agent> getPeds()
- Returns a non-modifiable
collection of pedestrians currently located in this block.