+ Reply to Thread
Results 1 to 2 of 2

select numbers from a list and add to optimise result

  1. #1
    DT
    Guest

    select numbers from a list and add to optimise result

    I have a list of lengths of material and a set available length I can
    purchase I need to create a solution to pick data from the list and sum them
    together to optimise material usage can anyone help


  2. #2
    Harlan Grove
    Guest

    Re: select numbers from a list and add to optimise result

    "DT" <[email protected]> wrote...
    >I have a list of lengths of material and a set available length I can
    >purchase I need to create a solution to pick data from the list and sum
    >them
    >together to optimise material usage can anyone help


    You'd need costs too to really optimize this. E.g., if you needed 12 6'
    lengths and 12' and 18' stock were available, you could buy either 6 12'
    lengths or 4 18' lengths, but if the 18' lengths cost less than 1.5 times
    the 12' lengths, you'd always want to buy the 18' lengths. With costs per
    stock item, you'd optimize for cost by starting with the cheapest stock item
    per unit of length, then move to the next cheapest, and so on.

    This is a variation on the knapsack problem, so the optimal answer requires
    checking all possible combinations, and the number of combinations grows
    hypergeometrically with the number of different lengths. If you needed more
    than 50 pieces of material at desired lengths, it could take a VERY, VERY
    LONG TIME for any software to find the optimal stock lengths. Better (i.e.,
    faster) to handle this sort of thing the old fashioned way and risk perhaps
    paying 1-2% more than optimal in order to avoid days of calculation time (if
    you don't run out of memory first).



+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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