NSGA-II Algorithm and Application For Multi-Object
NSGA-II Algorithm and Application For Multi-Object
Abstract
Based on the study of multi-objective flexible workshop scheduling problem and the learning of traditional genetic
algorithm, a non-dominated sorting genetic algorithm is proposed to solve and optimize the scheduling model with the
objective functions of processing cycle, advance/delay penalty and processing cost. In the process of optimization, non-
dominated fast ranking operator and competition operator are used to select the descendant operator, which improves
the computational efficiency and optimization ability of the algorithm. Non-repetitive non-dominant solutions and
frontier sets are found in the iteration operation to retain the optimal results. Finally, taking a manufacturing workshop
as an example, the practicability of the proposed algorithm is verified by the simulation operation of the workshop
scheduling information and the comparison with other algorithms. The results show that the algorithm can obtain the
optimal solution more quickly than the unimproved algorithm. The improved algorithm is faster and more effective in
searching, and has certain feasibility in solving the job shop scheduling problem, which is more suitable for industrial
processing and production.
Keywords
Multi-objective, workshop scheduling, non-dominated sorting, genetic algorithm
Received 21 November 2019; revised 16 April 2020; accepted 22 June 2020
Introduction
lead the initial scheduling scheme to be nonoptimal
With the development of science and technology and and/or infeasible. Hence, appropriate dynamic resched-
the application and popularization of advanced uling approaches are needed to overcome the dynamic
manufacturing technology, manufacturing companies events. Therefore, the quality of the scheduling scheme
are also facing the pressure of survival such as labour is of great significance to the company’s revenue and to
costs, equipment replacement and the renewal of cope with the changing market environment.3,4
advanced manufacturing concepts. Many manufactur- Multi-objective flexible workshop scheduling is an
ing enterprises are committed to improving energy and extension of single-objective scheduling.5 In the flexible
material efficiencies. To achieve this goal, one of the workshop scheduling problem, each process in each
high-efficiency ways is to optimize the scheduling.1,2 component is not only fixed on one machine, different
Facing with the diversification of market demand and machines can be selected for processing according to
the renewal of processing technology, the production
and manufacturing models has also begun to change
towards convenience and flexibility. In real-world School of Machinery, North China University of Water Resources and
manufacturing systems, production scheduling systems Electric Power, Zhengzhou, China
are often implemented under random or dynamic
Corresponding author:
events like machine failure, unexpected processing Wang Yahui, School of Machinery, North China University of Water
times, stochastic arrival of the urgent orders, cancella- Resources and Electric Power, Zhengzhou 450045, China.
tion of the orders and so on. These dynamic events will Email: [email protected]
Creative Commons Non Commercial CC BY-NC: This article is distributed under the terms of the Creative Commons Attribution-
NonCommercial 4.0 License (https://creativecommons.org/licenses/by-nc/4.0/) which permits non-commercial use, reproduction and dis-
tribution of the work without further permission provided the original work is attributed as specified on the SAGE and Open Access pages (https://us.
sagepub.com/en-us/nam/open-access-at-sage).
2 Journal of Algorithms & Computational Technology
the specific circumstances, and the processing time of f1; 2 Kg Txyz is the processing time of process Mz
different machines is different, which is more flexible of workpiece Ny on machine Kx .
than traditional workshop scheduling.6 In order to simplify the problem model, it is
assumed that the machine is in the state to be processed
at time t ¼ 0 and the processing objects are executed
Description and model construction
according to the original plan and processed sequen-
of multi-objective flexible workshop tially, then the flexible job-shop scheduling problem
scheduling problem (FJSP) can obtain the following problems from the
above expression.
Description of the problem Fully flexible FJSP: For Vyz ,KFyz ¼ x, the process
Assuming that K machines in a workshop plan to pro- of the workpiece is not restricted by the machine, and
duce N workpieces, each workpiece needs more than the machine in the non-occupied state can satisfy its
one process M processing and the processing sequence working conditions, such as the process m11 in the work-
can only be arranged in sequence, also the machine piece N1 , the process m21 in the workpiece N2 , and the
equipment is intelligent equipment which can process process m31 and process m34 in the workpiece
N3 .
many processes. The process can select machinery and Partial flexible FJSP: for Vyz ,KFyz < x, the work-
equipment according to production needs, and the ing procedure is restricted by the machining conditions.
machine can only occupy once at the same time, besides Even if the machine is idle in the arrangement, the
that the workpiece can only be processed by one machine can only wait or reschedule because it does
machine at the same time. The processing time depends not meet the use performance, such as the process
on the performance of the selected equipment and the m12 in the workpiece N1 , the process m22 in the work-
complexity of the process.7 Multi-objective flexible job- piece N2 , and the process m32 and process m33 in the
shop scheduling involves mainly parallel processing workpiece N3 .
and multi-function machines.8 The machine can pro-
cess multiple processes without mutual interference. Optimized mathematical model construction
The machine has high adaptability and versatility,
Problem model construction.
and can be interchanged according to the needs in the
process of processing. For example, the process of 1. The objective function is established by taking the
the set workpiece is processed on the machine, and minimum period of the workpiece flow during proc-
the machine is processing other parts in an occupied essing as a measure
state within a predetermined time. At this time, the
replacement machine can also meet the processing needs.9 X
0 X
M X
N
A two-dimensional table is used to describe the flex- minf1 ¼ ðTomn tomn Þ (1)
ible scheduling problem as shown in Table 1. The infor- 0¼1 m¼1 m¼1
mation corresponding to the values in the table is that
the process of the workpiece can be processed on the 2. Based on the delivery date and the punctuality of
machine. ‘•’ means that the processing conditions are product production plan according to schedule is
not satisfied. If Vyz indicates that the machine Kx does used to measure the delay completion penalty or
not meet the process Mz conditions of the workpiece the early completion penalty to establish the objec-
Ny. For example, Vyz indicates that Kx does not meet tive function
the process Mz of the workpiece Ny. The implement-
able set of numbers for processing and production is X
M
expressed as KFyz, 1 x < K, 1 y < N0 1 z < M. minf2 ¼ rm1 maxð0; Komn dm Þ (2)
The process Mz in which the workpiece Ny is repre- m¼1
sented by Uyz can select the set numbers of feasible
solutions of the machining on the machine as Uyz
N1 m11 1 2 5 4
m12 1 3 1
N2 m21 2 2 4 1
m22 1 2
Wang et al. 3
X
M NSGA-II algorithm operation flow
minf3 ¼ rm2 maxð0; Komn dm Þ (3)
m¼1 For the multi-objective coexistence of workshop sched-
uling, the traditional standard genetic algorithm cannot
3. The objective function is established by taking the meet the needs of multi-objective constraints.
minimum processing cost as the measurement value Non-dominated sorting genetic algorithm (NSGA) is
proposed based on the needs of multi-objective con-
X
0 X
M X
N straints. NSGA is based on the theory of algorithm,
minf4 ¼ Uomn þ f2 þ f3 (4) which is the same as the recombination operator
0¼1 m¼1 m¼1 mechanism of the standard algorithm, except that the
selection operation factor is different. It only uses
where ‘m’ is the serial number of the workpiece, the non-dominated sorting stratification and fitness
m ¼ 1,2,3, . . ., m, ‘n’ is process number, n ¼ 1,2,3,. . .,n, value calculation for the population, and uses the
‘o’ is the serial number of the production machine, komn niche technology to determine the fitness to ensure
indicates that the process n of the workpiece m is proc- the distribution characteristics of the Pareto optimal
essed on the machine o. Uomn indicates the production solution set,10,11 and then performs algorithm opera-
cost of the process n of the workpiece m when it is tions. However, the computational complexity of
processed on the machine o. tomn indicates the starting NSGA is high and the non-deterministic elite retention
time when the workpiece m’s process n is machined on mechanism is limited in use. Based on its advantages,
the machine o. The processing time when the process n Srinivas and Deb proposed the NSGA-II algorithm.
is completed is indicated by tn. The processing time of The NSGA-II algorithm makes up for the shortcom-
the workpiece m is indicated on the machine o by Tomn . ings of NSGA in use and reduces the computational
The workpiece m delivery date is indicated by dm. The complexity. Instead of sharing radius share Q, the com-
penalty factor for the completion of the workpiece m parison operator of congestion degree and congestion
delay is indicated by . The penalty factor for the pre- degree is used. The population diversity is guaranteed
completion of the workpiece m is indicated by rm2. by extending the individuals in the quasi-Pareto
domain to the whole Pareto domain with uniform dis-
tribution. The elite strategy adopted also improves the
Constraints. speed and stability of the algorithm.12,13
8 When using NSGA-II, the chromosomes in the ini-
< komn koðm1Þn oomn 0 tialized population are sorted by non-dominated sorting
x ¼ xoðm1Þn (5) and are only constrained by the first dominant frontier.
: omn
1<mM The next order of the chromosomes is constrained by
8 the first order, and each step has a ladder value assigned
< komn koij oomn 0 by the chromosomes and is arranged sequentially. The
xomn ¼ xoij ¼ 1 (6) chromosome also uses the crowded distance as a param-
:
tomn > toij eter to measure the distance from other chromosomes.
The smaller the distance is, the more the individual is,
When the workpiece is machined on the machine, the next the lower the diversity will be; among the multiple chro-
step of the workpiece can be carried out after the process mosomes under the same ladder, the chromosomes with
of the workpiece on the same machine is completed smaller ladder value and larger crowded distance have a
8 higher probability of generating offspring as the next
< Toðmþ1Þn tomn þ Tomn
round of operation of the father generation. The
T tomn (7)
: omn method of selecting the father generation is to adopt
tn > 0
the binary Championship method.
After the completion of the technological process of
the workpiece, the processing time is sequential and the Coding and decoding
processing time of the same process is fixed, which In the coding of the NSGA-II algorithm for solving the
involves the waiting time of the machine stopping. workshop scheduling, the initial population of genetic
Therefore, the processing time of the workpiece on operations in NSGA-II algorithm is formed by select-
the machine is longer than that on the machine, and ing the processing procedure ‘n’ of workpiece ‘m’ to
the processing time of the same process is fixed. The process on machine ‘o’. The chromosomal coding
working time should not be zero in time setting. moments that can be performed are
4 Journal of Algorithms & Computational Technology
2 3
n11 n12 ... n1N are represented by MN1 ; MN2 . . . MNn , and the corre-
6 n21 n22 ... n2N 7 sponding relationships are as follows
6 7
O¼6 .. .. .. .. 7
4 . . . . 5
UMN2fMN1 ;MN2 ...MNn g MN ¼ OPOP (9)
nM1 nM2 ... nMN
Cross operation. Taking chromosome coding matrix for The change of the processing sequence code can be
example divided into the machine code changes and the process
2 3 code changes, namely
1:26 1:35 2:51 2
6 7 3
O1 ¼ 4 1:32 1:25 1:21 5 n1 n2 n3 o2 o3 . . . ox
6 7
1:62 1:32 1:23 6 n2 n1 n3 o1 o4 ... 5 or
2 3 4
1:45 1:27 1:92 n1 n3 n2 o2 o3 ...
6 7 2 3
O2 ¼ 4 1:17 1:39 1:78 5
n1 n2 n3 . . . nx o2 o3
1:19 1:47 1:39 6 7
6 n2 n1 n3 . . . o1 o4 5
4
n1 n3 n2 . . . o2 o3
Selecting the row intersection and the intersection
point is ‘1’. Getting the new matrix
If the corresponding process code of the machine is
2 3 [1,3,5,2,3,4,2,2], the process code will be changed to
1:26 1:35 2:51
6 7 [1,3,5,2,7,8,3,4,2,2] after inserting the process when
O1 ¼ 4 1:17 1:39 1:78 5
the machine is not occupied.
1:62 1:32 1:23
2 3
1:45 1:27 1:92 Elite retention strategy
6 7
O2 ¼ 4 1:32 1:25 1:21 5 In the operation of non-dominant sorting algorithm,
1:19 1:47 1:39 each generation will choose the better population
of the parent to participate in the reorganization of
The corresponding matrix represents the change of the next generation population, retaining the non-
the machine usage corresponding to process A of the dominated solution in the evolution process, and the
workpiece. Selecting column intersection and intersec- speed of the algorithm searching for the optimal sur-
tion point 2 to get a new matrix as follows face is improved.14 Although most of the solutions in
evolution will approach the non-dominated frontier
2 3
1:26 1:35 1:92 surface, due to the different qualities of the surface,
6 7 the surface solution set that may be approximated is
O1 ¼ 4 1:32 1:25 1:78 5
the surface of the non-problem optimal solution set.
1:62 1:32 1:39
2 3 In order to make the algorithm solution set to the prob-
1:45 1:27 2:51 lem surface search, the elite strategy is shown in equa-
6 7
O2 ¼ 4 1:17 1:39 1:21 5 tion (14)
1:19 1:47 1:23
ni ¼ jFronti j ri (14)
The corresponding matrix can be expressed as a
change in the machine used for the machined workpiece. where ni represents the number of individuals selected
on the ith non-dominated surface Front; jFronti j
Mutation operation. In order to preserve a better popu- represents the number of individuals on the ith layer
lation, the two intersecting individuals with a non- non-dominated surface; ri represents a random
dominated rank greater than 2 are calculated by number, ri 2 ð0; 1Þ.
Hamming distance. If the similarity is greater than
the threshold value, the mutation rate parameter is Fitness function
increased, and vice versa. In the production scheduling, In the algorithm operation, the feasible conditions of
in order to improve the work efficiency, queue-
the processing will perform an evaluation function to
insertion processing is carried out, that means the
evaluate the fitness and keep the optimal.15 Fitness
workpiece process satisfies the machine’s queue inser-
evaluation of processable gene strings is carried out
tion for the process of workpiece being processed, and
in operator recombination, such as the fitness evalua-
the condition of the workpiece using the machine ‘o’ is
tion function (15) used in the third chapter.
(
Tom2 n2 tom2 n2 > Tom1 n1 tom1 n1
(13) fI
Tom2 n2 tom2 n2 > ton1 FI ¼ exp (15)
t
6 Journal of Algorithms & Computational Technology
1 1 * 20 16 18 * 13
2 16 14 19 * 17 *
3 19 * 22 19 25 21
4 14 13 * 12 16 *
2 1 13 17 * 11 * 13
2 17 20 * 16 * 18
3 * * 15 11 19 20
4 17 * 21 * 14 21
3 1 * 19 * 17 19 22
2 * 16 17 15 * 19
3 16 15 * 19 * 18
4 19 * 17 16 11 *
4 1 13 11 * 7 9 *
2 * 23 28 29 * 24
3 24 23 * 29 * 21
4 25 * 26 22 21 *
5 1 * 22 23 30 * 36
2 24 * 29 * 23 26
3 26 21 23 24 * 28
4 * 22 26 25 29 *
6 1 17 19 * 20 28 26
2 19 * 15 13 * 19
3 * 23 24 * 17 18
4 23 28 * 27 * 21
Note: Time unit: minute.
1 1 * 9 7 11 * 9
2 9 7 8 * 11 *
3 13 * 16 14 11 9
4 11 9 * 12 15 *
2 1 12 17 * 13 * 11
2 8 11 * 8 * 9
3 * * 11 10 14 15
4 8 * 12 * 10 7
3 1 * 13 * 11 15 12
2 * 12 13 10 * 9
3 11 9 * 13 * 17
4 13 * 12 11 8 *
4 1 11 13 * 9 10 *
2 * 11 13 11 * 17
3 14 12 * 9 * 17
4 12 * 8 10 14 *
5 1 * 12 13 8 * 11
2 16 * 20 * 13 17
3 14 11 11 13 * 9
4 * 11 17 14 13 *
6 1 13 10 * 9 12 14
2 9 * 12 14 * 10
3 * 14 11 * 16 17
4 15 13 * 11 * 9
Note: Processing cost unit: yuan.
Wang et al. 7
Figure 1. NSGA-II algorithm Gantt diagram. Figure 2. NSGA-II algorithms Pareto frontier.
8 Journal of Algorithms & Computational Technology
Conclusion
Through the learning of multi-objective flexible work-
shop scheduling, we learned how to numerically pro-
cess each production link and elements and used the
learned workshop scheduling knowledge to establish a
multi-objective workshop scheduling model as well as
defined the symbols in the model; Through the study of
the theoretical knowledge of genetic algorithm, the
NSGA-II algorithm is extended, the application of
the improved genetic algorithm in solving job shop
scheduling and the comparison with the results of
other algorithms prove that the improved genetic algo-
rithm has good practical performance in solving multi-
objective workshop scheduling problems.
Funding
Figure 3. Gantt diagrams of genetic algorithm and particle The author(s) disclosed receipt of the following financial sup-
swarm algorithm. port for the research, authorship, and/or publication of this
article: The project was supported by a key research project
of Higher Education of Henan Province (20A460019).
Table 5. Comparison of algorithm optimization results.
ORCID iD
Algorithm Target 1 Target 2 Target 3 Target 4
Yahui Wang https://orcid.org/0000-0002-4016-7871
Traditional 472 18.7 6.8 466.3
genetic
References
algorithm
Particle 421 47.6 5.8 474.4 1. Shaoqun X. Research on the technical status and devel-
swarm opment of workshop scheduling problem, North China
algorithm University of Water Resourcesand Electric Power, 2019:
NSGA-II 414 18.5 3.8 436.3 02; 1006–8554, 86–87.
algorithm 2. Bhosale KC. Material flow optimisation of flexible
manufacturing system using real coded genetic algorithm
(RCGA). J Mater Today Proc 2008; 05: 7160–7167.
3. Renqingdaoerji. Multi-objective models establishment and
and 2 yuan, respectively, compared with the traditional
algorithm for job shop scheduling problem. Xi’an: Xidian
genetic algorithm and the particle swarm algorithm;
University, 2013, pp. 1–7.
When optimizing the objective function 4, it is reduced
4. Lei W, Jincao C and Dunbing T. Flexible job shop sched-
by 30 and 38.1 yuan, respectively, compared with the uling based on improved genetic algorithm. J Nanjing
traditional genetic algorithm and the particle swarm Univ Acronaut Astronaut 2017; 49: 779–785.
algorithm. The comparison shows that the algorithm 5. Wang Y, Fu L and Su Y. Genetic algorithm in flexible
has good performance. From the perspective of the work shop scheduling based on multi-objective optimiza-
scheduling Gantt chart distribution, the algorithm used tion. J Interdiscip Math 2018; 21: 1249–1254.
can maximize the use of the machine and reduce the idle 6. Rui C, Xiangpan H and Siting J. Research on flexible
waiting time of the machine. Although it takes longer to workshop scheduling problem based on improved genetic
complete the machining of the workpiece at the same algorithm. J Comp Digital Eng 2019; 02: 285–288.
Wang et al. 9
7. Xiuli W. Research on multiobjective flexible job shop 12. Xi W, Qiao B and Zhu J. Flexible job shop scheduling
scheduling problem. Xi’an: Northwestern Polytechnical based on improved genetic algorithm. J Harbin Inst
University, 2006, pp. 1–10. Technol 2007; 39: 1151–1153.
8. Xiong J, Xing L and Chen Y. Robust scheduling for 13. Zhang C. Improved multi objective evolutionary algo-
multi-objective flexible job-shop problems with random rithm for solving flexible job shop scheduling problem.
machine breakdowns. Int J Prod Econ 2013; 141: Jisuanji YU Xiandaihua. 2017; 9: 80–84.
112–126. 14. Ling W. Shop scheduling with genetic algorithms. Beijing:
9. Smith WE. Various optimizers for single stage produc- Tsinghua University Press, 2003, pp. 39–40.
tion. Nav Res Logist Q 1956; 3: 59–66. 15. Bergh F. An analysis of particle swarm optimizers.
10. Hyun CJ and Kim YK. A genetic algorithm for multiple Pretoria: Department of Computer Science, University
objective sequencing problems in mixed model assembly of Pretoria, South Africa, 2002, pp. 938–946.
lines. Comp Oper Res 1998; 7: 7–8.
_
11. Demir Y and Işleyen SK. Evaluation of mathematical
models for flexible job-shop scheduling problems. Appl
Math Model 2013; 37: 977–988.