I need to cut a certain number of pieces of different length of lumber beams. Is there a mathematical approach to know the minimum number of beams required to make all the pieces? And to minimize the wood left?
>>10377807Yes. Calculate the area of the cut you want to make (I'm assuming you're making just flat pieces so you don't need to know the the surface area, just the area of the face), then calculate the area of a standard beam. Take the area of your cut and multiply by the number of cuts you need, then divide by the area of a standard beam. By the way, as someone that worked in a builder/estimator, it is wise to buy a little extra material to compensate for waste since reality is you won't perfectly use each beam.
>>10377807This problem is NP-hard. See "bin-packing".
>>10377807>>10377807Here's a better way. Manually find how many cuts you can get out of one standard piece of lumber. Then take the total number of pieces you want to cut and divide by that number (total pcs required ÷ cuts per pc). You get the exact number of beams you need. Obviously you can't really control waste here unless you change up the design to minimize waste per piece of lumber.
And fuck you gookmoot, you cocksucking chink faggot. Thanks for the ads and the endless fading captchas you cunt eyed dog eater..
This is the knapsack problem.
>>10378043Sounds more like bin packing to me
>>10377825How come you decided to work with the area of the board instead of taking the height of a beam and dividing before rounding down to see how many integer divisions fit into that height?Wouldn't the outcome be the same?>>10377807Take your stock length and divide by desired beam length, rounding down to the nearest number.Then divide your desired beam number by the number of boards you get from each piece of stock, and round up.
>>10377807OP is fag
>>10378203I chose to work with area because I wasn't sure what cuts you wanted to make. If they are just straight cuts then it's easier for you. Anyway, use this method exact number of boards>>10377897
>>10378417>>10378203 (me)I am not OP, but I interpreted the wording in such a way that he isn't cutting a panel of plywood but rather straight lengths of 2x4 or whatever.