I am developing a scheduler which will automatically schedule employees to various departments based on departments they are allow to work in (or are trained to work in).
Let's say for example the PCworld store has four departments: Laptop, TV, Cameras, Warehouse. EmployeeN is trained to work in Laptop and Cameras.
Let's say I have to schedule 100 PCworld colleagues based on the departments they are trained to work in. I have an employee class which has a list of departments the employee is allowed to work in. I have also a department class which has each individual department criteria such as minimum employee count needed.
Let's say I have a global list of employee instances and a list of department instances. So, if I have 4 departments then I need to create 4 lists of assigned employees from the global list of employees, ensuring that the department requirements such as minimum and maximum employee counts are satisfied. I don't know if that make sense sorry guys.
What's the best ways to tackle this solution, or what's the best algorithm to use to assign employees to departments?
Thank you guys.