+ Reply to Thread
Results 1 to 4 of 4

Excel macro required to calculate a cutting sequence

  1. #1
    Registered User
    Join Date
    01-03-2020
    Location
    Staffordshire, England
    MS-Off Ver
    excel for office 365 mso (16.0.12624.20348) 32-bit
    Posts
    35

    Excel macro required to calculate a cutting sequence

    Hi – I have a conundrum, we have to cut 7500mm bars of steel down for orders that vary in size and quantity.
    The latest example is:
    Component size (mm) Component quantity
    980 6
    3180 24
    2380 12
    3780 6
    The aim is to minimise the waste on each bar of steel. We can also incorporate stock sizes as follows:
    Stock sizes
    1380
    1580
    1780
    1980
    2180

    The saw will take two bars of steel at a time, what I’d like is for an excel macro to work out a cutting sequence of the component sizes and quantities. If a combination has a lot of waste the algorithm can incorporate stock gate sizes. I’d like the waste to be under 100mm for each bar.
    Preference is for one size to be cut as many times as possible which might mean loading and unloading bars often but that is okay due to set up time. A sample spreadsheet is attached. There wouldn’t be any more than 10 different component sizes at a time although six would probably be workable if the combinations are too vast.
    Any help appreciated, thanks in advance, Rob
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Excel macro required to calculate a cutting sequence

    Have you already checked similar problems on this forum, like: https://www.excelforum.com/excel-pro...th-orders.html

    There are also available commercial solutions for such problems.

    The one non-obvious part in your description is the "stock" part. Does it mean that if one can cut from one 7500 bar just one required piece and a combination of say 4 stock lengths giving total waste of 10mm it is acceptable way of cutting?


    in other words the order could be treated as
    980 exactly 6
    3180 exactly 24
    2380 exactly 12
    3780 exactly 6
    1380 >=0
    1580 >=0
    etc.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    01-03-2020
    Location
    Staffordshire, England
    MS-Off Ver
    excel for office 365 mso (16.0.12624.20348) 32-bit
    Posts
    35

    Re: Excel macro required to calculate a cutting sequence

    Hi Kaper
    Thanks for responding. I've had a look at the thread you sent and sample files but they don't quite give me what I need. In answer to your question about stock, yes any quantity of stock can be applied, apologies should have made that clear.
    That hopefully makes for more options for minimising waste. Any further help with this appreciated

    Regards
    Rob

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Excel macro required to calculate a cutting sequence

    So I did a first step and reused and adopted macro from another thread on this forum: https://www.excelforum.com/excel-pro...-in-range.html to list all possible ways of cutting 7500 bar (with waste not larger than 100mm) into pieces of required lengths and allowed spare lengths.
    Note that there is no way to cut 3780mm pieces. with 100 mm waste criterion.

    The next step could be optimization (not done yet)
    For instance probably first way of cutting shall not be used as it produces all needed 980mm pieces (and one stock piece) and all other usefull cuts like listed in row 6
    980 980 980 3180 1380
    which gives 3x980 + 1x3180 + 1 stock piece

    But before I start with opitimization/selection which "paths" shall be used, I'd like to know what is ""Total bars in saw" - does it mean that there is always a pair of bars cut at the same time? Then first way of cutting is obviously wrong as we take 2 7500 bars and end up with 12 980 pieces.

    And what we do if there is no allowed way to cut 3780 piece?

    The code is:

    Please Login or Register  to view this content.
    See attached file (with macros enabled)
    Attached Files Attached Files

+ 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. Cutting plan for making required sheets from available coils (Sheet Bundle)
    By nagesh.tvsr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-10-2019, 11:44 AM
  2. Cutting out required data in unstructured cells
    By Nico87 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2018, 10:49 AM
  3. [SOLVED] “… there will be »segments«”: cutting up a sequence into smaller chunks
    By Schroeder70 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-17-2013, 07:41 AM
  4. [SOLVED] Macro to calculate number sequence into rows and then copy formulas down to meet
    By agentone in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2012, 09:30 AM
  5. Macro required to calculate and display
    By karobonas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-29-2011, 09:39 AM
  6. Macro required to delete duplicate rows and arrange numerical sequence
    By domex in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2010, 07:13 AM
  7. Cutting Pipe lengths VBA program required
    By ldavison10 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-18-2008, 10:00 AM

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