I need to implement a priority queue, this queue in addition to the priority, needs to take into account some other requirements, such as switching between services and professionals, in addition to respecting the customer's order of arrival for that service and / or professional. p>
My complete (hypothetical) scenario:
In a hospital we have three services offered (this in any other company can be the same situation, a law firm anyway.):
Consultations, exams to be done in the day and another service that is a schedule of exams. The system needs to switch between services, type, called someone's query, the next should be from any other service and so on. The system must also switch between professionals, the one previously called was from professional 1, the next should be from professional 2 and so on.
I have been researching some lib or some algorithm and the closest one I found was the heapq of Python but I could not adapt and mount my solution.
I'm really in need of a help, I accept suggestions for implementations, indications of libs that solve this problem anyway.
I have tried several solutions and none have shown the desired result.
I'm waiting for you.
PS: I did several searches here in the OS and I did not find any of the same question, if it is repeated please indicate link of the question.