Library
URL http://www.ioz.pwr.wroc.pl/Pracownicy/Chodak/artykuly/genetic_algorithms_in_seasonal_demand_forecasting.pdf
forecasting, demand, genetic algorithm
Grzegorz Chodak, Witold Kwasnicki
GENETIC ALGORITHMS IN SEASONAL DEMAND FORECASTING INTRODUCTION
Demand forecasting is one of the most important phase of a firm’s decision making process. Management of material flow, which is based on just-in-time strategy, would not be possible to achieve without precise estimation of the demand. We can distinguish two general demand forecasting methods, namely quantitative and qualitative methods.
The advanced computer software that enables data computing and graphic presentation of data can support both of them. Artificial intelligence (AI) techniques (such as: genetic algorithms, fuzzy logic and neural networks) will be extensively applied in the next stage of forecasting methods development. Applying AI techniques should improve correctness of seasonal demand forecasting. A presentation of seasonal demand forecasting method and its applicability is the main objective of this article. Identification of demand function’s parameters is based on genetic algorithms (GA) approach.
DEMAND FUNCTION
Shape of a demand function should be inferred from internal and external environments of each firm. It is impossible to propose general formula of a demand function applicable to all economic conditions of different firms. In some firms demand could depend mainly on one factor but in other firms tens of important factors influencing demand can be identified. Therefore the main problem is to point out that factors correctly.
Frequently, as the first approximation, it is assumed that the demand function is a function of time (e.g. linear, logarithmic, exponential etc) representing a trend of demand. It is well known that the price is one of the most important factors influencing demand of almost all products and services. What we propose in this article is a combination of classical trend approach (i.e., demand as a function of time) and the economic textbook demand function (i.e., demand as a function of price). At the first stage of development of this approach we propose rather simple form the demand function, namely:
D – demand (of products or services);
p – price;
t – time;
e – price elasticity.
M(t) is function of time and it can represent a trend but when the demand is seasonal the function M(t) is periodical. To include periodicity in our demand function we use the following formula:
D - demand;
A – amplitude of fluctuation;
t – time;
w - frequency (representing periodicity);
j - horizontal offset;
C – vertical offset;
B – trend factor;
e – price elasticity.
The above function has six parameters (A, w, j, C, B, e) which values ought to be identified using real data. Applying analytical method for evaluation (identification) values of these parameters is rather impossible. Therefore we propose to apply well-known and efficient approach of GA to identify that parameters.
IDENTIFICATION VALUES OF DEMAND FUNCTION PARAMETERS
Mathematical form of our demand function can be considered as a complex one. Therefore we need to look for a more effective method of identification. Using techniques of artificial intelligence seems to be very promising to solve this problem and within AI techniques genetic algorithms, which are searching procedures based on natural evolution, seems to the best one. The GA is defined by its genetic operators acting on bit strings (examples of the operators are: crossover, inversion, and mutation) and its method of credit allocation (fitness evaluation and selection). Searching for optimal solution is possible thanks to the genetic operators, which allow for small and large steps on the route search forward the optimum in a parameter space. It is done by exchanging sections of each individual’s descriptive bit string (the chromosome), inverting selections of a given bit string, or mutating a bit string by altering one or more bits. The credit-allocation scheme is based on a rule that individual has different probabilities of entering into the next generation accordingly to its relative fitness.
Advantage of applying GA for identification of demand function’s parameters is that there is no constrains on a shape of demand function and also on a number of parameters. The main disadvantage of GA is a lack of guarantee that global optimum is found within limited period of time. There is a possibility to adjust GA to specific requirements of real problems. We can say that GA technique is very elastic one.
APPLYING GA TO IDENTIFICATION OF DEMAND FUNCTION’S PARAMETERS
First step in applying GA to our problem of parameters’ identification is to define a fitness function (F). It ought to be a measure of “distance” of model generated data and collected real data. In our experiments we use the following fitness function:
t – time;
Dt – real sell in t time;
p – price;
A, B, C, w, j, e – the same as in 2 equation – these values of parameters should be identified.
The structure of individuals in our GA is following: every individual consists of 1 chromosome divided into six segments. Each segment represents one identified parameter. Chromosome is composed of 60 bits, divided into 10 bits segments, the segments code values of amplitude, vertical and horizontal offset, frequentness, price elasticity factor and trend factor. We use binary code and every gene is coded as one bit. An example of individual is presented in Figure 1.
Figure 1- GA individual.
The size of chromosome is compromise between exactness of parameters representation and quickness of computing. The greater number of bits for each parameter representation allows for more exact evaluation of its value but length of calculation (simulation) to reach the more exact value grows enormously.
We use two genetic operators, namely:
- mutation – invert one bit in a chromosome,
- crossover - exchange of bits string between two chromosomes.
The next crucial phase of GA application is proper definition of the credit-allocation scheme. It ought to be based on relative fitness over the entire population of solutions to the problem so that a given individual has a probability of entering into the next generation according to its relative fitness. In our experiments we use modified roulette method. Each individual (chromosome) has assigned piece of a roulette wheel, which size is proportional to its fitness. The whole wheel represents a sum of fitness of all individuals of the population. Additionally the individual with best fitness is chosen to the next generation (the rule “don’t lose the best”).
To make GA search more effective it is important to estimate the scope of the parameters’ domain. We can use our heuristic knowledge about the explored demand. Namely, to evaluate the range of amplitude (A) one can estimate maximum and minimum amount of sell. Maximum vertical offset (C) ought to be located between maximum of demand function and zero. The range of horizontal offset (j) should be placed in the range (0-2p). The scope of variability of price elasticity (e) is related to individual good and can be set up by a sell manager (plausible values are 0 to 2). Range of frequency (w) can also be set by manager who can predict the seasonal demand. Accepted values of the trend parameter are related to dynamics of increase (decrease) of sell and for static environment it can set up between 1 and –1.
If one of parameters values got from optimisation experiment is getting closer to the limit of range of domain, the rage should be shifted in such way that value of parameter will be in the centre of new range. If the ranges of parameters are set up accurately, the values of identified parameters will also estimated quicker and more precisely. It is important when we make calculations (simulation) on not very powerful computer.
Definition of the stopping condition is the important for proper GA application. There are two possibilities of stopping the algorithm: when the settled number of generations is exceeded or when fitness is less then settled error. Both criteria are used in our algorithm.
SUMMARY
Our results suggest that in some cases identification of demand function parameters using genetic algorithms can be more effective than in standard seasonal demand forecasting (e.g. Winter model). In the presented article we have explored a situation when demand function is seasonal and has linear trend but our proposition is more general – there is no limitation to adjust the shape of the demand function to specific requirements, e.g. when double seasonalness is observed, or the trend is non-linear. Results of our experiments based on different sets of real data suggests good applicability of our proposition but it has to be said that this method does not work well for all data. There can be two general reasons of unsatisfied results of forecasting using our approach: not correct shape of demand function or not appropriate method of parameters identification.
REFERENCES
- GOLDBERG D., Algorytmy genetyczne i ich zastosowania, Wydawnictwo Naukowo-Techniczne, Warszawa 1998
- E. NOWAK (ed.), Prognozowanie gospodarcze – metody, modele, zastosowania, przyklady, Warszawa 1998
- DITTMANN P., Metody prognozowania sprzedazy w przedsiebiorstwie, Wydawnictwo Akademii Ekonomicznej im. Oskara Langego we Wroclawiu, Wroclaw 1998
- HOLLAND H. J. Algorytmy genetyczne, Swiat Nauki, 9/92
- RUTKOWSKA D., PILINSKI M., RUTKOWSKI L., Sieci neuronowe, algorytmy genetyczne i systemy rozmyte, Wydawnictwo Naukowe PWN, Warszawa 1997
- SARIUSZ-WOLSKI Z., Ilosciowe metody zarzadzania logistycznego w przedsiebiorstwie, Torunska Szkola Zarzadzania, Warszawa 1997
- DRESS W.B., On modeling and Controling Intelligent Systems, Instrumentation and Controls Division, Oak Ridge National Laboratory
To the begining
|