algorithm - Fitness function for scm distribution -


Issue: I need a fitness function, which is used to distribute the value and number of objects .

denote:

I have 1 distribution center (DC)

I have 3 stores (S1, S2, S3)

The DC of time is for some event. Item A's 30 pcs. The stores ask DC to send them items. Ask for S1 10 PC Item AS2 Ask 15 PCs. S3 asks for 20 pcs.

How do I set the optimal number item to send to the store while the DC item & lt; Total items are requested, whereas in each store, the sale of that item is calculated from profit for the fitness function?

Example of Solution:

  • Send DC to S7
  • Send DC 10 to S2
  • < Li> send DC 13 to S3

What is the best fitness function to use?

Use a profit measurement. How will your fitness function

look like fitness (integer numberSentToA, integer numberSentToB, integer numberSentToC) {moneyEarned = numberSentToA * priceAtWhichABuys + numberSentToB * priceAtWhichBBuys + numberSentToC * priceAtWhichCBuys; Return money; }

However, there is no need to use genetic algorithms for something like this. You can find the optimal solution using greedy approach.

Sort the stores with the items on which they buy goods. Take the shop that is ready to pay the majority of the amount, and wants to send all that stuff to him. Then select the next higher paying store until you leave the goods, do not do that until you have the optimal delivery.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -