Cancel
Showing results for
Did you mean:

# How to choose the next MU based on an attribute

Genius

Hello everyone
I'm facing a simple problem and I don't want to use methods to solve it, because I think it would be too much for such problem. So I'm thinking if there's a easy way to solve the problem without using methods.
The problem is:

Patients arriving at a hospital receive a colored bracelet based on the gravity of his problem. After that, they go to a waiting room and are called based on the bracelets color. When there are two patients with the same color, the FIFO rule is applied.

-The waiting room have a capacity, so I can not create individual buffers for each color.
-There are five different colors and each one have a different probability of happening

Thank you all for the attention.

4 REPLIES 4

# Re: How to choose the next MU based on an attribute

Gears Esteemed Contributor

If you had only two categories, the sorter would work (you have only to switch the sorting direction - 2 lines SimTalk), you can search in the contentslist of the buffer for the patient  (at least 3 lines SimTalk). My favorite is a doorkeeper, who is observing the number of patients in the waiting room and blocks the entrance, if the waiting room is full (SingleProc, no processing time, exit strategy MU-attibute --> distribution to 5 queues, 2 lines SimTalk necessary).

But sorry, I have no idea, how to do this without a single line of SimTalk...

 Steffen Bangsowfreelance simulation specialist  web: www.bangsow.eumail: steffen@bangsow.net

# Re: How to choose the next MU based on an attribute

Siemens Phenom

Hello Mario,

there is a solution with the Sorter object, which does not use SimTalk.

Note that the custom attribute color is of type integer.

Please start the simulation. Close the exit of the Source object and continue the simulation.

Observe the console.

Regards,

Peter

# Re: How to choose the next MU based on an attribute

Genius

Hello guys

Steffen, at first I was thinking in something similar at that you proposed, I would create a different buffer for each color and then a method to control the entrances based on the sum of MU's on each buffer.
But Peter's solution is easiest..
I had never used the object "sorter" and one can clearly see that it was builded for problems like this.

Thank you Petter, and thank all for the help

# Re: How to choose the next MU based on an attribute

Gears Esteemed Contributor

Hello Mario,

normally you need for this kind of models random access to each queue, because the most hospitals have different processes for e.g. heavy cases and easy cases (and between). So you need different queues. If 5 is e.g. heavy injured people and 1 only light, you have different rooms with different equipment for initial treatment. So e.g. 4 can go to 5 but never to 1 and 2, and 3 can go everywhere. In many cases 1 will be reject or processed directly in the waiting room, if the waiting room has a certain filling level.

Best regards

Steffen

 Steffen Bangsowfreelance simulation specialist  web: www.bangsow.eumail: steffen@bangsow.net