Next Article in Journal
The Impacts of Online Clothes Short Video Display on Consumers’ Perceived Quality
Previous Article in Journal
Stateless IoT
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Harmony Search Method with Global Sharing Factor Based on Natural Number Coding for Vehicle Routing Problem

1
College of Information Science and Technology, Gansu Agricultural University, Lanzhou 730070, China
2
School of Electronic and Information Engineering, Lanzhou Jiaotong University, Lanzhou 730070, China
*
Author to whom correspondence should be addressed.
Information 2020, 11(2), 86; https://doi.org/10.3390/info11020086
Submission received: 24 December 2019 / Revised: 29 January 2020 / Accepted: 3 February 2020 / Published: 5 February 2020
(This article belongs to the Section Artificial Intelligence)

Abstract

:
This paper proposes an improved Harmony Search algorithm, and gives the definition of the Global Sharing Factor of the Harmony Search (HS) algorithm. In the definition, the number of creations of the HS algorithm is applied to the sharing factor and calculated. In this algorithm, the natural harmony encoding method is used to encode the initial harmony, and the total path length of all vehicles is taken as the optimization objective function. A new harmony generation strategy is proposed as follows: each tone component in an evolution is calculated separately using the new learning strategy and update strategy. In the calculation process, the tone component is judged by whether it needs to be adjusted according to the adjustment strategy. In this way, the problems of singularity and randomness of the new harmony generation strategy of basic HS are solved to improve the diversity of algorithm solutions. Then, a new Harmony Search method with Global Sharing Factor based on natural number coding and decoding for the Vehicle Routing Problem (GSF-HS-VRP) is proposed. The improved Global Sharing Factor-Harmony Search-Vehicle Routing Problem (GSF-HS-VRP) algorithm is applied to capacity-limited vehicle path optimization problems compared with the HS, Improved Harmony Search (IHS), Global-best Harmony Search (GHS), and Self-adaptive Global Best Harmony Search (SGHS) algorithms. The small-scale data and Solomon examples were adopted as the experimental data. Compared with the other four algorithms, the GSF-HS-VRP algorithm has the shortest running time, more rapid convergence speed, and higher efficiency. In the multi-vehicle test, with the increase of the number of vehicles, the optimized path of the vehicle is more satisfied in relation to the actual needs of customers. The results showed that this method could effectively improve the optimization performance of the capacity-limited vehicle routing problem.

1. Introduction

The vehicle routing problem (VRP) is an important part of logistics mode and logistics management [1]. Proper selection of the vehicle’s driving route is extremely important to improve the economic efficiency of the logistics model [1]. The vehicle routing problem is a typical Non-deterministic Polynomial-Complete (NPC) problem [2,3,4,5], which are usually solved with heuristic algorithms such as Genetic Algorithm (GA), Particle Swarm Optimization (PSO), etc. However, these algorithms all have the disadvantages that it is easy for them to fall into the local minimum and generate a lot of useless loops, which leads to the long running time of GA and premature convergence of PSO [6]. Swarm intelligence optimization algorithms mainly include the Artificial Bee Colony (ABC) algorithm [7], Locust Swarm (LS) Algorithm [8], Moth-Flame Optimization (MFO) [9] Algorithm, Shuffled Frog Leaping Algorithm (SFLA) [10], Fruit Fly Optimization Algorithm (FOA) [11], Harmony Search (HS) algorithm [12], etc. Various swarm intelligence optimization algorithms have their own characteristics and advantages. The ABC Algorithm [7] simulates the characteristics of swarm bees. Through the cooperation of three kinds of bees, the random and targeted evolution of swarms gradually converges to the optimum. Locust Swarms (LS) are a new multi-optima search technique explicitly designed for non-globally convex search spaces [8]. Ldquosmartrdquo is used by LS to start points to scout for promising new areas of the search space before using particle swarms and a greedy local search technique to find a local optimum [8,13]. The Moth-Flame optimization (MFO) algorithm is an optimization algorithm generated by simulating the biological behavior of a moth using the transverse orientation to find a light source [9]. However, the MFO algorithm itself does not have the ability to jump out of the local optimum, and it has the defects of being easily trapped in the local optimum and insufficient convergence speed in the later stage [14]. The Shuffled Frog Leaping Algorithm (SFLA) [10] is a swarm intelligence algorithm that simulates the characteristics of information sharing and communication during frog foraging. The evolutionary idea of the Fruit Fly Optimization Algorithm (FOA) [11] originated from the simulation of the foraging behavior of the fruit fly, which is a global optimization evolutionary algorithm.
The Harmony Search (HS) algorithm [12] is a swarm intelligence algorithm that simulates the process of music players’ repeated tuning of the pitch of each musical instrument through memory to achieve a wonderful harmony process. It has been successfully applied to many engineering problems. The HS algorithm has the advantages of simple concept, fast convergence, easy implementation, a novel generation of solutions, and a few parameters to adjust. It shows better performance than the Genetic Algorithm, Simulated Annealing algorithm, and Tabu Search algorithm on related issues [15,16]. The HS algorithm has been successfully applied in different fields. A new block-matching (BM) algorithm that combines HS with a fitness approximation model is proposed in the literature [17], and the set of motion vectors is evolved through HS operators until the best possible motion vector is identified. In the literature [18], a new dynamic clustering algorithm based on the hybridization of Harmony Search (HS) and fuzzy c-means to automatically segment MRI brain images in an intelligent manner was presented. Improvements to Harmony Search (HS) in circle detection were proposed that enable the algorithm to robustly find multiple circles in larger data sets and still work on realistic images that are heavily corrupted by noisy edges [19]. A new approach to estimate the vanishing point using a harmony search (HS) algorithm was proposed in [20]. Ref. [21] presents a simple mathematical analysis of the explorative search behavior of the Harmony Search (HS) algorithm.
Aiming at the singularity and randomness of the new harmony generation strategy, from the perspective of improving the diversity of algorithm solutions, the global sharing factor is introduced to improve the new harmony generation strategy, and an improved HS algorithm is proposed. The new algorithm is applied to solve the capacity-limited vehicle routing optimization problem. Then, a new Harmony Search method with Global Sharing Factor based on natural number coding and decoding for the Vehicle Routing Problem (GSF-HS-VRP) is proposed to improve the optimization performance.

2. Theory Basis

2.1. Capacity-Limited Vehicle Routing Problem

There are many variants of the VRP problems, of which the Capacity-limited Vehicle Routing Problem (CVRP) is more common [1]. In a CVRP, all customers have the same service type of delivery or receipt. All vehicles carry the same weight of load, each customer’s demand is not greater than the vehicle’s load, and the vehicle starts off and returns to the distribution center [1].

2.2. Mathematical Description of Optimization of VRPs

The definition of the Capacity-limited Vehicle Routing Problem (CVRP) is shown in Equation (1) [1].
{ s . t . min D ( i , j ) = i = 0 N j = 0 N s = 1 K c i j x i j s i = 0 N x i j s = y j s , j = 1 , 2 , , N ; s = 1 , 2 , , K j = 0 N x i j s = y i s , i = 1 , 2 , , N ; s = 1 , 2 , , K i = 0 N q i y i s q s , s = 1 , 2 , , K s = 1 K y i s = { 1 , i = 1 , 2 , , N K , i = 0
Here, D ( i , j ) represents the total path length of all vehicles, and c i j represents the transportation distance between customer i and customer j. q i represents the transportation demand of customer i, and q s represents the load capacity of vehicle s. N is the total amount of customers, in which i , j = 1 , 2 , , N represents the customer number, and i = 0 and j = 0 represent the number of the distribution center. K is the total amount of vehicles, in which s = 1 , 2 , , K represents the vehicle number, and { x i j s = 1 } represents a directly connected path of the vehicle s between the customer i and the customer j; otherwise, { x i j s = 0 } . y i s and y j s respectively represent that the needs of customer i and customer j are satisfied by the vehicles.

2.3. Basic HS Algorithm

The basic concept of the basic HS algorithm can be described as follows. It randomly generates harmonies such as x 1 , x 2 , x H M S to form harmony memory (HM), whose size is HMS. Each harmony is composed of W different tone components, i.e., if the harmony number is j , j = 1 , 2 , , H M S , the harmony is represented as x j = ( x 1 j , x 2 j , , x W j ) . The initial form of HM is as expressed in Equation (2), where HMCR is the probability that takes values from the harmony memory, PAR is the probability of pitch fine-tuning, and BW is the bandwidth of pitch fine-tuning, T max is the maximum number of algorithm evolutions. r1, r2, and r are random numbers generated by the rand () function when running in the basic harmony search algorithm, and r 1 , r 2 , r [ 0 , 1 ] .
H M = [ x 1 x 2 x H M S | f ( x 1 ) f ( x 2 ) f ( x H M S ) ] = [ x 1 1 x 2 1 x W 1 x 1 2 x 2 2 x W 2 x 1 H M S x 2 H M S x W H M S | f ( x 1 ) f ( x 2 ) f ( x H M S ) ]
According to Equation (3), set the new harmony to be x n e w = ( x 1 n e w , x 2 n e w , , x W n e w ) ; then, each tone component x i n e w ( i = 1 , 2 , , W ) of the new harmony is generated by three rules: learning harmony memory, fine-tuning tone components, and the random selection of tone components. x i Ra n d o m refers to randomly generating a new harmonic tone component.
x i n e w = { x i n e w { x i j | j = 1 , 2 , , H M S } , 0 < r 1 H C M R x i Ra n d o m , H C M R < r 1 < 1
Then, the tone component x i n e w produced by Equation (3) is judged by the probability PAR whether fine-toning adjustment is required, which is described as Equation (4).
x i n e w n e w = { x i n e w ± r × B W , 0 < r 2 P A R x i n e w , P A R < r 2 H C M R
Then, the harmony memory is updated according to the following update strategy described in Equation (5), where f ( x i ) represents the value of the objective function or fitness.
If   f ( x n e w ) < f ( x w o r s t ) = max j = 1 , 2 , , H M S f ( x j ) , then   x w o r s t = x n e w
The above process is repeated until the number of evolutions T max is reached.

3. GSF-HS-VRP Algorithm

Similar to other swarm intelligence algorithms, the HS algorithm also has problems such as premature convergence and stagnant convergence, which are mainly caused by its own search mechanism. Firstly, the HS algorithm is a single-body evolutionary algorithm [16] in which a new harmony is randomly generated through learning harmony memory (HM), and then adjusted by the tone fine-tuning mechanism and bandwidth. This generated method has obvious defects such as certain singularity, poor search ability, and requiring a long number of evolutions to converge. Once the generated harmony is near the optimal harmony, it is easy to fall into local optimum and cause premature convergence. Secondly, the HS algorithm provides a mechanism to introduce a new harmony, i.e., to generate a new harmony by randomly selecting the tone just based on the value of the harmony memory value probability (HCMR) parameter. Since most of the parameters including BW and HCMR are chosen from the fixed experience value, the accuracy of the HS algorithm is not particularly high [22].
The paper addresses the singularity and randomness of the new harmony generation strategy; from the perspective of improving the diversity of algorithm solutions, the global sharing factor of the harmony search method is introduced to improve the new harmony generation strategy, and a new Harmony Search method with Global Sharing Factor based on natural number coding and decoding for the Vehicle Routing Problem (GSF-HS-VRP) is proposed and applied to solve the capacity-limited vehicle routing optimization problem.

3.1. Concept Definition

3.1.1. Global Sharing Factor of the Harmony Search Algorithm

The concept of global sharing factor was proposed in the literature [23,24]. It is a sharing factor that changes nonlinearly only along with the number of trials, and it increases rapidly from a small initial value to a steady-state value. Thus, it can be used to suppress the randomness of tone fine-tuning.
In this paper, the global sharing factor is adopted to the HS algorithm to improve the efficiency of the tone generation and fine-tuning mechanism.
The global share factor is shown in Equation (6).
α G = ( 1 δ G ) · α f i n a l
δ G = 1 ( α i n i t / α f i n a l ) 1 / t , t [ 1 , T max ]
Here, α G is the global sharing factor, and δ G is a parameter for calculating the global sharing factor, which is denoted in Equation (7). α i n i t and α f i n a l are the initial value and final value of the parameters, respectively, and their values are set by experience as α i n i t = 0.1 and α f i n a l = 1.2 [22,23]. T is the number of trials, and in Equation (7), t is the number of trials t [ 1 , T max ] .

3.1.2. Coding Method

In our algorithm, the initial harmony is encoded using a natural number encoding method. Assuming that the dimension of the tone component x i j is W, then a tone component x i j represents each customer number in the routing optimization natural number encoding, and each customer number should be unique. For example, using an eight-digit integer coding (W = 8), i.e., the total number of customers is N = 8, then the number from 1 to 8 represents each unique customer number, and 0 represents the number of the distribution center. Therefore, in the encoding, each tone component x i j must be different and unique. In the improved routing optimization method in this paper, f ( x j ) , j = 1 , 2 , , H M S represents the total path length D of all vehicles, which is the final optimization objective function.

3.1.3. Learning Strategy

In the algorithm, the harmony memory whose size is HMS is randomly generated to find out the global optimal harmony x g , n o w = ( x 1 g , x 2 g , , x W g ) in one harmony evolution. Each tone component x i j , i = 1 , 2 , , W of each harmony x j , j = 1 , 2 , , H M S in the harmony memory adaptively evolves through the learning strategy, which is shown in Equation (8).
x i j , n e w = x i j , o l d + ( int ) ( α G × r × ( x g , n o w x i j , o l d ) )

3.1.4. Updating Strategy

In a harmony evolution, if the objective function value f ( x j , n e w ) obtained by learning strategy evolution is slightly lower than f ( x j , o l d ) , i.e., f ( x j , n e w ) f ( x j , o l d ) exists. Then, every tone component x i j , i = 1 , 2 , , W of each harmony x j , j = 1 , 2 , , H M S in the harmony memory adaptively evolves through the update strategy, which is shown in Equation (9).
x i j , n e w = x i j , o l d + ( int ) ( ( 1 α G ) × r × ( x g , n o w x i j , o l d ) )

3.1.5. Randomly Generating Strategy

In a harmony evolution, if the objective function value f ( x j , n e w ) obtained by updating the strategy evolution is slightly lower than f ( x j , o l d ) , i.e., f ( x j , n e w ) f ( x j , o l d ) exists, use Equation (10) to randomly generate the non-repeating harmony tone.
x i j , n e w = r % W + 1
The learning strategy, updating strategy, and randomly generating strategy are all calculated for each tone component of the harmony. In Equations (8)–(10), x i j , o l d represents each tone component in the last evolution, and x i j , n e w represents the new value of the corresponding tone component obtained by learning strategy, updating strategy, and randomly generation strategy after evolution.

3.1.6. Adjusting Strategy

When using the global sharing factor α G to calculate the learning strategy and updating strategy for the tone component, there are two situations that need to be considered for adjustment.
The first case is whether the evolved x i j , n e w still belongs to the correct coding range. x i j , n e w represents a newly generated customer number whose value should belong to the range of natural number coding. If it exceeds the range, a random value calculated by the formula (int)((rand()%W)) to adjust its value to the right encoding range.
The second case is whether the evolved x i j , n e w is the same as the value of other newly generated x i j , n e w . The newly generated customer number x i j , n e w should be unique; thus, if the situation of duplicate values occurs, they need to be compared one by one and modified with the method of randomly generating harmony tones.

3.1.7. Decoding Method

The arrangement of the vehicles is mainly based on the order of the customer number and the maximum load of the vehicle, i.e., the vehicle is arranged in the first vehicle path according to the customer’s coding order until the maximum load limit of the vehicle is exceeded, and then the second vehicle path is arranged in turn, and so on until the customer is completely arranged. In this paper, the decoding method of [1] was adopted, in which the encoding order of the customer is decoded into the vehicle path sequence of each vehicle in accordance with the maximum load limit per vehicle.

3.1.8. Objective Function

The objective function, i.e., the fitness, refers to the sum of the path lengths according to the total number of vehicles. There are several vehicles with several paths, and the sum length of the paths is taken as the objective function. The calculation method for the objective function is shown in Equation (11). In this paper, each harmony is used as the input of the objective function. Thus, the value of objective function is the total length of the vehicle path generated by the W integer-encoded harmony tones, each of the harmony is composed of N customers, where W = N.
i f ( i = 0 W q [ x i j ] [ x i + 1 j ] ) q s , s = 1 , 2 , K t h e n min D ( i , j ) = f ( x j ) = i = 0 W s = 1 K c s [ x i j ] [ x i + 1 j ] , j = 1 , 2 , H M S
Among them, q [ x i j ] [ x i + 1 j ] represents the transportation demand of customer i, i = 1 , 2 , , W represents each unique customer number, and i = 0 represents the number of the distribution center. The path corresponding to the s-th ( s = 1 , 2 , , K ) vehicle always starts from the distribution center ( i = 0 ) and then returns to it ( i = 0 ). q s represents the load capacity of the s-th vehicle. c s [ x i j ] [ x i + 1 j ] represents the transportation distance between customer i and customer i+1 when the s-th vehicle is satisfied, and therefore, i = 0 W s = 1 K c s [ x i j ] [ x i + 1 j ] represents the sum length of the total paths of K vehicles.

3.2. Theory of Algorithm

The theory of algorithm was described as follows. Set the maximum number of music creations to be T max . After initializing the harmony memory, the harmony fitness f ( x j ) , j = 1 , 2 , , H M S is sorted in descending order to find the optimal harmony x g , n o w = ( x 1 g , x 2 g , , x W g ) in one harmony creation evolution. The global sharing factor α G is calculated, and each tone component x i j , i = 1 , 2 , , W of each harmony x j , j = 1 , 2 , , H M S in the harmony memory adaptively evolves through the learning strategy according to Equation (8). If f ( x j , n e w ) < f ( x j , o l d ) , replace x i j , o l d with x i j , n e w respectively. Otherwise, each tone component evolves through the updating strategy according to Equation (9). If still f ( x j , n e w ) f ( x j , o l d ) , use Equation (10) to randomly generate harmony tone.
The above-mentioned harmony tone generation method is repeated until the number of evolution times reaches T max ; then, the optimal harmony and optimized path sequence are output.

3.3. Algorithm Process

Algorithm: GSF-HS-VRP
Input: the maximum number of evolutions T max , the size of the harmony memory HMS, and the number of tone component W.
Output: global optimal harmony x g and optimized path sequence.
Step 1: Randomly generate initial harmony individuals whose number is HMS, which is marked as. X H M S = { x j | x j = ( x 1 j , x 2 j , , x W j ) , j = 1 , 2 , , H M S } . The harmony memory is initialized according to Equation (1). Calculate the fitness f ( x j ) of the j-th ( j = 1 , 2 , , H M S ) harmony x j according to Equation (11).
Step 2: Each tone component x i j , i = 1 , 2 , , W of each harmony x j , j = 1 , 2 , , H M S is updated.
Begin
Sort each harmony by fitness f ( x j ) in descending order to determine x g , n o w .
Calculate α G according to Equations (6) and (7).
For ( x i j , i = 1 , 2 , , W )
  Update x i j , o l d through the learning strategy according to Equation (8).
End
if ( f ( x j , n e w ) < f ( x j , o l d ) )
  For ( x i j , i = 1 , 2 , , W )
     x i j , o l d = x i j , n e w
  End
else
  For ( x i j , i = 1 , 2 , , W )
    Update x i j , o l d through the update strategy according to Equation (9).
  End
if ( f ( x j , n e w ) < f ( x j , o l d ) )
  For ( x i j , i = 1 , 2 , , W )
     x i j , o l d = x i j , n e w
  End
else
  For ( x i j , i = 1 , 2 , , W )
    Randomly generate harmony tone x i j , n e w according to Equation (10).
  End
End
Step 3: Determine whether the number of evolutions has reached T max . If not, go to Step 2. Otherwise, the algorithm stops and outputs x g and the optimized path sequence.

3.4. Algorithm Flowchart

The algorithm flowchart of GSF-HS-VRP is shown in Figure 1.

3.5. Algorithm Efficiency Analysis

From the efficiency analysis of the HS algorithm in the literature, the time complexity of the HS algorithm is O ( T max × W ) , and the space complexity is O ( H M S × W ) . According to the previous descriptions of the improvements of the new algorithm, it can be concluded that the time complexity of the GSF-HS-VRP algorithm is O ( T max × W × H M S × K ) , and the space complexity is O ( H M S × W × W + K ) . The time complexity and space complexity of GSF-HS-VRP varies with the values of W and K, which are dependent on the size of the small-scale data and Solomon example dataset.

4. Experiment Design and Results Analysis

4.1. Experiment Design

Experiments were carried out on the HS algorithm Improved Harmony Search (IHS) algorithm [25], Global-best Harmony Search (GHS) algorithm [26], Self-adaptive Global Best Harmony Search (SGHS) Algorithm [27], and GSF-HS-VRP algorithm to optimize the vehicle routing problem. The computer processor of the personal computer used in the experiment was Intel Core i5 2.6 GHz and it had a memory of 4.0 GB. The experiment’s programs were programmed by Visual C++ 2010. The final test results were averaged after 30 runs independently.
The experimental parameters were set as follows: HMS = 20, HMCR = 0.9, PAR = 0.3, BW = 0.01, T max = 20. In the IHS algorithm, the minimum value of pitch tune probability PARmin = 0.01, the maximum value of pitch tune probability PARmax = 0.99, the minimum value of pitch tune bandwidth BWmin = 0.0001, and the maximum value of pitch tune bandwidth BWmax = 1 / ( 20 × ( U B L B ) ) [25]. In the GHS algorithm, PARmin = 0.01, PARmax = 0.99 [22]. In the SGHS algorithm, the initial probability value of the harmony memory is HMCRm = 0.98, the standard deviation of the value of the harmony memory HMCRs = 0.01, and the probability of the harmony memory is normally distributed within [0.9,1.0], the average initial value of bandwidth PARm = 0.9, the standard deviation of pitch tune bandwidth PARs = 0.05, the pitch tune bandwidth is normally distributed within [0.0,1.0], the specific evolution numbers Learning Period (LP) = 10, minimum value of the pitch tune bandwidth BWmin = 0.0001, the maximum value of the pitch tune bandwidth BWmax = 1 / ( 20 × ( U B L B ) ) [27]. UB and LB are the maximum value and minimum value of the search range of the algorithm, respectively. In the GSF-HS-VRP algorithm of this paper, according to sharing factor theory and experimental analyses in the literature [22,23], α i n i t is set to 0.1, and α f i n a l is set to 1.2.
According to the natural number coding method, adjusting strategy, and encoding strategies, the HS, IHS, GHS, and SGHS algorithms in the experiments have been modified to solve the vehicle routing problem, which is to ensure the consistency of the parameters and optimization results of all the five algorithms in the experimental tests.

4.2. Results Analysis

4.2.1. Experiment Results and Analysis of Small-Scale Data

Firstly, the experiment was tested using small-scale data [1]. The distance c s [ x i j ] [ x i + 1 j ] between customer i and customer i+1 and the demand q [ x i j ] [ x i + 1 j ] of customer i are shown in Table 1. The experimental parameters were set as follows: the number of customer nodes is N = 8, i.e., the number of harmony tone components is W = 8, where 1–8 represents each unique customer number, and 0 represents the number of the distribution center. The number of vehicles is K = 2, and the capacity of each car is q s = 8. The comparison of the results of fixed iterations and average runtime are shown in Table 2, and the average optimum of each algorithm is shown in Figure 2. The comparison results of vehicle routing optimization for each algorithm are shown in Table 3.

4.2.2. Experiment Results and Analysis of Standard Test Data

Then, the standard test data in the famous Solomon example [28] is used for the experiment, and the C101 dataset is selected as the test set. Experimental parameters were set as follows: the number of customer nodes is N = 100, i.e., the number of harmony tone components is W = 100, where 1 to 100 represents each unique customer number and 0 represents the number of the distribution center. The tests are conducted according to the number of vehicles K = 2, 3, and 10, respectively, and the vehicle capacity of each vehicle is 200.

Results and Comparison of Two Vehicles

In the case of two vehicles, i.e., K = 2, the comparison results of fixed iteration times and average runtime are shown in Table 4. The average optimum iteration curves of four algorithms were drawn in Figure 3. The comparison results of vehicle routing optimization of each algorithm are shown in Table 5.

Results and Comparison of Three Vehicles

In the case of three vehicles, i.e., K = 3, the comparison results of fixed iteration times and average runtime are shown in Table 6. The average optimum iteration curves of five algorithms are drawn in Figure 4. The comparison results of vehicle routing optimization of each algorithm are shown in Table 7.

Results and Comparison of Ten Vehicles

In the case of 10 vehicles, i.e., K = 10, the comparison results of fixed iteration times and average runtime are shown in Table 8. The average optimum iteration curves of five algorithms are shown in Figure 5. The comparison results of the vehicle routing optimization of each algorithm are shown in Table 9.

4.2.3. Wilcoxon’s Test

Wilcoxon’s test can be used to perform individual comparisons between two algorithms (pairwise comparisons), and the p-value in a pairwise comparison is independent from another one [13,29]. We conducted the behaviors of the five algorithms by means of Wilcoxon’s rank sum test, which known as a non-parametric statistical significance proof for independent samples. The p-values produced by Wilcoxon’s test in the experiments are shown in Table 10. Through the comparison of the computed p-values, we can draw the conclusion that the results of the GSF-HS-VRP algorithm are better than the ones acquired by the other four algorithms, especially for the problem of the Solomon example (K = 3).

4.2.4. Analysis of Results

It can be seen from the above test results that the GSF-HS-VRP algorithm shows a better average optimum for both small-scale data and standard test data. Compared with the other four algorithms, the GSF-HS-VRP algorithm has the shortest runtimes, achieves the effect of rapid convergence, and improves the efficiency of the algorithm. The algorithm’s average optimum iteration curve also shows that under the condition of fixed evolution times, the GSF-HS-VRP algorithm has a relatively stable evolutionary curve, making it less prone to premature convergence. In the multi-vehicle test, with the increase of the number of vehicles, the optimized path of the vehicle can satisfy the actual needs of more customers. The above results demonstrated that the GSF-HS-VRP algorithm has higher efficiency and reliability than the other four algorithms, which can effectively improve the optimization performance of the capacity limited-vehicle routing problem.

5. Conclusions

In this paper, a new Harmony Search method with Global Sharing Factor based on natural number coding for the Vehicle Routing Problem is proposed. From the perspective of improving the diversity of algorithm solutions, the number of creations of the harmony search algorithm is applied to the sharing factor, and the global sharing factor of the HS algorithm is proposed to improve the new harmony generation strategy. This method adopts natural number coding with high efficiency. The test results show that the optimal path results of this method are significantly improved compared with other HS, IHS, GHS, and SGHS algorithms in solving the problem of capacity-limited vehicle path optimization.

Author Contributions

L.L. conceived and designed the Harmony Search Method and the experiments, and wrote the paper; J.H., F.X. and Y.D. performed the experiments and analyzed the experiments. All authors have read and agreed to the published version of the manuscript.

Funding

This work is supported by the Gansu Agricultural University Discipline Construction Fund Project (Grant No. GAU-XKJS-2018-253, GAU-XKJS-2018-255, GAU-XKJS-2018-251), Gansu Province Higher Education Research Project (Grant No. 2019B-086, 2019A-056), Development Foundation Project of College of Information Science and Technology of Gansu Agricultural University (Grant No. GAU-XKFZJJ-2020-11), Young Advisor Fund of Gansu Agricultural University (Grant No. GAU-QDFC-2019-02), National Nature Science Foundation of China (Grant No. 61741201), 2019 General Planning Project of the 13th Five-Year Plan for Education Science in Gansu Province (Grant No. GS[2019]GHB2152), National Higher Education for Basic Computer Education Research Project (Grant No. 2018-AFCEC-214, 2018-AFCEC-213).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Yan, T. Research on Improved Harmony Search Algorithms for VRP. Master’s Thesis, Zhejiang Normal University, Hangzhou, China, 25 March 2015. [Google Scholar]
  2. Hu, L.; Wang, Z.; Zhao, F. Gaussian harmony search algorithm for driver satisfaction based logistics distribution path optimization. Appl. Res. Comput. 2015, 32, 3622–3625, 3676. [Google Scholar]
  3. Lau, H.; Chan, T.; Tsui, W.; Pang, W. Application of genetic algorithms to solve the multidepot vehicle routing problem. IEEE Trans. Autom. Sci. Eng. 2010, 7, 383–392. [Google Scholar] [CrossRef]
  4. Murray, C.; Park, W. Incorporating human factor considerations in unmanned aerial vehicle routing. IEEE Trans. Syst. Man Cybern. Syst. 2013, 43, 860–869. [Google Scholar] [CrossRef]
  5. Pavone, M.; Frazzoli, E.; Bullo, F. Adaptive and distributed algorithms for vehicle routing in a stochastic and dynamic environment. IEEE Trans. Autom. Control 2011, 56, 1259–1269. [Google Scholar] [CrossRef] [Green Version]
  6. Zhao, Z.; Wan, F. The solving of Vehicle Routing Problem based on hybrid harmony search algorithm. In Proceedings of the 3rd International Conference on Computational Intelligence and Industrial Application (PACIIA), Wuhan, China, 6–7 November 2010; pp. 379–382. [Google Scholar]
  7. Karaboga, D.; Basturk, B. On the Performance of Artificial Bee Colony Algorithm. Appl. Soft Comput. 2008, 8, 687–697. [Google Scholar] [CrossRef]
  8. Chen, S.; Locust, S. A new multi-optima search technique. In Proceedings of the Eleventh Conference on Congress on Evolutionary Computation, Trondheim, Norway, 18–21 May 2009. [Google Scholar]
  9. Mirjalili, S. Moth-flame optimization algorithm: A novel nature-inspired heuristic paradigm. Knowl.-Based Syst. 2015, 89, 228–249. [Google Scholar] [CrossRef]
  10. Eusuff, M.; Lansey, K. Optimization of Water Distribution Network Design Using the Shuffled Frog Leaping Algorithm. J. Water Sources Planning Manag. 2003, 129, 210–225. [Google Scholar] [CrossRef]
  11. Pan, W. A new fruit fly optimization algorithm: Taking the financial distress model as an example. Knowl.-Based Syst. 2012, 29, 69–74. [Google Scholar] [CrossRef]
  12. Geem, Z.; Kim, J.; Loganathan, G. A new heuristic optimization algorithm: Harmony search. Simulation 2001, 76, 60–68. [Google Scholar] [CrossRef]
  13. Cuevas, E.; González, A.; Zaldívar, D.; Pérez-Cisneros, M. An optimisation algorithm based on the behaviour of locust swarms. Int. J. Bio-Inspir. Comput. 2015, 7, 402–407. [Google Scholar] [CrossRef]
  14. Wang, G.; Jin, J. Moth-flame optimization algorithm fused on refraction principle and opposite-based learning. Comput. Eng. Appl. 2019, 55, 46–51. [Google Scholar]
  15. Han, H.; Pan, Q.; Liang, J. Application of improved harmony search algorithm in function optimization. Comput. Eng. 2010, 36, 245–247. [Google Scholar]
  16. Zhao, P.; Liu, S. Novel intelligent optimization algorithm and its improvement. J. Chin. Comput. Syst. 2010, 31, 955–958. [Google Scholar]
  17. Cuevas, E. Block-matching algorithm based on harmony search optimization for motion estimation. Appl. Intell. 2013, 39, 165–183. [Google Scholar] [CrossRef] [Green Version]
  18. Alia, O.; Mandava, R.; Aziz, M. A hybrid harmony search algorithm for MRI brain segmentation. Evol. Intell. 2011, 4, 31–49. [Google Scholar] [CrossRef]
  19. Fourie, J. Robust circle detection using Harmony Search. J. Optim. 2017, 2017. [Google Scholar] [CrossRef] [Green Version]
  20. Moon, Y.; Zong, W.; Han, G. Vanishing point detection for self-driving car using harmony search algorithm. Swarm Evol. Comput. 2018, 41, 111–119. [Google Scholar] [CrossRef]
  21. Das, S.; Mukhopadhyay, A.; Roy, A.; Abraham, A.; Panigrahi, B. Exploratory power of the Harmony Search Algorithm: Analysis and improvements for global numerical optimization. IEEE Trans. Syst. Man Cybern. 2011, 41, 89–106. [Google Scholar] [CrossRef]
  22. Liu, L.; Huo, J.; Wang, L.; Han, J. Harmony search algorithm based on shuffled frog leaping and bacterial foraging and its application in image. J. Front. Comput. Sci. Technol. 2015, 9, 119–128. [Google Scholar]
  23. Liu, L.; Huo, J.; Wang, L. Harmony search algorithm with global sharing factor. J. Chongqing Univ. Technol. (Nat. Sci.) 2014, 28, 82–86. [Google Scholar]
  24. Liu, L.; Wang, L.; Han, J. Shuffled frog leaping algorithm based on global sharing factor. Comput. Eng. 2013, 39, 162–166, 171. [Google Scholar]
  25. Mahdavi, M.; Fesanghary, M.; Damangir, E. An improved harmony search algorithm for solving optimization problems. Appl. Math. Comput. 2007, 188, 1567–1579. [Google Scholar] [CrossRef]
  26. Omran, M.; Mahdavi, M. Global-best harmony search. Appl. Math. Comput. 2008, 198, 634–656. [Google Scholar] [CrossRef]
  27. Pan, Q.K.; Suganthan, P.N.; Tasgetiren, M.F.; Liang, J.J. A self-adaptive global best harmony search algorithm for continuous optimization problems. Appl. Math. Comput. 2010, 216, 830–848. [Google Scholar] [CrossRef]
  28. Available online: http://web.cba.neu.edu/~msolomon/problems.htm (accessed on 4 February 2020).
  29. García, S.; Molina, D.; Lozano, M.; Herrera, F. A study on the use of non-parametric tests for analyzing the evolutionary algorithms’ behaviour: A case study on the CEC’2005 Special Session on Real Parameter Optimization. J. Heuristics 2009, 15, 617–644. [Google Scholar] [CrossRef]
Figure 1. Flowchart of Harmony Search method with Global Sharing Factor based on natural number coding and decoding for Vehicle Routing Problem (GSF-HS-VRP) algorithm.
Figure 1. Flowchart of Harmony Search method with Global Sharing Factor based on natural number coding and decoding for Vehicle Routing Problem (GSF-HS-VRP) algorithm.
Information 11 00086 g001
Figure 2. Average optimum of each algorithm.
Figure 2. Average optimum of each algorithm.
Information 11 00086 g002
Figure 3. Average optimum iteration curve of each algorithm.
Figure 3. Average optimum iteration curve of each algorithm.
Information 11 00086 g003
Figure 4. Average optimum iteration curve of each algorithm.
Figure 4. Average optimum iteration curve of each algorithm.
Information 11 00086 g004
Figure 5. Average optimum iteration curve of each algorithm.
Figure 5. Average optimum iteration curve of each algorithm.
Information 11 00086 g005
Table 1. Table of customer distance and demand.
Table 1. Table of customer distance and demand.
c s [ x i j ] [ x i + 1 j ] 012345678
00467.592010168
1406.541057.51110
266.507.510107.57.57.5
37.547.501059915
491010100107.57.510
5205105100797.5
6107.57.597.570710
716117.597.597010
88107.515107.510100
Demand
q [ x i j ] [ x i + 1 j ] /Ton
012121422
Table 2. Comparison of the results of fixed iterations. HS: Harmony Search, IHS: Improved Harmony Search, GHS: Global-best Harmony Search, SGHS: Self-adaptive Global Best Harmony Search.
Table 2. Comparison of the results of fixed iterations. HS: Harmony Search, IHS: Improved Harmony Search, GHS: Global-best Harmony Search, SGHS: Self-adaptive Global Best Harmony Search.
AlgorithmAverage OptimumStandard DeviationAverage Runtime
HS-VRP7.15E+013.28E+007.27E+00
IHS-VRP7.14E+015.09E+006.62E+00
GHS-VRP7.06E+014.97E+007.69E+00
SGHS-VRP7.04E+014.91E+001.30E+01
GSF-HS-VRP6.96E+014.45E+007.01E+00
Table 3. Comparison of vehicle routing optimization for each algorithm.
Table 3. Comparison of vehicle routing optimization for each algorithm.
AlgorithmShortest Path ValueOptimization Path of Vehicle 1Optimization Path of Vehicle 2
HS-VRP67.503-7-86-5-2
IHS-VRP66.501-2-5-36-7-4
GHS-VRP79.506-2-34-7-5-8-1
SGHS-VRP73.001-2-76-8-4
GSF-HS-VRP66.004-5-1-36-7-2
Table 4. Comparison results at fixed iteration times.
Table 4. Comparison results at fixed iteration times.
AlgorithmAverage OptimumStandard DeviationAverage Runtime
HS-VRP6.40E+024.75E+011.56E+02
IHS-VRP6.50E+024.59E+016.15E+01
GHS-VRP6.33E+025.56E+019.69E+01
SGHS-VRP6.61E+026.35E+013.97E+02
GSF-HS-VRP6.39E+024.20E+013.12E+01
Table 5. Comparison results of vehicle routing optimization of each algorithm.
Table 5. Comparison results of vehicle routing optimization of each algorithm.
AlgorithmShortest Path ValueOptimization Path of Vehicle 1Optimization Path of Vehicle 2
HS-VRP622.3969-35-38-95-53-58-56-6693-90-60-59-20-24-7-74-39-3
IHS-VRP699.8793-2-6-22-43-35-54-69-2868-34-50-30-17-58-80-26-63-45-39
GHS-VRP645.827-70-58-38-74-3310-78-81-54-49-24-20-5-17-27-30-69-72
SGHS-VRP692.5327-33-1-95-46-58-34-84-4969-68-10-63-23-9-61-21-89-5-15
GSF-HS-VRP569.8354-42-13-89-2-100-41-2288-26-85-25-74-50-20-34
Table 6. Comparison results of fixed iteration times.
Table 6. Comparison results of fixed iteration times.
AlgorithmAverage OptimumStandard DeviationAverage Runtime
HS-VRP1.02E+037.21E+017.11E+01
IHS-VRP1.03E+038.10E+017.13E+01
GHS-VRP1.05E+037.23E+011.24E+02
SGHS-VRP1.02E+037.60E+015.93E+02
GSF-HS-VRP9.77E+027.63E+013.66E+01
Table 7. Comparison results of vehicle routing optimization of each algorithm.
Table 7. Comparison results of vehicle routing optimization of each algorithm.
AlgorithmShortest Path ValueOptimization Path of Vehicle 1Optimization Path of Vehicle 2Optimization Path of Vehicle 3
HS-VRP1068.1223-4-50-40-81-86-78-85-11-18-8-3743-76-88-21-92-15-6-25-5928-74-98-94-49-34-22-52-95-1
IHS-VRP1062.0233-16-19-64-73-66-86-44-21-38-6895-11-2-63-98-61-57-40100-29-48-6-89-74-20-80-84-69-72
GHS-VRP972.9742-74-8-7-6-2-26-4856-69-95-52-53-18-68-50-94-43-2716-14-45-10-63-81-54
SGHS-VRP1125.3722-66-63-6-83-12-50-1354-58-87-88-52-60-17-89-5595-56-10-93-42-35-64-18-8
GSF-HS-VRP928.0755-44-82-1-52-88-74-18-9054-53-85-93-100-37-26-333-47-63-60-81-66-32
Table 8. Comparison results at fixed iteration times.
Table 8. Comparison results at fixed iteration times.
AlgorithmAverage OptimumStandard DeviationAverage Runtime
HS-VRP3.86 × 1039.63 × 1013.05 × 102
IHS-VRP3.84 × 1039.39 × 1013.08 × 102
GHS-VRP3.86 × 1039.45 × 1013.12 × 102
SGHS-VRP3.83 × 1037.25 × 1011.99 × 103
GSF-HS-VRP3.82 × 1036.08 × 1017.45 × 101
Table 9. Comparison optimization path results of the vehicle routing optimization of each algorithm.
Table 9. Comparison optimization path results of the vehicle routing optimization of each algorithm.
AlgorithmShortest Path ValueVehicle 1Vehicle 2Vehicle 3Vehicle 4Vehicle 5Vehicle 6Vehicle 7Vehicle 8Vehicle 9Vehicle 10
HS-VRP3964.0860-48-52-33-11-23-28-58-1571-90-34-27-65-3-36-87-1-6-31-84-687-62-96-39-57-40-64-56-893-86-24-20-99-82-80-76-73-49-4-1874-32-12-21-25-53-8938-59-29-26-50-72-37-61-95-77-81-67-9151-16-85-75-70-46-9713-2-100-94-42-83-17-63-7945-69-10-92-5-41-54-78-19-47-66-55-14-43-4435-88-30-98-22-9
IHS-VRP3939.6663-100-75-59-43-68-16-56-8969-87-98-1-54-57-62-8-51-4024-65-10-70-66-53-14-18-35-49-76-85-7894-12-81-77-9-73-61-5-11-7-79-80-31-29-2397-42-72-17-3-93-27-38-4641-13-26-30-21-34-33-96-39-19-4592-2-64-55-67-52-48-20-15-84-50-8274-32-47-91-95-44-90-37-86-36-9971-58-28-22-4-60-88-612-36-69-0-0-25-83
GHS-VRP3995.3025-82-9-49-16-64-6-99-26-89-2092-85-24-60-14-38-75-4-48-34-528-91-12-54-93-95-51-31100-80-18-87-76-81-2-23-35-3319-22-42-47-46-84-65-29-78-79-71-30-5943-73-72-41-67-44-88-90-86-10-7-56-2898-77-27-37-68-36-83-32-61-15-55-5063-3-1-53-45-40-96-13-94-17-6697-5-57-39-58-11-69-62-2180-72-4-19-17-0-0-74-70
SGHS-VRP3950.6376-15-58-49-73-86-93-774-62-95-33-18-10-69-4296-6-64-65-78-21-48-85-54-7981-9-46-39-68-72-83-61-27-12-22-3431-51-82-14-43-57-29-41-60-56-94-9113-55-19-99-3-23-1-8-92-90-84-17-44-20100-75-77-26-47-4-87-66-67-53-38-40-2825-50-70-80-98-45-88-59-37-571-89-24-2-52-32-11-97-16-3036-63-35
GSF-HS-VRP3855.1335-84-100-68-34-5-53-37-4-67-65-466-92-2-96-10-60-94-17-45-54-5932-78-98-51-18-13-30-21-70-8679-75-8-9-19-91-25-99-27-1-48-3916-88-95-97-7-7414-12-69-61-93-77-50-55-41-62-44-24-4315-26-38-23-31-40-71-72-83-3-8173-64-56-28-76-42-36-47-85-22-80-89-2063-82-57-66-87-90-5833-49-29-52-11
Table 10. p-Values produced by Wilcoxon’s test for the different datasets.
Table 10. p-Values produced by Wilcoxon’s test for the different datasets.
GSF-HS-VRP vs.HS-VRPIHS-VRPGHS-VRPSGHS-VRP
Small-scale data [1]0.02550.02440.04400.0481
Solomon example K = 2 [28]0.08820.05430.08600.0126
Solomon example K = 3 [28]0.00680.01080.00100.0133
Solomon example K = 10 [28]0.02080.01990.04680.0561

Share and Cite

MDPI and ACS Style

Liu, L.; Huo, J.; Xue, F.; Dai, Y. Harmony Search Method with Global Sharing Factor Based on Natural Number Coding for Vehicle Routing Problem. Information 2020, 11, 86. https://doi.org/10.3390/info11020086

AMA Style

Liu L, Huo J, Xue F, Dai Y. Harmony Search Method with Global Sharing Factor Based on Natural Number Coding for Vehicle Routing Problem. Information. 2020; 11(2):86. https://doi.org/10.3390/info11020086

Chicago/Turabian Style

Liu, Liqun, Jiuyuan Huo, Fei Xue, and Yongqiang Dai. 2020. "Harmony Search Method with Global Sharing Factor Based on Natural Number Coding for Vehicle Routing Problem" Information 11, no. 2: 86. https://doi.org/10.3390/info11020086

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop