+ Reply to Thread
Results 1 to 24 of 24

Need formula to cut and weld steel pipe with minimal waste.

  1. #1
    Registered User
    Join Date
    12-05-2013
    Location
    OKC, OK
    MS-Off Ver
    Excel 2010
    Posts
    8

    Need formula to cut and weld steel pipe with minimal waste.

    We are working on a project where we need 7 pieces at 45', 5 pieces at 50', 2 pieces at 35', and 1 piece at 20'. The lengths we are working with to make this are : 49.1 with a mid-weld at 39.8.
    31.7
    20.8 with a mid-weld at 11.2
    20 with a mid-weld at 10.9
    18 with a mid-weld 8.2
    17.8
    27.2
    35.5
    32.5
    35.3
    35.8
    If anyone can make a formula that can calculate the best way to cut, weld, and cut again with minimal waste that would be great. Not only will this help with this project, but it will help us to be able to do more projects like this on the fly. Thanks in advance!

    EDIT
    Basically what we want is something to take the original lengths, cut off footage, then add it on another piece and then repeat until we have the desired number of pieces and footages. Thanks!
    Last edited by spencergraves13; 12-05-2013 at 05:12 PM. Reason: Better explanation

  2. #2
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Need formula to cut and weld steel pipe with minimal waste.

    How does the mid-welds affect the calculations?
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  3. #3
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Need formula to cut and weld steel pipe with minimal waste.

    On the first sheet there is a simple tool to do the calculations manually.

    On the second sheet I tried Solver. It worked well but the layout is not so clear.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-05-2013
    Location
    OKC, OK
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Thank you so much! However, the project took a turn for the larger. What we need are 10 pieces @ 30', 7 pieces @ 45', 5 pieces @ 50', 2 pieces @ 35', and 1 @ 20'. The lengths that we have to do this are: 19.5,47.7,34.9,39.4,47.5,41.5,41.5,41.5,42.8,32.5,35.8,35.3,31.7,49.1,44.8,25.7,31.7,20.8,21.7,18,39.9,17.8,27.2,35.5,37.2,25.1,22.7, and 41.7. And to answer the question before, we only want 1 mid weld if possible on each pipe and we would prefer it to be at least 3.3 feet from the end of the pipe. I know I'm asking a lot but this would be a big help to us as we normally turn down jobs that require this kind of constant cutting and welding, since we have other projects we are working on as well. But what you made so far was great and thank you so much!

  5. #5
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Need formula to cut and weld steel pipe with minimal waste.

    What would be really nice is if you could post a workbook with all your new data in a table that I can just copy and paste.
    Or use that table function in the post editor. Either way you first have to click Go Advanced, down to the right.

  6. #6
    Registered User
    Join Date
    12-05-2013
    Location
    OKC, OK
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Here you go. Thanks so much!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-05-2013
    Location
    OKC, OK
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need formula to cut and weld steel pipe with minimal waste.

    I also wanted to say that I appreciate your patience with me and I really appreciate the help. That being said, (I know, I know what now?) on the new workbook can you write in there how I can use that for future projects? Thanks so much!

  8. #8
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Need formula to cut and weld steel pipe with minimal waste.

    In your list of available lengths, you only have one of each I assume?
    In that case my old solution is not valid. I'll have a second look at it.

  9. #9
    Registered User
    Join Date
    12-05-2013
    Location
    OKC, OK
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Correct, I listed every length. If there are duplicates then they are listed. Thanks!

  10. #10
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Checking the values in the uploaded file (lenghts.xlsx) I find that the sum of "original lenghts" adds up to 950.5 but the sum of "lenghts needed" is 955.

    What am I missing?

    Alf

  11. #11
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Need formula to cut and weld steel pipe with minimal waste.

    That's easy, Alf! You are missing 4.5 feet.

    Actually, I was about to call for your help in this thread before. My Solver setup was inspired by one you did recently. First time I try Solver. I think I got the actual Solver setup right but I got the whole idea of the problem wrong so my workbook is just a Solver exercise that does not help OP at all.

    I understand now that I have to use the very items listed, not just any amount of those lengths. A very cool problem indeed but more than I can handle I'm afraid. I'm guessing a dedicated algorithm is the way to go. I wouldn't be surprised if such an algorithm already exists in some other programming language. Finding it would be a challenge though.

    What's your take on it, Alf? Is this possible to solve with Solver?

  12. #12
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Hi Jacc!

    I liked your mix of solver with the vlookup function and rounding it up by using "Evolutionary" solver.

    Is this possible to solve with Solver?
    I have no idea i.e. I've been trying to see if I could find a solver setup that makes sense but so far no luck. Let's hope that forum guru shg takes an interest in this thread. If anybody could solve this he is the one!

    I find that as a solver problem this is quite fascinating so I have not given up yet, I'm still tinkering with it.

    As the OP uses Excel 2010 he could perhaps try to contact the support department at http://www.solver.com/

    they may be able to help him.

    Alf

  13. #13
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Need formula to cut and weld steel pipe with minimal waste.

    I had a feeling this wasn't that new.
    The cutting stock problem is similar but less complex I believe.
    http://en.wikipedia.org/wiki/Cutting_stock_problem

  14. #14
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Hi Jacc!

    The cutting stock problem is similar but less complex I believe.
    Oh yes certainly as you have a standard stock length and you are cutting a number of different lengths from it. So you set up umpteen cutting pattern and every pattern is set so that the leftover from each pattern cut is less than the smallest piece you can use.

    Quite some time ago I tried to set up a model for that. I think I got all the possible combinations, then I trimmed it down to a smaller model. In reality both results should be the same but they are not. Must try some day to analyze and see why the result differ and if you like to have a go at it be my guest.

    The poor OP here we are spending time on idle pleasures when we should be concentrating on his problem.

    Alf
    Attached Files Attached Files

  15. #15
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need formula to cut and weld steel pipe with minimal waste.

    I posted my attempt at this at https://app.box.com/s/7bsmo5e6izk346v5p5vv

    Alf, for the cutting problem, see https://app.box.com/shared/uhrjy318l1
    Entia non sunt multiplicanda sine necessitate

  16. #16
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Thanks shg!! You are the man! Now I'll probably spend most of Christmas trying to understand the workings behind both you your solutions. But with two serious handicaps one being a Norwegian (not known as the great minds of Scandinavia) and the second having passed the "three score and ten" age of man I'm rather doubtful if I'll succeed.

    Alf

    Ps Do you know why Norwegian brain surgeons have a year longer education than the other Scandinavians? It's because it contains a one year course in wood carving as well.

  17. #17
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Brilliant shg! And very good looking layout!

  18. #18
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Thank you both.

    The optimization it does is piece-by-piece, finding the one or two stock lengths available that results in least waste after composing each production part in sequence. It does no global optimization.

    ... a one year course in wood carving as well

  19. #19
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Ah! Now we just need to merge this code with Solver to create global optimization!

  20. #20
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Or now that I think about it, how about some brute force? Considering how fast your code runs, wouldn't it be feasible to loop it 100 times using some random function to scramble the starting positions and just take the minimum of those 100 loops?

  21. #21
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need formula to cut and weld steel pipe with minimal waste.

    I made one further optimization step -- in each iteration, it makes the piece that has the least waste among the pieces remaining to be made. Instead of making all but one 50' piece, it makes all but one 30' piece.

  22. #22
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Impressive, waste went down from 45.5 to 25.5 in the "improved" version!

    Alf

  23. #23
    Registered User
    Join Date
    12-05-2013
    Location
    OKC, OK
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Thanks so much to everyone jumping on this thread and trying to help! You guys are awesome!
    @shg
    I looked at your attempt and noticed that you only have 41.5 listed once when there are 3 at that length.

  24. #24
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need formula to cut and weld steel pipe with minimal waste.

    Input sheet:
    B
    C
    26
    39.9
    1
    27
    41.5
    3
    28
    41.7
    1


    Output sheet:
    B
    C
    24
    19
    39.9
    25
    20
    41.5
    26
    21
    41.5
    27
    22
    41.5
    28
    23
    41.7


    Looks like 3 to me.
    Last edited by shg; 12-09-2013 at 06:45 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 09-19-2013, 08:32 AM
  2. [SOLVED] How to get minimal date by array formula
    By lugburz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-10-2013, 04:28 AM
  3. [SOLVED] Function/Formula to display minimal sell price for profit
    By DKSJ in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-22-2012, 10:17 AM
  4. Spreadsheet for waste pickup
    By excelforum123 in forum Excel General
    Replies: 2
    Last Post: 12-05-2010, 05:43 PM
  5. Formula to limit the minimum waste
    By Krazy_Kaos in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-27-2007, 04:59 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1