The primary aim of demand forecasting is to decrease the cost of company’s operations: storage and loss of sales related to shortages. As business environment is highly complex, forecasting the demand using deterministic models may not be as successful as expected. In such a case, stochastic models should be adopted. A genetic algorithm is one of such models.  

What is a genetic algorithm?

A genetic algorithm is an attempt to apply excellent laws of nature for the purposes of economy. Like in biology, the terms used include a gene, chromosome, population, mutation or crossover.

The process of merchandising optimization begins with generating a random population of chromosomes. Each chromosome contains genes, i.e. variables that will be subject to modifications. The genes must comply with the limitations of the data model and are coded in the form of successive integers. Each chromosome of the population is verified in terms of its adaptation using the roulette wheel selection.

Next, chromosomes are drawn for a crossover. The better the adaptation, the greater the chance of selection, i.e. survival. Crossover is an exchange of genes between individual chromosomes.

The chromosomes selected and crossed over may be subject to further mutations. A mutation means selecting a new value of a gene for specified chromosomes.

When the mutation is completed, a new generation of population is created. As a result of the crossover and mutation some of the chromosomes endure and other disappear or are modified. The entire process is then repeated for the new generation. In following iterations, new populations of chromosomes will be created with improved adaptation to the surrounding environment.

When to use it?

This procedure may be used for example to minimize the function of merchandising costs of sales networks. If it is assumed that the cost depends on the volume of a lot and the frequency of purchase orders, then the chromosome will consist of two genes. Optimization will consist in finding a relevant combination of those values to minimize the given function of costs. Undoubtedly, one advantage of a genetic algorithm is the promptness of acceptable results. Naturally, the more variables in the function, the more complicated the mechanism is. However, the computer power available today allows for addressing nontrivial problems.