Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I think the key here is to establish the potential costs of each purchase case, so that the proper combination of purchase cases optimally minimize a cost function. (Then its simply reduced to a knapsack problem)</p> <p>What follows is probably not optimal but here is an example of what I mean:</p> <p>1.Any product that is the end product "costs" it's actual cost (in currency). </p> <p>2.Any component or product that can be assembled into the end product (given other separate products/components) but does not require being dissembled costs it's real price (in currency) plus a small tax( tbd).</p> <p>3.Any component or product that can facilitate assembly of the end product but requires being dissembled costs it's price in currency plus a small tax for the assembly into the end product and another small tax for each dis-assembly needed. (maybe the same value as the assembly tax?).</p> <p>Note: these "taxes" will apply to all sub-products that occupy the same case.</p> <p>... and so on for other possible cases</p> <p>Then, find all possible combinations of components and products available at the storefront that are capable of being assembled into the end product. Place these "assembly lists" into a cost sorted list determined by your chosen cost function. After that, start creating as many of the first (lowest cost) "assembly list" as you can (by checking if all items in assembly list are still available at the store - i.e. you have already used them for a previous assembly). Once you cannot create any more of this case, pop it from the list. Repeat until all the end products you need are "built".</p> <p>Note: Every time you "assemble" an end product you will need to decriment a global counter for each product in the current "assembly list". </p> <p>Hope this get's the discussion moving in the right direction. Good luck!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload