Abstract
The capacitated clustering problem (CCP) divides the vertices of the undirected graph into several disjoint clusters so that the sum of the node weights in each cluster meets the capacity limit while maximizing the sum of the weight of the edges between nodes in the same cluster. CCP is a typical NPhard problem with a wide range of engineering applications. In recent years, heuristic algorithms represented by greedy random adaptive search program (GRASP) and variable neighborhood search (VNS) have achieved excellent results in solving CCP. To improve the efficiency and quality of the CCP solution, this study proposes a new hybrid algorithm HACCP. In HACCP, a feasible solution construction method is designed to adapt to the CCP with stricter upper and lower bound constraints and an adaptive local solution destruction and reconstruction method is designed to increase population diversity and improve convergence speed. Experiments on 90 instances of 4 types show that the best average solution obtained by HACCP on 58 instances is better than all comparison algorithms, indicating that HACCP has better solution stability. HACCP is also superior to all comparison algorithms in average solving efficiency.
1. Introduction
The capacitated clustering problem (CCP) divides the vertices of the undirected graph into several disjoint clusters so that the sum of the node weights in each cluster meets the capacity limit while maximizing the sum of the weight of the edges between nodes in the same cluster.
CCP is closely related to the graph partition problem (GPP) [1–5], where the goal is to find a partition of the vertex set in k classes while minimizing the number of cut edges and respecting a balance constraint between the classes. Moreover, the maximum diversity grouping problem (MDGP) [6–13] is used to partition the vertices of an edgeweighted and undirected complete graph into m groups such that the total weight of the groups is maximized subject to some group size constraints. Consequently, the objective of the handover minimization problem (HMP) in the mobile network [14] is to minimize the sum of weights of the edges with endpoints in different clusters. In addition, CCP also has essential applications in vehicle routing [15] and mail delivery [16].
Optimization problems in real life are becoming more complex, with largescale, nonlinear, multiconstrain characteristics. In recent years, many intelligent optimization algorithms [17–22] have been proposed to solve some complex practical problems effectively. Since Mulvey and Beck [23] proposed the CCP model in 1984, much literature has been on CCP and related issues. The greedy random adaptive search program (GRASP) is an effective method to solve CCP. Deng and Bard [24] combined a GRASP with path relinking (PR) and proposed GRASPPR with a postprocessing stage. MoránMirabal et al. [14] proposed three random heuristic methods to solve the handover minimization problem in mobile networks: a GRASP with path relinking for the generalized quadratic assignment problem (denoted by GQAP), a GRASP with evolutionary path relinking (denoted by GevPRHMP), and a biased randomkey genetic algorithm (BRKGA). MartínezGavara et al. [25] proposed the greedy random adaptive search program (GRASP), Tabu search method (TS), a hybrid method combining GRASP and TS (GRASP + TS), and Tabu search with strategic oscillation (TS_SO). MartínezGavara et al. [26] proposed three random heuristic algorithms: greedy random adaptive search process (GRASP21), iterative greedy (IG), and their hybrid IGGRASP.
Algorithms based on variable neighborhood search (VNS) [27, 28] are another method of solving CCP. Lai and Hao [29] proposed an iterative variable neighborhood search (IVNS) algorithm. Brimberg et al. [30] proposed the general VNS (GVNS) and the skewed general VNS (SGVNS). Lai X et al. [31] proposed the neighborhood decompositiondriven variable neighborhood search (NDVNS) for capacitated clustering. In addition, a Tabu search designed specifically for CCP includes the TS (denoted as FITS) and the memetic algorithm (MA) proposed in the literature [32].
CCP is an NP problem. By imposing upper and lower limits on the size of clusters, CCP becomes a typical constrained clustering problem. The complexity of CCP is related to the scale of the problem and the upper and lower limits of its capacity. Largescale CCPs require more calculation time to obtain a good solution than those of small and medium CCPs. In particular, it is challenging to find feasible solutions for CCPs with strict upper or lower limits. Literature [26] introduced a hybrid method called IGGRASP to solve CCP. On the one hand, IGGRASP initializes a new solution and restarts the search when it falls into the local optimum and fails to break out the local optimum after a preset number of searches. This process discards the results of the previous stage search. As mentioned in [26], it is more efficient to construct a link solution of the current solution than to construct a new solution. On the other hand, as described in Section 3.3, the destruction strength of the current solution by the IGGRASP destructive method depends on the number of clusters and nodes of the instance. When applying IGGRASP to solve largescale instances, the destructive method may excessively destroy the current solution, which is not conducive to the final convergence of the algorithm to a better solution. In addition, the construction method of IGGRASP is difficult to successfully construct feasible initial solutions for some instances with strict upper and lower limits of capacity. Recently, algorithms based on VNS have been proposed to solve CCP, including IVNS, GVNS, and SGVNS. The experimental results in the literature [32] show that SGVNS has the best performance. We believe this is mainly due to the extension of the search to other promising areas of the solution space by adding skewed acceptance criteria. The algorithms based on VNS all use a random shaking process to introduce diversity to search. To improve the efficiency and quality of CCP solutions, this study proposes a new hybrid algorithm HACCP, which intelligently combines IGGRASP and SGVNS algorithms. HACCP follows the framework of SGVNS and uses partial destruction and reconstruction strategies to introduce diversity to search. In addition, we also designed a new initial solution constructive method and partial destructive method to avoid the above limitations in IGGRASP. The main contributions of this study include the following:(1)A solution construction method CM2 is designed. Even if the upper and lower boundaries of the cluster are very tight, CM2 can successfully build a feasible solution. It can construct feasible solutions in a wider range of CCP solutions to make the algorithm run correctly and perform better than the random construction method [29, 31, 32].(2)A destructive method DM3 is designed to destruct partial solutions. It adaptively destructs the solution according to the number of clusters and nodes of the instance while limiting the maximum number of deleted nodes in largescale instances. In largescale instances, the performance of DM3 is significantly better than DM2 [26].(3)A hybrid algorithm HACCP is proposed to solve CCP. The HACCP follows the framework of SGVNS, uses the partial destruction and reconstruction strategy to shake the current solution, uses the proposed solution constructor to construct the initial solution, reconstructs the partial solution, and uses the proposed destruction method to destroy the partial solution. Compared with the existing VNSbased CCP algorithm [29–31], HACCP uses a nonfully random method to shake the current solution to improve the efficiency of the algorithm and the quality of the solution.
The experimental results on 90 benchmark test instances show that HACCP is superior to all comparison algorithms except NDVNS (because NDVNS [31] does not provide calculation time) in terms of average solving efficiency. In terms of solution quality, HACCP obtained 57 best average results and 30 best results, indicating that HACCP outperformed all comparison algorithms in average results. However, the solution quality of HACCP on MDGa instances is inferior to NDVNS.
The rest of the study is organized as follows. In Section 2, the definition of the CCP and the latest heuristics for CCP are introduced. Then, the overall framework of HACCP and the proposed construction method CM2 and destruction method DM3 are introduced in Section 3. Section 4 gives the experimental results and timetotarget analysis on benchmark instances. Section 5 analyzes the contribution of the critical algorithmic component to the performance of the proposed algorithms. Finally, conclusions and future work are provided in Section 6.
2. Background and Literature Review
This section introduces the concept of the CCP and the stateoftheart CCP algorithms in the literature. Some of these algorithms are also used for analysis and comparison in Section 4.
2.1. Basic Concepts
For undirected weighted graphs, , where is a set of nodes and is the set of edges. is the weight of the node . is the weight of the edge. is divided into clusters , and . If , let the binary variable ; otherwise, . The CCP based on can be expressed as an optimization problem [29, 32]:
Here, equation (2) requires that each node be allocated and only allocated to one cluster, and equation (3) requires that the sum of the node weight of each cluster is not less than the lower limit of capacity and does not exceed the upper limit of capacity . The subset of the solution is called the partial solution of .
2.2. IGGRASP for CCP
IGGRASP [26] is the latest algorithm for solving CCP based on GRASP, as shown in Algorithm 1. It first constructs an initial solution with the construction method CM (line 6) and then improves the initial solution with the local search method IM21 (line 7). Subsequently, the algorithm repeatedly applies the destructive method DM2 to destruct the solution (line 9), the CM to reconstruct the solution (line 10), and the IM21 for local search (line 11). If several attempts cannot improve the solution (lines 8–18), the algorithm constructs a new solution (line 6) and starts again.

In Algorithm 1, CM (line 6) is used to construct a feasible solution. It starts by seeding the clusters with randomly selected nodes. Then, the clusters are explored in lexicographical order assigning nodes until all of them satisfy the lower bound constraint. To do so, the candidate list is formed with all the unassigned nodes and the value is calculated for all pairs of nodes and clusters. , the restricted candidate list of nodes for cluster , can be formed as follows:where is a parameter used to balance randomness and greed. Finally, CM randomly selects a node in and assigns to cluster . The nodes are allocated in this way until cluster satisfies the lower bound of capacity. Then, all clusters are processed in this way until all clusters meet the lower limit of capacity. In the next step, CM assigns all unallocated nodes to these clusters so that each cluster meets the capacity limit constraint. In particular, CM constructs the candidate list by equation (6), builds by equation (7), selects one pair at random, and assigns node to cluster . CM stops when all the nodes have been assigned in this way.
DM2 (Algorithm 1, line 9) is used to destruct part of the solution. It aims to remove some nodes from the cluster so that those nodes can be assigned to a different cluster to increase the value of the objective function. DM2 first constructs a deleted candidate list for the cluster as follows:where is the relative contribution of node to cluster , is the contribution of node to the objective function value in cluster , and is the potential contribution of the node to the objective function value, is a threshold, and is a parameter to control the size of the deleted candidate list. The DM2 method deletes the percentage elements from of each cluster . So, the actual number of nodes removed from cluster is , where is the length of the list .
2.3. VNS Algorithms for CCP
The VNS algorithm is a classic local search algorithm for combinatorial and global optimization problems (see [33–36]). It first constructs a feasible initial solution and then iteratively applies a shaking and local search to find the global optimal solution. Lai and Hao [29] followed the general VNS framework and proposed iterative variable neighborhood search (IVNS) for CCP. IVNS constructs the initial solution with a random construction procedure, shakes the current solution with a random shaking procedure, and finds the local optimal solution with the extended variable neighborhood descent (EVND).
Brimberg et al. [30] proposed two heuristic algorithms based on VNS to solve CCP. The first is to combine variable neighborhood descent (VND) with general VNS to obtain the general variable neighborhood search (GVNS). The second is to combine VND with skewed VNS to obtain skewed general variable neighborhood search (SGVNS). SGVNS expands the search range to other promising areas of the solution space by a skew operation. The acceptance criteria for skewed moves in SGVNS are described as follows:where is the best solution, is the current solution, and is the new solution obtained after one application of shaking and local search. is a parameter, and function denotes a measure of distance between two solutions, according to [30], and can be calculated as follows:where and is the label of the cluster where the node is located in the solution .
2.4. Tabu Search
FITS [32] is a Tabu search approach to solve CCP. It starts from generating feasible solutions and then enters the searching stage until the running deadline is reached. The searching stage alternates between a feasible local search phase (FLS for short) and an infeasible local search phase (InfLS for short). If FLS is trapped in a deep local optimum, FITS will switch to InfLS to guide the search towards new search regions. It alternately explores the feasible and infeasible solution space to avoid falling into the local optimum easily.
3. A Hybrid Algorithm for CCP: HACCP
In this section, we propose a hybrid algorithm HACCP to solve CCP. HACCP uses a process based on the combination of greediness and randomization to construct the initial solution, uses the VND method to perform a local search to find the local optimal solution, and uses the destruction and reconstruction partial solution to shake the current solution. In addition, an acceptance criterion for skewed moves was added to enable HACCP to extend the search range to other promising areas of the solution space, thereby reducing repeated searches for some areas of the solution space and increasing the diversity of the search. For ease of description, in the rest of this study, represents the best solution obtained so far, represents the current solution, and represents the new solution obtained after one application of destruction, reconstruction, and local search of .
3.1. HACCP Framework
The overall framework of HACCP is shown in Algorithm 2. It constructs an initial solution x with CM2 (Algorithm 2 line 2; see Section 3.2), and if x is not a feasible solution (Algorithm 2 line 3), an empty solution is returned (Algorithm 2 line 4); otherwise, x is improved with VND [30] (Algorithm 2 line 5) and the improved solution is copied as the current best solution x^{b} (Algorithm 2 line 6). Then, it enters the iterative process to optimize the solution until the loop condition is no longer satisfied. Each iteration consists of four stages: (1) the current solution is partially destructed (Algorithm 2 line 8; see Section 3.3); (2) the destroyed solution is reconstructed (Algorithm 2 line 9); if is not a feasible solution (Algorithm 2 line 10), is updated with x (Algorithm 2 line 11); (3) VND is used to perform a local search on the reconstructed solution to obtain a new solution (Algorithm 2 line 13); and (4) if the new solution is better than the best solution x^{b}, the current solution x and the best solution x^{b} are updated with the new solution ; otherwise, whether to accept the new solution as the current solution x according to acceptance criteria is determined. If the acceptance criteria were satisfied, the new solution is accepted as the current solution x. Otherwise, the current solution x is not updated (Algorithm 2 lines 14–21). Because the three processes of partial destruction, reconstruction, and local search have a certain degree of randomness, each iteration will produce a different new solution.
Compared with Algorithm 1 (IGGRASP), Algorithm 2 (HACCP) has the following differences:(1)Local Search. In Algorithm 1, IM21 has to be used (Algorithm 1, line 7) to improve the solution, which searches in neighborhood N4(x) [25], but Algorithm 2 applies the VND [30] based on 3 neighborhoods (Algorithm 2, line 5)(2)Partial Destruction Solution. Algorithm 1 partially destructs the solution with DM2 (Algorithm 1, line 9), but Algorithm 2 adopts DM3 (Algorithm 2, line 8)(3)Acceptance Criteria. Algorithm 1 adopts the “always replace” acceptance criterion (Algorithm 1, lines 12–17), but Algorithm 2 adopts the “conditional acceptance” criterion (Algorithm 2, lines 18–20)(4)Jump out of the Local Optimum. Algorithm 1 jumps out of the local optimization after the preset number of iterations without any improvement (Algorithm 1, Line 8), but Algorithm 2 appropriately accepts the suboptimal solution as the current solution to moving the search to other areas of the solution space (Algorithm 2, line 19)(5)Algorithm 1 has one possible starting point for a new round of search: the current solution x (Algorithm 1, lines 12–17), but Algorithm 2 has two: the current solution x and the new solution (Algorithm 2, lines 14–21). Therefore, Algorithm 2 has a larger optimization search space than Algorithm 1
Compared with the SGNVS algorithm, Algorithm 2 (HACCP) has the following differences:(1)In terms of the construction of the initial solution, HACCP uses a combination of randomization and greediness to construct the initial solution, and SGNVS uses a completely random construction method to construct the initial solution.(2)In terms of introducing diversity for search, HACCP adopts the strategy of destructing and reconstructing the current solution, and the VNSbased SGVNS adopts a completely random shake process.(3)In terms of perturbation strength, HACCP controls the number of the deleted nodes of the destructive method according to the number of nodes, clusters, and the parameter of the current instance, while SGNVS adjusts the perturbation strength according to the solution obtained in the search process.

3.2. Construction Method: CM2
To construct a feasible solution, we propose CM2 in Algorithm 3. CM2 includes two steps. The first step (Algorithm 3, lines 4–16) is as follows: assigning nodes to each cluster until all clusters meet the lower limit of capacity. For cluster , CM2 first constructs a candidate list with all the unallocated nodes (Algorithm 3, line 6). If the is not empty (Algorithm 3, lines 7–10), the increment of the objective function value is calculated and the restricted candidate list isconstructed by equation (5). Then, a node in is randomly selected and assigned to cluster . If is empty (Algorithm 3, lines 11–14), it indicates that all nodes have been allocated, but the cluster in solution x does not meet the lower limit of capacity. In this case, we apply Algorithm 4 to fix x into a feasible solution.
The second step (Algorithm 3, lines 18–29) is as follows: assigning the remaining unallocated nodes to suitable clusters. It first constructs the candidate list by equation (6). If is not empty (Algorithm 3, lines 20–23), the restricted candidate list isconstructed by equation (7). Then, a pair of elements in is randomly selected and is assigned to cluster . All unallocated nodes are allocated in this way. If the is empty (Algorithm 3, lines 24–27), it indicates that there is an unallocated node , and allocating it to any cluster will cause the cluster capacity to exceed the upper limit. For this case, we apply the LWA (Algorithm 5) for processing. CM2 performs the solution construction process up to 10 times (Algorithm 3, lines 1–3). If the feasible solution is successfully constructed, it will jump out of the loop and return to the feasible solution (Algorithm 3, lines 30–34).

Algorithm 4 describes the repair method. For the cluster that does not meet the lower limit of capacity, we first construct a feasible movein node candidate list (Algorithm 4, line 3) by equation (11). If is empty (Algorithm 4, line 4), the infeasible solution x (Algorithm 4, line 5) is returned; otherwise, the restricted candidate list is constructed in a similar way to the restricted candidate list (Algorithm 4, line 6). Then, a node in is randomly selected and it is moved to the cluster (Algorithm 4, lines 7–8). The node is moved in this way until all clusters meet the lower capacity constraint, and the repair ends.

LWA is shown in Algorithm 5. It first selects a node with the largest weight among the unallocated nodes (Algorithm 5, line 2). Then, as in equation (6), a feasible allocation candidate list is formed just for node (Algorithm 5, line 3). Second, if is empty (Algorithm 5, line 4), the infeasible solution x (Algorithm 5, line 5) is returned. Otherwise, the restricted candidate list is constructed by equation (7) (Algorithm 5, line 6). Finally, a pair (, ) is selected randomly from , and the node is assigned to cluster (Algorithm 5, lines 7–9). The remaining unallocated nodes are allocated according to the above way.

3.3. Destruction Method: DM3
To destruct partial solution, [26] proposed DM2. MD2 deletes at least one node for each cluster. For large instances, as the number of nodes and clusters increases, the number of deleted nodes increases for each cluster. On the one hand, it increases the time cost, and on the other hand, it is difficult to converge to a highquality solution due to too many deleted nodes. To limit the number of deleted nodes, we propose a new destruction method DM3, in Algorithm 6.
Algorithm 6 sets the upper limit of the number of deleted nodes to (Algorithm 6, lines 8–9). DM3 first selects nodes to be deleted from each cluster to construct the deletion candidate list by equation (8) (Algorithm 6, lines 3–6) and then puts all these nodes in the list (Algorithm 6, line 7). If the number of nodes in exceeds , nodes are randomly selected for deletion from the solution (Algorithm 6, line 11).

4. Computational Experiments
This section describes the computational experiments that we conducted to evaluate the effectiveness and efficiency of the HACCP. We first conducted some preliminary experiments to find suitable parameters for HACCP. Then, we compare the result of HACCP with the stateoftheart CCP algorithms: IVNS [29], GVNS [30], SGVNS [30], FITS [32], and DNVNS [31]. Section 4.1 introduces benchmark instances and experimental setup, and Section 4.2 describes the comparative experiments on benchmark instances. Section 4.3 illustrates a comparative experiment based on timetotarget (TTT) analysis method.
4.1. Benchmark Instances and Experimental Setup
We conducted experiments to evaluate HACCP on 90 benchmark instances (available at http://www.optsicom.es/ccp and [30]), which is commonly used to evaluate algorithms for CCP (see, for instance, [29–32]). It contains four sets: RanReal240, RanReal480, RanReal960, and MDGa instances. Table 1 lists the experimental datasets. In the second column, represents the number of nodes of the instance and represents the number of clusters.
We use the following indicators to measure the advantages of each algorithm:
counted the number of instances where a specific algorithm outperforms the other algorithms in terms of the best and the average objective value.
indicates the average percent deviation of a specific algorithm’s best/average result from the best solution obtained in all algorithms participating in the comparison, where and , and is the best result of each algorithm, is the average result of each algorithm, and is the best solution obtained by participating in the comparison of all algorithms.
recorded the average calculation time (in seconds) required for a particular algorithm to reach its final objective function value.
represents the of the best/average result obtained through the pairwise Wilcoxon statistical test.
Note that, in Section 4.2, we use the result of IVNS, GVNS, SGVNS, FITS, and NDVNS present in [31]. The experiments of IVNS, GVNS, SGVNS, and FITS were executed on an Intel E52670 Processor (2.8 GHz) with 2 G Byte RAM running under Linux. HACCP is implemented in C++, compiled with the ++ compiler using the option “O3,” and carried out on a server under Ubuntu Linux (version 16.04) with 1 Core of an Intel Xeon (Cascade Lake) Platinum 8269CY 2.5 GHz CPU and 2 G Byte RAM. These results are obtained by running each instance independently 20 times with the running time set to seconds, where is the number of nodes in a given instance.
The HACCP has five parameters: the parameter used to balance randomness and greed in CM2, the parameter that controls the size of the deleted candidate list in DM3, the percentage of deleted nodes in the candidate list of each cluster, and the upper limit of the number of deleted nodes in DM3 and parameter (for skewed moves) in HACCP. For , we conducted the test experiment on 13 instances with different characteristics in RanReal240, RanReal480, RanReal960, and MDGa. For , we keep the other parameters unchanged and change the value of from 0.2 to 0.8 in steps of 0.2. The best value is obtained when α = 0.6. For and , we use a similar method to obtain = 0.7 and = 0.1. The value settings of parameters are consistent with the literature [26], so we did not report the results of this experiment.
For , we test it in the range of {20, 24, 30, 40, 60}. We conducted this experiment on 9 instances with different characteristics in RanReal960 and MDGa. The statistical results of the experiment are shown in Table 2. In terms of the best objective function value and average objective function value (), HACCP obtains the best value at , including obtaining 4 best objective function values and 6 best average values. According to the average percentage deviation (), HACCP has the smallest deviation of the best solution obtained when , and there is not much difference between the parameter values in terms of average time. Therefore, we set .
For parameter , according to [30], . On this basis, we test and on 4 instances from RanReal with and 13 instances from RanReal240, RanReal480, RanReal960, and MDGa with . The test results are shown in Tables 3 and 4. On the instances with , the effect of is better than . In the other instance, presents a better effect. Therefore, in instances where the number of clusters is greater than 12, we set , and in other instances, we set .
4.2. Algorithm Comparison Experiment
To evaluate the performance of HACCP, we compared the solution of HACCP, IVNS [29], GVNS [30], SGVNS [30], FITS [32], and NDVNS [31]. The instances in the experiment are divided into small and medium instances and largescale instances.
The experimental statistical results on the datasets of small and medium instances (RanReal240 and RanReal480) are shown in Table 5. Tables 6 and 7 give detailed results. In Table 5, HACCP is better than other algorithms on 19 instances in terms of the best objective function value and has better performance on 36 instances from the average result. According to the average percentage deviation, HACCP has the smallest deviation from the best solution obtained in the experiment . The statistical test shows a significant performance difference between HACCP and other comparison algorithms , except for the best results of NDVNS.
The experimental statistical results on the dataset of largescale instances (RanReal960) are shown in Table 8. The detailed results are given in Tables 9 and 10. According to Table 8, HACCP has obvious advantages in average results. It obtained 20 best average results out of 30 instances and 11 best results. HACCP surpasses other comparison algorithms in terms of the average percent deviation of average result from bestfound solutions (). The row shows a statistically significant difference in performance between HACCP and all the reference algorithms except NDVNS.
The experimental statistical results on the dataset of largescale instances (MDGa) are presented in Table 11. Tables 12 and 13 give detailed results. It can be seen from Table 7 that NDVNS has obvious advantages in solution quality, but HACCP is better than other algorithms (such as IVNS, GVNS, SGVNS, and FITS), which is also proved by the results of statistical testing.
From the above experimental results, it can be seen that (1) the average solving efficiency of HACCP on all instances is better than all comparison algorithms except NDVNS (because NDVNS does not give the solution time). (2) In terms of solution quality, HACCP obtained 58 best average solutions and 30 best solutions on 90 instances, which is better than all comparison algorithms in average results. This shows that HACCP has better solution stability. (3) The solution quality of HACCP on MDGa instances is inferior to NDVNS. Therefore, the improvement of HACCP combined with NDVNS deserves further study.
4.3. TimetoTarget Analysis
To further evaluate the efficiency of the HACCP algorithm, we apply the timetotarget (TTT) analysis [37], which identifies the empirical probability distribution of the time required to reach a given objective function value. In this experiment, we choose algorithms with known good performance to compare with HACCP: VNS, GVNS, and SGVNS. We used the source code of IVNS (http://www.info.univangers.fr/pub/hao/ccp.html), GVNS, and SGVNS (http://www.mi.sanu.ac.rs/∼nenad/ccp/), which can be found online. The instance we chose in the experiment is the same as the test instance in [32], and the objective function value recommended in [32] is used. We carried out TTT experiments under the calculation conditions described in Section 4.2 by executing 100 times on each instance for each algorithm. For each instance/target pair, the running time is sorted in ascending order, and the probability associated with the th sorted running time is , and the points are drawn. Figure 1 shows the experimental results. The abscissa of the figure represents the timetotarget value in seconds (s). The maximum coordinate value of the abscissa is set to a different value to make the comparisons clearer. It can be seen from Figure 1 that in Figures 1(a)–1(f), HACCP and SGVNS have similar performance. HACCP has the shortest calculation time in the remaining instances.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
5. Analysis of the Main Components of HACCP
In this section, we have studied the contribution of the main components of HACCP to performance. We give experimental results from four aspects: “construct solution,” “destruct partial solution,” “destruct and reconstruct partial solution,” and “acceptance criterion for skew” to show that the method used in HACCP is better. All experiments in this section were performed under the experimental conditions described in Section 4.1.
5.1. Benefit of CM2
In HACCP, CM2 is first used to construct the initial feasible solution (Algorithm 2, line 2) and then reconstruct the solution in the iterative process (Algorithm 2, line 9). Different from CM [26] and random construction method (RCM, used in [29, 31, 32]), CM2 can increase the probability of constructing a feasible solution when the upper and lower bounds are tighter and improve the performance of HACCP. Therefore, we conducted comparative experiments in the following two aspects.
First, we compared the success rate of constructing the initial feasible solution between RCM and CM2 under different upper and lower bound constraints on 10 RanReal960 instances with . In the experiment, the upper and lower bounds and of the instance are adjusted to and , respectively. Obviously, and will tighten the constraints of CCP. For each instance, RCM and CM2 are run 100 times under the new upper and lower bound constraints, respectively, and the success rate of obtaining the initial solution is shown in Table 14. The “average” row indicates the average value of the construction success rate of all the test instances.
We can see from Table 14 that if the upper and lower bounds of the cluster capacity become stricter, the success rate of RCM and CM2 in constructing the initial solution decreases, but the success rate of CM2 is higher than that of RCM. From the average point of view, the success rate of CM2 in the experiment is higher than that of RCM, even as high as 2 times (the last column of Table 14). Therefore, CM2 has better usability than RCM, and it can construct feasible solutions in tighter constrained CCPs.
Secondly, we use RCM to replace CM2 in HACCP (denoted as HACCPRCM) for comparison experiments with HACCP. The experiment was conducted on the same 10 instances as Section 4.3, and each instance was run 20 times. Table 15 summarizes the comparison results, and Tables 16 and 17 give detailed results. It can be seen from Table 15 that when the average calculation time is almost the same, HACCP with CM2 can obtain more best solution and best average solution. Therefore, CM2 can effectively improve the CCP solution quality.
5.2. Benefit of DM3
DM2 [26] is the destruction method used in IGGRASP [26] to partial destruction solution. To verify the superiority of DM3 used in HACCP, we replaced the DM3 in HACCP with DM2 and compared the results of HACCP using different destruction methods (DM2 and DM3) on the results of the RanReal960 dataset. Table 18 summarizes the statistical comparison results, and Tables 19 and 20 give detailed results.
As shown in Table 18, DM3 has obtained 29 best solutions and 30 best average objective function value and has a smaller value of . The Wilcoxon statistical test shows that the best performance and average performance of DM2 and DM3 on RanReal960 are statistically significantly different. Therefore, we can conclude that DM3 is superior to DM2 on RanReal960.
5.3. Benefit of the Destruct and Reconstruct Partial Solution
Algorithms IVNS, GVNS, SGVNS, and FITS for CCP used a completely random shaking procedure to shake the current solution, but HACCP uses the method of destroying and reconstructing partial solutions. To verify the advantage of the destruct and reconstruct partial solution, we combined HACCP with the random shaking procedure used in SGVNS [30], called HACCPRS. We compared the result of HACCP with HACCPRS on the MDGa dataset. Table 21 describes the statistical comparison results, and Tables 22 and 23 give detailed results. According to Table 21, HACCP has a better performance than HACCPRS in all indicators.
5.4. Benefit of Acceptance Criterion for Skew
HACCP added an acceptance criterion for skewing the search to other promising areas of the solution space. To verify the performance of acceptance criterion for skew to the performance, we compared the result of HACCP with the HACCP without acceptance criterion for skew (HACCPNAC for short) on RanReal240 and RanReal480 datasets. Table 24 shows the statistical comparison results, and detailed results are given in Tables 25 and 26. As shown in Table 24, HACCP has a better performance than HACCPNAC in best results and average results.
In summary, from the experimental results of the four aspects of “the construction of solution,” “the destruction of the partial solution,” “the destruction and reconstruction of the partial solution,” “the acceptance criteria,” no matter which component is replaced, the overall performance of the algorithm decreases significantly. Therefore, we believe that the combination of these components has obtained good experimental results. The effective combination of these components helps the algorithm jump out of the local optimum and obtains a better balance between intensification and diversification levels.
6. Conclusion
The capacitated clustering problem (CCP) has a wide range of applications. In this study, we propose a hybrid heuristic algorithm HACCP for CCP. After constructing the initial solution, HACCP partially destructs and reconstructs the current solution through a combination of greediness and randomness to obtain a new solution. On this basis, an acceptance criterion is added, which allows the current solution to be skewed to move to inferior solutions so that more promising solutions can be explored in the solution space.
The competitive experiments on the benchmark instances show that HACCP is superior to all comparison algorithms except NVSD in terms of average solving efficiency for all instances (because the solution time is not given). The result of the timetotarget analysis also verifies the efficiency of HACCP. Moreover, HACCP is better than all comparison algorithms because the best average solution of 58 instances is obtained on all 90 instances, which shows that HACCP has better solution stability. However, the solution quality of HACCP on MDGa instances is obviously inferior to NDVNS.
As future work, we believe that the following research is worthwhile. First, the automatic parameter adjustment tool irace is used [38] to adjust the HACCP parameters to find a better parameter configuration. Second, the improved solution construction strategy enables the algorithm to solve the more restrictive CCP. Third, NDVNS is combined to improve HACCP, so that it has better solution quality on CCP including MDGa.
Data Availability
The data are available at CCPLIB (https://grafo.etsii.urjc.es/optsicom/ccp/ccplib.zip).
Conflicts of Interest
The authors declare that they have no conflicts of interest.