# Quality-Oriented Study on Mapping Island Model Genetic Algorithm onto CUDA GPU

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Related Work

#### 2.1. UA-FLP

#### 2.2. Introduction to GPU and CUDA

#### 2.3. Parallelizaiton of IMGA for UA-FLP on a GPU

## 3. Improvement of Parallel Tournament Selection

#### 3.1. Generate Random Seed Once with the System Clock

Algorithm 1: Generate Random Seed Once |

Data: |

round: number of tournaments that are conducted |

population: number of chromosomes that are in an island |

Input: |

survive; fitness |

Function: |

clock(): access the system time from GPU |

rand_initiate(): initiate the state of random number generator |

rand_generate(): generate a random number |

Result: |

Chromosomes are randomly picked, and conduct a series of tournament. |

Parallel: |

1: tseed = clock() |

2: offset = threadId |

3: rand_initiate(tseed, offset, state) |

4: winner = 0 |

5: for i = 1 to i = round do |

6: rival = rand_generate(state) mod population |

7: if fitness[blockId][rival] < fitness[blockId][winner] do |

8: winner = rival |

9: end |

10: end |

11: survive[blockId][threadId] = winner |

#### 3.2. Generate a Random Seed during Each Round of Comparisons

Algorithm 2: Generate a Random Seed during Each Round of Comparison |

Data: |

round: number of tournaments that are conducted |

population: number of chromosomes that are in an island |

Input: |

survive; fitness |

Function: |

clock(): access system time from GPU |

rand_initiate(): initiate the state of random number generator |

rand_generate(): generate a random number using the state of generator |

Result: |

Chromosomes are randomly picked, and conduct a series of tournament. |

Parallel: |

1: offset = threadId |

2: winner = 0 |

3: for i = 1 to i = round do |

4: tseed = clock() |

5: rand_initiate(tseed, offset, state) |

6: rival = rand_generate(state) mod population |

7: if fitness[blockId][rival] < fitness[blockId][winner] do |

8: winner = rival |

9: end |

10: end |

11: survive[blockId][threadId] = winner |

#### 3.3. Our Improved Strategy

Algorithm 3: Our Improved Strategy |

Data: |

round: number of tournaments that are conducted |

population: number of chromosomes that are in an island |

Input: |

survive; fitness |

Function: |

clock(): access system time from GPU |

rand_initiate(): initiate the state of random number generator |

rand_generate(): generate a random number using the state of generator |

Result: |

Chromosomes are randomly picked, and conduct a series of tournament. |

Parallel: |

1: tseed = clock() + blockId * population + threadId |

2: offset = 0 |

3: rand_initiate(tseed, offset, state) |

4: winner = 0 |

5: for i = 1 to i = round do |

6: rival = rand_generate(state) mod population |

7: if fitness[blockId][rival] < fitness[blockId][winner] do |

8: winner = rival |

9: end |

10: end |

11: survive[blockId][threadId] = winner |

## 4. Performance Evaluations

#### 4.1. Tested Platform

#### 4.2. Evalutions of Parallel Tournament Selection

#### 4.3. Evaluations of Quality Improvement

#### 4.3.1. Influence of the Number of Islands

#### 4.3.2. Influence of the Number of Iterations

#### 4.3.3. Influence of the Number of Chromosomes Per Island

#### 4.3.4. Effect of Combining Suggested Parameter Settings

## 5. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Wang, M.J.; Hu, M.H.; Ku, M.Y. A solution to the unequal area facilities layout problem by genetic algorithm. Comput. Ind.
**2005**, 56, 207–220. [Google Scholar] [CrossRef] - Scholz, D.; Petrick, A.; Domschke, W. STaTS: A slicing tree and tabu search based heuristic for the unequal area facility layout problem. Eur. J. Oper. Res.
**2009**, 197, 166–178. [Google Scholar] [CrossRef] - Wong, K.Y. Solving facility layout problems using Flexible Bay Structure representation and Ant System algorithm. Expert Syst. Appl.
**2010**, 37, 5523–5527. [Google Scholar] [CrossRef] - Kulturel-Konak, S.; Konak, A. Unequal area flexible bay facility layout using ant colony optimisation. Int. J. Prod. Res.
**2011**, 49, 1877–1902. [Google Scholar] [CrossRef] - Xiao, Y.J.; Zheng, Y.; Zhang, L.M.; Kuo, Y.H. A combined zone-LP and simulated annealing algorithm for unequal-area facility layout problem. Adv. Prod. Eng. Manage.
**2016**, 11, 259. [Google Scholar] [CrossRef] - Holland, J.H. Adaptation in Natural and Artificial Systems: An Introductory Analysis with Application to Biology, Control, and Artificial Intelligence; University of Michigan Press: Ann Arbor, MI, USA, 1975. [Google Scholar]
- Kenneth, A.D.J. An analysis of the behavior of a class of genetic adaptive systems. Ph.D. Thesis, University of Michigan, Ann Arbor, MI, USA, 1975. [Google Scholar]
- Darwin, C. The Origin of Species by Means of Natural Selection, or, the Preservation of Favoured Races in the Struggle for Life; with a Foreward by George Gaylord Simpson; Collier Books: New York, NY, USA, 1962. [Google Scholar]
- Khuda Bux, N.; Lu, M.; Wang, J.; Hussain, S.; Aljeroudi, Y. Efficient association rules hiding using genetic algorithms. Symmetry
**2018**, 10, 576. [Google Scholar] [CrossRef] - Goldberg, D.E.; Holland, J.H. Genetic algorithms and machine learning. Mach. Learn.
**1989**, 3, 95–99. [Google Scholar] [CrossRef] - Ijjina, E.P.; Chalavadi, K.M. Human action recognition using genetic algorithms and convolutional neural networks. Pattern Recognit.
**2016**, 59, 199–212. [Google Scholar] [CrossRef] - Montazeri, A.; West, C.; Monk, S.D.; Taylor, C.J. Dynamic modelling and parameter estimation of a hydraulic robot manipulator using a multi-objective genetic algorithm. Int. J. Control
**2017**, 90, 661–683. [Google Scholar] [CrossRef] - Shin, H.; Joo, C.; Koo, J. Optimal rehabilitation model for water pipeline systems with genetic algorithm. Procedia Eng.
**2016**, 154, 384–390. [Google Scholar] [CrossRef] - Deng, Q.; Gong, G.; Gong, X.; Zhang, L.; Liu, W.; Ren, Q. A bee evolutionary guiding nondominated sorting genetic Algorithm II for multiobjective flexible Job-shop scheduling. Comput. Intell. Neurosci.
**2017**, 2017. [Google Scholar] [CrossRef] [PubMed] - Alshamsi, A.; Diabat, A. a genetic algorithm for reverse logistics network design: A case study from the GCC. J. Clean. Prod.
**2017**, 151, 652–669. [Google Scholar] [CrossRef] - RazaviAlavi, S.; AbouRizk, S. Site layout and construction plan optimization using an integrated genetic algorithm simulation framework. J. Comput. Civil Eng.
**2017**, 31, 04017011. [Google Scholar] [CrossRef] - Szénási, S.; Vámossy, Z. Implementation of a distributed genetic algorithm for parameter optimization in a cell nuclei detection project. Acta Polytech. Hung.
**2013**, 10, 59–86. [Google Scholar] - Szénási, S.; Felde, I. Configuring genetic algorithm to solve the inverse heat conduction problem. In Proceedings of the 2017 IEEE 15th International Symposium on Applied Machine Intelligence and Informatics (SAMI 2017), Herlany, Slovakia, 26–28 January 2017. [Google Scholar]
- Pospichal, P.; Jaros, J.; Schwarz, J. Parallel Genetic Algorithm on the CUDA Architecture. In Applications of Evolutionary Computation; Springer: Berlin, Germany, 2010; pp. 442–451. [Google Scholar]
- Palomo-Romero, J.M.; Salas-Morera, L.; García-Hernández, L. An island model genetic algorithm for unequal area facility layout problems. Expert Syst. Appl.
**2017**, 68, 151–162. [Google Scholar] [CrossRef] - Starkweather, T.; Mcdaniel, S.; Whitley, D.; Mathias, K.; Whitley, D.; Dept, M.E. A comparison of genetic sequencing operators. In Proceedings of the Fourth International Conference on Genetic Algorithms, San Diego, CA, USA, 7–11 July 1991; pp. 69–76. [Google Scholar]
- Meller, R.D.; Gau, K.Y. The facility layout problem: Recent and emerging trends and perspectives. J. Manuf. Syst.
**1996**, 15, 351–366. [Google Scholar] [CrossRef] - Tompkins, J.A.; White, J.A.; Bozer, Y.A.; Tanchoco, J.M.A. Facilities Planning; John Wiley &Sons: New York, NY, USA, 2010. [Google Scholar]
- Garey, M.R.; Johnson, D.S.; Stockmeyer, L. Some simplified NP-complete graph problems. Theor. Comput. Sci.
**1976**, 1, 237–267. [Google Scholar] [CrossRef] [Green Version] - Hasda, R.K.; Bhattacharjya, R.K.; Bennis, F. Modified genetic algorithms for solving facility layout problems. Int. J. Interact. Des. Manuf.
**2017**, 11, 713–725. [Google Scholar] [CrossRef] - Leno, I.J.; Sankar, S.S.; Ponnambalam, S.G. An elitist strategy genetic algorithm using simulated annealing algorithm as local search for facility layout design. Int. J. Adv. Manuf. Tech.
**2016**, 84, 787–799. [Google Scholar] - Paes, F.G.; Pessoa, A.A.; Vidal, T. A hybrid genetic algorithm with decomposition phases for the unequal area facility layout problem. Eur. J. Oper. Res.
**2017**, 256, 742–756. [Google Scholar] [CrossRef] - Derakhshan, A.A.; Wong, K.Y.; Tiwari, M.K. Unequal-area stochastic facility layout problems: Solutions using improved covariance matrix adaptation evolution strategy, particle swarm optimisation, and genetic algorithm. Int. J. Prod. Res.
**2016**, 54, 799–823. [Google Scholar] [CrossRef] - García-Hernández, L.; Pierreval, H.; Salas-Morera, L.; Arauzo-Azofra, A. Handling qualitative aspects in unequal area facility layout problem: An interactive genetic algorithm. Appl. Soft Comput.
**2013**, 13, 1718–1727. [Google Scholar] [CrossRef] - Gonçalves, J.F.; Resende, M.G. A biased random-key genetic algorithm for the unequal area facility layout problem. Eur. J. Oper. Res.
**2015**, 246, 86–107. [Google Scholar] [CrossRef] - Szénási, S. Segmentation of colon tissue sample images using multiple graphics accelerators. Comput. Biol. Med.
**2014**, 51, 93–103. [Google Scholar] [CrossRef] [PubMed] - Sun, X.; Lai, L.F.; Chou, P.; Chen, L.R.; Wu, C.C. On GPU implementation of the island model genetic algorithm for solving the unequal area facility layout problem. Appl. Sci.
**2018**, 8, 1604. [Google Scholar] [CrossRef] - Melab, N.; Talbi, E.G. GPU-based island model for evolutionary algorithms. In Proceedings of the 12th Annual Conference on Genetic and Evolutionary Computation, Porland, OR, USA, 7–11 July 2010. [Google Scholar]
- Limmer, S.; Fey, D. Comparison of common parallel architectures for the execution of the island model and the global parallelization of evolutionary algorithms. Concur. Comput. Pract. Exp.
**2016**, 29, e3797. [Google Scholar] [CrossRef] - Tong, X. SECOT: A sequential Construction Technique for Facility Design. Ph.D. Thesis, University of Pittsburg, Pittsburgh, PA, USA, 1991. [Google Scholar]
- Bonelli, F.; Tuttafesta, M.; Colonna, G.; Cutrone, L.; Pascazio, G. An MPI-CUDA approach for hypersonic flows with detailed state-to-state air kinetics using a GPU cluster. Comput. Phys. Commun.
**2017**, 219, 178–195. [Google Scholar] [CrossRef] - Han, T.D.; Abdelrahman, T.S. Reducing branch divergence in GPU programs. In Proceedings of the Fourth Workshop on General Purpose Processing on Graphics Processing Units, Newport Beach, CA, USA, 5 March 2011. [Google Scholar]
- Jachym, M.; Lavernhe, S.; Euzenat, C.; Tournier, C. Effective NC machining simulation with OptiX ray tracing engine. Vis. Comput.
**2018**, 1–8. [Google Scholar] [CrossRef] - Li, C.C.; Lin, C.H.; Liu, J.C. Parallel genetic algorithms on the graphics processing units using island model and simulated annealing. Adv. Mech. Eng.
**2017**, 9, 1687814017707413. [Google Scholar] [CrossRef] - NVIDIA. Whitepaper NVIDIA GeForce GTX 980. 2014. Available online: http://international.download.nvidia.com/geforce-com/international/pdfs/GeForce_GTX_980_Whitepaper_FINAL.PDF (accessed on 11 August 2018).
- Whitley, D.; Rana, S.; Heckendorn, R. B. Island model genetic algorithms and linearly separable problems. In AISB International Workshop on Evolutionary Computing; Springer: Berlin, Germany, 1997. [Google Scholar]

**Figure 2.**FBS codes for the example in Figure 1.

**Figure 4.**CUDA memories and hierarchy model [38].

Intel Xeon CPU E5-2609 v3 | GTX 980 | ||
---|---|---|---|

Number of Cores | 6 | Number of GPUs | 1 |

Number of Threads | 6 | Thread Processors | 2048 |

Clock Speed | 1.9 GHz | Clock Speed | 1127 MHz |

Memory Size | 16 GB | Memory Size | 4 GB |

Memory Type | DDR4 | Memory Type | GDDR5 |

No. | Problem Data Set | Number of Facilities | Facility Size | Common Shape Constraint | Distance Measure | |
---|---|---|---|---|---|---|

Width Length | ||||||

1 | F40 | 40 | 45.00 | 45.00 | α = 1000 | Rectilinear |

2 | F60 | 60 | 45.00 | 45.00 | α = 1000 | Rectilinear |

3 | F80 | 80 | 45.00 | 45.00 | α = 1000 | Rectilinear |

4 | F100 | 100 | 45.00 | 45.00 | α = 1000 | Rectilinear |

5 | F120 | 120 | 45.00 | 45.00 | α = 1000 | Rectilinear |

Parameter | Value |
---|---|

Total population size per island (n) | 32, 64, 128, 256, 512,1024 |

Number of islands (N) | 16, 32, 64, 128, 256 |

Cycle generations (c) | 64, 128, 256, 512, 1024, 2048, 4096, 8192 |

Migration rate (m) | 5 |

Migration frequency (g) | 15 |

Crossover probability (p_{c}) | 0.7 |

Mutation probability (p_{m}) | 0.01 |

Benchmark | NQ | NT | QTR |
---|---|---|---|

40 | 1.0097 | 0.2390 | 2.0788 |

60 | 1.0266 | 0.0752 | 3.7712 |

80 | 1.0020 | 0.0518 | 4.2739 |

100 | 1.0332 | 0.0410 | 4.6543 |

120 | 1.0316 | 0.0350 | 4.8822 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Sun, X.; Chou, P.; Wu, C.-C.; Chen, L.-R.
Quality-Oriented Study on Mapping Island Model Genetic Algorithm onto CUDA GPU. *Symmetry* **2019**, *11*, 318.
https://doi.org/10.3390/sym11030318

**AMA Style**

Sun X, Chou P, Wu C-C, Chen L-R.
Quality-Oriented Study on Mapping Island Model Genetic Algorithm onto CUDA GPU. *Symmetry*. 2019; 11(3):318.
https://doi.org/10.3390/sym11030318

**Chicago/Turabian Style**

Sun, Xue, Ping Chou, Chao-Chin Wu, and Liang-Rui Chen.
2019. "Quality-Oriented Study on Mapping Island Model Genetic Algorithm onto CUDA GPU" *Symmetry* 11, no. 3: 318.
https://doi.org/10.3390/sym11030318