This might be long winded, but im struggling to generalize this question. So I'm sorry, but here goes:
So I have what I think is/was a linear optimization question.
I have a series of vendors and customers as well as a product cost per case and sale price per case. I also have the total supply at each vendor and demand at each customer. Next I have the freight for a full truck (not single case) between each vendor - customer combination. (We can assume all orders are full truck loads(1000 cases)).
I set this up as an LP (max) where the gross profit per case (Sale Price - Product Cost - Freight per case = GP) is the objective function and the total supply/demand for each vendor/customer are the constraints. So a variable for every customer vendor combination.
I solve this and all is well.
What do i do when i add additional products at different sales price/costs and different supply/demands? So 1 order could be 250 of product 1 and 750 of product 2. The freight is the problem here I think.
My intuition says when you have multiple products you could do a weighted allocation of the freight across the two products (to calculate GP per case) assuming you just create all new variables for each product (so two products doubles the amount of variables). If that's the case how do you keep the full truck load together? ie insure it comes from the same vendor? or if you allow it to come from multiple vendors how do you account for the the additional freight to get the second pick up?
Any help here is appreciated. I am doing this in SQL/R if that matters.