为什么在AnyLogic中“seize queue”不能为零?

huangapple go评论66阅读模式
英文:

Why seize queue cant be zero in AnyLogic

问题

让我们想象一种情况,我们在占用块之前有一个队列,这个队列启用了超时属性。

在这种情况下,重要的是要注意,占用队列不能减少到零。占用队列始终具有最小容量为1的容量。如果将占用队列的容量设置为1,那么一个代理将被从原始队列的超时属性中取出,并直接放入占用队列。

这种行为通常是不可取的,特别是当处理大量代理或运行模拟以收集统计数据,特别是原始队列的超时属性的情况下。

那么,如何避免在占用队列中有一个代理,或者是否有其他方法可以实现这一点?

英文:

Let's imagine a situation where we have a queue positioned before the seize block, and this queue has the timeout property activated.

In such cases, it is important to note that the seizure queue cannot be reduced to zero. The seize queue always has a minimum capacity of 1. If the seize queue capacity were set to 1, one agent would be taken out of the timeout property of the original queue and placed directly into the seize queue.

This behavior is generally not desirable, particularly when dealing with a large number of agents or running the simulation for extended periods, such as years, to collect the statistics, especially for the timeout property of the original queue.

为什么在AnyLogic中“seize queue”不能为零?

So how can I avoid having an agent in the seize queue, or is there another way to achieve this?

答案1

得分: 1

你可以通过在上游使用一个Hold块,并且只有在Seize块的队列为空时才释放代理来手动避免Seize队列中有代理。

英文:

You can manually avoid having agents in the Seize queue by using a Hold block upstream and only releasing agents into the Seize block if its queue is empty.

huangapple
  • 本文由 发表于 2023年6月2日 13:41:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/76387405.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定