I am looking for a code direction to optimize product selection.
There are 6 products. Using a combination of these 6 products gives the best outcome of subtotals required for selection. It gets complex - these 6 products have 6 options each.
Product1...QtyA_type..QtyB_type..QtyC_type.......QtyF_type...Price
Product2...QtyA_type..QtyB_type..QtyC_type.......QtyF_type...Price
Product3...QtyA_type..QtyB_type..QtyC_type.......QtyF_type...Price
Product4...QtyA_type..QtyB_type..QtyC_type.......QtyF_type...Price
Product5...QtyA_type..QtyB_type..QtyC_type.......QtyF_type...Price
Product6...QtyA_type..QtyB_type..QtyC_type.......QtyF_type...Price
e.g. Totals Req... 11..4..4..7..0..0
Solution(s) may be multiple Product X's or a combination of different products. It would be good to optimally use product(s) with the best price.
The biggest problem I think is that subset >= is OK (minimized), but cannot be <. Most things I look at try to be exact or under.
The second twist is that QtyA_type and QtyB_type could be combined as a total requirement. e.g. need "17" can be a total of A and B in a single type total (essentially reduces to 5 types).
I still find it even difficult how to properly get the nearest >= for a single column. I attached a sample of what this looks like when I do it in a very manual way. Actually, I had lookups with dropdowns in each level to make manual evaluations easier but it would be better automated. A point in the right direction is very appreciated. Anything more... much appreciated. TestCombo.xlsx
Bookmarks