News for hackers. Stuff that matters.
Re:Knapsack problem by danielovich on Tuesday April 23, 2013 @12:35PM (#5596169)
Knapsack! And there is no way to determine the best solution before every combinations has been tried. I have been in the exact same spot as you but ended up making a specific module for it which didn't needed any computation beforehand.
Re:Knapsack problem by itomatik on Tuesday April 23, 2013 @12:56PM (#5596304)
Hold on, so you did you bruteforce all-all possible solutions and then just picked the best one out of them? How many products you had? Was it close to what I have? In my case there are just too many possible solution. I waited for an hour on my current one and it didn't finish :) What was your strategy with regards of how much each bag type you select? Try all possible from current_max downto 7,500?
Re:Knapsack problem by itomatik on Tuesday April 23, 2013 @01:06PM (#5596391)
In which context were you solving this problem? I'm trying to optimize products distribution.