AnyLogic
Expand
Font size

Serpentine queue

The  Serpentine Queue is an integral part of the  Service with Lines markup element. It enables you to configure the individual serpentine queue comprising the service: limit the number of people standing in this queue, and so on.

To select a serpentine queue

  1. Click the serpentine queue. First click selects the Service with Lines element.
  2. Click the queue again to select the serpentine queue.

To extend a serpentine queue

  1. Right-click the queue shape and select Add points from the context menu.
  2. You are in the drawing mode now. Add new segments with mouse clicks.
  3. Finish drawing by double-clicking at the spot where you want to place the end point of the serpentine queue.

To remove a serpentine queue point

  1. Double-click the point you want to remove.

Properties

General

Name — The name of the serpentine queue. The name is used to identify and access the queue from code.

Show name — If selected, the queue name is displayed in the graphical editor.

Visible on upper agent — If selected, the serpentine queue is also visible on the upper agent where this agent lives.

Limit the number of people in the queue — If selected, the number of people that can stand in the queue is limited to the Maximum number of people in the queue.

Maximum number of people in the queue — Defines the logical capacity of the queue: the maximum number of people that can stand in the queue.

Appearance

Belt barrier color — The color of the serpentine queue belt barriers

Position

X — X-coordinate of the queue’s start point.

Y — Y-coordinate of the queue’s start point.

Z — Z-coordinate of the queue’s start point.

Points

The table located in the Points properties section allows you to view and adjust coordinates of the serpentine queue points.

Here you define relative coordinates, not the absolute ones. The first point always has coordinates (0, 0, 0) that cannot be changed. Other rows of the table define relative coordinates of the successive points. Coordinates of each point are actually offsets of the corresponding point from the start point along X, Y (and optionally Z) axes correspondingly.

Advanced

Show in — Here you can choose whether you want the shape to be shown both in 2D and 3D animation, or in 2D only, or in 3D only.

Functions

Queue line type
Function Description
boolean isReverse() Returns true if the queue is reverse; returns false otherwise.
Statistics
Function Description
int size() Returns the number of pedestrians currently standing in the queue.
List<Agent> getPeds() Returns the collection of pedestrians standing in the queue. The first pedestrian is the queue head, the last pedestrian is the queue tail.
Capacity
Function Description
int capacity() Returns the capacity of the queue (the maximum number of pedestrians that can stand in the queue).
boolean isCapacityLimited() Returns true if the queue has limited capacity; returns false otherwise.
setCapacity(int capacity) Sets the capacity of the queue.

capacity — the new capacity value.
Belt barrier color
Function Description
getBeltBarrierColor() Returns the color of the serpentine queue barrier belt.
setBeltBarrierColor(Color color) Sets the color of the serpentine queue barrier belt.

color — the color of the serpentine queue barrier belt. It is defined with a color constant, or the new Color(‘red’, ‘green’, ‘blue’) constructor.
How can we improve this article?