Looking for supplier price optimization algorithm

126 views Asked by At

I'm looking for an algorithm for the following problem:

I have a set of x distinct components and a set of y supplier for those components. I know the price p(x,y) for each component from each supplier. I also know the shipping cost s(y) for each supplier, which is obviously cheaper if you just buy from just a few suppliers. Not all suppliers have each component available. I want to buy all components once, but need to get the cheapest total price or at least a very closed small value.

The straight forward approach would be to try each combination, which could take some time if x and y get very large, although it could be parallelized. Any suggestions are appreciated.

For simplicity let's say x = 100, y = 1000.

1

There are 1 answers

0
Andibioticum On BEST ANSWER

Thanks for all the comments. They pointed me in the right direction, to formulate the problem like displayed below.

Minimize the sum of all items plus shipping costs:

p(0,0)*x00 + p(0,2)*x02 + p(1,2)*x12 + ... + ship(0)*y0 + ship(1)*y1 + ...

with x and y in [0,1], p(n,m) is the price of item n for supplier m and ship(m) is the shipping cost for supplier m

Subject to:

  1. Retrieve each item exactly one time, like this:
p00 + p01 = 1
p12 + p13 + p15 = 1
p20 + p21 = 1
...
  1. Shipping cost is taken into account if one item is bought from this supplier
y0 >= x00
y0 >= x10
y1 >= x01
...