CiwPython / Ciw

Ciw is a simulation library for open queueing networks.
http://ciw.readthedocs.io
MIT License
146 stars 42 forks source link

How to implement class-selective servers? #221

Open galenseilis opened 8 months ago

galenseilis commented 8 months ago

Suppose I have three classes of patients and two servers.

image

Server one will only serve patients of class A and B while server two will only server 2 will only serve patients of class B or C.

I was looking at server priorities in the docs. It seems that I could easily make it preferable for patients to go to one server or another, but it would still be possible that a patient of class A gets served by server 2 when server 1 is not available.

My conceptual attempt at this is two replace the one service centre with three service centers. One of them just received the general flow of patients from elsewhere in the service network (or from outside the network). Its job is to basically ensure that everyone waits in line together regardless of whether they can see the same of servers. When they leave the arrival centre they are routed according to their class to the respective service centres that can care for them, which is to say that they get filtered at the routing stage. The two other service centres receive patients (only from the arrival centre for the scenario I am considering) and are served according to a FIFO service discipline.

I've tried to roughly sketch this using mermaid diagrams and emojii.

image

Feel free to ask follow-up questions to fill in where I didn't provide sufficient detail or clarity.