The optimal algorithm for this geometric (carpenter-related) program

As the title says, my question is about finding the best algorithm to solve the problem I'm working on. I am just looking for information / suggestions.

This problem was asked to me by my uncle, who thought that it would be a good challenge for me as well as a potentially useful software if I could implement it on a mobile platform. There he is:

"Im doing some carpentry using sheet products of a known standard size (either 4 x 8 or 5 x 5). I have a" cut list "of pieces of wood of various known sizes that I need. I like to do this quickly figure out how to break sheet goods into useful pieces at minimal cost.

Another factor to consider is the kerf saw (or width). For example, you get only 3 x 4 pieces (not four) from a 4 x 8 sheet due to material loss when making three cuts.

What I imagine is a program where I could enter the sheet size, the width of the saw blade Im using (its variable), the dimensions of the finished product, I want, and the program will generate a rough picture of the cut pattern, which most effectively minimizes waste " .

At the moment, I'm just working on writing an algorithm to find a solution with minimal cost. I will leave it on Android for one more day.

In terms of a real algorithm, here are my thoughts:

  • Order "cutout" in descending order of area
  • Place the first element in this list on the sheet so that it occupies the highest position on the left.
  • ,
  • ,
  • , .

(), !

- , .

, KWarr

+4
1

, kerf k. k/2 , k/2 . 2D , , , NP . , , , .

, . , - .

+1

Source: https://habr.com/ru/post/1532408/


All Articles