1
OPTIMIZING THE DISTRIBUTION ROUTE FOR ARTIFICIAL BEE COLONY ALGORITHM
Franky Vasquez Ortiz* Frank Nixon Giraldo Ramos** Lizeth Mayerly Martínez***
Summary: The present article spreads the results of the investigation developed by the DIGITI group assigned to the scientific center of research and development (CIDC) from the Universidad Distrital Francisco José de Caldas (UDFJ de C). This group is orientated to the solution and optimization of problems using swarms of intelligence. It shows the development of an artificial bee colony (ABC) algorithm (Advanced Clustering Algorithm) as a tool for planning and the optimization of the distribution routes for a chain of restaurants, this, with the aim to find the best delivery route. The results are simulated in MatLab® (a tool for technical calculation), taking into consideration the administration and logistics of the distribution channel for the brand Kokorico® (a fast food restaurant chain), through a solution of planning that optimizes the use of transportation resources. The obtained solution satisfies the criteria for using, at a maximum, 38 % of the resources available nowadays, for what it turns into a commendable alternative to answer in the area of Colombia.
Keywords: Route Optimization, Bee Bean Algorithm, Distribution, Supply, Logistics.
Introduction: The artificial bee colony (ABC) algorithm was introduced in 2005 by Dervis Karaboga [1], basing itself on the capacity of self-organization, intelligence of swarms and the behavior from colonies of honey bees to look for food. Initially, BCA was designed for the solution to problems without restrictions, in this sense Karaboga and Akay (2011) proposed an adjustment of the model to solve combinatorial problems [2], for example, the exploration of routes. The ABC bases first and foremost on the sense of self- organization of the bees examined from three specialized functions, in terms of if these are working or are free. These functions are, 1 the exploration 2 the observation and 3 the compilation [3, 4].
The bees that are working must go to the food sources to exploit the nectar, they are also responsible for the communication of the quality of the nectar, the quantity and location.
This is done across a dance slant that in agreement with the angle of the Sun establishes the direction allowing to define the magnitude of distance and the possible quality and productivity in the search for food. Once the food source is exhausted, these bees are responsible to fulfill two functions.
* BSc. In Production engineering, Universidad Distrital Francisco José de Caldas, Colombia. Current position: Sample Management, Samsung Electronics. E-mail: [email protected].
** BSc. In Electronic Control and Instrumentation, Universidad Distrital Francisco José de Caldas, Colombia.
Current position: Professor and Research Group DIGITI, Universidad Distrital Francisco José de Caldas, Colombia. e-mail: [email protected].
*** BSc. In Production engineering, Universidad Distrital Francisco José de Caldas, Colombia. Current position: leader of distribution and invoicing, Comboca Group. E-mail: [email protected].
2
The first is to, as exploratory bees, to fly at random in the search of new food source. The second as spectator bees, they wait for information about the food sources in the dance zone, they then make the decision of the best option to take for the process.
During this search for food, a bee travels from a geographical place to another until it gets to every destination. The quantity of food source (the positions of every restaurant in this case) is equal to the number of bees [5, 6]. The position of a food source represents a possible solution of the issue of optimization, and the quantity of nectar or the productivity of a food source corresponds to the quality (fitness) of the associate solution. This optimization is obtained from three parameters of control: Number 1, the size of the population, 2 the number of interactions and 3 the maximum limit of abandonment for every solution. A route, between a position of item and a destination, which cannot be optimized increasingly across a succession of limits of iterations, is given up as a possible solution that is a feasible food source. The food source in which nectar is left by the bees is replaced by new sources of food located by the exploratory bees. If the new food source has equal or a better possibility as the old source of nectar, it is then replaced by the stored former one, if this is not the case, the first food source remains the better source for food.
The problem that occupies us in the investigation is exactly an application perspective of the model ABC, since it is of the combinatorial type. It is focused on the optimization of the distribution routes of whose assertiveness in the taken decisions with regards to the management of a chain of transport, it is possible to translate in competitive advantages.
Such competitive advantages take relevance when there is an analyzed cost of the transported weight in the general cost to the operation [7]. Because of the consequences, it becomes a forced necessity to approach efficient solutions.
As precedents, it is possible to indicate that around 2009 in Cuba, for the selection of distribution routes in the branch Villa Clara de Almacenes Universales S.A. (Which was focused on the reduction of the distribution times) An ABC model was applied, which obtained a reduction of 30 % in the delivery time [8]. On the other hand, this same problem of routing was applied to the distribution in Courier's modality1. It was approached in Ecuador in the year 2010 giving a result that the proposed metaheuristic has a performance similar to the obtained one in Solomon's tests2. This is, departing from a population of initial solutions to improve them in every iteration, in which it is perfectly adaptable to one of Courier's operation - [9].
In another aspect, it is possible to take in precedence the problem of planning of route distributions that allows the design of new routes that satisfy the needs in a determined uncertainty condition. For the planning of distribution routes, to have efficient technologies
1 Courier Modality: consists on the sending of documents and / or packages for a person or company, to local, national or international level.
2 Solomon Tests: It serves to reduce the influence of variables of confusion and allows that the investigator should demonstrate if the same previous test has an effect on the subjects.
3
of optimization of routes in flexible contexts of decision is essential. The high complexity for the diversity of criteria and for the typology of available information affects the model.
The incorporation of these aspects can help, not only to the improvement of the development of operations but also the tactical decisions (like the definition of the ideal size of fleet and of the policies of investments and of cooperation before the possible service issues) [10]. Finally, the problem of routing and logistic distribution was approached by the Technological University of China in the year 2013 where the model achieved (ABC) was applied in three stages to obtain satisfactory solutions [11].
Determining initially the quantity of artificial and observant bees, and then submitting in repeated cycles the positions of the populations to obtain the modifications. Finally, the least beneficial areas are rejected and that information is stored in their memory, they remember and go to the new position or area that has a greater benefit for the operation.
The aim of the investigation is to apply the algorithm of bee colonies to optimize the chain of supply of raw materials and product supplies of the Kokoriko Company in its distribution network between the center of operation and each of the restaurants in the city of Bogota.
The company belongs to the Comboca Group, in which it specializes in a chain of restaurants that serves chicken. They will distribute anywhere it is needed to have the product every day (for its main product and other supplies). Special conditions are:
controlled temperature, delivered supply in the least possible time and a certain high quality for fresh product. The main distribution center is located in Bogota Colombia.
From this point the product is distributed to 17 restaurants that are located in different parts of the city. The distribution is done with its own fleet that has 13 vehicles and work 3 days a week. It is needed to have a process of delivery for the type of products sold by the company from the source, which in this case is the distribution center, to a specific destination or several destinations with specific requirements3. These requirements must comply in its entirety to guarantee the fulfillment of the objectives of the operation of delivery and the strategic objectives of the company in general. From the established actions and the decision making in the establishment of routes, directly depends on the satisfaction needs. In addition, each of these actions have associated costs that must be controlled to achieve a better operation of performance and to optimize the traveled distances from store to store. The article is structured in the following way: In the second paragraph (Materials and Methods) it is presented the relevant information for the development of the model and the initial references are taken of the deciding information to include in the model: Algorithm of initialization, evaluation of the quality and Codification of the population. In the third paragraph the tests and results are described, identifying the comparisons between the real results and the theoretical ones, to verify the degree of adaptability of the model. In the fourth paragraph the previous discussions are exposed,
3 The Specific requirements to deliver the raw materials to each one of the restaurants are: delivering the goods on a freezer truck between –18°C and –35°C and freezer trucks that their equipment is working between 4°C +/- 2°C
- Conservation of the packaging during transport.
- To avoid the pollution and / or the proliferation of microorganisms.
4
where the results are compared and the viability of the same are identified. Finally the conclusions are obtained.
METHODS AND MATERIALS: Figure 1, the geographical region is determined where there was a realized study and optimization of routes in Bogota (Colombia).
Fig. (1) Google® Maps Sites Source: Own Compilation
Each of the restaurants for which the fleet must travel to was codified like (x, y). Covering a geographical region of Bogota of an approximate surface of 12 x 18 kilometers; and arranged as a series of two coordinates for the total number of restaurants. For this case 21 (2 x 21 size of the counterfoil). And are established by every index of counterfoil (position in the counterfoil of coordinates). For the development of the solution to the problem of the optimization of the route, the BCA whose flow chart is observed in the figure 2, was codified in Matlab [5, 6, 12], bearing in mind to define the positions of the food sources corresponding to the coordinates of every restaurant in order to update the feasible solutions. All the employed bees select a new position of the chosen feeding source, which is different from the previous one.
5
Bee Colony Initialization: Bees Quantity, Nectar sites locations, Iterations
number
Stop Criteria satisfized? (Iterations Number)
Scouts Bees Foraging: search and evaluate site productivity (Nectar
Quality and Quantity)
Onlookers observe Bees Waggle Dance (Probability Calculation)
Memorize best food sources
Explotation Phase: Employed Bees
All bees employed?
Discover new location in a neighbour food site
Produced New Position of abandon
sites
Fig (2). Flow chart (ABC) used in the investigation. Source: Own Compilation
Chart 1. The following scenes that correspond to the routes were designed and realized by the companies own fleet
Route Total route (Km) Empirical
1 170,8
2 193,4
3 193,6
4 244,1
Total 801,9
Chart 1 Studied scenes. Source: Own Compilation.
6
A. Algorithm of initialization.
The first step is the heuristic initialization of the population, the total number of sites, the total number of bees, and maximum number of iterations [6]. The position of a new source of food is calculated by the worker bees, with the aim of optimization of the route, minimizing the total length of route. Later, the quality of every solution fiti is calculated using the following equation (1):
𝑓𝑖𝑡𝑖 = 1 1 + 𝑓(𝑥𝑖)
Ex. (1) Calculation of adjustment
Where f(xi) is the length of the tour for the solution xi. All the bees use the process of search, the exchange of information about the food sources nectar (solutions) and the information of location with the observation bees. Now, every observant bee chooses a Pi food source depending on the value of probability associated with the food source [6]. While, the spectator bees select the best sources of food of probable way, (in agreement to the suitability of this source of food) Pi is the probability of selecting a food source, i decides by means of the following formula:
𝑃𝑖 = 𝑓𝑖𝑡𝑖
∑ 𝑓𝑖𝑡𝑛
Ex. (2) Probability of food selection
Where fi is the aptitude of the solution represented by the i food source and m is the total number of food source. After selecting the source of food, the exploratory bees go to the selected feeding source and select a new source of food. This is a limit for the predetermined number of cycles in ABC. Any source of food that it does not improve (according to the limit) will be left and replaced by a new position and the worker bee turns into an explorer [5, 6]. The new position chosen at random by the navigator will be
calculated by the following equation:
𝑥𝑖𝑗 = 𝑥𝑚𝑖𝑛𝑗 + 𝑟𝑎𝑛𝑑(0,1) ∙ (𝑥𝑚𝑎𝑥𝑗 − 𝑥𝑚𝑖𝑛𝑗 ) Ex. (3) Exploration of new sites
Here, Xjmin is the limit below of the position of the food source in the dimension j, and j sub max is the limit above of the position of the food source in the dimension j. This way the bees memorize a better candidate solution for the route selection.
B. Evaluation of the Quality (cost function).
The quality of the food sources (sequences of ways), must be evaluated for quality costs and also its degree of specific adjustment functions (fitness).
In this case, it consists of the evaluation of the sum of each one of the distances between the cities n of the route, to determine which are the best sequences according to its punctuation of fitness [4,13]. Following, to check the quality of every
7
feeding source, the sum of the distance in sections between the coordinates of the current city (xi, yi) and the following city (xi + 1, yi + 1) it is realized to complete them n cities in every sequence and this way the total length is obtained of each one of the proposed routes: In accordance to equation #1.
𝑓(𝑥𝑖) = ∑ √(𝑥𝑖 − 𝑥𝑖+1)2+ (𝑦𝑖− 𝑦𝑖+1)2
𝑛−1
Ex. (1) addition of distance (x, y) 𝑖=1
C. Codification of the population.
It is necessary to indicate that the sequence between the restaurants of the distribution network must correspond to Hamilton's path or cycle4 [13], that is to say, not to allow him to visit one restaurant more than once and the obtained route will have to include visiting all the restaurants.
Then, every individual is represented by a numerical value in decimals formed by the codified sequence, structuring a vector which length must be of the same size for all the bees in the population.
See chart 2 in the following page.
METERS
X Y
A 382,62 11624,46
B 2104,39 8384,19
C 3060,94 7776,64
D 4400,09 5346,44
E 8034,95 9194,26
F 9182,81 10206,85
G 8991,50 11624,46
H 7843,65 13042,08
I 6887,10 13852,15
J 4782,71 13649,63
K 11478,51 13649,63 L 10521,96 16282,35
M 3443,55 6966,58
N 7461,03 5751,48
O 7078,41 3118,76
P 7269,72 2713,72
Q 3252,24 283,52
Table 2. Information of coordinates. Source: Own Compilation.
4 Hamilton's path or Hamilton's cycle represents a way that happens for every vertex exactly one time
8
In an area of 12 x 18 kilometers it also indicates the locations for which the route must go through. Previously, the m-file in Matlab, the coordinates in space (x, y) and the location of every city were codified in a counterfoil shape. The Avenue
¨City of Cali¨ and 26th street, in Bogota, was taken as the central point of supply across which every route must go through since the fleet must be loaded at this point. A scene as a possible alternative solution was proposed with a fleet of thirteen vehicles, see figure 3.
Fig. (3) Codified Sites. Source: Own Compilation
TESTS AND RESULTS
In each of the raised scenes a decreased is observed in the driven routes which meets the initial approved percentile like chart 3 indicates.
Route
Total Driven Route
(Km) Diference (Km) (%)
Empirical Theoretical
1 170,8 105 65,8 38,5
2 193,4 120 73,4 38,0
3 193,6 120 73,6 38,0
4 244,1 150 94,1 38,5
Total 801,9 495 306,9 38,3
Table 3. Comparison of the results between the royal cases and the offered ones to the procedure of this investigation.
9
Source: Own Compilation The result of the optimization using ABC for the heavy truck vehicle fleet that goes from the distribution center is 306.9 km, see figure 3.
Fig. (4), ABC Route Optimization. Source: Own Compilation
One checks then that, for the transporting company (given these routes), the best scene from the perspective of minimal distance for the route is to use a fleet of four heavy truck vehicles, this of course with agreement to the routes calculated by the algorithm.
Discussion.
The costs associated with the logistic freight management depends on several aspects, the capacity optimizing time, the routes of transport and the distribution to the consumer or to the final destination. The results are reached, by a demonstrated final saving in a strategy by route, it also optimizes the size of the fleet, chart 4.
Table 4. Consumption of petrol. Source: Own Compilation.
Route Vehicle Type
Gallons of Petrol Consummed
1 NPR 7
2 NPR 8
3 NPR 8
4 NPR 10
10
The unitary costs are represented by the traveled kilometers; to calculate the definite margins, the cost was estimated by the route in order to define the costs of freight for every alternative. In each one of the four studied routes it is diminished the minimum time of total service, diminishing (in sequence) the minimum distance traveled in every route: This influences the number of gallons consumed by kilometers, the tires of vehicles and of expense associated like lubricants, maintenance, and other costs.
After having completed the number of iterations for every simulation with the proposed scenes, it allows from the calculations in costs to define a better option and to facilitate the capture of decisions; This ideal solution from the point of view to the cost of the operation admits, that in spite of not choosing the route with the less distance in kilometers, it represents a relevant reduction in the number of vehicles used and thus in the resources associated with the transport. In the same manner, the model allows modifications in the route of work, taking into account the information of the location of the GPS, the congestion of the traffic, speed, etc. Everything is taken in real time to make the redefinition of the coordinates to follow without producing a significant increase in the costs of operation.
11
Conclussions.
From the results showed previously, it is possible to conclude that the algorithm ABC in the optimization has reduced the total distance in 38.3 % in which it is equivalent to 306.9 km for every distribution. Different technologies of swarms of intelligence can be used for finding a better solution and for raising efficiency. Although the results are not equivalent to the best well known routes, the costs of these identified cases using the algorithm ABC to the problem they are a practical and satisfactory theoretical attempt, replicable in other combinatorial problems. On the other hand, the algorithm ABC performs well in the first period, but it stops advancing to the final stage and reaching ideal places easily. The future work must center itself on the improvement of the diversity of the population and the aptitude of the algorithm of global search to improve precision. The procedure of the population generation (points of sales) according to the algorithm, allows to define the selection of the route and the function of cost associated with the selected sequence.
Every change of vehicle type or capacity affects the system of route and must get up-to- date using the algorithm, once again repeating the iterations until reaching the maximum number of cycles and this way it will find a better solution.
The first consideration when creating an ABC is to define a representation to the problem.
One must define the function of costs, bearing in mind, as for achieving a better quality (fitness) and thereby, a better solution for the given problem. Another frequent problem, it can be is the premature convergence to a local minimum, this is immediately after an incorrect definition of the initial population. It was evident, the potential of the implementation of the algorithm of ABC in issues of logistics, like in the case of planning of routes, with good results like methods of optimization of facilitating the capture of decisions in this field on having reduced the times of displacement 38.2 %, this gives an opportunity to utilize the vehicles in other tasks. The costs associated in fuel diminished 60 % in each of the distributions.
ACKNOWLEDGEMENTS
To the groups of investigation DIGITI and SciBas (assigned to the CIDC of the Universidad Distrital Francisco José de Caldas), For its theoretical and methodological support, and to the Kokorico company for facilitating everything relating to the tests in situ of the investigation.
12
References
[1] D. Karaboga. “An Idea Based On Honey Bee Swarm for Numerical Optimization”, Technical Report-TR06, Erciyes University, Engineering Faculty, Computer Engineering Department 2005.
[2] A. Aguilar J. “Un algoritmo basado en la colonia artificial de abejas con búsqueda local para resolver problemas de optimización con restricciones”. .125 p. Universidad Veracruzana.2014
[3] E. Bonabeau, Dodigo, M., & Theraulaz, G. (1999). “Swarm Intelligence, from natural to artificial Systems”. New York: Oxford University Press.
[4] D. Karaboga and B. Basturk, "A powerful and efficient algorithm for numerical function optimization: artificial bee colony (ABC) algorithm," Journal of Global Optimization, vol.
39, no. 3, pp. 459-471, 2007.
[5] K.P Wang, Huang, L., Zhou, C.G., Pang, W.: “Particle Swarm Optimization for Traveling Salesman Problem”. In: 2nd IEEE International Conference on Machine Learning and Cybernetics, pp. 1583–1585. IEEE Press, Xi’an (2003)
[6] M.M. Flood, “The traveling salesman problem, Operations Research”, Vol. 4, No. 1, Feb. 1956.
[7] SM Castro.” revisión del estado del arte del problema de enrutamiento de vehículos con restriccion de capacidad, cvrp, involucrado en la administración de la cadena de suministro”. 109 p. Universidad tecnológica de Pereira.2014
[8] C Feitó. R Cespón: “selección de rutas de distribución utilizando optimización por colonia de hormigas”.8 p. Facultad de Ingeniería Industrial y Turismo. Universidad Central
“Marta Abreu” de Las Villas.2009
[9] J Tomalá . “Diseño de un sistema de soporte de decisiones para resolver el problema de ruteo en un servicio de Courier” .135 p. escuela superior politécnica del litoral.2010.
[10]J Brito S. “Optimización de rutas de distribución con información y restricciones difusas”..291 P. Facultad de ciencias y tecnologías.2011
[11] WU Bin. “Artificial Bee Colony Algorithm for Two-dimensional Loading Capacitated Vehicle Routing Problem”.7 p. School of Economics & Management, Nanjing University of Technology, P.R.China.2013
[12] M. Muñoz, J. López, E. Caicedo. “Inteligencia de enjambres: sociedades para la solución de problemas”.12 p. revista ingeniería e investigación vol. 28 no. 2.2008
[13] K. v. Frisch, "Decoding the language of the bee," Science, vol. 185, no. 4152, pp.
663-668, 1974.