# An Improved Genetic Algorithm with Adaptive Variable Neighborhood Search for FJSP

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Mathematical Model of FJSP

_{i}, 1 ≤ k ≤ m) is predefined. The optimization goal of FJSP is to select the machine M

_{k}from the machine set M

_{i,j}for each operation O

_{i,j}, and determine the start time st

_{i,j}and completion time ft

_{i,j}of each operation, and minimize the completion time of all machines, see the Equation (1).

- All machines are available at time 0, and each operation can be processed at time 0;
- At a certain time, one operation can only be processed by one machine at a time. Once the operation is completed, the machine can be used in other operations;
- Once the processing begins, it cannot be interrupted;
- There are no successive constraints on the operations of different jobs, and there are successive constraints between the operations of the same job;
- The setting time of the machine and the transportation time of the operation are negligible;
- There are no emergencies (such as machine failures, new orders, etc.).

## 3. Flow of the IGA-AVNS

## 4. IGA-AVNS

#### 4.1. Encoding and Decoding

#### 4.2. Population Initialization

#### 4.3. Improved Genetic Operation

#### 4.3.1. Selection

#### 4.3.2. Crossover

#### 4.3.3. Mutation

#### 4.4. Adaptive Variable Neighborhood Search

#### 4.4.1. Neighborhood Structure

- Randomly generate s random numbers, s ∈ [1, M], and M is the total number of operations;
- Randomly select s positions from the chromosome MA;
- For each corresponding process of s, select the machine with the shortest processing time from its optional machine set to replace it, and evaluate the new solution. If the machine with the minimum time has been selected, select the machine with the second shortest machining time.

- Randomly generate two operations ${J}_{1}$ and ${J}_{2}$, let the number of ${J}_{1}$ < the number of ${J}_{2}$, and record the positions of ${J}_{1}$ and ${J}_{2}$ in the OS, respectively;
- Place each operation of ${J}_{1}$ at the positions corresponding to ${J}_{2}$ from left to right, and place each operation of ${J}_{2}$ in the remaining positions.

- Select t random positions, t ≤ total number of operations;
- Reverse the genes at the t positions in the original OS and reinsert them into the same positions of the new solution.

#### 4.4.2. Flow of Adaptive Variable Neighborhood Search Algorithm

## 5. Simulation and Analysis

## 6. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Huang, S.; Tian, N.; Wang, Y.; JI, Z.C. Multi-objective flexible job-shop scheduling problem using modified discrete particle swarm optimization. SpringerPlus
**2016**, 5, 1432–1453. [Google Scholar] [CrossRef] [PubMed] - Ning, T.; GUO, C.; Chen, R. A Novel Hybrid Method for Solving Flexible Job-Shop Scheduling Problem. Open Cybern. Syst. J.
**2016**, 10, 13–19. [Google Scholar] [CrossRef] - Vilcot, G.; Billaut, J.C.; Esswein, C. A Genetic Algorithm for a Bicriteria Flexible Job Shop Scheduling Problem. In Proceedings of the 2006 International Conference on Service Systems and Service Management, Troyes, France, 25–27 October 2006; Volume 2, pp. 1240–1244. [Google Scholar]
- Shivasankaran, N.; Senthilkumar, P.; Raja, K.V. Hybrid Non-dominated Sorting Simulated Annealing Algorithm for Flexible Job Shop Scheduling Problems. In ICT and Critical Infrastructure: Proceedings of the 48th Annual Convention of CSI; Satapathy, S.C., Ed.; Springer International Publishing: Cham, Switzerland, 2014; Volume I, pp. 101–107. [Google Scholar]
- Nouri, H.E.; Driss, O.B.; Ghédira, K. Solving the flexible job shop problem by hybrid metaheuristics-based multiagent model. J. Ind. Eng. Int.
**2017**, 14, 1–14. [Google Scholar] [CrossRef] - Zhao, S.K. Bilevel Neighborhood Search Hybrid Algorithm for the Flexible Job Shop Scheduling Problem. J. Mech. Eng.
**2015**, 51, 175–184. [Google Scholar] [CrossRef] - Driss, I.; Mouss, K.N.; Laggoun, A. A new genetic algorithm for flexible job-shop scheduling problems. J. Mech. Sci. Technol.
**2015**, 29, 1273–1281. [Google Scholar] [CrossRef] - Chang, H.C.; Liu, T.K. Optimization of distributed manufacturing flexible job shop scheduling by using hybrid genetic algorithms. J. Intell. Manuf.
**2017**, 18, 1973–1986. [Google Scholar] [CrossRef] - Yi, W.C.; Li, X.Y. Solving flexible job shop scheduling using an effective memetic algorithm. IJCAT
**2016**, 53, 157–163. [Google Scholar] [CrossRef] - Wang, C.; Tian, N.; Cheng, J.Z.; Wang, Y. A hybrid evolutionary algorithm for flexible job shop scheduling problems. In Proceedings of the 35th Chinese Control Conference, Chengdu, China, 27–29 July 2016. [Google Scholar]
- Li, X.; Gao, L. An effective hybrid genetic algorithm and tabu search for flexible job shop scheduling problem. Int. J. Prod. Econ.
**2016**, 174, 93–110. [Google Scholar] [CrossRef] - Nenad, M.; Pierre, H. Variable neighborhood search. Comput. Oper. Res.
**1997**, 24, 1097–1100. [Google Scholar] - Manerba, D.; Mansini, R. An effective matheuristic for the capacitated total quantity discount problem. Comput. Oper. Res.
**2014**, 41, 1–11. [Google Scholar] [CrossRef] - Iris, Ç.; Pacino, D.; Ropke, S. Improved formulations and an Adaptive Large Neighborhood Search heuristic for the integrated berth allocation and quay crane assignment problem. Transp. Res. Part E
**2017**, 105, 123–147. [Google Scholar] [CrossRef] - Li, J.Q.; Pan, Q.K.; Suganthan, P.N.; Chua, T.J. A hybrid tabu search algorithm with an efficient neighborhood structure for the flexible job shop scheduling problem. Int. J. Adv. Manuf. Technol.
**2011**, 52, 683–697. [Google Scholar] [CrossRef] - Kacem, I.; Hammadi, S.; Borne, P. Pareto-optimality approach for flexible job-shop scheduling problems: Hybridization of evolutionary algorithms and fuzzy logic. Math. Comput. Simul.
**2002**, 60, 245–276. [Google Scholar] [CrossRef] - Pezzella, F.; Morganti, G.; Ciaschetti, G. A genetic algorithm for the Flexible Job-shop Scheduling Problem. Comput. Oper. Res.
**2008**, 35, 3202–3212. [Google Scholar] [CrossRef] - Gao, L.; Zhang, G.H.; Wang, X.J. Flexible Job Shop Scheduling Algorithm and Its Application; Huazhong University of Science and Technology Press: Wuhan, China, 2012; pp. 35–38. [Google Scholar]
- Zhang, G.H.; Zhang, L.J.; Song, X.H.; Wang, Y.C.; Zhou, C. A variable neighborhood search based genetic algorithm for flexible job shop scheduling problem. Clust. Comput.
**2018**. [Google Scholar] [CrossRef] - Yazdani, M.; Amiri, M.; Zandieh, M. Flexible job-shop scheduling with parallel variable neighborhood search algorithm. Expert Syst. Appl.
**2010**, 37, 678–687. [Google Scholar] [CrossRef] - Lei, D.M.; Guo, X.P. Variable Neighbourhood Search for dual-resource constrained flexible job shop scheduling. Int. J. Prod. Res.
**2014**, 52, 2519–2529. [Google Scholar] [CrossRef] - Cui, Q.; Wu, X.L.; Yu, J.J. Improved genetic algorithm variable neighborhood search for solving hybrid flew shop scheduling problem. Comput. Integr. Manuf. Syst.
**2017**, 23, 1917–1927. [Google Scholar] - Xia, W.J.; Wu, Z.M. An Effective Hybrid Optimization Approach for Multi-objective Flexible Job-shop Scheduling Problems. Comput. Ind. Eng.
**2005**, 48, 409–425. [Google Scholar] [CrossRef] - Palacios, J.J.; González, M.A.; Vela, C.R.; González-Rodríguez, I.; Puente, J. Genetic tabu search for the fuzzy flexible job shop problem. Comput. Oper. Res.
**2015**, 54, 74–89. [Google Scholar] [CrossRef] - Amiri, M.; Zandieh, M.; Yazdani, M.; Bagheri, A. A variable neighborhood search algorithm for the flexible job-shop scheduling problem. Int. J. Prod. Res.
**2010**, 48, 5671–5689. [Google Scholar] [CrossRef] - Mohsen, Z. A heuristic algorithm for solving flexible job shop scheduling problem. Int. J. Adv. Manuf. Technol.
**2014**, 71, 519–528. [Google Scholar] - Flexible Job Shop Problem. Available online: http://www.idsia.ch/~monaldo/fjsp.html (accessed on 10 October 2019).

**Figure 1.**Flow chart of improved genetic algorithm with adaptive variable neighborhood search (IGA-AVNS). GA: genetic algorithm.

**Figure 4.**The processing of the global selection by operation (GSO). ML: machine load; OT: order time; TT: temporary time.

**Figure 6.**Gantt chart of the best heuristic solution: (

**a**) is the 8 × 8 problem from Kacem; (

**b**) is MK01 from BRdata.

Jobs | Operation | ${\mathit{M}}_{1}$ | ${\mathit{M}}_{2}$ | ${\mathit{M}}_{3}$ | ${\mathit{M}}_{4}$ |
---|---|---|---|---|---|

${J}_{1}$ | ${O}_{1,1}$ | 2 | 999 | 3 | 999 |

${O}_{1,2}$ | 5 | 999 | 999 | 2 | |

${O}_{1,3}$ | 999 | 3 | 4 | 1 | |

${J}_{2}$ | ${O}_{2,1}$ | 7 | 3 | 9 | 999 |

${O}_{2,2}$ | 3 | 1 | 999 | 6 |

**Table 2.**Comparison with other algorithms on flexible job-shop scheduling problems (FJSPs) from the Kacem data.

n × m | Kacem | Xia | HGTS | PVNS | Heuristic | IGA-AVNS |
---|---|---|---|---|---|---|

8 × 8 | 15 | 15 | 14 | 14 | 15 | 14 |

10 × 10 | 7 | 7 | 7 | 7 | 7 | 7 |

15 × 15 | 24 | 12 | 11 | 12 | 12 | 11 |

Problem | n × m | L | LB | IGA-AVNS | ||||
---|---|---|---|---|---|---|---|---|

Populations | Iterations | x* | Av(x*) | $\mathit{d}\mathit{e}{\mathit{v}}_{1}(\%)$ | ||||

MK01 | 10 × 6 | 55 | 36 | 60 | 600 | 40 | 40.1 | 11 |

MK02 | 10 × 6 | 58 | 24 | 60 | 600 | 26 | 27.2 | 8.3 |

MK03 | 15 × 8 | 150 | 204 | 120 | 1200 | 204 | 204 | 0 |

MK04 | 15 × 8 | 90 | 48 | 120 | 1200 | 60 | 61.8 | 25 |

MK05 | 15 × 4 | 106 | 168 | 60 | 600 | 173 | 175.2 | 2.9 |

MK06 | 10 × 15 | 150 | 33 | 150 | 1500 | 60 | 60.08 | 81.8 |

MK07 | 20 × 5 | 100 | 133 | 100 | 1000 | 144 | 144.5 | 8.3 |

MK08 | 20 × 10 | 225 | 523 | 200 | 2000 | 523 | 523 | 0 |

MK09 | 20 × 10 | 240 | 299 | 200 | 2000 | 307 | 307 | 2.7 |

MK10 | 20 × 15 | 240 | 165 | 300 | 3000 | 208 | 209.9 | 26 |

Problem | n × m | LB | GA | GATS + HM | HEA | NGA | IGA-AVNS | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|

${\mathit{C}}_{\mathit{m}}$ | $\mathit{d}\mathit{e}{\mathit{v}}_{2}(\%)$ | ${\mathit{C}}_{\mathit{m}}$ | $\mathbf{Av}\left({\mathit{C}}_{\mathit{m}}\right)$ | $\mathit{d}\mathit{e}{\mathit{v}}_{2}(\%)$ | ${\mathit{C}}_{\mathit{m}}$ | $\mathit{d}\mathit{e}{\mathit{v}}_{2}(\%)$ | ${\mathit{C}}_{\mathit{m}}$ | $\mathit{d}\mathit{e}{\mathit{v}}_{2}(\%)$ | x* | Av(x*) | |||

MK01 | 10 × 6 | 36 | 40 | 0 | 40 | 40.8 | 0 | 40 | 0 | 37 | 7.5 | 40 | 40.1 |

MK02 | 10 × 6 | 24 | 26 | 0 | 27 | 27.8 | –3.8 | 27 | –3.8 | 26 | 0 | 26 | 27.2 |

MK03 | 15 × 8 | 204 | 204 | 0 | 204 | 204.0 | 0 | 204 | 0 | 204 | 0 | 204 | 204 |

MK04 | 15 × 8 | 48 | 60 | 0 | 64 | 65.6 | –6.7 | 60 | 0 | 60 | 0 | 60 | 61.8 |

MK05 | 15 × 4 | 168 | 173 | 0 | 173 | 174.8 | 0 | 173 | 0 | 173 | 0 | 173 | 175.2 |

MK06 | 10 × 15 | 33 | 63 | –5 | 65 | 67.0 | –8.3 | 59 | 1.7 | 67 | –11.7 | 60 | 60.08 |

MK07 | 20 × 5 | 133 | 139 | 3.47 | 144 | 144.0 | 0 | 144 | 0 | 148 | –2.8 | 144 | 144.5 |

MK08 | 20 × 10 | 523 | 523 | 0 | 523 | 523.0 | 0 | 523 | 0 | 523 | 0 | 523 | 523 |

MK09 | 20 × 10 | 299 | 311 | 0 | 311 | 311.8 | –1.3 | 307 | 0 | 307 | 0 | 307 | 307 |

MK10 | 20 × 15 | 165 | 212 | –1.3 | 222 | 224.8 | –6.7 | 209 | –0.48 | 212 | –1.9 | 208 | 209.9 |

Problem | n × m | LB | GATS + HM | IGA-AVNS | |||
---|---|---|---|---|---|---|---|

x* | $\mathit{d}\mathit{e}{\mathit{v}}_{1}(\%)$ | x* | $\mathit{d}\mathit{e}{\mathit{v}}_{1}(\%)$ | $\mathit{d}\mathit{e}{\mathit{v}}_{2}(\%)$ | |||

mt10c1 | 10 × 11 | 655 | 927 | 41.5 | 927 | 41.5 | 0 |

mt10cc | 10 × 12 | 655 | 917 | 40.0 | 908 | 38.6 | −0.99 |

mt10x | 10 × 11 | 655 | 923 | 40.9 | 918 | 40.2 | −0.5 |

mt10xx | 10 × 12 | 655 | 918 | 40.2 | 918 | 40.2 | 0 |

mt10xxx | 10 × 13 | 655 | 918 | 40.2 | 918 | 40.2 | 0 |

mt10xy | 10 × 12 | 655 | 908 | 38.6 | 905 | 38.2 | −0.3 |

mt10xyz | 10 × 13 | 655 | 868 | 32.5 | 868 | 32.5 | 0 |

setb4c9 | 15 × 11 | 857 | 927 | 8.2 | 914 | 6.7 | −1.42 |

setb4cc | 15 × 12 | 857 | 938 | 9.5 | 944 | 10.2 | 0.6 |

setb4x | 15 × 11 | 846 | 944 | 11.6 | 926 | 9.5 | −1.9 |

setb4xx | 15 × 12 | 846 | 942 | 11.3 | 926 | 9.5 | −1.7 |

setb4xxx | 15 × 13 | 846 | 949 | 12.2 | 926 | 9.5 | −2.42 |

setb4xy | 15 × 12 | 845 | 931 | 10.2 | 938 | 11.0 | 0.75 |

setb4xyz | 15 × 13 | 838 | 926 | 10.5 | 926 | 10.5 | 0 |

© 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**

Gu, X.; Huang, M.; Liang, X.
An Improved Genetic Algorithm with Adaptive Variable Neighborhood Search for FJSP. *Algorithms* **2019**, *12*, 243.
https://doi.org/10.3390/a12110243

**AMA Style**

Gu X, Huang M, Liang X.
An Improved Genetic Algorithm with Adaptive Variable Neighborhood Search for FJSP. *Algorithms*. 2019; 12(11):243.
https://doi.org/10.3390/a12110243

**Chicago/Turabian Style**

Gu, Xiaolin, Ming Huang, and Xu Liang.
2019. "An Improved Genetic Algorithm with Adaptive Variable Neighborhood Search for FJSP" *Algorithms* 12, no. 11: 243.
https://doi.org/10.3390/a12110243