I haven't done much algorithm writing till now. I have a specific scenario and I am wondering which approach shall I take.
Let us suppose that
- we have 4 guys (A,B,C,D)
- We want to assign them a certain task whose duration varies from 40 mins - 1 hr 15 mins.
- The task duration varies depending on the number of people (1-6) which he needs to serve. (i.e 40 mins for 1 person and 75mins for 6).
- Now we want to utilise these 4 guys(A,B,C,D) in particular time slots. let's say:
06:30 to 11:00 & 16:00 to 22:00
I don't only want the code rather I would love to get some info about good algorithms which are best suited for this scenario following with some code.
- All resources have equal efficiency. Efficiency is not much of our concern.
We can have any number of customers who are to be served. I'll try to explain this by one scenario:
A,B,C,D are cooks(assume) who need to work during the mentioned time slots(6:30 to 11:00 & 16:00 to 22:00). Customers(as an individual or some group who are living together in a flat) can book the cooks to cook food for them. The cooking time (40 mins to 75 mins) is directly proportional to the number of people for whom it is being cooked. The customer should be able to register himself on some website and the website would allocate the resources(A,B,C,D) to the registered users accordingly.
- How many people are enrolling for the service
- Desired time slots
- Available cooks as per the selected time slot
- There can any number of cooks.
- There can any number of customers with no relation to cooks.
- Once a customer books any cook , its not compulsory that the cook has to serve in both(lunch & dinner) time slots. The customer can select opt for the same cook if he's(the cook) available or else the customer will be asked to select another cook who is available during that time