I originally posted the problem in stackoverflow but later on it become clear that it is more of a math problems then coding.
We have company doing support work on 3 projects (P1, P2, P3); In the company there are 4 workers (w1,w2,w3,w4) and each of them got some special preferences described below.
On Monday morning the company receives the following tasks for the day:
P3: tasks for 16 man-hours* , with dead-line=13:00.
P2: tasks for 16 man-hours* , with dead-line=17:00.
P1: tasks for 30 man-hours* , NO dead-line (as much as you can make).
Lets say the working schedule of all(see w2) workers is 08:00-12:00, 13:00-17:00.
w1: can work on P1, P2;
w2: can work on P1, P2, P3, but works will work only 4 hours today (08:00-12:00);
w3: can work on P1, P2, P3, and has Double performance on P2;
w4: can work on P2, P3, and has Double performance on P3;
*Man-Hours: P2 needs 16h so it will take 2 normal workers for 8 hours to be complete.
w3 is specially trained for this project and can make it alone for 8 hours.
The goal is: to create a schedule so that P3, and P2 are done in time and P1 should be done as much as possible (it is impossible to finish it).
Edit: each worker can change his current project at 1 hour intervals.
This scenario is easy to solve and is just for example. In the real scenario there are 20+ projects and 50+ workers with random dead-lines, working hours and performance speed.
But the problem involves more then this... any ideas?