Move agent from existing queue to shorter queue in the pedestrian library

Viewed 120

I am building a super market simulation in which a customer (agent) walks to different spots (target lines) and then goes to the checkout (Ped Service) with the pedestrian library.

When agents are sent to the Ped Service, they will select one of the queue lines of the service, based on the setting eg. closest queue.

I want to add a functionality, that agents can switch to a shorter queue after they already entered a queue (jockeying). I wasn't able to find a way programmatically or with the default options.

Does anyone have any ideas on how to implement this?

1 Answers

You can always call myPedService.cancel(). This will send your ped through the bottom "ccl" cancel port below:

enter image description here

So you need to:

  1. make your ped "realize" there is a better queue (you have to code this yourself, it can be as complex or simple as you like)
  2. cancel him as above
  3. connect the "ccl" port so the ped then re-joins the same or a different PedService with a better queue
Related