Mathematical Problems in Engineering

Volume 2017, Article ID 3046830, 20 pages

https://doi.org/10.1155/2017/3046830

## Bee-Inspired Algorithms Applied to Vehicle Routing Problems: A Survey and a Proposal

Natural Computing and Machine Learning Laboratory (LCoN), Graduate Program in Electrical Engineering and Computing, Mackenzie Presbyterian University, R. da Consolação 930, Higienópolis, 01302-000 São Paulo, SP, Brazil

Correspondence should be addressed to Leandro N. de Castro; rb.eiznekcam@senunl

Received 25 January 2017; Revised 29 July 2017; Accepted 22 August 2017; Published 8 October 2017

Academic Editor: Jorge Magalhaes-Mendes

Copyright © 2017 Thiago A. S. Masutti and Leandro N. de Castro. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Vehicle routing problems constitute a class of combinatorial optimization tasks that search for optimal routes (e.g., minimal cost routes) for one or more vehicles to attend a set of nodes (e.g., cities or customers). Finding the optimal solution to vehicle routing tasks is an NP-hard problem, meaning that the size of problems that can be solved by exhaustive search is limited. From a practical perspective, this class of problems has a wide and important set of applications, from the distribution of goods to the integrated chip design. Rooted on the use of collective intelligence, swarm-inspired algorithms, more specifically bee-inspired approaches, have been used with good performance to solve such problems. In this context, the present paper provides a broad review on the use of bee-inspired methods for solving vehicle routing problems, introduces a new approach to solve one of the main tasks in this area (the travelling salesman problem), and describes open problems in the field.

#### 1. Introduction

The characteristics of an optimization problem, such as the high number of possible solutions (size of the search space) and number and type of constraints, can prevent its solution by exhaustive search methods in a feasible time, even if large amounts of computational resources are employed. For this reason, instead of using methods that calculate the exact solution to the problem, techniques that propose candidate solutions and consider the history of results in the search process, modifying these solutions iteratively until a satisfactory solution is found, are usually employed. These methods exchange the guarantee of the exact solution for a satisfactory solution that can be obtained with an acceptable computational cost. These methods are normally called metaheuristics [1–3].

The planning of routes used to transport products is one of the ways to improve the use of resources in various transportation modals. For instance, a beverage distributor has its vehicle filled with goods and must distribute them to a certain group of customers. Defining the best sequence of customer visits, known as a route, can help reduce the cost of this operation and, consequently, impact the final product cost. In the literature, the route planning task is defined as a vehicle routing problem (VRP), with the travelling salesman problem (TSP) as one of the most elementary and widely studied cases [4–10]. The VRPs belong to the category of NP-hard problems, making them difficult to solve by exact methods, mainly for larger instances. Therefore, much of the study of this class of problems is based on metaheuristics [11, 12].

One area that has received considerable attention from the scientific community over the past decades is that of nature-inspired algorithms [13–15]. Studies in this area seek inspiration in biological phenomena for the development of algorithms capable of solving problems that are not satisfactorily solved by traditional techniques [16]. In such cases, heuristics inspired by insect behaviors have shown good results. Swarm intelligence (SI) is a term used to describe algorithms that have as inspiration the collective behavior of social insects or other types of social animals [17, 18]. Within swarm intelligence, the agents in the swarm act with no supervision, being affected by what happens in the surroundings, interacting with the environment and with other agents. An important characteristic of SI systems is the self-organization: with the low-level interactions within the agents, the swarm is capable of providing global responses. Among the most studied algorithms in this area one can mention the Ant Colony Optimization (ACO) [19] and the Particle Swarm Optimization (PSO) [20].

Some social species of bees clearly present characteristics and principles related to swarm intelligence, making them a good inspiration to optimization algorithms. Some of the main collective behaviors of bee colonies during foraging that can be highlighted as inspiration for the design of algorithms are as follows [21]: (1) bees dance to recruit nestmates to a food source; (2) bees adjust the exploration and recovery of food according to the colony state; (3) bees exploit multiple food sources simultaneously; (4) there is a positive linear relationship between the number of bees dancing and the number of bees recruited; (5) recruitment continues until a threshold number of bees is reached; (6) the quality of the food source influences the bee dance; and (7) all bees retire at some point in time, meaning that bees stop recruiting other bees. For generic reviews of bee-inspired algorithms and applications, the reader is invited to refer to Karaboga and Akay [22], Bitam et al. [23], Ruiz-Vanoye et al. [24], Verma and Kumar [25], Karaboga et al. [26], and Agarwal et al. [27].

This paper starts by bringing a chronological review on bee-inspired algorithms applied to vehicle routing problems. The review includes a brief description of the key biological mechanisms of the bee metaphor and a mathematical description of vehicle routing problems. It then follows with a taxonomy of bee-inspired algorithms and a description of the four standard approaches, presenting the main types of (bee) agents in the metaphor, a simplified pseudocode of the algorithm, and a brief description of its main steps. The review of the papers focuses on the problem solved, the types of bee agents or base algorithm used, how the algorithms were assessed, and comments on their overall performance.

The last part of the paper describes a new bee-inspired proposal, named TSPoptBees, originally designed to solve continuous optimization problems [21] and then adapted to solve VRPs, more specifically the travelling salesman problem. The proposed algorithm is applied to 28 TSP instances and its results are compared to the best-known solutions from the literature and with the results of many other bee-inspired algorithms cited in the review part of the paper. The paper is concluded with general comments and a proposal of how to extend the algorithm to the other vehicle routing problems.

The remainder of this paper is organized as follows. Section 2 provides a brief introduction to bee colonies and vehicle routing problems; Section 3 describes the base algorithms used in the literature to solve vehicle routing problems; and Section 4 briefly reviews each work found in the literature related to bee-inspired algorithms to solve vehicle routing problems. The proposed algorithm is detailed in Section 5 and its performance is assessed in Section 6. The paper is concluded in Section 7 with general comments and perspectives for future research for the area.

#### 2. Fundamentals of Bee Colonies and Vehicle Routing Problems

This section provides a brief introduction to the use of bee colonies as metaphors for swarm intelligence and a standardized mathematical description of vehicle routing problems, to be used over the whole paper.

##### 2.1. Bee Colonies as Metaphors for Swarm Intelligence

A notable feature of swarm intelligence is self-organization, whereby the system is able to present responses at a global level through the low-level iterations among the agents themselves and the environment. Bonabeau et al. [17] highlight four characteristics of self-organization in swarms: positive feedback, through simple behavioral rules that promote the creation of appropriate structures; negative feedback, which acts as a counterbalance to positive feedback; oscillations, such as random behaviors, errors, and task switching; and multiple interactions among the agents and the environment, allowing the exchange of information. Millonas [28] highlighted five principles for a swarm to present intelligent behavior: proximity (individuals should be able to perform simple tasks); quality (the swarm must be sensitive to quality factors); diversity (the swarm should not allocate all its resources in a single medium, but distribute them); stability (individuals should not change their behavior in response to all changes in the environment); and adaptability (the swarm must be able to change its behavior when necessary).

Some species of bees clearly present the characteristics described by Bonabeau et al. [17] and the principles defined by Millonas [28], which motivates the use of bee colonies as metaphors for the design of algorithms for solving complex problems. Karaboga and Akay [22] highlighted some tasks performed by bee colonies that are most used in the literature as metaphors for swarm intelligence, as well as the clear division of tasks between bee types:(i)*Queen bee*: it is the only female of the colony that lays eggs, being the progenitor of all the other bees in the colony. It can live for several years, mating only once. Fertilization can occur for two or more years, using sperm stored during mating. When there is a lack of food sources, it produces more eggs and when the colony is very populated it stops producing them. After consuming the sperm in its spermatheca, it produces eggs that have not been fertilized and one of these descendants will become the new queen.(ii)*Drones*: they are the male bees of the hive, with reproductive role, being considered the progenitors of the other bees of the colony. They are produced from unfertilized eggs and are fed differently when in the larval stage. Depending on the period there may be hundreds of drones in the colony; however they do not live more than six months. Their main task is to mate with the queen, dying after that.(iii)*Workers*: they are responsible for various operational tasks of the hive, such as collecting and storing food, removing debris, and protecting the hive. They can live for a few weeks or months and the tasks to which they are allocated depend on their age and the colony needs. In general, in the second half of their lives they forage for food.(iv)*Mating flight*: the mating of the queen takes place in the air during the so-called mating flight. This starts with a dance performed by the queen and the drones follow her. The mating between the queen and a drone is probabilistic, according to the speed of the queen’s flight and the fitness of the drone and queen. The drone sperm is stored in the spermatheca of the queen and can be used in the descendants fertilized by the queen.(v)*Foraging*: this is one of the most important tasks for the hive. External factors (odor, location, and presence of other bees in the food source) and internal factors (souvenir and odor of the location) on bees influence this process. It begins with the worker leaving the hive in search of the food source. After finding this source, the nectar is collected and stored in its stomach, and after returning to the nest it deposits the nectar in the combs.(vi)*Dancing*: dancing is the way bees inform others of good food sources. After unloading the nectar, the bee that found an attractive food source performs a series of movements, called waggle dance. Information such as quality, direction, and distance from the source of food is passed through the dance.

##### 2.2. Optimization and Vehicle Routing Problems

Optimization consists of determining the values of a set of variables that minimize or maximize a given mathematical expression, satisfying all problem constraints [2, 3]. Perhaps the most intuitive way to solve a given optimization problem is to list all possible solutions, evaluate them, and use the best solution. However, this approach, known as brute force, is not efficient depending on the characteristics of the problem. The main drawback in using full enumeration is that it becomes computationally impractical depending on the number of possible solutions to the problem. This means that this exact solution approach would be valid only for simpler problems, which hardly occurs in practical applications.

An example of an optimization problem commonly used in the literature is the travelling salesman problem (TSP) [5, 7, 9]. In a simple way, TSP can be described as follows: given a set of cities, the salesman should visit every city once, coinciding the initial city with the final one, so that the cost of the path travelled is minimal. For the asymmetric TSP, in which the distance between a city A and another city B can be different from the distance between B and A, the number of possible solutions is ()!, where is the number of cities. This means that the number of possible solutions has a factorial growth with the size of the problem.

The TSP can be mathematically described as follows. Given a set of cities and the cost () of going from city to city , the TSP aims at determining a permutation of the cities that minimize TSP represents one of the elementary vehicle routing problems and, despite its simple description, its exact solution becomes complex because of the computational cost required, being part of the class of NP-hard problems [29]. Due to its academic importance and wide application in practical problems, TSP has been receiving great attention for more than 60 years [5, 10]. As a result, well-consolidated TSP-oriented review works can be found in the literature [6, 9, 29], which present formulations, examples of practical applications, and classical solution algorithms.

Vehicle routing problems closer to practical applications appear with the addition of some constraints to the TSP. The Multiple Travelling Salesman Problem (MTSP) is a generalization of TSP in which more than one salesman is used in the solution and a common city, the depot, is used as starting and ending point by all the salesmen. Given a number of salesmen, a depot , a set with intermediate cities, and the cost of going from one city to another and also from each city to the depot, the MTSP consists of determining the set of permutations from the elements in** S** so as to minimize where represents the city visited in order in route and is the number of intermediary cities visited in route . The MTSP already presents enough characteristics to represent practical problems, such as school vehicle routing [30]. Bektas [31] presented other examples of practical applications and algorithms for MTSP.

The addition of some constraints in MTSP leads to another classical problem, the capacitated vehicle routing problem (CVRP). The CVRP can be seen as an MTSP with two modifications: (1) each intermediate city represents a customer with a certain demand for a product and (2) each salesman represents a vehicle with a limited capacity. Given a number of identical vehicles, each with a capacity , a depot , a set with customers, each with a demand , and the cost of going from customer to customer and from each customer to the depot, the CVRP consists of determining the permutation of the elements in so as to minimize subject towhere represents the city visited in order in route and is the number of customers visited by vehicle . For a review of practical applications and solution algorithms the works of Laporte et al. [11] and Laporte [10] are suggested.

#### 3. Bee-Inspired Algorithms: A Taxonomy and Standard Approaches

In the literature, there are basically four different algorithms forming the basis of all bee-inspired approaches for solving* vehicle routing problems* (VRPs). Thus, the works to be reviewed here are either the proposal of one algorithm or a modification of it to solve a different problem or to improve its performance. The domain of bee-inspired algorithms is not constrained to the ones presented in this section, but these are the ones so far used to tackle vehicle routing problems. As shown in Table 1, these algorithms can be divided into two subclasses based on the bees’ behavior used as inspiration [23]. Each of the base algorithms is described in the following subsections.