Service with a "serpentine" queue

Services in pedestrian flow models define a group of similar physical service objects (turnstiles, ticket vending machines, security checkpoints, check-in counters, ticket office, cash desks, etc.)

There are two types of space markup shapes you can use to draw services in your pedestrian model:

Service with Area - Used to define service(s) with an electronic queue (like in bank office, information office on the railway station, etc.) Pedestrians do not stand in a queue line, but wait for their turn in the hall. The hall is modeled by a polygonal node and can support all its functionality, such as restriction of access to the node and restriction of speed inside the node.

Service with Lines - Used when pedestrians wait in a line until the service becomes available. Two types of queues are supported: straight queue lines, and "serpentine" queue (or "zigzag" queue) typically used in airport check-in areas.

Demo model: Serpentine Queue

To draw a service with a "serpentine" queue

Let's demonstrate how to draw four check in counters with a serpentine queue. Here is our layout, you can see four placeholders for check-in counters on the left side:

  1. Drag the Service with Lines element from the Space Markup section of the Pedestrian Library palette into the graphical diagram. You will see the space markup shape consisting of two service points and two queue lines. In our example, we need to rotate the shape because the service points should be on the left side.

  1. Now we will place the service points near the placeholders. Service point defines the place where the passenger will wait while receiving the service. Since placeholders define the places for the check-in counters, you should place service points not inside the placeholders, but close to them.
    Place the upper service point near the upper placeholder, and then move the lower service point to the second placeholder. You may notice that when you click the services, you select all the shapes composing this complex element. To select just one particular shape of a complex space markup element (in our case - a service point), make one more click on it.

  1. Open the properties of the Service with Lines element. The easiest way to open the properties of the complex space markup shape is to click somewhere in the graphical editor, and then click the services shape.
  2. Set Number of services to 4, N of queues to 1, and set Type of queue: Serpentine.

  1. After configuring the properties, the shape should look as shown below. You can see that the service points are located with the same offset. That is why we first adjusted two of them to the placeholders (and defined the distance between the neighboring service points), and only then increased the number of services.

  1. Now we will change the shape of the "serpentine" queue. We want it to match the borders in the layout. When we need to finely adjust the shape in the graphical editor, we turn the grid alignment off, so press off the Enable/Disable Grid toolbar button.
  2. Select the queue shape with a click. Move the queue starting point (the one that is indicated with a white circle) to the center (where the queue starts).
  3. If needed, adjust the width of the queue shape by dragging the handle on the shape corner.

  1. Now we placed the first segment of the queue shape as we need, and we can continue drawing the queue by adding more segments. Right-click the queue shape and choose Add Points from the context menu.
  2. Add one more point by clicking at the place where the queue will turn. Please note that you should click exactly in the middle of the passage, as shown in the figure below:

  1. Continue drawing the serpentine queue by adding more turning points in the places indicated on the figure below. Add the final point with a double-click.

  1. If some points are not aligned, adjust them by dragging the point handles with the mouse.

  1. Finally you will get the queue of the required shape:

  1. To define how passengers check-in at the drawn counters, insert the PedService Pedestrian Library block in your flowchart, configure its parameters, and choose the name of the just drawn Service with Lines in the Services parameter of this PedService block.



Name – The name of the service. The name is used to identify and access the service shape from code.

Ignore – If selected, the service shape is excluded from the model.

Visible on upper agent – If selected, the service shape is also visible on the upper agent where this agent lives.

Lock - If selected, the service shape is locked. Locked shapes do not react to mouse clicks - it is impossible to select them in the graphical editor until you unlock them.

Visible – Here you specify whether the shape is visible on the animation at the model runtime, or not. Using the control, choose yes or no.

Level – The level this service belongs to.

Number of services – Here you can define the number of service points.

N of queues – Here you can define the number of queues leading to the service points.

Type of queue – Type of the queue: common straight Line, or Serpentine queue with belt barriers.

Type of service – Type of the service point. Use Linear for services where pedestrians should move along the service shape, passing begin and end points of the line. Use Point for services, where pedestrians just stand near the service point while being serviced.

Bidirectional - [Enabled if the Type of service is Linear] If this option is selected, pedestrians can pass services in both directions.

N of reverse queues – [Enabled if the service is Bidirectional] Here you can define the number of reverse queues leading to the service points. Pedestrians can pass services in any directions.

Wait for exit – [Enabled if the Type of service is Linear] If this checkbox is selected, the service would not start servicing another pedestrian if some pedestrian is being serviced currently and has not reached the end point of service's line or polyline yet. For example, turnstiles do not have such restriction, while security check service does.

Serve pedestrians from – Defines whether service will serve pedestrians from Longest queue, Closest queue (strict), Closest not empty queue, Next queue (round robin), Priority queue or some Other queue that user should individually choose using the Queue parameter below.


Waiting area for groups – Selecting this option you will create the area that will act as the waiting area for pedestrian group members. Inside this area the members of pedestrian group will wait while the leader of their group is serviced at this service (you should do this only if the Group behavior in service is Only one group member is serviced, others wait in a waiting area).

Group behavior – [Visible if Service type is Point] When passing through a service, a group of pedestrians may behave differently. You can choose one of three alternative behavior modes (All group members are serviced individually, Only one group member is serviced, others wait in a queue, or Only one group member is serviced, others wait in a waiting area).
Since the behavior may depend on the role of the particular group (guided group of tourists, family, group of friends), you may want to define it once for the group to avoid setting several times in different service shapes. In this case you define the behavior mode in the object creating this group (it can be PedSource, PedEnter, or PedGroupAssemble).
If this particular group of services should follow the same rules you have defined for the group, just choose here Depends on the settings of each incoming group.
If this block defines the service where the pedestrian groups behave in a different way, choose here The same for all groups and define this behavior using the parameter below.

The behavior – Here you can choose how groups of pedestrians behave while passing through this service. There are three alternative behaviors:
All group members are serviced individually - Each member of the group should be serviced individually. The example: turnstiles.
Only one 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 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 for their tour guide to buy the tickets for the whole group. To draw the waiting area for this case, select the Waiting area for groups option above and adjust the created area in the graphical editor.


Service color – Color of service shape(s).

Queue color – Color of queue shape(s).

Reverse queue color – Color of reverse queue shape(s).


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.

Show name – If selected, the shape's name is displayed in the graphical editor.

Related topics

Markup for pedestrian simulation

Selecting markup shapes

Service with lines

Service with area

API reference: ServiceWLine class