Hello I am having difficult time to think on a solution for this algorithm my work asked me to create.
A little background to understand what the algorithm is supposed to do: there are shift types: morning, late morning, noon, late noon, evening, etc.
.
each agent is working on a subset of shifts, regularly.
for example, agent smith is working only on morning shifts, while agent Neo is working on morning and evening as well.
the current solution (which is not good), is that whenever a new meeting is created, it is assigned based on the agents who work on that specific shift when the meeting needs to occur, and we select the a random agent from a list of agents that available for that shift BUT also has the least of meeting on that specific date.
the problem that happens due to this current solution is that for example if the morning shift had exactly 3 agents: x, y, z and noon shift had 4 agents (for example): q, x, y, z and for example 4 new meetings needs to be assigned now 3 for noon shift and 1 for morning shift and lets assume that first the algorithm received the noon meetings first to assign and also lets assume the algorithm chosen to assign those to users x, y, z because they each have 0 meetings before assigning those new meetings for that date.
and now the morning meeting is needed to be assigned for the same date, but x,y,z agents already have 1 meeting each scheduled, however they are the only ones who can take morning shift meeting.
So now I will have to assign the new morning meeting to x or y or z, while agent q doesn’t get a meeting.
This cause unfairness.
the process doesn’t receives all the meetings at once so each time it is needed to run the algorithm on new meetings that is being inserted to the system, and assign it as fair as possible.
What I have tried:
I wrote already in the problem section.