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 modeled by polygonal node or rectangular node, or a point with given coordinates. If the location is area, you can specify exact waiting points inside the node 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 the 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 through the out port. On exit callback is called for each pedestrian leaving the block.
void freeAll()- Interrupts command for all pedestrians in the block and causes them to exit through the out port. On exit callback is called for each pedestrian leaving the block.
void freeAllWaitingPeds() - This function affects pedestrians who are currently in the state of waiting and forces them to leave the block through the out port. On exit callback is called for each pedestrian leaving the block. In case of groups, the function called for one member of the group will also free all other members of this group.
void cancel(Agent ped) - Interrupts command for the specified pedestrian and causes it to exit through the 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 through the 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 block.
boolean contains(Agent ped) - Returns true if pedestrian is inside the block.
Set<Agent> getPeds() - Returns a non-modifiable collection of pedestrians currently located in this block.
Agent remove(Agent agent) - Removes the specified agent from the block.