Heuristic

M

Marcos

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.
 
M

Marcos

You would not use a heuristic to generate all possibilities. You might
use one to *avoid* doing that, and still get a good, not necessarily
optimal, answer. Wikipedia has an general entry on 'heuristic'.
Algorithm books often specifically discuss heuristic algorithms.

Thanks terry I am reading about Knapsack problem, but the main problem
I have its the repeated elements, so If i am itering all elements some
can be repeated, I dont know how to avoid this, I thinked in neural
networks too.

Do you have any ideas?.
 
M

Marcos

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.
 
M

Marcos

True. Basically there are two ways of approaching the problem. One is to
try all the combinations, which will guarantee that you'll find the best
solution, but if there are an enormous number of combinations then that
could take a very long time. The other way is to use a heuristic to get
an reasonable solution in an reasonable time. It's a trade-off.

 > Wikipedia has an general entry on 'heuristic'.
 > Algorithm books often specifically discuss heuristic algorithms.

Do you know it there is some way to generate all the scenario
possibilities?. So I Can put an array an data an generate all. I have
the lack of repeated elements that I cant solve.

Thanks.
 
M

Marcos

What do you suggest Terry? I think this problem its similar to
traveler salesman. Some people solve it with Heuristic and some with
Linear programming or Stochastic programming.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top