1

Let's say we have 9 storage units with the following current quantities:

152, 153, 154, 159, 157, 147, 140, 265, 205.

The 9 storage units will be supplied daily, for 30 days, with the following daily maximum quantities:

day 1: 12, day 2: 13.5, day 3: 15, etc (each day an increase in 1.5 units) until the 30th day.

The daily quantity can only be supplied towards one unit each day (so you can't split the 12 from 1st day to multiple units, it must go to 1 storage unit only).

Can a formula be devised to calculate which days which units must be supplied in order that at the end the resource distribution, after 30 days, resources/units are as balanced as possible (all units to have a similar or very close quantity) ? The one with 265 can be ignored if it is too high to be reached by the others.

Overmind
  • 121
  • The greedy algorithm approach would be to allocate every new quantity to the unit that has the quantity furthest below the mean quantity over all units. But that does not guarantee you'll end up with the most even distribution in the end. At least, I don't see so a priori. – Raskolnikov Jun 30 '20 at 06:34
  • Agreed, the closest thing I managed is to try compensate things like that and use the last 9 days for the closest balance possible, but the end differences still seem to end up high. – Overmind Jun 30 '20 at 07:17
  • Have you tried reversing the problem as follows?: Sum all quantities at start and the quantities of the full program. Divide them equally over the units. Now try to work backwards from there to the initial state or as close as possible to it by subtracting the daily quantities in order. The allocations you obtain are your "solution". – Raskolnikov Jun 30 '20 at 07:26
  • Thanks for the suggestion. Due to the over-complexity of putting this into some sort of formula I did it via excel by making square boxes and fitting them around until I got the desired balance. Took way less than I anticipated. I'd still want to find some sort of formula that can consider variable initial quantities and constant linear growth addition. – Overmind Jul 22 '20 at 10:46

0 Answers0