I have 10 warehouses across the US. Each of them may or may not have product A, B, C, D, E in stock. Someone orders all five items from my website.
I want to minimize th
As the number of locations is rather small, you could prepare a list with shipment options in ascending order of shipments:
10 x shipment alternatives from 1 location
45 x shipment alternatives from 2 locations
120 x shipment alternatives from 3 locations
210 x shipment alternatives from 4 locations
252 x shipment alternatives from 5 locations
For a given order, you'd scan your table and check for every option whether it is feasible for the given order. The first match is a viable solution. Assuming that a customer cannot order more than five products, no more than five shipments have to be taken into account.
In real, you'd take into consideration that customers might order larger quantities. Your warehouses might have a non-zero but limited number of products. So, the checking might be cumbersome in the end. Which brings us back to the ILP solver mentioned obove.