Last modified on 3 August 2009, at 11:54

Simulation with AnyLogic/Pedestrian Simulation/Step 8. Adding ticket windows

Step 8. Adding Ticket WindowsEdit

Now we will expand our model by adding ticket windows.

Step 1. Creating a new model1.gif Modify the model animation

  1. Draw lines representing ticket windows as shown in the figure below.
    Step 8. Adding ticket windows 1.png
  2. Add these lines to a new group. Name the group windowsGroup.
  3. Draw polylines representing queues to ticket windows as shown in the figure below.
    Step 8. Adding ticket windows 2.png
  4. The starting point of the polyline is important since it stands for the head of the queue. Place the first point of each polyline near the corresponding service line.
  5. Add these polylines to a new group. Name the group windowsQueuesGroup.
  6. Move lineBeforeGates a little bit down:
    Step 8. Adding ticket windows 3.png

Now we will modify the model flowchart.

Step 1. Creating a new model1.gif Modify the flowchart

  1. Add new objects and connect them as shown below:
    Step 8. Adding ticket windows 4.png
  2. Configure PedServices object. This object will define parameters of a service representing ticket windows. Services defined by this object can be referenced by flowchart objects PedServices.
    Set the following object properties:
    Step 8. Adding ticket windows 5.png
    • Name this object windows.
    • Specify the group containing lines representing services. Type windowsGroup in the Services (group of lines) field.
    • Specify the group containing polylines representing queues to services. Type windowsQueuesGroup in the Queues (group of lines, polylines) field.
    • Specify the service time. Type triangular(15*second(), 25*second(), 35*second()) in the Delay field (you can use code assist). We assume that service time is triangularly distributed with minimum value of 15 seconds, average value of 25, and maximum value of 35 seconds.
    • Change the Service type to Delay. Delay service is defined by a line, which pedestrians should step on for service delay time.
  3. Configure PedSelectOutput object. We need it to route non-ticketed passengers to ticket windows while other ones – straight to the ticket control gates. PedSelectOutput object is a decision making block of Pedestrian Library. The pedestrian arrived at the PedSelectOutput object is forwarded along one of five output ports depending on ratios specified for these ports.
    Set up the following object properties:
    Step 8. Adding ticket windows 6.png
    • Specify ratios for flows going to ticket control gates (Chance 1) and to ticket windows (Chance 2) correspondingly. In this flowchart we assume that the number of passengers that have already bought their tickets is actually significantly higher.
  4. Configure just added PedService object. This flowchart object references to PedServices object defining a service representing subway ticket windows.
    Set the following object properties:
    Step 8. Adding ticket windows 7.png
    • Specify the PedServices object defining the service pedestrians will pass through. Type windows (the name of our PedServices object) in the Service (PedServices) field.

Run the model. Note that now some passengers first go to the ticket windows to buy a ticket and only then pass through ticket control gates.