The problem is to find the optimum quantity that incurs minimum total cost in a number of warehouses using genetic algorithm.
Let's say there are n
warehouses. Associated with each warehouse are a few factors:
- LCosti: loading cost for warehouse i
- HCosti: holding cost for warehouse i
- TCosti: transportation cost for warehouse i
- OCosti: ordering cost for warehouse i
Each warehouse has quantity Qi associated with it that must satisfy these 4 criteria:
- loading constraint: Qi * LCosti >= Ai for warehouse i
- holding constraint: Qi * HCosti >= Bi for warehouse i
- Transportation constraint: Qi * TCosti >= Ci for warehouse i
- Ordering constraint: Qi * OCosti >= Di for warehouse i
where A, B, C and D are constants for each of the warehouses.
Another important criterion is that each Qi must satisfy:
- Di >= Qi
where Di is the demand in warehouse i.
And the equation of total cost is:
Total cost = sum(Qi * (LCosti + HCosti + TCosti) + OCosti / Qi)
How do I encode a chromosome for this problem? What I am thinking is that combining one of the four constraints that gives a minimum allowable value for Qi and the last constraint, I can get a range for Qi. Then I can randomly generate values in that range for the initial population. But how do I perform crossover, and mutation in the above scenario? How do I encode the chromosomes?