An Efficient Crossover Operator for Quadratic Assignment Problem Based on Discrete Differential Evolution Algorithm
1*Asaad Shakir Hameed, 2Burhanuddin Mohd Aboobaider, 3Modhi Lafta Mutar, and 4Ngo Hea Choon
1,2,3,4
Faculty of Information and Communication Technology, Universiti Teknikal Malaysia Melaka Hang Tuah Jaya, 76100, Durian Tunggal, Melaka, Malaysia
Abstract
Proposing an efficient crossover operator that helps prevent premature convergence by increasing the diversification of the population in the algorithm. This paper has been proposed four crossover operators One Point Crossover (OPX), Swap Path Crossover (SPX) Operator, Sequential Constructive Crossover (SCX) Operator, and Uniform Like Crossover (ULX) operator for Quadratic Assignment Problem(QAP) and applied on Discrete Differential Evolution(DDE) algorithm. The purpose of this paper to select the best crossover operator by comparing it with other crossover operators which applied in the instances of QAP. The results emerged that a ULX operator is better than the OPX, SPX, and SCX.
Keywords: Quadratic Assignment Problem, Discrete Differential Evolution,One Point Crossover Operator, Swap Path Crossover Operator, Sequential Constructive Crossover Operator.
1. Introduction
In the science of mathematics and computer science, the optimization problem seeks to find the best solution from all practical solutions. Optimization problems have been divided into two groups depending on whether the variables are discrete or continuous. The discrete variables in the optimization problem called discrete optimization and they belong to the countable set such as integer, permutation, ...etc. The Combinatorial Optimization Problems COPs is one of the youngest and most active areas of discrete mathematics and is probably its driving force today.
On the other hand, the Facility Layout Problem (FLP) is one of the best-studied problems in the field of COPs, several formulations have been developed for the problem but the more particularly the FLP has been modeled as Quadratic Assignment Problem (QAP) (Liu et al., 2018). The QAP was first introduced as a mathematical model related to economic activities by (Koopmans and Beckmann, 1957). The QAP has been successfully enforcement of in the real-life, there are many practical problems can be modeled as a QAP, including economic, engineering, ... etc. On the other hand, the aim of QAP is allocating the facilities to the locations such that each facility is allocated to one exact location, and every location is allocated to one exact facility to reduce the total cost that represented as the sum of the products of flows and distances.
Their more studies in the literature review have been addressed the QAP model which covers algorithms, applications, comparisons, and analysis to improve the solutions with the total cost is minimized with best distributions for N facilities to N of locations. From the view
of solutions, there are two approaches introduced to solve the QAP, the first approach can find the optimal solutions but with the small size of the problem such as Branch and Bound BB had been used by (Drezner, 2006) Dynamic Programming used by (Zabudskii and Lagzdin, 2012) , and the study (Zhang, Beltran-Royo and Ma, 2012) has been applied the mixed-integer linear programming.
The exact approach achieves the global optimal solution to small size QAP, though quite a few efficient exact algorithms have been developed still only a few instances of size n
≥ 30 from QAP have been solved optimally. On the other hand, the second called approximate approach which included two categories the heuristic and metaheuristic.
Heuristics are methods to find good solutions in a reasonable computational cost without guaranteeing feasibility and optimality, the most recent heuristic methods that can be adapted to a wide range of combinatorial optimization problems are called metaheuristics. The meta- heuristics are a set of intelligent strategies to enhance the efficiency of heuristic procedures (Beheshti and Shamsuddin, 2013). Therefore, it can be applied to wide different problems for example of metaheuristic algorithms Tabu Search (TS) algorithm (Misevicius, 2005), Ant Colony Optimization (ACO)(Demirel and Toksari, 2006), Discrete Differential Evolution (DDE) algorithm which has been modified by (Tasgetiren et al., 2013), and Genetic algorithm (Rostami and Malucelli, 2014), and(Hameed et al., 2020) has been suggested a new hybrid approach based on Discrete Differential Evolution (DDE) to enhancement solutions of QAP.
The contribution of this study to suggest the efficient crossover operator for QAP based on the Discrete Differential Evolution (DDE) algorithm through the comparison with other crossover operators. The rest of this paper as follows: Section 2 has been introduced the Quadratic Assignment Problem (QAP), the methods of this study have been presented in section 3, while, section 4 includes section the results and discussion, and finally, the conclusion has been presented in section 5.
2. The Quadratic Assignment Problem (QAP)
The Quadratic Assignment Problem (QAP) was first introduced as a mathematical model by Koopmans and Beckman in 1957. Many practical problems can be modeled as a QAP, including production line scheduling, assignment of gates to airplanes in airports, backboard wiring problems in electronics, campus, and hospital layouts, typewriter keyboard designs, and many others. On the other hand, the QAP is one of the most difficult combinatorial optimizations problems in the operations research. QAP is an NP-hard problem that is impossible to be solved in polynomial time when the problem size increases (Abdel- Basset et al., 2018), (Riffi, Saji and Barkatou, 2017). On the other hand, this section has been presented three subsections the first subsection introduced analysis the QAP model, the second subsection has been presented the processing of QAP model, and finally the third subsection outline the applications of QAP model.
2.1Analysis of QAP Model
This subsection included three stages created to achieve a good analysis of the QAP model. The stages of QAP model have been presented as follows:
2.1.1 Input Stage
The characterizes of QAP model have been played an important role in obtaining a good solution for QAP. The characterizes including: Problem Size:N = facilities, location.
Distance Matrix (D): Distance between every pair of locations. Flow Matrix (F): Amount of traffic between every pair of facilities.
2.1.2 Processing Stage
This stage includes solve the Permutations (π): A permutation or one-to-one mapping between all facilities to location, this stage is responsible for the layout through the distribution of N facilities to N locations. There are N! (N size of the problem) permutations to assign all facilities to locations based on determining the flow matrix and the distance matrix. And solve the Objective Function: find total cost or flow * distance between all assigned pairs (
n
i n
j 1 1
Fij Dπ(i), π(j) ).
2.1.3 Outcomes Stage
The results of QAP model solutions can be summarized as follows: find the best layout depends on the distribution permutations of N facilities to an N of locations regarding the distance between any two locations and the flows between any two facilities to minimize total cost. Based on the above there are two issues worth to highlight in QAP model as follows:
The lack of layout of the locations to facilities for some of them causes a lot of distances. So, there is an urgent need to find the best layout of distributions of N facilities to N locations to reduce the total cost based on determining the flow matrix and the distance matrix.
Whenever there is an increase in the size of the problem it becomes more difficult to find the best solution in a reasonable time.
3. Method
This section has been presented two phases the first phase introduced the Discrete Differential (DDE) algorithm. While the second phase has been investigation on the efficient crossover operators for QAP.
3.1 Discrete Differential Evolution (DDE) Algorithm
The Differential Evolutionary Algorithm (DE) was originally designed to operate on continuous variables. So, the purpose of suggestion of Discrete Differential Evolution (DDE) is to extend the functionalities of DE for solving per mutative-based combinatorial problems such as Quadratic Assignment Problem (QAP). The DDE algorithm which has been modified
by (Tasgetiren et al., 2013) is used in this study. On the other hand, the steps of the DDE algorithm are illustrated as follows:
Initialization: initialize population matrix π = {π1, π2, π3, …, πNP} randomly. Matrix size NP* ND where NP is number of population and ND dimension of problem space. All population individuals should be unique.
Evaluate fitness: find the best solution𝜋𝑏fromthe population NP.
Mutation: the equation stated below can be used to get the mutant individual:
𝑣𝑖𝑡= 𝑖𝑛𝑠𝑒𝑟𝑡(𝜋𝑏𝑡−1) 𝑖𝑓 𝑟 < 𝑃𝑚
𝑠𝑤𝑎𝑝(𝜋𝑏𝑡−1) 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 (1)
Where 𝜋𝑏𝑡−1 represents the most suitable result from the previous generation in the target population; the Pm is the perturbation probability; and insert () and swap are merely the swap moves and single insertion, r is a uniform random number belong to [0,1].
Crossover: obtain the crossover; the following equation can be used:
𝑢𝑖𝑡= 𝐶𝑅 𝑖𝑓 𝑟 < 𝑃𝑐
𝑣𝑖𝑡 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 (2)
Where the Pc is the crossover probability; and CR is crossover operation.Inother words, if a uniform random number r is less than the crossover probability Pc , then the crossover operator is applied to generate the trial individual 𝑢𝑖𝑡. Otherwise the trial individual is chosen as 𝑢𝑖𝑡 = 𝑣𝑖𝑡.
Selection: selection is based on fitness function; the following equation can be used:
𝜋𝑖𝑡= 𝑢𝑖𝑡 𝑖𝑓 𝑓 𝑢𝑖𝑡 ≤ 𝑓 𝜋𝑖𝑡−1
𝜋𝑖𝑡−1 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 (3)
The selection was groundedon the existenceof the rightestamongst the trial and target individuals.
3.2 Investigation on Crossover Operators for Quadratic Assignment Problem
The crossover operator has been playing a pivotal role in the DDE algorithm. On the other hand, there are many types of crossover operators have been a suggestion for QAP.
This study has been an investigation of the efficient crossover for QAP based on the DDE algorithm.
3.2.1 One Point Crossover (OPX) Operator
The One Point Crossover (OPX) operators have been used in the versions of genetic algorithms. One of the variants of OPX for the QAP is due to(Holland, 1988). The idea of OPX is quite simple. A crossing point (site) is chosen randomly between 1 and n-1 in one of the parents. As a result, a child chromosome is an obtained, containing information partially determined by each of parent chromosomes. Figure 1 shows the steps of OPX operator.
Figure 1 Example of one-point crossover (Ahmed, 2014)
3.2.2 Swap Path Crossover (SPX) Operator
The swap path crossover (SPX) operator has been used by (Ahuja, Orlin and Tiwari, 2000)in the "greedy genetic algorithm". (Note that the original idea of this type of crossover was developed by (Glover, 1994), who referred to it as a "path relinking") Let π′, π′′ be a pair of parents. In SPX, one starts at the first (or some random) gene, and the parents are examined from left to right until all the genes have been considered. If the alleles at the position being looked at are the same, one moves to the next position; otherwise, one performs a swap (inter-change) of two alleles in π′ or in π′′ so that the alleles at the current position become alike. (For example, if the current gene is i, and a = π′(i), b = π′′(i), then, after a swap, either π′(i) becomes b, or π′′(i) becomes a.) Ahuja et al. propose to perform the swap for which the corresponding solution has a lower cost (objective function value). The elements in the two resultingsolutions are then considered, starting at the next position, and so on. The best solution obtained during thisprocess (the fittest child) serves as an offspring.
Theswap path crossover is illustrated in Figure 2.
Figure 2 Example of swap path crossover(Ahmed, 2014)
3.2.3 Sequential Constructive Crossover (SCX) Operator
The parents' characteristics are inherited mainly by crossover operator. Hence, several crossover operators have been proposed (or modified) for solving the QAP as well as other combinatorial optimization problems. The operator that preserves good characteristics in the offspring is said to be a good operator.The parents' characteristics are inherited mainly by crossover operator. Hence, several crossover operators have been proposed (or modified) for solving the QAP as well as other combinatorial optimization problems. The operator that preserves good characteristics in the offspring is said to be a good operator. Hence, the SCX is modified (the name is not changed) for the QAP asfollows (Ahmed, 2014):
Step 1: Start from the location (suppose, p) of the first facility of the first parent.
Step 2: Sequentially search both parent chromosomes and consider the first legitimate location(the location that is not yet assigned) appeared after location p in each parent. If nolegitimate location, after location p, is available in any of the parent, search sequentiallyfrom the beginning of the parent and consider the first legitimate location, and go toStep 3.
Step 3: Suppose location α and location β are found in 1st and 2nd parent respectively, then forselecting the next location go to Step 4.
Step 4: Compute the cost of one incomplete offspring chromosome by incorporating location α as the next location (suppose, cα). Similarly, compute the cost of other incompleteoffspring by incorporating location β as the next location (suppose, cβ). Then go to Step5. Suppose (α1, α2, α3, …., αk-1) be a partially constructed offspring and locationδ isselected for concatenation, then the cost (value) of assigning this location for the facilityk is calculated as follows:
Cδ=
1
1
( ik i ki )
i
i k
f d f d
(4)Step 5: If cα<cβ, then select location α, otherwise, location β as the next location to be assignedfor next facility and concatenate it to the partially constructed offspring
chromosome.
If the offspring is a complete chromosome, go to Step 6; otherwise, rename the present location as location p and go to Step 2.
Step 6: Evaluate the first parent and the offspring chromosomes. If value of the offspring is less than the value of the parent, replace the first parent by the offspring, otherwise do not replace.
3.2.4 Uniform Like Crossover (ULX) Operator
This operator has been introduced by (D.M. Tate, 1995) and the process of it as follows:
Any facility that is assigned to the same location in both parents is inherited by the offspring.
All unassigned facilities are selected, in a random fashion, ensuring that each unassigned facility is selected exactly once. For each of these, one of the parents is chosen at random. If the location of the selected facility in this parent is free, then it is inherited by the offspring. If the location is not free in the first parent, then attempt to assign the location of the facility from the second parent. When a facility is assigned to a location, that location is flagged. The facility that is assigned to this location, in the parent that was used in the previous rule, if not already assigned, is inherited by the offspring.
Figure 3Example shows the ULX operator (Chyży and Kosiński, 2005)
4. Results and Discussion
This section has been reported the results of QAP obtained by using four types of crossover operators which applied in the DDE algorithm. The efficient results of QAP depend on the gap which is calculated by the equation follows:
Gap = (CBest - C*) / C* ×100 (5)
Where CBest is the best objective value found over 10 runs, while C* is the best-known value taken from QAPLIB. The QAPLIB considers the source of the QAP dataset, all the instances of QAP are available in the link http://anjos.mgi.polymtl.ca/qaplib/. On the other hand, the implementation has been done on 31 instances of QAP. Tables 1,2,3 have been presented the results as follows:
Table 1 Comparison of the crossover operators for QAPLIB instances
Name of Instances
BKS Best Gap %
CR1 CR2 CR3 CR4
Sko42 15812 2.934 3.250 3.731 2.681
Sko49 23386 2.736 3.147 2.617 2.155
Sko56 34458 3.737 4.529 3.848 3.389
Sko64 48498 3.756 3.55 3.848 2.33
Sko72 66256 4.552 3.836 3.674 4.017
Sko81 90998 4.529 4.035 4.336 3.586
Sko90 115534 4.416 4.561 4.997 3.785
Sko100a 152002 4.942 4.392 4.721 4.109
Sko100b 153890 4.364 4.360 5.063 3.590
Sko100c 147862 4.494 4.690 5.183 4.339
Sko100d 149576 4.383 4.806 4.671 4.004
Sko100e 149150 5.397 4.509 5.617 4.036
Sko100f 149036 4.731 4.307 5.049 3.668
Average gap % 4.228 4.151 4.411 3.514
Table 1 above has been reported the gaps of solutions value of the instances QAP which called “Sko” by four types of crossover operators (CR1: OPX, CR2: SCX, CR3: SPX, and CR4: ULX). The results of the comparison in the Table 1 shows the CR4: ULX is better than the other crossover ( CR1, CR2, and CR3) with best average gap 3.514 % for all cases the problem “Sko” while the average gap of the other crossover as follows: CR1 is 4.228%, CR2 is 4.151%, and the CR3 is 4.411 %. Figure 4 shows the graphical representation of Table 1.
Figure 4 Graphical representation of Table 1
Table 2 Comparison of the crossover operators for QAPLIB instances
Name of Instances
BKS Best Gap %
CR1 CR2 CR3 CR4
Tai20a 703482 3.772 5.179 2.846 3.406
Tai25a 1167256 3.853 4.545 3.721 3.294
Tai30a 1818146 4.178 3.747 4.356 3.654
Tai35a 2422002 4.148 4.461 5.286 3.302
Tai40a 3139370 4.831 5.030 5.481 4.422
Tai50a 4938796 5.318 5.896 5.980 5.068
Tai60a 7205962 6.131 5.640 6.392 4.797
Tai80a 13499184 6.158 5.822 6.410 5.638
Average gap % 4.798 5.04 5.509 4.197
The table above has been presented the gaps of solutions value of the instances QAP which called “Tai-a” via four types of crossover operators. The results of the comparison in Table 2 shows the CR4 is better than the other crossover ( CR1, CR2, and CR3) with best average gap 4.197 % whilst the average gap of the other crossover as follows: CR1 is 5.274%, CR2 is 5.04 %, and the CR3 is 5.509 %. Figure 2 shows the graphical representation of Table 5.
Figure 5 Graphical representation of Table 2
0 1 2 3 4 5 6
Gap
Instances
CR1 CR2 CR3 CR4
0 2 4 6 8
Tai20a Tai25a Tai30a Tai35a Tai40a Tai50a Tai60a Tai80a
Gap
Instances
CR1 CR2 CR3 CR4
Finally, the carryout of the real-life instances QAP has been recorded in Table 3. The gaps of the value of the solution of these instances have been obtained through the proposal crossover operators.The results of the comparison in Table 3 proved the CR4 is better than the other crossover ( CR1, CR2, and CR3) with best average gap 3.417 % whilst the average gap of the other crossover as follows: CR1 is 5.274 %, CR2 is 4.168 %, and the CR3 is 4.050
%. Figure 6 shows the graphical representation of Table 3.
Table 3 Comparison of the crossover operators for real-life QAPLIB instances
Name of Instances
BKS Best Gap %
CR1 CR2 CR3 CR4
Tai20b 122455319 1.026 0.452 0.60 0.452
Tai25b 344355646 1.392 0.949 0.545 2.672
Tai30b 637117113 4.190 0.538 0.312 0.372
Tai35b 283315445 5.090 0.683 1.071 1.158
Tai40b 637250948 5.074 5.444 6.770 5.975
Tai50b 458821517 3.776 2.95 3.457 2.911
Tai60b 608215054 4.566 6.939 3.439 1.889
Tai80b 818415043 10.054 6.553 7.432 4.428
Tai100b 1185996137 9.173 7.335 8.316 6.867
Tai150b 498896643 8.4 9.846 8.567 7.451
Average gap % 5.274 4.168 4.050 3.417
Figure 6 shows the graphical representation of Table 3 as follows:
Figure 6 Graphical representation of Table 3 5. Conclusion
The purpose of this work, to find efficient crossover operators for QAP by using the DDE algorithm and applied on the instances of the QAP dataset. There are four crossover operators that have been suggested in this study for QAP as follows: (CR1: OPX, CR2: SCX, CR3: SPX, and CR4: ULX). The results proved the CR4: ULX is better than CR1: OPX, CR2: SCX, and CR3: SPX based on the accuracy.
0 2 4 6 8 10 12
Tai20b Tai25b Tai30b Tai35b Tai40b Tai50b Tai60b Tai80b
Gap
Instances
CR1 CR2 CR3 CR4
Acknowledgment
The authors would like to thank the UTeM Zamalah Scheme. This research has been supported by Universiti Teknikal Malaysia Melaka (UTeM) under UTeM Zamalah Scheme.
References
Abdel-Basset, M. et al. (2018) „A comprehensive review of quadratic assignment problem: variants, hybrids and applications‟, Journal of Ambient Intelligence and Humanized Computing. Springer Berlin Heidelberg, 0(0), pp.
1–24. doi: 10.1007/s12652-018-0917-x.
Ahmed, Z. H. (2014) „A simple genetic algorithm using sequential constructive crossover for the quadratic assignment problem‟, Journal of Scientific and Industrial Research, 73(12), pp. 763–766.
Ahuja, R. K., Orlin, J. B. and Tiwari, A. (2000) „A greedy genetic algorithm for the quadratic assignment problem‟, Computers and Operations Research, 27(10), pp. 917–934. doi: 10.1016/S0305-0548(99)00067-2.
Beheshti, Z. and Shamsuddin, S. M. H. (2013) „A review of population-based meta-heuristic algorithm‟, International Journal of Advances in Soft Computing and its Applications, 5(1), pp. 1–35.
Chyży, M. and Kosiński, W. (2005) „Comparison of Crossover Operators for the State Assignment Problem‟, Intelligent Information Systems 2002, 34(2), pp. 195–200. doi: 10.1007/978-3-7908-1777-5_20.
D.M. Tate, A. E. S. (1995) „A genetic approach to the quadratic assignment problem‟, Computers & Operations Research, 1, pp. 73–83.
Demirel, N. Ç. and Toksari, M. D. (2006) „Optimization of the quadratic assignment problem using an ant colony algorithm‟, Applied Mathematics and Computation, 183(1), pp. 427–435. doi:
10.1016/j.amc.2006.05.073.
Drezner, Z. (2006) „Finding a cluster of points and the grey pattern quadratic assignment problem‟, OR Spectrum, 28, pp. 417–436. doi: 10.1007/s00291-005-0010-7.
Glover, F. (1994) „Genetic algorithms and scatter search: unsuspected potentials‟, Statistics and Computing, 4(2), pp. 131–140. doi: 10.1007/BF00175357.
Hameed, A. S. et al. (2020) „A new hybrid approach based on discrete differential evolution algorithm to enhancement solutions of quadratic assignment problem‟, International Journal of Industrial Engineering Computations, 11(1), pp. 51–72.
Holland, D. E. G. and J. H. (1988) „Genetic Algorithms and Machine Learning‟, pp. 95–99.
Koopmans, T. C. and Beckmann, M. J. (1957) „Assignment Problems and the Location of Economic Activities Author ( s ): Tjalling C . Koopmans and Martin Beckmann‟, Econometrica, 25(1), pp. 53–76. Available at:
http://www.jstor.org/stable/1907742.
Liu, J. et al. (2018) „Multi-objective particle swarm optimization algorithm based on objective space division for the unequal-area facility layout problem‟, Expert Systems With Applications Received. Elsevier Ltd, pp. 3–
27. doi: 10.1016/j.eswa.2018.02.035.
Misevicius, A. (2005) „A tabu search algorithm for the quadratic assignment problem‟, Computational Optimization and Applications, 30(1), pp. 95–111. doi: 10.3233/INF-1992-3405.
Riffi, M. E., Saji, Y. and Barkatou, M. (2017) „Incorporating a modified uniform crossover and 2-exchange neighborhood mechanism in a discrete bat algorithm to solve the quadratic assignment problem Incorporating a modified uniform crossover and 2-exchange neighborhood mechanism‟, Egyptian Informatics Journal. Faculty of Computers and Information, Cairo University, 18(3), pp. 221–232. doi: 10.1016/j.eij.2017.02.003.
Rostami, B. and Malucelli, F. (2014) „A revised reformulation-linearization technique for the quadratic assignment problem‟, Discrete Optimization. Elsevier B.V., 14, pp. 97–103. doi: 10.1016/j.disopt.2014.08.003.
Tasgetiren, M. F. et al. (2013) „Metaheuristic algorithms for the quadratic assignment problem‟, 2013 IEEE Symposium on Computational Intelligence in Production and Logistics Systems (CIPLS), pp. 131–137. doi:
10.1109/CIPLS.2013.6595210.
Zabudskii, G. G. and Lagzdin, A. Y. (2012) „Dynamic programming for the quadratic assignment problem on trees‟, Automation and Remote Control, 73(2), pp. 336–348. doi: 10.1134/S0005117912020117.
Zhang, H., Beltran-Royo, C. and Ma, L. (2012) „Solving the quadratic assignment problem by means of general purpose mixed integer linear programming solvers‟, Annals of Operations Research, 207(1), pp. 261–278. doi:
10.1007/s10479-012-1079-4.