Reputation: 53
We are confronted with a Task scheduling Problem
Ti
needs Di
(i.e. worker*days) to finish (Demand), and can only hold no more than Ci workers to work on it simultaneously (Capacity).[A, B, C]
[100 50 10]
- unit: workerday (Task A need 100 workerday to finish, B needs 50 workerday, and C need 10 workerday)[10 10 2]
- unit: worker (Task A can only 10 workers to work on it at the same time, B can only hold 10, and C can only hold 2){A: null, B: null, C: B}
- A and B can start at any time, C can only start after B is donePossible approaches to the example problem:
First assign B 10 workers, and it will take 50/10 = 5 days to finish. Then at day 5, we assign 2 workers to C, and 8 workers to A, it will take max(10/2 = 5, 100/8 = 12.5) = 12.5 days to finish. Then the total duration is 5 + 12.5 = 17.5 days.
First assign A 10 workers, and it takes 100/10 = 10 days to finish. Then at day 10, we assign 10 workers to B, which takes 50/10 = 5 days to finish. Then at day 15, we assign 2 workers to C, which takes 10/2 = 5 days to finish. The total duration is 10+5+5 = 20 days.
So the first practice is better, since 17.5 < 20. But there are still many more possible allocation practices to the example problem, and we are not even sure about what is the best practice to get the minimal total duration for it.
What we want is an algorithm:
Input: Nworker, Demand, Capacity, Dependency
output: worker allocation practice with the minimal total duration.
B
as soon as possible in the example)A
in the example)But none of the two proves to be the optimal strategy.
Any idea or suggestion would be appreciated. Thanks !
Upvotes: 3
Views: 1918
Reputation: 27312
This sounds like Job Shop Scheduling with dependencies, which is NP-complete (or NP-hard). So scaling out and delivering an optimal solution in reasonable time is probably impossible.
I've got good results on similar cases (Task assigning and Dependend Job Scheduling) by doing first a Construction Heuristic (pretty much one of those 2 allocation strategies you got there) and then doing a Local Search (usually Late Acceptance or Tabu Search) to get to near optimal results.
Upvotes: 0