Service with lines

Services in pedestrian flow models define a group of similar physical service objects (turnstiles, ticket vending machines, security checkpoints, check-in counters, 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 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 neighboring area.

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

Demo model: Service With Lines

You first draw the service in the graphical diagram, then add the Pedestrian Library block PedService in the flowchart and configure it by tuning its parameters.

 To draw a service with lines

  1. Drag the  Service with Lines  element from the Space Markup section of the  Pedestrian Library palette to the graphical diagram. 

  1. Locate the service points in the graphical editor. When working with markup shapes, the first click selects all shapes of this markup element (in our case - two queue lines and two service points). To select just one particular shape, make one more click on it. After that you can edit this particular shape and your changes won't affect other markup shapes. The third click on the same shape selects the ground.

  2. Usually the service points are located with the same offset. If needed, place these two service points so that they match their locations on the drawing before you change the number of services. Then the service points that you add later will be located with this custom offset. To move a service point, select it and drag without releasing the left mouse button.

  1. Now you can change the number of service points. Open the service properties page and change the value inside the Number of services control. Let's increase it to 3. You will see one more service point appeared in the graphical diagram.

Properties

General

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 level – If selected, the service shape is also visible on the upper level 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

Ground – The ground 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: usual queue Line, or Serpentine queue (also named "zigzag" queue). Please refer here to know how to draw services with serpentine queues.

Type of service – Type of the service point. Use Linear for services where peds should move along the service shape, passing begin and end points of the line. Use Point for services, where peds should stand at any point of the line.

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. Peds 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 queue yet. For example, turnstiles do not have such restriction, while security check service does.

Serve pedestrians from – Defines the queue from which the service will serve pedestrians. When the service becomes vacant, it chooses the queue anew according to the selected option. The following alternative options define the queue to be selected:
Longest queue
- the queue containing the maximum number of pedestrians.
Closest queue (strict)
- the queue that is closest to the service, no matter whether it is empty or not.
Closest not empty queue -
the non-empty queue that is closest to the service.
Next queue (round robin) - the queues are selected sequentially in circular order.
Priority queue - the queue with the highest priority is selected (according to the expression provided in the Queue priority field below),
Other
queue - the queue is returned by the expression specified in the Queue field below.

Queue priority – [Visible if Serve pedestrians from is set to Priority queue] Here you can enter Java expression that returns the queue priority. The greater value corresponds to the higher priority. The expression is dynamically reevaluated for each nonempty queue. Based on the results of recalculations the queue with the highest priority will be chosen. You can refer to the service's queues in the expression using the local variable queue.

Queue – [Visible if Serve pedestrians from is set to Other] Here you can enter Java expression that returns the selected queue. Typically you place the call of your custom Java function here. The service point that has just become vacant and is currently selecting the queue is available here as serviceUnit.

Grouping

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 Just delay] 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 severkla 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 Depands 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.

Appearance

Service color – Color of service shape(s).

Queue color – Color of queue shape(s).

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

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.

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

Servicing groups of pedestrians

When passing through services with lines, a group of pedestrians may behave differently. 

The behaviors are:

You can choose one of three alternative behavior modes in the flowchart block that creates pedestrian groups (it can be PedSource, PedEnter, or PedGroupAssemble), and even change the group servicing settings in the properties of some specific service with lines (Grouping property section).

Demo model: Group Behavior in Services