An effective approach for the dual-resource flexible job shop scheduling problem considering loading and unloading

Many manufacturing systems need more than one type of resource to co-work with. Commonly studied flexible job shop scheduling problems merely consider the main resource such as machines and ignore the impact of other types of resource. As a result, scheduling solutions may not put into practice. This paper therefore studies the dual resource constrained flexible job shop scheduling problem when loading and unloading time (DRFJSP-LU) of the fixtures is considered. It formulates a multi-objective mathematical model to jointly minimize the makespan and the total setup time. Considering the influence of resource requirement similarity among different operations, we propose a similarity-based scheduling algorithm for setup-time reduction (SSA4STR) and then an improved non-dominated sorting genetic algorithm II (NSGA-II) to optimize the DRFJSP-LU. Experimental results show that the SSA4STR can effectively reduce the loading and unloading time of fixtures while ensuring a level of makespan. The experiments also verify that the scheduling solution with multiple resources has a greater guiding effect on production than the scheduling result with a single resource.


Introduction
Since the early 1960s, the job shop scheduling problem (JSP) has been considered as one of the most important NPhard combinatorial optimization problems. The flexible job shop scheduling problem (FJSP), which is an extension of JSP, increases the flexibility and complexity of scheduling (Xie et al. 2019). The real production environment, such as production conditions and customer requirements, becomes more and more complex with the increasing popularity of personalized requirements. A growing number of authors have paid attention to the actual production problems and developed many scheduling approaches for FJSP (Gao and Pan 2016;Gong et al. 2018a, b;Costa et al. 2020). Most of them, nevertheless, ignored the important influence of fixtures, such as loading and unloading time, which is an essential part in the production time and should be therefore not neglected. Among recent studies, most scheduling studies only focus on the machine resource (Wu and Wu 2017;Xie et al. 2019;Li et al. 2019;Nesello et al. 2018). Jobs, however, need to be processed with not only machines but also other types of resource, such as fixtures and measuring tools. Such a scheduling problem is referred to as a multi-resource constrained scheduling problem, which exists ubiquitously in many production environments. In the studies related to this kind of scheduling problem, most authors focus on the constraints of machine and worker resource (Alejandro et al. 2020), and few consider the constraints of fixture resources in the scheduling solution (Costa et al. 2020). However, fixtures are an indispensable tool for fixing and locating jobs on machines. Especially in some types of workshops, some fixtures are unique for typical jobs. During scheduling such job shops, the scheduling solution can be executed only if both the machine and fixture resources are considered. This gap motivates this study.
According to the statistics from the International Association of Production and Research, 95% of the time during processing is consumed in the non-processing process (Wang 2005). These non-processing processes do not create value (Allahverdi 2015). Efficiently using the production resources, reducing non-processing time and improving production efficiency have become a challenge for practitioners and academia. In the production, the complex processing technology and the constant change of fixtures on machines cause frequently load and unload the fixture resources, which takes a large amount of non-processing time and a waste of resources. Exploring the ways to reduce the setup time of production is an important part of the research in the relevant literature. Moreover, in the past research process, the setup time is considered as a whole, which does not conform to the reality of production. In this paper, we divide the setup time of fixture into loading time and unloading time, and propose a similarity-based scheduling algorithm for setup-time reduction (SSA4STR).
Up to now, a variety of models have been developed in various production environments and different algorithms have been designed to study the multi-resource scheduling problem and the scheduling problem considering setup time respectively. However, in the study of the multiresource scheduling problem, most considered the machine and worker resources (Costa et al. 2020), but few consider the fixture resource. In terms of setup time, the setup time between jobs used to be studied as a whole, few studied the loading and unloading of fixture separately. This motivates us to study the multi-resource scheduling problem with fixture and machine resources, and consider the loading and unloading time of the fixtures. For convenience, we define the problem thereafter in this study as the dual resource flexible job shop scheduling problem with consideration of loading and unloading of fixtures (DRFJSP-LU). Considering the excellent performance of the non-dominate sorting genetic algorithm II (NSGA-II) algorithm (Wu and Sun 2018), we proposed an NSGA-II to solve this problem in our previous study (Wu et al. 2020). For a further study, we improve the NSGA-II and propose an improved NSGA-II integrating SSA4STR to reduce the loading and unloading time in this paper. The main contributions of this paper are as follows: (1) A new method that defines the similarity of resource requirement among different operations is proposed; (2) A resource requirement similarity-based scheduling algorithm for setup-time reduction (SSA4STR) is developed; (3) An improved non-dominated sorting genetic algorithm II integrating SSA4STR is presented.
The remainder of this paper is structured as follows. "Literature review" section reviews the related literatures in recent years. "The model of DRFJSP-LU" section introduces the DRFJSP-LU and formulates a mathematical model. "The calculation of resource requirement similarity" section proposes the calculation of the resource requirement similarity. "The non-dominated sorting genetic algorithm II" section improves an improved NSGA-II integrating a SSA4STR. "Case study" section reports the case study. "Conclusions" section concludes the paper.

Literature review
The multi-resource constrained scheduling problem is more complicated than the single resource one (Alejandro et al. 2020). Existing researches have studied shop scheduling problems under different resource constraints. Costa et al. (2020) studied a flexible job shop scheduling problem considering machines and workers, but did not consider the time needed to shift workers. Gong et al. (2018a, b) considered the processing time, green production and worker skill simultaneously, established a multi-objective dual resource constraint model, and solved the problem with the nondominated sorting genetic algorithm. Andrade-Pineda et al.
(2019) studied a novel dual-resource constrained flexible job-shop problem and considered the influence of workers' proficiency. Marichelvam et al. (2020) studied a multi-stage hybrid flow shop scheduling problem with identical parallel machines at each stage with the effect of human factors under consideration. The learning and forgetting effects of labors at different skill levels were considered. Li et al. (2016) considered machines and heterogeneous workers, and added dynamic scheduling and worker fatigue in their study of the scheduling problem. Bitar et al. (2016) proposed a metaheuristic for solving a scheduling problem with auxiliary resources in a photolithography workshop of a semiconductor plant. Gao and Pan (2016) considered three kinds of additional resources, i.e. as well as machines resource and proposed a hybrid multi-group migration bird optimization algorithm.
There is a bulk of related literatures on production scheduling in last several decades since the production scheduling theory was introduced. However, a survey has shown that 90% of the literature neglected the setup time (Allahverdi 2015). The setup time, nevertheless, has a certain impact on production scheduling in real industries, including the electronics industry, the printed circuit board manufacturing, etc.
The setup time can be divided into two categories: the sequence-dependent setup time and the sequenceindependent setup time.
(1) Sequence-dependent setup time is related to the preprocessing operation. For example, in solving the dynamic flow shop problem, Heger et al. (2016) considered sequence-dependent setup time by dynamically adjusting the parameters of the scheduling rules. Benkalai et al. (2017) used the migration bird algorithm to solve the permutation flow shop scheduling problem, considering sequence-dependent setup time. Li et al. (2019) proposed an elitist non-dominated sorting hybrid algorithm for the multi-objective flexible job shop scheduling problem with sequence-dependent setup times. Naderi et al. (2009) investigated flexible flow line problems with sequence dependent setup times and proposed a novel variable neighborhood search algorithm. Yuan et al. (2020) developed a mixed integer linear programming model for the flow shop group scheduling problem where both sequence-dependent setup time between groups and round-trip transportation time between machines are considered. They proposed an efficient co-evolutionary discrete differential evolution algorithm to solve this problem. Nesello et al. (2018) proposed a single-machine scheduling problem with periodic maintenance and sequence-dependent setup times. Wu et al. (2020) proposed a NSGA-II approach to solve the flexible job shop dual resource scheduling problem considering fixture loading and unloading.
(2) Sequence-independent setup time is only related to the current processing operation. Aydilek et al. (2017) proposed a new hybrid simulated annealing insertion algorithm in the context of two-stage assembly shop by considering the sequence-independent setup time. It had been verified that the proposed algorithm shares similar performance with the algorithm of self-adaptive differential evolution which has the best performance for such a problem. Mutu and Eren (2020) studied the single machine scheduling problem with sequenceindependent setup times and time-dependent learning and forgetting effects. Aldowaisan and Allahverdi (2015) proposed an improved genetic algorithm and an improved simulated annealing algorithm for the flow shop scheduling problem where the sequenceindependent setup time is considered.
To sum up, the multi-resource scheduling problem mainly considers machine resources and worker resources, and there is scarcity of literature that studies both machine and fixture resources. Among the existing studies, a small percentage of the studies that take into account the setup time, and the studies that divide the setup time into loading and unloading time are inadequate.

Problem description
The dual-resource constrained flexible job shop scheduling problem considering loading and unloading (DRFJSP-LU) can be described as follows (Wu et al. 2020): there are |I| jobs waiting to be processed, and each job i is composed of There are M machines and F fixtures available for processing. Each job is processed on machines following a pre-defined order. Each operation can be processed on more than one available machine, and the processing time on different machines is different. The job needs to be fixed with a specific fixture during processing, and each operation can be fixed with one of the available fixtures. A job can only be processed on one machine with one fixture at a time.
The setup time is sequence-independent. A fixture needs to be loaded onto the machine at the beginning of processing and unloaded from the machine after processing. The loading and unloading time of the fixture on different machines is different, too. The task of scheduling is first to select a machine and a fixture for each operation and then determine the processing sequence on the selected machine to optimize the makespan and the setup time simultaneously. Some assumptions are as follows: (1) Each machine can only process one job at a time.
(2) Each fixture can only process one job at a time.
(3) The processing time for each operation is determined and known in advance. (4) Once processing has begun on a machine, it cannot be interrupted until the processing is completed. (5) The processing of an operation cannot be performed until its preceding operation is completed.
To make it easier to understand, we give an example of DRFJSP-LU in Tables 1 and 2, respectively. In Table 1, the data in the first row is the available machine indexes for each operation. The data in the second row is the available fixture indexes for each operation. In Table 2, the data is the loading/unloading time for each fixture.

Notations
Some notations are listed below before formulating DRFJSP-LU.

Formulation of DRFJSP-LU
In the production, the desire for the decision makers is to complete all processing tasks effectively and efficiently. Besides, although the loading and unloading time for a fixture may not create any value, a fixture is an indispensable resource during processing. In order to reduce the makespan, the decision maker will prioritize to select machine that can finish processing earliest when scheduling the subsequent operations, but does not consider whether the fixture installed on the machine is available. If the fixture on the machine is not available for the subsequent operation, the fixture needs loading and unloading. This results in the increasing of setup time. Hence it is necessary to take setup time into consider-ation when scheduling. The objectives of the mathematical model in this study are therefore to minimize the makespan and the setup time of the fixtures simultaneously.
The DRFJSP-LU can be formulated as follows: (1) x i jm ≤ A i jm , i 1, 2, . . . , |I| , j 1, 2, . . . , | J i | , m 1, 2, . . . , |M| (10) (13) (1) and (2) are two objectives, i.e. to minimize the makespan and to minimize the setup time. Equation (3) is to compute the setup time of operation O i j , which is the sum of the loading time (i.e. the first part of the formulation) and the unloading time (i.e. the second part of the formulation) of the fixture employed in this process. Equation (4) guarantees that each operation can only be processed on one machine. Equation (5) guarantees that only one fixture can be used in one operation. Equation (6) imposes the constraint that an operation can only be processed by one of the available machines. Equation (7) imposes the constraint that the fixture used by operation O i j must be available for the operation. Equation (8) ensures that all operations must meet process constraints. Equation (9) indicates that the starting time must be more than zero. Equation (10) is to compute the completing time of operation O i j . Equation (11) indicates that the same machine can only process a job at the same time. Equation (12) constrains that the same fixture can only hold one job at a time. Equations (13)-(18) are the decision variables.

Resource requirement similarity
If the fixtures for the adjacent operations on one same machine are different, the worker needs to unload one fixture and load another fixture, resulting in too long non-processing time. Therefore, in order to minimize the loading and unloading of the fixture and reduce the setup time, the fixture resources required by the adjacent operations on machines should be the same. In reality, jobs in a workshop normally have some similar characters (Erromdhani et al. 2012). In existing research, the measurement methods for the similarity between jobs are different (Yin and Yasuda 2006). Most of them defined the similarity between jobs as the similarity of their processing, and calculated it according to the processing route of the jobs. The similarity of the processing not only relates to the operations included in the processing route, but also relates to the sequence of the operations. Ho et al. (1993) proposed a processing route similarity algorithm based on compatibility index, which analyzed the same number of operations between processing routes A and B from the forward and reverse directions, using the ratio of the same number of operations and the length of processing route as a similarity. Choobineh (1988) proposed a similarity algorithm for the hybrid processing route. The sequence similarity was proposed by Irani and Huang (2000) and was the longest common subsequence to transform one sequence into another with the minimum number of substitutions, insertions and deletions. In addition, other factors are taken into consideration according to the processing technology. Goyal et al. (2013) developed a novel method to evaluate similarity considering bypassing moves and idle machines according to the longest common subsequence. Alhourani (2013) constructed a new comprehensive similarity, including the processing route, process sequence, batch, shared equipment, etc.
As can be seen from the above discussion, although some methods to calculate the processing similarity between jobs have been designed, the definitions of the similarity in the existing research mostly focus on the similarity between jobs. Few authors considered the similarity between operations. Moreover, most of the research calculates the similarity according to the processing route, regardless of the similarity of resources requirement, which in turn affects the setup time. Hence, we propose a method to define the similarity of the resource requirements for operations in the following section.

The representation for the similarity
The required resources can be classified into 2 categories, machines and fixtures. Each can be further split into sub- Fig. 1 The representation of the resource requirement similarity categories according to their resource requirement features. Denote the resources required for each operation are the machine resource M and the fixture resource F. The machine resource has s m sub-categories and the fixture resource has s q sub-categories.
The binary encoding is used to indicate whether the corresponding operation can be processed by the resource. "1" represents that the operation can be processed by the corresponding resource, and "0" represents that the operation cannot be processed by the corresponding processing resource. Figure 1 shows a representation of the resource requirement similarity for operation O i j .
Where W s is the value of the corresponding sub-category. The value of W s is as shown in Eq. (19).
The example mentioned in Table 1 can be encoded to be a matrix W as shown in (20). O 11 [1 1 0 0 0 1 0 1 0 1] means that the first operation of the job 1 can be processed by machine 1 or machine 2, and it can be fixed by fixture 1, fixture 3 or fixture 5, respectively. (20)

The calculation of the similarity
The resource requirement similarity is calculated according to the Jaccard coefficient (Sujoy et al. 2019). The Jaccard coefficient is the ratio of the number of intersections to the number of unions for two elements. It does not consider the size of the specific difference between individuals, and only pays attention to whether there are common features among elements. Denote two operations as A and B, respectively. The calculation formula of the Jaccard coefficient is shown in Eq. (21).
Since the encoded process has Boolean attributes, f 00 is the number of attributes that both equals to 0, f 11 is the number of attributes that both equal to 1, f 01 is the number of attributes that A equals to 1 and B equals to 0 and f 10 is the number of attributes that A equals to 0 and B equals to 1. Hence, the Jaccard coefficient can be calculated according to Eq. (22).
For example, the resource requirement similarity of O 11 and O 12 , as shown in Table 1, can be calculated as follows: The resource requirement similarity of each operation is calculated in the same way and the similarity matrix W can be obtained as shown in Eq. (24).

(24)
The non-dominated sorting genetic algorithm II

The details of the NSGA-II
The dual resource scheduling problem has been proved to be a typically NP-Hard problem (Yuan et al. 2020), which is generally solved by meta-heuristics, such as the genetic algorithm (Paksi and Ma'ruf 2016), the fruit fly optimization algorithm (Zheng and Wang 2016), and the particle swarm algorithm (Zhang et al. 2017). DRFJSP-LU takes the loading and unloading time of fixture, the resource requirement similarity, and the dual resources into consideration, which is obviously strongly NP-hard. Since the NSGA-II performs well in solving multi-objective optimization problems, we employ the NSGA-II to search the optimal solution for the DRFJSP-LU.

The representation for DRFJSP-LU
The operation-based encoding method (Wu and Sun 2018) is employed in the paper, which is the classical encoding method for FJSP. The example shown in Fig. 2 is a representation of the case in Table 1. The SSA4STR for decoding The DRFJSP-LU can be divided into three sub-problems: machine assignment, fixture assignment, and job sequencing. When solving them, one needs to consider the conflict among different types of resource, including the conflict among machines and that among fixtures. When one fixture is loaded to or unloaded from one machine, the loading and unloading time cannot usually be ignored, especially for some special fixtures that need a little time to load or unload. The encoding method in "The representation for DRFJSP-LU" section only considers the scheduling sequence, while neither the machine nor the fixture is determined for each operation. Hence, the machine and the fixture for each operation should be determined when decoding. Based on the gap extrusion method (Wu and Sun 2018), this paper proposes a scheduling algorithm considering the resource requirement similarity and the loading/unloading time of fixture simultaneously.
The core of the gap extrusion method is to insert the current operation into the time gap between the scheduled operations if possible. That is, if the start time of a gap is greater than the completion time of the preceding operation and the length of the gap meets the processing time of the current operation, it is preferred to insert the current operation into the gap for processing. The details of the gap extrusion method are described in Wu and Sun (2018). Motivated by the gap extrusion method, we propose a SSA4STR to take the machines and the fixtures into account jointly. The main idea of the SSA4STR are as follows.
(1) Rank the operations according to their similarity so that those with similarity value higher than a given threshold will be scheduled successively.
(2) For each operation, choose the machine on which there is both an available gap and an available fixture to reduce the loading and unloading time.
Let's explain why the similar operations are scheduled successively in the SSA4STR first. Take the cases in Tables 1 and 2 as an example. The processing time for each operation is given in Table 3. Consider the individual representation shown in Fig. 2. If we decode the individual without considering the similarity between operations, the scheduling solution is as shown in Fig. 3. The X-axis represents time and the Y-axis represents machines. The numbers in each block "a-b-c" indicates the b-th operations of job a is fixed Machine5 -------10 with fixture c, e.g. "2-3-4" indicates that the third operation of job 2 is fixed with fixture 4. The rectangles in the front of and at the back of each block indicate the loading time and the unloading time, respectively. From Fig. 3, the makespan is 36.3 and the total times for the loading and unloading is 7 and the amount is 14.3. Figure 4 gives the ranking process. However, if we use the SSA4STR to decode the chromosome, the genes indicating operations are ranked first according to the similarity and the threshold. Only those with similarity value larger than the threshold should be re-ranked. The similarity value is computed by Eq. (22) to form the similarity matrix as shown in Eq. (24). Assume the threshold value is 0.2 and take the chromosome in Fig. 2 as an example. The ranking algorithm is as follows.
Step 1 The first operation (O 31 ) in the original chromosome is still the first one in the ranked chromosome.
Step 2 Search the similar operations with operation O 31 with similarity value larger than the threshold. We obtain operations O 13 , O 21 , and O 23 , respectively. Because the immediate predecessor operations for operations O 13 and O 23 have not been scheduled, the current available operation is only operation O 21 . If there is more than one available operation, choose the one whose similarity value is the largest.
Step 3 Repeat step 2 for the other operations in the original chromosome. For example, for operation O 21 , repeat the process in step 2 to search its most similar operation and we get operation O 32 . During searching the similar operations, if there is no operations with similarity value larger than the threshold, choose the first un-scheduled operation. For example, for operation O 12 , no operation whose similarity value is more than 0.2, so we choose operation O 33 because it is the first un-scheduled operation in the original chromosome. Now, we generate a scheduling solution from the ranked chromosome with the gap extrusion method. The Gantt chart is shown in Fig. 5. It can be seen that the makespan is 29, the times of the loading and unloading is 6, and the total amount of the loading and the unloading time is 12.5. By comparing The detailed steps (Fig. 6) to generate a scheduling solution with SSA4STR are as follows: Step 1 Input a chromosome and rank its gene sequence with the ranking algorithm to get a ranked chromosome. Record the length of the chromosome as L. Set i 1.
Step 2 Repeat (for each gene i in the ranked chromosome).
Step 2.1 Determine the corresponding operation of gene i according to the encoding method.
Step 2.2 Search the available combination of the machines and fixtures. Record the number of combination as n. Set j 1.
Step 2.3 Repeat (for each combination j).
Step 2.3.1 Check whether the machine in combination j has been occupied. If yes, go to step 2.3.2; Go to step 2.3.3, otherwise.
Step 2.3.2 Check whether the fixture in combination j has been occupied. If yes, schedule the operation with the rule for Case 4; Schedule the operation with the rule for Case 3, otherwise.
Step 2.3.3 Check whether the fixture in combination j has been occupied. If yes, schedule the operation with the rule for Case 2; Schedule the operation with the rule for Case 1, otherwise.
Step 2.3.4 Record the makespan and setup time for combination j and let j j + 1. If j < n, go back to step 2.3; go to step 2.4, otherwise.
Step 2.4 Select the combination which can ensure both the makepan and the setup time simultaneously optimal. Let i i + 1. If i ≤ L, go back to step 2; go to step 3, otherwise.
Step 3 All the genes have been scheduled and the output the scheduling solution, Cases 1-4 are four cases in terms of the status of machines and fixture. In different cases, the scheduling method is different, with which the position of the current operation, the loading time and unloading time for the fixture is determined.
Case 1 In this case, neither the selected machine nor the selected fixture is occupied. The fixture should be loaded onto the machine first, and the start time of the current operation is zero (Wu et al. 2020). Case 2 In this case, the selected machine has not been occupied by other operations, but the selected fixture has already been occupied. Hence, we should first find the operation that is occupying the selected fixture, and then calculate the idle time gaps for the fixture. Choose the idle time gap into which the current operation can be inserted. The fixture should be unloaded first from the previous machine and then loaded on the selected machine. If the two machines are the same, the unloading and the unloading time of the fixture is saved (Wu et al. 2020).
There are three sub-cases for this case, as shown in Fig. 7 (Wu et al. 2020). The time of each operation can be broken down into three parts: loading time, processing time and unloading time. The operation in green [i.e. block "1-2-3" in (a), block "3-1-3" in (b) and (c)] is currently being scheduled. The block in brown is the extra loading or unloading time spent. In Fig. 7a, the selected fixture (i.e. fixture 3) has been loaded onto the other machine (i.e. machine 2), and it is occupied in the gap time. Hence, the fixture should be unloaded from the machine (i.e. machine 2) first, and then be loaded onto the selected machine (i.e. machine 1) to process the current operation (i.e. operation O 12 ). When the processing finishes, it should be unloaded from the selected machine (i.e. machine 1) and loaded back to machine 2 again to avoid interfering with the scheduled operations' processing. In Fig. 7b and c, fixture 3 is idle during the gap time, so it can be loaded on the selected machine (i.e. machine 1) directly.
Case 3 The selected machine is occupied but the selected fixture is not occupied. First find the operations that have been scheduled on the selected machine and then calculate the idle time gaps in the machine. Choose the idle time gap into which the current operation can be inserted. The fixture is loaded first on the machine and then unloaded from the machine after processing.
There are three sub-cases for case 3, as shown in Fig. 8 (Wu et al. 2020). In Fig. 8a and b, the operation in green (i.e. block "3-1-3") is the currently being scheduled. The selected fixture (i.e. fixture 1) is not occupied on the selected machine (i.e. machine 2). The selected fixture (i.e. fixture 1) can be loaded on the selected machine (i.e. machine 2) directly and unloaded from the selected machine (i.e. machine 2) after processing. In Fig. 8c, other fixture (i.e. fixture 3) has been loaded on the selected machine (i.e. machine 2) in the gap time, so it (i.e. fixture 3) should be unloaded first and loaded again for processing the operation "2-2-3" after the current operation (i.e. block "3-1-1"). The selected fixture (i.e. fixture 1) for the current operation (i.e. block "3-1-1") should be loaded first on and then unloaded from the selected machine (i.e. machine 2).
Case 4 Both the selected machine and the selected fixture are occupied. This case is the most complicated. Hence, we develop a scheduling algorithm. The steps are as follows (Wu et al. 2020): Step 1 Denote the selected machine as m, the selected fixture as f, the completing time for each operation as C P , the idle time gap of m and f as T m and T f , respectively, the fixtures on machine m at a certain moment as M f , and the machines occupying fixture f at a certain moment as F m .
Step 2 For the currently scheduled operation O i j , find the completing time E T i( j−1) of its predecessor operation O i( j−1) in C P . The time E T i( j−1) is the earliest start time for processing operation O i j . Get the processing time t i jm of operation O i j , the loading time s f m and the unloading time d f m for fixture f from the input data set.
Step 3 The intersection of the idle time gaps both in machine m and fixture f is denoted as T M F , which can be calculated according to T m and T f .
Step 4 For the idle time gap in T M F , there are seven subcases of the loading or unloading for fixture f. To show it clearly, we use a decision tree (Fig. 9) to describe the subcases. Modify the loading and unloading status of according to M f and F m . Denote the sum of the processing time t i jm , the loading time s f m and the unloading time d f m of fixture f is denoted as t all . If the common idle time gap in T M F is more than t all , the operation O i j can be processed in the gap. Append Fig. 6 The flowchart of the SSA4STR operation O i j at the end of the selected machine and the selected fixture, otherwise. Figure 9 shows the decision tree to determine whether the loading and unloading of fixture in the gap needs modifying. f 1 is the fixture loaded before the idle time gap on the machine m. f 2 is the fixture loaded after the idle time gap on the machine m. k 1 is a state variable for fixture f 1 . k 1 1 indicates that there is an unloading process for fixture f 1 and a loading process for fixture f 2 while k 1 0 means fixture f 1 has not been unloaded and there is no loading process for fixture f 2 (this case only exists when f 1 f 2 ) .k 2 is another state variable for fixture f 2 . k 2 1 indicates there is an unloading process for fixture f 2 and a loading process for fixture f 1 , while k 2 0 implies fixture f 2 has not been unloaded and there is no loading process for fixture f 1 . m 1 represents the machine where fixture f is loading before the idle time gap and m 2 represents the machine where fixture f is loading after the idle time gap. The start time of operations in machine m before and after the gap are denoted as ST 1 and ST 2 , respectively, and the start times of operations that are fixed by fixture f before and after the gap are denoted as ST 3 and ST 4 , respectively. There are seven resulting nodes in the decision tree, which determines how to schedule machines and fixtures when dealing with operation O ij . The details of the resulting nodes are as follows (Wu et al. 2020).

Crossover and mutation
New gene combinations can be generated with crossover. The local search ability of the algorithm is improved with mutation. The search direction and strength of different operators are different. Hence, a crossover operator pool and a mutation operator pool are established to search the solution space as comprehensively as possible. The crossover operators are Fig. 9 The decision tree for case 4 selected from the literature (Akay and Yao 2013), including linear order crossover, position-based crossover, and sequence-based crossover. The mutation operators include inversion, swap, displacement, and insertion. One of these operators is randomly selected in each iteration.

The non-dominated ranking
The non-dominated ranking of the population is determined by the non-dominated level. A non-dominated solution is a solution that is not dominated by any other solutions. The offsprings are mixed with their parent population, and the non-domination level of each individual is determined by the crowding degree that describes the distribution of a solution with other solutions in the same non-dominated level.
According to Deb et al. (2002), the crowding degree, crowd, of the individual X i is calculated with the Eq. (25).
where K is the number of objectives, f (k) max is the maximum value of the k-th objective, f (k) min is the minimum value of the k-th objective, f (k) (i + 1) and f (k) (i − 1) are the k-th objective of X i+1 and X i−1 , respectively.
The next generation is selected from the mixed population according to the non-dominated level and the crowding degree. The steps are as follows (Wu et al. 2020).
Step 1 Individuals with the minimum non-dominated level enter the next generation directly. If the amount is less than the required population size, go to Step 2; otherwise, two individuals are randomly selected, and the individuals with the larger crowding degree are selected to enter the next generation until the number of individuals is equal to the population size.
Step 2 Randomly select two individuals from the remaining individuals, and the individual with a small non-dominated level enters the next generation; if the non-dominated levels of two individuals are same, the individual with a larger crowding degree enters the next generation preferentially until the number of individuals in the next generation is equal to the population size.
Individuals with a small non-dominated level are selected so that better individuals in the population are retained, and individuals with a larger crowding degree are chosen to ensure the diversity of the population.

The design of experiments
All experiments were conducted in a desktop computer with an Intel Core i5-7200U, 2.50 GHz CPU, 8.00G RAM, Win10 64 OS, and Matlab©.
The parameters for the NSGA-II are set as follows: the population size Num 50, the number of iterations Iterations 500, the crossover probability pc 0.8, and the mutation probability pm 0.2.
The experimental instances are generated from the Brandimarte instances (Brandimarte 1993). The number of fixtures is the same as the number of machines. M max is the maximum number of available machines for the operation, the number of available fixtures for the operation follows the uniform distribution U[0, M max ]. The available fixture sets are generated  Table 4. In order to verify the performance of the proposed algorithm and compare the difference between single and multi-resource, we design the following numerical experiments, respectively: (1) Analysis of the performance of the SSA4STR.
(2) Analysis of the effect of the threshold size in the scheduling algorithm.
(3) Analysis of the performance of the improved NSGA-II.
(4) Analysis of the difference between scheduling solutions that fully and partially consider resource, respectively.

Analysis of the performance of the SSA4STR
The aim is to verify the optimization effect of the SSA4STR by comparing it with the makespan oriented scheduling algorithm (algorithm A for convenience) and the setup time oriented scheduling algorithm (algorithm B for convenience), respectively. The SSA4STR is represented as algorithm C for convenience. Three scheduling algorithms are employed to solve the MKF-01 problem. The results are reported in Table 5, and the comparison results of Pareto solutions are shown in Fig. 10. It can be seen from Fig. 10 that the Pareto solutions obtained with the SSA4STR outperforms those obtained with the other two scheduling algorithms. The solution obtained with the SSA4STR dominates the solutions obtained with the makespan oriented scheduling algorithm. At the same level of the makespan, the setup time of the solution obtained with the SSA4STR is shorter. Compared with the setup time oriented scheduling algorithm, although the solutions dominate each other, the makespan of the solution obtained with the setup time oriented scheduling algorithm is too long. The SSA4STR can greatly reduce the setup time while ensuring  Fig. 10 The comparison of Pareto solutions with three algorithms the makespan, and in that way the jobs can be finished processing efficiently.
In order to analyze these three scheduling algorithms more intuitively, the Gantt charts of the typical solutions obtained with the three scheduling algorithms (marked with circles in Fig. 10) are provided in Figs. 11, 12 and 13. The X-axis represents time, the Y-axis represents machine, the blue rectangle is the loading process of the fixture, the red rectangle is the unloading process, the number in the lower row is the job index, the number in the upper row is the fixture index, and the rectangles with the same color represent the different operations of the same job. It can be seen from Fig. 11 that the makespan oriented scheduling algorithm does not consider the setup time in scheduling, resulting in frequent loading and unloading of fixtures. Especially on machine 3, there are many non-processing processes, thus leading to a waste of time. In Fig. 12, in order to reduce the setup time, the operations are arranged as much as possible on the machine on which the available fixture is installed. This strategy leads to the unbalanced load among machines. We can see that most operations are assigned on machine 2 so that the makespan is too big. As shown in Fig. 13, the SSA4STR reduces the frequency of loading and unloading of the fixture. It can be seen that the SSA4STR can effectively balance the two optimization goals. Figure 14 shows the Gantt chart on the fixtures of Fig. 13.

Analysis of the effect of the similarity threshold size in the scheduling
In the SSA4STR, the generation of ranked chromosome depends on the size of the threshold. More operations will be adjusted in the generation of the ranked chromosome with a smaller threshold. Hence, the threshold value is vital in the scheduling algorithm. The purpose of this experiment is to determine the effect of the threshold size.
To show it clearly, the comparison of the results is shown in Fig. 15. The dotted line is the trend of the setup time with the decreasing of the threshold value referring to the coordinate axis on the left and the solid line is the trend of the makespan with the decreasing of the threshold value referring to the coordinate axis on the right. As can be seen from the Fig. 15, the size of the threshold affects the experimental results greatly. The setup time decreases with the decreasing of the threshold. When the threshold decreases to a certain level, the setup time begins to increase. Obviously, there is an inflection point for the threshold. When the threshold is large, some operations which are similar to the current operation will be arranged near to the current one. When scheduled, these operations can select the same fixtures to reduce the setup time. For the makespan, it shows an increasing trend as the threshold decreases. As a result, the introduction of the threshold trades off the makespan to reduce the setup time.
Furthermore, we study the performance of the proposed algorithm. For convenience, the algorithm, without considering similarity, is denoted as algorithm D, and the algorithm with the best threshold is denoted as algorithm E. The experimental results of the above algorithms are shown in Table 6. It can be seen that at the threshold inflection point, the increased ratio of makespan is not more than 6%, and the decreased proportion of the setup time is up to 13%. The reduction rate of the setup time is significantly greater than the increase rate of completion time. Although the makespan increases little, the decrease of the setup time can produce a greater effect on the production of the workshop than the increase of the makespan. The reduction of setup time is to reduce not only the loading and unloading times of fixtures but also the complexity of work and the operation difficulty of the processing. Therefore, it can be concluded that introducing resource requirement similarity in the scheduling algorithm can greatly reduce the setup time.

Analysis of the performance of the improved NSGA-II
To evaluate the performance of the improved NSGA-II algorithm, we develop a multi-objective differential evolution algorithm (MODE). MODE is an algorithm based on population evolution and its flowchart is shown in Fig. 16.

MKF-10
The basic idea of this algorithm is to generate a new population with differential mutation and crossover, and then select individuals from the parent-child mixed population to obtain the offspring population. The operation-based encoding method and the SSA4STR are employed in MODE algorithm. The differential evolution operator mixes the DE/best/1 strategy and the DE/rand/1 strategy. The global search ability of the MODE algorithm is good, but its local search ability is poor, so the scaling factor F is set to adaptively change with the number of iterations between [F 0 ,2F 0 ]. F has a large value in the early stage of the search, and it can fully explore the solution space. As the number of iterations increases, the value of F gradually decreases. The algorithm can retain excellent genes and avoid the best solu-  (26) and (27), where Iterations is the maximum number of iterations, Itr is the current number of iterations, and F 0 is the initial value of the scaling factor.
Multi-objective optimization is generally evaluated in terms of convergence, diversity and distribution uniformity. There are some indicators that are generally employed, such as contemporary distance (Gong et al. 2018a, b), hypervolume, ideal solution deviation, spread and so on. Two indicators, i.e. hypervolume and spread, are selected to measure the results in this study.
(1) Hypervolume index (Ciavotta et al. 2013): The hypervolume index method is proposed by Zitzler and Thiele (1999), which indicates the volume of the hypercube enclosed by the individual and the reference point in the target space. The coordinate origin is selected as the reference point, and the two objective values are respectively normalized before calculation. A hypervolume indicator can measure the convergence of the solution set. The smaller the hypervolume index is, the better of the convergence of the algorithm is.
(2) Spread index (Lu et al. 2017): The spread index evaluates the diversity and the distribution uniformity of solutions. The smaller the spread value, the better the diversity and distribution uniformity of the solution set. The calculation formula of spread is as shown in Eq. (28).

S P
where Z is the number of the Pareto solutions, d i is the Euclidean distance between solution i and the nearest solution, andd is the average of d i .
The experimental results and performance indicators obtained with the MODE algorithm and the NSGA-II algorithm are shown in Table 7, including the makespan, the setup time, the hypervolume index, and the spread index, respectively. The results with the MODE algorithm are listed in the left column under each indicator, and the results with the NSGA-II algorithm are listed in the right column under each indicator. For the setup time index, the NSGA-II algorithm outperforms the MODE algorithm for 10 instances. For the makespan index, the improved NSGA-II algorithm obtains the better results for 8 instances. For each instance, better solutions are shown in bold. Therefore, the NSGA-II algorithm outperforms the MODE algorithm in the convergence, the distribution and the diversity of the solution. Figure 17 is the comparison of the distribution of the Pareto solution, obtained by the NSGA-II algorithm and the MODE algorithm. The stars in the figure are the results from the NSGA-II algorithm, and the dots are the results from the MODE algorithm. It can be seen from Fig. 17 that most of the results obtained from the NSGA-II algorithm are better than those obtained from the MODE algorithm. Only for the MKF-09 instance, the results are similar, with the possibility of either algorithm producing better results. Therefore, the NSGA-II algorithm outperforms the MODE algorithm in general.

Analysis of the differences between scheduling solutions that fully and partially consider resource, respectively
In order to test the difference between the multi-resource scheduling solution and the single-resource scheduling solu- Evaluate the new population tion, we ignore the fixture resource and only consider machine resource. Figure 18 shows a scheduling solution generated only if single resource (e.g. machine) for the scheduling solution shown in Fig. 13 is considered. By comparing Fig. 18 with Fig. 13, one can find that on the basis of multi-resource scheduling solution, the makespan can be reduced without considering the loading and unloading time of fixtures. But in the real production, fixtures are indispensable. If the production is carried out according to the scheduling solution that only considers the single resource, there will be a situation that the scheduling solution cannot be executed due to the occupation of the machines or fixtures. For example, job 9 is scheduled on machine 4 and fixed by fixture 2 as shown in Fig. 13. When multi-resource is considered, the production of job 9 after job 2 can avoid the loading and unloading of the fixture and the time spent on those actions can be saved. However, if the fixture resources are not considered when generating scheduling solution, job 9 can only be placed behind job 10 for processing (as shown on machine 4 in Fig. 18). When machine 4 processes job 9, fixture 2 used by job 9 is occupied by job 6 produced on machine 2. At this time, the processing of job 9 has to be stopped, which will affect the subsequent processing. Therefore, scheduling

Discussions
This paper proposed a similarity-based scheduling algorithm for setup-time reduction (SSA4STR) to reduce the setup time and the makespan. We compared the performance of SSA4STR with the makespan oriented scheduling algorithm and setup time oriented scheduling algorithm, respectively. The first reason that SSA4STR outperforms others is that the operation with a larger similarity is placed adjacently.
In this way, the loading and unloading time is significantly reduced, and the operation can be completed efficiently while ensuring a good utilization rate of resources. Secondly, the performance of SSA4STR is greatly affected by the similarity threshold. Therefore, we obtained the trend of the makespan and setup time changing with threshold value under different instances (as shown in Fig. 15). The results show that the setup time and the makespan will increase if the threshold value is too large or too small. When the threshold is too small, the operations with the smaller similarity are arranged in the adjacent positions for processing, and the processing still needs the loading and unloading of fixture resources; Fig. 18 The scheduling solution considering single resource otherwise, when the threshold is too large, only a small part of the operations with the larger similarity are arranged in the adjacent position for processing, and the role of SSA4STR is not fully played. Thirdly, in order to verify the good performance of NSGA-II in solving this problem, we designed an experiment to compare the performance of NSGA-II and MODE, in terms of the makespan, the setup time, the hypervolume index, and the spread index. NSGA-II outperforms MODE in the convergence, the distribution and the diversity. Finally, in order to prove the necessity for considering multiple resources when scheduling, we analyze the differences between the two scheduling solutions (Figs. 13, 18). Makespan only considering the machine resource scheduling solution is shorter than that considering multiple resources, but scheduling solution considering multiple resources is more practicable for real production.

Conclusions
In real production, it is always necessary to cooperate with multiple types of resource. Thus, the study of the multiresource scheduling problem is of great importance. When researching into the multi-resource scheduling problem, one needs to consider the similarity of the resources between different operations, so that some unnecessary setup time can be saved. This paper proposed a similarity-based scheduling algorithm for setup-time reduction to solve the dual resource constrained flexible job shop scheduling problem, with the makespan and the loading and unloading time as objectives. The improved non-dominated sorting genetic algorithm II was employed to search the optimal solution. Experiments showed that the proposed algorithm could effectively reduce the loading and unloading time of fixtures while ensuring makespan. When the similarity equals the best threshold, the proposed algorithm can effectively reduce the loading and unloading time of fixtures. The experiment also verified that the scheduling solution with multiple resources has a greater guiding effect on production than the scheduling result with a single resource.
The managerial insights are summarized as follows. In the production operation management, the decision maker should take as much as possible constraints into account. Only in this way can the decision maker ensure that the decision is feasible and practical. Though some assumptions can make the problem much easier for solving, they doesn't hold in practice. This paper considered machine and fixture simultaneously when making a scheduling solution, which overcomes the shortcoming of the scheduling solution where only the machine resource is considered.
However, the problem discussed in this paper only considered two types of resources: fixtures and machines. In our future research, more types of resource constraints will be taken into account, such as tool wear, workers and so on, with aims to develop more effective heuristics and algorithms to solve the problem more effectively and efficiently. Besides, other production environment should also be studied, such as the flow shop scheduling problem considering multiple types of resource.