Parallel Hybrid Particle Swarm Algorithm for Workshop Scheduling Based on Spark
Abstract
:1. Introduction
2. Problem Description and Modeling
- (1)
- At the beginning, all equipment and assembly stations are ready to perform production tasks at any time.
- (2)
- Different types of parts can be produced in the workshop and the sequence, processing machine and time in the production process of the parts are known.
- (3)
- The assembly time of different types of parts and products at the stations on the assembly line is known.
- (4)
- The process time of the same type of products, components and parts on the machine and the workstation is the same.
- (5)
- In the job shop, only the processes of the same part have process constraints and there are no process constraints between different parts.
- (6)
- The process time of the process includes the preparation time and transportation time of the process.
- (7)
- The parts-process workshop processes a batch of parts for the components-assembly workshop and the product-assembly workshop; or the parts-assembly workshop processes certain parts for the assembly station of the product-assembly workshop. Moreover, if the assembly station does not need more, then these parts or components are temporarily stored in the buffer zone. Ignore the delivery time.
3. Parallelized Hybrid Particle Swarm Algorithm Based on Spark
3.1. Parallel Hybrid Particle Swarm Algorithm
Algorithm 1. Hybrid Particle Swarm Algorithm | |
1 | *Initialization*/ |
2 | Generate N random workpiece sequences in each workshop according to the number of input products; solve the objective function value k after the crossover operation, according to Equations (2)–(6); max_iter is the maximum number of iterations; i corresponds to each particle population; ii corresponds to the number of iterations. |
3 | Set initial values for: max_ iter, N; i, ii |
4 | Initialize and solve the particle swarm’s own optimal m and global optimal value n according to the default order of the workpiece; |
5 | for ii in rang(max_iter): |
/*The particles and the global optimal particles are cross-operated*/ | |
6 | for i in rang(N): |
7 | Cross operation between each particle and the global optimal particle; |
8 | Update N; |
9 | Solve the objective function after crossover: k = fitness(N); |
10 | Output the optimal new_n value of the most global particle swarm; its own optimal value new_m |
/*Update m, n*/ | |
11 | If new_n < n then n = new_n; If new_m < m then m = new_m; |
13 | end for |
/*The particle and its own optimal history particle perform cross operation*/ | |
14 | for i in rang(N): |
15 | Each particle crosses with its own optimal history particle |
16 | Update N; |
17 | Solve the objective function after crossover: k = fitness(N); |
18 | Output the optimal new_n value of the most global particle swarm; its own optimal value new_m |
/*Update m, n*/ | |
19 | If new_n < n then n = new_n; If new_m < m then m = new_m; |
20 | end for |
/*Single-site mutation for each particle swarm */ | |
21 | for i in rang(N): |
22 | Random single-site mutations for each particle swarm; |
23 | Update N; |
24 | Calculate the objective function value after mutation: k = fitness(N); |
25 | Output the optimal new_n value of the most global particle swarm; its own optimal value new_m |
/*Update m, n*/ | |
26 | If new_n < n then n = new_n; If new_m < m then m = new_m; |
27 | end for |
28 | end for |
29 | /*Output*/ |
30 | Output the global optimal k and corresponding N workpiece production sequencing |
3.2. Detailed Design of the Algorithm
3.2.1. Coding Scheme Design
3.2.2. Crossover and Mutation
3.2.3. Parallelization of Hybrid Particle Swarm Algorithm
4. Instance Verification
4.1. Examples of Mixed Mixed-Flow Workshop Scheduling
4.2. Computing Performance
4.3. Results Discussion
5. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Lefkowitz, I.; Schoeffler, J.D. Multilevel control structures for three discrete manufacturing processes. IFAC Proc. Vol. 1972, 5, 96–103. [Google Scholar] [CrossRef]
- Djellab, H.; Djellab, K. Preemptive hybrid flowshop scheduling problem of interval orders. Eur. J. Oper. Res. 2002, 137, 37–49. [Google Scholar] [CrossRef]
- Bolat, A.; Al-Harkan, I.; Al-Harbi, B. Flow-shop scheduling for three serial stations with the last two duplicate. Comput. Oper. Res. 2005, 32, 647–667. [Google Scholar] [CrossRef]
- Guirchoun, S.; Martineau, P.; Billaut, J.C. Total completion time minimization in a computer system with a server and two parallel processors. Comput. Oper. Res. 2005, 32, 599–611. [Google Scholar] [CrossRef]
- Smutnicki, C. A two-machine permutation flow shop scheduling problem with buffers. Oper.-Res.-Spektrum 1998, 20, 229–235. [Google Scholar] [CrossRef]
- Wang, B.; Rao, Y.; Shao, X.; Xu, C. A MOGA-based Algorithm for Sequencing a Mixed-model Fabrication/Assembly System. Zhongguo Jixie Gongcheng/China Mech. Eng. 2009, 20, 1434–1438. [Google Scholar] [CrossRef]
- Seidgar, H.; Kiani, M.; Abedi, M.; Fazlollahtabar, H. An efficient imperialist competitive algorithm for scheduling in the two-stage assembly flow shop problem. Int. J. Prod. Res. 2014, 52, 1240–1256. [Google Scholar] [CrossRef]
- Na, H.; Park, J. Multi-level job scheduling in a flexible job shop environment. Int. J. Prod. Res. 2014, 52, 3877–3887. [Google Scholar] [CrossRef]
- Zhang, H.; Wu, Y.; Software, S.O. Single piece and small batch mixed-shop scheduling algorithm. China Sci. Pap. 2015, 10, 962–966. [Google Scholar]
- Komaki, G.M.; Teymourian, E.; Kayvanfar, V. Minimising makespan in the two-stage assembly hybrid flow shop scheduling problem using artificial immune systems. Int. J. Prod. Res. 2016, 54, 963–983. [Google Scholar] [CrossRef]
- Lou, G.; Cai, Z. Improved hybrid immune clonal selection genetic algorithm and its application in hybrid shop scheduling. Clust. Comput. 2018, 22, 3419–3429. [Google Scholar] [CrossRef]
- Hu, H.; Lu, J.; Li, Y. Study of mixed-model hybrid shop fuzzy scheduling problem based on multi-populations parallel genetic algorithm. J. Zhejiang Univ. Technol. 2012, 40, 554–558. [Google Scholar] [CrossRef]
- Li, X.; Lu, J.; Chai, G.; Tang, H.; Jiang, L. Hybrid Genetic Algorithm for Mixed-model Hybrid-shop Scheduling Problem. Zhongguo Jixie Gongcheng/China Mech. Eng. 2012, 23, 935–940. [Google Scholar] [CrossRef]
- Lu, J.; Hu, H.; Dong, Q. Game theory and particle swarm optimization for mixed-model hybrid-shop scheduling problem. J. Zhejiang Univ. Technol. 2015, 43, 398–404. [Google Scholar]
- Wang, M. Research on Multi-level Hybrid Workshop Integrated Scheduling Based on Immune Genetic Algorithm. Master’s Thesis, Lanzhou University of Technology, Lanzhou, China, 2020. [Google Scholar]
- Tang, H.; Ding, B.; Li, X.; Lu, J. Improved immune genetic algorithm for mixed-model scheduling problem. China Mech. Eng. 2014, 25, 1189. [Google Scholar] [CrossRef]
- Nasri, N.; Mnasri, S.; Val, T. 3D node deployment strategies prediction in wireless sensors network. Int. J. Electron. 2020, 107, 808–838. [Google Scholar] [CrossRef]
- Mnasri, S.; Nasri, N.; Val, T. The Deployment in the Wireless Sensor Networks: Methodologies, Recent Works and Applications. In Proceedings of the International Conference on Performance Evaluation and Modeling in Wired and Wireless Networks (PEMWN 2014), Sousse, Tunisia, 4–7 November 2014. [Google Scholar]
- Zhao, F.; Tang, J.; Wang, J.; Jonrinaldi, N.A. An improved particle swarm optimization with decline disturbance index (DDPSO) for multi-objective job-shop scheduling problem. Comput. Oper. Res. 2014, 45, 38–50. [Google Scholar] [CrossRef]
- Mansour, E.; Bassem, J.; Patrick, S. Combinatorial particle swarm optimization for solving blocking flowshop scheduling problem. J. Comput. Des. Eng. 2016, 3, 295–311. [Google Scholar] [CrossRef]
- Jamrus, T.; Chien, C.F.; Gen, M.; Sethanan, K. Hybrid particle swarm optimization combined with genetic operators for flexible job-shop scheduling under uncertain processing time for semiconductor manufacturing. IEEE Trans. Semicond. Manuf. 2017, 31, 32–41. [Google Scholar] [CrossRef]
- Zaharia, M.; Chowdhury, M.; Franklin, M.J.; Shenker, S.; Stoica, I. Spark: Cluster computing with working sets. HotCloud 2010, 10, 95. [Google Scholar]
- Dongfei, S.O.N.G.; Hua, X.U. Research and Parallelization of DBSCAN Algorithm. Comput. Eng. Appl. 2018, 54, 52–56. [Google Scholar]
- Qiu, R. The Parallel Design and Application of the CURE Algorithm Based on Spark Platform. Master’s Thesis, South China University of Technology, Guangzhou, China, 2014. [Google Scholar]
- Li, F. Parallel Programming of Particle Swarm Optimization Algorithm Based on Spark and Its Application in Reservoir Scheduling. Master’s Thesis, Xi’an University of Technology, Xi’an, China, 2017. [Google Scholar]
- Peng, A.; Peng, Y.; Zhou, H. Multi-core parallel computation for deriving joint operating rule curves in multi-reservoir system under the condition of inter-basin water transfer. J. Hydraul. Eng. China 2014, 45, 1284–1292. [Google Scholar] [CrossRef]
- Shi, Y. A Modified Particle Swarm Optimizer. In Proceedings of the 1998 IEEE International Conference on Evolutionary Computation Proceedings, Anchorage, AK, USA, 4–9 May 1998. [Google Scholar]
- Gu, X.; Huang, M.; Liang, X. An improved genetic algorithm with adaptive variable neighborhood search for FJSP. Algorithms 2019, 12, 243. [Google Scholar] [CrossRef] [Green Version]
Parts | Q1 | Q2 | Q3 | Q4 | X | Y |
---|---|---|---|---|---|---|
A | 1 | 1 | / | / | / | / |
B | / | / | 1 | 1 | / | / |
C | 1 | 1 | / | / | / | / |
D | / | / | 1 | 1 | / | / |
E | 1 | 1 | / | / | / | / |
F | / | / | 1 | 1 | / | / |
G | / | / | / | / | 1 | / |
H | / | / | / | / | / | 1 |
Component X | 1 | 1 | / | / | / | / |
Component Y | / | / | 1 | / | / | / |
Parts | ||||||||
---|---|---|---|---|---|---|---|---|
Machine | A | B | C | D | E | F | G | H |
M1 | 300.1 | 375.1 | 0 | 0 | 0 | 0 | 0 | 0 |
M2 | 375.2 | 450.2 | 0 | 0 | 0 | 0 | 0 | 0 |
M3 | 375.3 | 450.3 | 0 | 0 | 0 | 0 | 0 | 0 |
M4 | 0 | 0 | 450.1 | 450.1 | 0 | 0 | 450.1 | 525.1 |
M5 | 0 | 0 | 0 | 0 | 450.1 | 525.1 | 375.2 | 450.2 |
M6 | 0 | 0 | 525.2 | 525.2 | 0 | 0 | 0 | 0 |
M7 | 0 | 0 | 0 | 0 | 525.2 | 450.2 | 0 | 0 |
M8 | 0 | 0 | 375.3 | 375.3 | 375.3 | 375.3 | 0 | 0 |
M9 | 0 | 0 | 0 | 0 | 0 | 0 | 600.3 | 600.3 |
M10 | 0 | 0 | 375.4 | 375.4 | 600.4 | 600.4 | 0 | 0 |
Process | Component X | Component Y |
---|---|---|
1 | 147 | 126 |
2 | 126 | 147 |
3 | 126 | 168 |
4 | 105 | 105 |
5 | 157 | 168 |
6 | 126 | 105 |
7 | 168 | 168 |
8 | 147 | 126 |
9 | 147 | 168 |
Process | Q1 | Q2 | Q3 | Q4 |
---|---|---|---|---|
1 | 105 | 84 | 91 | 105 |
2 | 140 | 147 | 133 | 126 |
3 | 154 | 161 | 140 | 175 |
4 | 140 | 126 | 140 | 147 |
5 | 133 | 147 | 126 | 140 |
6 | 147 | 154 | 147 | 161 |
7 | 126 | 133 | 133 | 140 |
8 | 147 | 140 | 154 | 147 |
9 | 147 | 133 | 133 | 140 |
10 | 140 | 140 | 133 | 140 |
11 | 140 | 147 | 147 | 154 |
12 | 154 | 161 | 147 | 154 |
13 | 126 | 133 | 133 | 126 |
14 | 147 | 154 | 147 | 161 |
15 | 126 | 133 | 133 | 140 |
16 | 140 | 147 | 140 | 133 |
17 | 147 | 154 | 140 | 147 |
18 | 140 | 147 | 147 | 140 |
19 | 140 | 133 | 140 | 133 |
20 | 154 | 161 | 147 | 161 |
21 | 140 | 133 | 140 | 168 |
22 | 168 | 161 | 161 | 168 |
23 | 161 | 161 | 154 | 147 |
24 | 168 | 175 | 161 | 168 |
25 | 161 | 168 | 161 | 168 |
26 | 140 | 147 | 147 | 147 |
27 | 126 | 133 | 140 | 133 |
28 | 126 | 126 | 126 | 119 |
29 | 154 | 154 | 147 | 140 |
30 | 161 | 154 | 154 | 161 |
31 | 161 | 147 | 168 | 161 |
32 | 140 | 133 | 126 | 133 |
33 | 161 | 168 | 161 | 161 |
PHPSO | IA | PSO | |||||
---|---|---|---|---|---|---|---|
Cbest(/s) | Aver(/s) | Cbest(/s) | Aver(/s) | Cbest(/s) | Aver(/s) | dev1(%) | dev2(%) |
15,508 | 15,526.92 | 15,688 | 15,734.38 | 15,660 | 15,682.4 | −1.16 | −0.98 |
Algorithm | Workshop | Processing Time/s | Dev/% |
---|---|---|---|
Parts | 7500 | 0 | |
PHPSO | Component | 2247 | 0 |
Product | 5761 | 0 | |
Parts | 7650 | 2 | |
IA | Component | 2247 | 0 |
Product | 5782 | 0.36 | |
Parts | 7575 | 1 | |
PSO | Component | 2247 | 0 |
Product | 5838 | 1.34 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zheng, T.; Wang, J.; Cai, Y. Parallel Hybrid Particle Swarm Algorithm for Workshop Scheduling Based on Spark. Algorithms 2021, 14, 262. https://doi.org/10.3390/a14090262
Zheng T, Wang J, Cai Y. Parallel Hybrid Particle Swarm Algorithm for Workshop Scheduling Based on Spark. Algorithms. 2021; 14(9):262. https://doi.org/10.3390/a14090262
Chicago/Turabian StyleZheng, Tianhua, Jiabin Wang, and Yuxiang Cai. 2021. "Parallel Hybrid Particle Swarm Algorithm for Workshop Scheduling Based on Spark" Algorithms 14, no. 9: 262. https://doi.org/10.3390/a14090262
APA StyleZheng, T., Wang, J., & Cai, Y. (2021). Parallel Hybrid Particle Swarm Algorithm for Workshop Scheduling Based on Spark. Algorithms, 14(9), 262. https://doi.org/10.3390/a14090262