Thank you very much for your advice. There're only 2 criteria in the
calculation: volumn & weight. It's because the factory will bear
other costs themselves.
You're right that the no. of product is extended to "n". Sometimes
it's needed to do a forecast for the whole month. The no. of product
may be increased to thousands and an additional constrain will be the
goods finishing date.