Categories: java, anylogic

Anylogic, get the time a pedestrain is in a queue

1 answer

I'm modeling a customer service office and are building a statechart of satisfied/unsatisfied customers.

How can I measure how long each customer (pedestrian) is in the pedService block?

I want to say that if the customer is waiting in the queue more than 5 minuts they are becoming unsatisfied. I tried to make the condition in the state chart like this:

   main.pedService.delayTime() > 5; 

All answers to this question, which has the identifier 61239128

The best answer:

You can use the following code in your service (when it begins the service or when it ends the service or exits the blog):


This will give you the total time the pedestrian has been in the service block. With that you can use your condition to make the pedestrian satisfied or unsatisfied.

This is one option

The other option is to trigger a user controlled event when the pedestrian enters the block and make the pedestrian unsatisfied if it's activated: - when it enters the block do ped.event.restart(5); - when the agent leaves the block do ped.event.reset(); - in the event make the code necessary to make the pedestrian unsatisfied

The difference is that the second technique will make the customer unsatisfied when it's in the queue, while the first technique will make him unsatisfied only after it leaves the queue

Last questions

how do i remove the switch on my home screen?
how to edit the JS date and time to update atuomatically?
How to utilize data stored in a multidimensional array
Powermockito not mocking URL constructor in URI.toURL() method
Android Bluetooth LE Scanner only scans when phone's Location is turned on in some devices
docker wordpress container can't connect to mysql container
How can I declare a number in java that is more than 64-bits? [duplicate]
Optaplanner solutionClass entityCollectionProperty should never return null error when simple JSON object passed to controller
Anylogic, get the time a pedestrain is in a queue
How do I fix this syntax issue with my .flex file?
Optimizing query in PHP
How to find the highest number of a column and print two columns of that row in R?
Ideas on “Error: Type is referenced as an interface from”?
JCIFS SmbFile.exists() and SmbFile.isDirectory() return false when it exists and I can listFiles()
PHP total order
Laravel booking system design
neural net - undefined column selected
How to indicate y axis does not start from 0 in ggplot?
Fragments in backStack
Spinner how to change the data