简体   繁体   中英

Priority-based queueing in AnyLogic

I'm new in AnyLogic and I'm developing a model for a real Emergency Department. I have developed almost everything I need, however I'm having trouble with priority queueing . In our model we have 2 different priorities for patients (red and yellow), where red has a higher priority in queueing. 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).

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;" 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:

Queue priority

Output priority

Errors

I also tried typing "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.

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

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. Instead of agent you could try entity .

In the fields causing the errors (where you typed agent ), is there a small "lightbulb" when you have the cursor in the field? 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:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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