10

I'm a metal worker, I cut, weld, whatever.

I'm trying to figure out a formula where I could take my cutting list And figure out the most efficient way to cut it with the materials I have.

For example I have 2 20ft lengths of tubes I want 5 peices cut at 1.5ft, 3 at 2ft and 1 at 2ft

What I'm trying to do is calculate the most efficient cutting order to save the most material I'm using. My education is limited so any help would be appreciated, thank you.

John Don
  • 101

2 Answers2

8

This is a very well known, difficult problem, called the "bin packing problem". There is no known algorithm that would work efficiently for large numbers of pipes, but for reasonably small numbers it can be done in practice.

A reasonably good, though not always optimal, strategy is "first fit decreasing". Sort the desired output lengths in decreasing order, and cut each from the first tube where it will fit.

Robert Israel
  • 448,999
-2

"For example I have 2 20ft lengths of tubes I want 5 pieces cut at 1.5ft, 3 a 2ft and 1 at 2ft."

That adds up to 5(1.5)+ 3(2)+ 2= 7.5+ 6+ 1= 14.5 feet

I see no reason not to cut those 9 pieces in the order given. You will only need to use one of your 20 ft lengths and it will have 20- 14.5= 5.5 feet left.

user247327
  • 18,710