英文:
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.
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论