简体   繁体   English

访问 Seize 块中的队列优先级

[英]Accessing Queue Priorities in a Seize Block

According to the AnyLogic's documentation, a Seize block embeds a Queue block, and "The rich interface of Queue (ability to use priorities, timeouts, remove agents, etc.) is fully exposed by Seize.".根据 AnyLogic 的文档,Seize 块嵌入了 Queue 块,并且“Queue 的丰富接口(使用优先级、超时、删除代理等的能力)完全由 Seize 公开。”。

I want to access the queue portion of a seize block in order to make agent prioritization, which can be found under the first "Advanced" tab of the Queue block properties.我想访问占用块的队列部分,以便确定代理优先级,这可以在队列块属性的第一个“高级”选项卡下找到。 However, I cannot see this in the properties of a Seize block.但是,我在 Seize 块的属性中看不到这一点。

Is there anything I have to do in order for this property to appear in the Seize block?为了让这个属性出现在 Seize 块中,我需要做些什么吗? Or do I have to set the queue capacity of the Seize block to 0 and add a separate Queue block in front?还是我必须将 Seize 块的队列容量设置为 0 并在前面添加一个单独的 Queue 块? I want the model to be as readable as possible for my case organization, thus I want to use as few blocks as possible.我希望 model 对于我的案例组织尽可能具有可读性,因此我想使用尽可能少的块。

In the seize, the conceptual difference is that instead of "queue priority" you have "task priority"在抓住,概念上的区别是,而不是“队列优先级”你有“任务优先级”

You can basically do everything related to priority using only that.您基本上可以仅使用它来完成与优先级相关的所有事情。 If you do nothing, you use FIFO, if you want to prioritize based on priority based, well then it's the exact same.如果您什么都不做,则使用 FIFO,如果您想基于优先级进行优先级排序,那么它是完全相同的。 If you want to use LIFO, then you can use agent.getBlockEnterTime() as your priority variable, and if you want to compare agents, it's the same as using priority based.如果要使用 LIFO,则可以使用 agent.getBlockEnterTime() 作为优先级变量,如果要比较代理,则与使用基于优先级的相同。

So no, you don't need to add another queue所以不,您不需要添加另一个队列

I think that priority can not change dynamically.我认为优先级不能动态改变。 For example, priority is changed dynamically by using parameter, seize does not work correctly.例如,使用参数动态改变优先级,seize 不能正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM