Knapsack - Saving Waste

55 Views Asked by At

I am trying to figure out the most efficent way to save waste. I've looked into the knapsack problem as I believe it is what can help me solve this dilemma. Any help, guidence, or direction is appreciated.

I have a set of objects with their own required widths and amounts. For example, I need 2400ft of the 5in object, 1200ft of the 4in object, 3600ft of the 2in object, etc. The widths range from 1in to 13in, the amount per object from 150ft to 4500ft. I am creating these individual objects from a larger one that is 50in wide. The goal is to have 1in of shim on both sides of the 50in object, leaving 48in of material to use for the smaller objects, but this can vary slightly. There can be multiple objects of the same width to fill the 48in gap. I want to find the lowest amount possible per smaller object and the number of each smaller object, e.g. 5in $\times$ 2, 2in $\times$ 7.

Where do I start? If you have any questions let me know and I will answer them.

Thank you,