On 25 jun, 03:36, geremy condra <debat...@gmail.com> wrote: > On Thu, Jun 24, 2010 at 9:13 PM, Marcos <marcosruap...@gmail.com> wrote: > > I have a store, so I want to maximize the profit. I have all the > > suppliers with diferent prices, some providers can send products to a > > client an others not, this has a plus price. Some providers has a > > discount over the tansport if a quantity is reached. > > > Sometimes its better to me receive the order and resend to the client > > if I have a transport discount. > > > Not all the suppliers has all products for a order. > > > So I want to create a function which I can pass the data, and > > generates all the possibilities so I can find the maximum profit. > > > Have I to use heuristics? Do you know some examples?. > > > Thanks in advance. > > Depending on the exact constraints this may be a linear programming > problem (very simple) and even if it isn't there are likely to be good > approximation methods. With more information will come better > advice. > > Geremy Condra
I geremy Im goint to put you some example: Providers: Number 1- Product 1: 56$ Product 4: 45$ Number 2- Product 2: 24$ Product 4: 34$ Number 3- Product 1: 45$ Product 2: 65$ Product 3: 65$ Product 4: 76$ Transport Provider number 3 can transport direct to customer with a plus of 5$, It can deply to a distribution center. Provider number 2 and 1 only transport to a distribution center. Poriver number 2 gives free transport over 500$, and number 1 over 1000$. Each provider has a transport cost, that we have in tables. If we deply to the distribution center we have to add the transport to the consumer. Order: 10 units product 1 6 units product 2 20 units product 3 40 units product 4 So which is the best way to deploy the order optimizing profit?. This example has random quantities of product and prices, but I think now its clear. Regards. -- http://mail.python.org/mailman/listinfo/python-list