简体   繁体   English

AnyLogic 中基于优先级的排队

[英]Priority-based queueing in AnyLogic

I'm new in AnyLogic and I'm developing a model for a real Emergency Department.我是AnyLogic的新手,正在为真正的急诊室开发 model。 I have developed almost everything I need, however I'm having trouble with priority queueing .我已经开发了几乎所有我需要的东西,但是我在priority queuing方面遇到了麻烦。 In our model we have 2 different priorities for patients (red and yellow), where red has a higher priority in queueing.在我们的 model 中,我们有 2 个不同的患者优先级(红色和黄色),其中红色在排队中具有更高的优先级。 For example, if a yellow-priority patient and a red-priority patient are both in queue for going to the X-ray, the red should be picked first (Priority-based queueing NOT LIFO).例如,如果黄色优先的患者和红色优先的患者都在排队等待进行 X 光检查,则应该首先选择红色(基于优先级的排队不是后进先出)。

I saw a lot of posts that explained how to do this but none of them worked for me.我看到了很多解释如何执行此操作的帖子,但没有一个对我有用。 I tried making a parameter called "priority" within the "Patient" agent and using "agent.priority=1;"我尝试在“Patient”代理中创建一个名为“priority”的参数并使用“agent.priority=1;” for assigning priorities on the exit of a SelectOutput and then selecting the "Priority-based" option in the Queue but that doesn't seem to work as I get the following error:用于在SelectOutput退出时分配优先级,然后在队列中选择“基于优先级”选项,但这似乎不起作用,因为我收到以下错误:

Queue priority队列优先级

Output priority Output优先

Errors错误

I also tried typing "patient.priority=2;"我还尝试输入“patient.priority=2;” instead of "agent.priority=2;", also using a variable instead of a parameter, and also initializing the variable's value with the following formula: uniform() < 0.7 = 1: 3. But this didn't worked.而不是“agent.priority=2;”,也使用变量而不是参数,并使用以下公式初始化变量的值:uniform() < 0.7 = 1: 3。但这没有用。

Does anyone know how to use priority-based queueing or some sort of walkaround I could use?有谁知道如何使用基于优先级的排队或我可以使用的某种绕行方法? It's for my final project for becoming an engineer!这是我成为工程师的最终项目!

The version I'm using is AnyLogic Professional 7.0.2我使用的版本是 AnyLogic Professional 7.0.2

Thank you very much for your time!非常感谢您的宝贵时间!

You are using a very old AnyLogic version that still applies the old process-modelling library where entities are NOT actual agents.您使用的是非常旧的 AnyLogic 版本,该版本仍然应用实体不是实际代理的旧流程建模库。 Instead of agent you could try entity .您可以尝试entity而不是agent

In the fields causing the errors (where you typed agent ), is there a small "lightbulb" when you have the cursor in the field?在导致错误的字段中(您键入agent的地方),当您在该字段中输入 cursor 时是否有一个小“灯泡”? If so, what keywords does it allow you to write?如果是这样,它允许您编写哪些关键字? Please see this article to understand what I am talking about请参阅本文以了解我在说什么

Strongly suggest you upgrade asap:)强烈建议您尽快升级:)

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

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