1

There are N person. Each person has a strength Si to perform tasks .
There are T tasks. Each task consumes energy ej
We have to assign the tasks to the persons such that the distribution is balanced.
For e.g if there are 4 person with Strengths 100, 50, and 30, 20 and there are 10 tasks with energy weight as 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 (No need to be same). Here I want to assign the tasks such that maximum tasks can be done without exhausting any person.
So,I would assign 6 tasks to the first one, 2, 1, 1 to second, third and fourth respectively.

I tried solving the problem with OR tools https://developers.google.com/optimization/bin/multiple_knapsack but the solver assigns all the 10 tasks to the first person exhausting it immediately.
Here is a question with similar problem but it is different from mine because I have different capacity of bags https://math.stackexchange.com/questions/1833651/is-there-a-balanced-knapsacks-problem-with-a-known-result

Is it a known problem?
Am I wrong by calling it a Multiple Knapsack?
Is there a way to solve this using the OR tools or any other way is much appreciated?

booyaakaashaa
  • 105
  • 12
  • 1
    Define *balanced*. `10, 10, 10, 10, 10, 10, 10, 10, 10, 10` can all assigned to Stength-guy 100 and `Here I want to assign the tasks such that maximum tasks can be done without exhausting any person.` is enforced (if exhausting means X > strength). Who is more exhausted? 100-guy who works 90 or 20-guy who works 10? Problems like these always need a solid formal base before one should spin up some solver. – sascha Jul 15 '22 at 11:43
  • @sascha is right, the solution assigning all 10 tasks to the first person doesn't violate any of the constraints you named so it's a perfectly valid solution. If you continue with ``NextSolution()`` you'll get other solutions that also satisfy the constraints, with different assignments of the tasks. If you want to balance the load on the persons you need to define an objective such as "maximize the minimum difference between load and capacity of all the people". – Christopher Hamkins Jul 15 '22 at 11:50
  • By balanced we mean that the distribution of tasks should be as per the current strength of each worker. Giving all the 10 tasks to the 100 person will consume all the the strength and they will be out. We want each person to be alive for as long as possible. You can say merit based. – booyaakaashaa Jul 15 '22 at 11:55
  • Maybe: Minimize the max percentage used? – Erwin Kalvelagen Jul 17 '22 at 07:07

0 Answers0