I am trying to make a software for a sawmill. I have a list of boards that I will have to obtain and the diameter of the log that I have to cut.
The algorithm is relatively simple. I try to make a prism in the center of the log, then depending on the space that remains I try to put other boards. The problem is that I don't know what boards should I put to minimize losses.
I think I have to put thick boards in the centre and the thin boards in the remaining space, but the problem goes deeper. In the figure below, red represents the maximum width of a board (y axis) with a given thickness (x axis). What thickness should I consider from board list for optimal results? I must take into consideration width of the boards (I can put multiple boards on the same column, but they must have same thickness).