-2

Edit: The solution was that the serviceRate was too high for the amount of arriving trucks.

In my Anylogic model, I have a population of terminals (5) and a population of trucks (100). The trucks visit the terminals, which are a queueing model for them. The terminals have a number of gates (e.g., 7) that can all service 1 truck at a time (service time is based on a uniform distribution). If all the gates are busy, the other trucks have to wait in a (FIFO) queue in front of the terminal.

I want to measure the time trucks are standing within the queues before the terminals (without the service time). How can I create these terminal processes best within my Anylogic model?

I tried using a service block (the first processes in the picture), but I think that gives all the time and not only the time within the queue. I also tried a queue and delay block (below), to be able to measure the queue time. However, the distribution of the time measurement is not working as I get no distribution but just 1 (very small) number, as can be seen in the lowest picture. Same if I measure the time within the service or delay block... Does any body know how to let this work? Thanks!

enter image description here

enter image description here

Ella
  • 125
  • 6

2 Answers2

2

You delay capacity is numberOfGates. It means if that value is 5, then 5 trucks will move into delay block at the same time. Other arrived trucks will wait in the queue if delay.size()=5. There is nothing wrong in this, you should check if your model really works as intended.

The agents would move into delay block immediately if you selected the maximum capacity option in the delay block.

Also instead of timeMeasureStart/End, use your own assignments. That is, inside the delay, on enter type agent.waitStart = time(); and upon leaving type yourHistogramData.add(time()-agent.waitStart);

Yashar Ahmadov
  • 1,616
  • 2
  • 10
  • 21
  • Thanks for your comment. I edited my question to better explain how I want the terminal and queue to work. If all gates are occupied, I want the trucks to wait in the queue (and measure only the time they are in this queue, without the service/delay time). Am I using the capacity correct as the number of servers? I tried the histogram data like you explained, but still got the same problem (1 number). Same when I measured it within the Queue block... – Ella Jan 18 '22 at 10:12
-1

It turns out that the service rate was too high for the amount of trucks I send to the terminal.

Ella
  • 125
  • 6
  • Instead of self-answering such not-reproducible questions, please delete the thread altogether - it is highly unlikely that it will be useful for anyone else in the future (which is actually the sole purpose of SO). – desertnaut Jan 18 '22 at 14:42
  • I tried to delete it but it is not possible because people answered on it. – Ella Jan 18 '22 at 15:49
  • I think you can always delete your questions as long as they do not have *upvoted* answers. – desertnaut Jan 18 '22 at 16:11
  • I have tried several times but it is not possible. It gives me this answer: _You cannot delete this question as others have invested time and effort into answering it. For more information, visit the help center._ – Ella Jan 18 '22 at 16:34