 Original Article
 Open Access
 Published:
Necessary and Sufficient Conditions for Feasible Neighbourhood Solutions in the Local Search of the JobShop Scheduling Problem
Chinese Journal of Mechanical Engineering volumeÂ 36, ArticleÂ number:Â 87 (2023)
Abstract
The metaheuristic algorithm with local search is an excellent choice for the jobshop scheduling problem (JSP). However, due to the unique nature of the JSP, local search may generate infeasible neighbourhood solutions. In the existing literature, although some domain knowledge of the JSP can be used to avoid infeasible solutions, the constraint conditions in this domain knowledge are sufficient but not necessary. It may lose many feasible solutions and make the local search inadequate. By analysing the causes of infeasible neighbourhood solutions, this paper further explores the domain knowledge contained in the JSP and proposes the sufficient and necessary constraint conditions to find all feasible neighbourhood solutions, allowing the local search to be carried out thoroughly. With the proposed conditions, a new neighbourhood structure is designed in this paper. Then, a fast calculation method for all feasible neighbourhood solutions is provided, significantly reducing the calculation time compared with ordinary methods. A set of standard benchmark instances is used to evaluate the performance of the proposed neighbourhood structure and calculation method. The experimental results show that the calculation method is effective, and the new neighbourhood structure has more reliability and superiority than the other famous and influential neighbourhood structures, where 90% of the results are the best compared with three other wellknown neighbourhood structures. Finally, the result from a tabu search algorithm with the new neighbourhood structure is compared with the current best results, demonstrating the superiority of the proposed neighbourhood structure.
1 Introduction
The jobshop scheduling problem (JSP), one kind of classic scheduling problem [1], is widespread in the modern manufacturing system [2]. It can be described as follows: there are n jobs, and each has m operations needing to be processed on m different machines. The order of machines used for operations in each job could be different. Each machine can only process one operation at one time, and one operation can only be processed on one machine at one time [3]. Processing cannot be interrupted. The goal of this problem is to obtain the solution with minimum makespan by arranging the processing sequence of jobs for each machine [4].
The JSP is a proven NPComplete problem [5], for which metaheuristic algorithms are more popular than other methods. The key to ensuring a highquality solution in metaheuristic algorithms is to use a good local search strategy [6], and the existing literature shows that the algorithm with this strategy [7,8,9,10], at least as a part of the algorithm [11,12,13,14], could be easier to get a better result. The basic process of a local search strategy is to obtain a set of neighbourhood solutions from the current solution through the neighbourhood structure and then select one as the current solution for the next iteration. In 1996, a comprehensive survey [15] summarized six effective neighbourhood structures named N1â€“N6. In 2007, Zhang et al. [9] proposed a new neighbourhood structure based on N6 [16], which enlarged the search space of the neighbourhood and was called N7. In 2022, Xie et al. [17] obtained more neighbourhood solutions by moving the operations in the critical path outside the critical path. These neighbourhood structures are widely used in many algorithms and achieved tremendous success [18]. Of course, there are many other neighbourhood structures, but most of them are based on the above seven neighbourhood structures. In fact, two issues have been driving the design of neighbourhood structures in the JSP: (1) how to ensure the neighbourhood solution is feasible; (2) how to increase (reduce) the neighbourhood solutions with (without) improvement on the current solution. They can improve the search results of the algorithm by ensuring the feasibility and effectiveness of the neighbourhood solutions.
In this paper, we mainly study the feasibility of neighbourhood solutions in the JSP. By analyzing the causes of infeasible solutions, we propose sufficient and necessary constraint conditions for feasible neighbourhood solutions and the properties of these constraints are proved. On this basis, a new neighbourhood structure is designed to ensure that the local search is carried out thoroughly, and a fast computational method is proposed to cope with the complexity of this neighbourhood structure. Obviously, these conditions not only ensure the feasibility of neighbourhood solutions but also improve the effectiveness of local searches. Experiments at different levels were carried out to demonstrate the reliability and superiority of the new neighbourhood structure. The main purpose of this paper is not to design a metaheuristic algorithm for the JSP, but to mine the domain knowledge to ensure the feasibility of neighbourhood solutions. It is hoped that by mining the domain knowledge, we can have a deeper understanding of the JSP and provide theoretical support for the design of algorithms for it.
The remainder of the paper is organized as follows. Section 2 uses the disjunctive graph model to describe the JSP. The domain knowledge in the local search of the JSP and the related applications are presented in Section 3. The necessary and sufficient conditions for the feasible neighbourhood solution and the fast calculation method proposed are provided in Section 4. The algorithm used in this paper and the experimental results are presented in Sections 5 and 6, respectively. The summary and the prospect are carried on in Section 7.
2 Description of JSP
The JSP is a complex combinatorial optimization problem that needs to arrange the processing sequence of the jobs for each machine to optimize some objective functions. In this paper, the objective function is to minimize the total completion time. The disjunctive graph model is usually used to describe the JSP. A disjunctive graph can be represented by a triple Gâ€‰=â€‰(V, A, E). V is the set of vertices in G, where each vertex represents an operation of a job. It is worth noting that there exist two virtual operations, s and e, which are the starting and ending points of all jobs, respectively. A is the set of conjunctive arcs in G, where each arc represents the processing sequence of different operations in the same job and is shown by solid lines with an arrow. E is the set of disjunctive arcs in G, where each arc connects operations processed on the same machine and is shown by a dashed line. Different from the existing literature, this paper sets the weight of each vertex in the disjunctive graph, instead of the arc length, as the processing time of the corresponding operation, and the weight of the two virtual operations s and e is 0. Therefore, it is easy to know that for the JSP, we need to determine a unique direction for each disjunctive arc in the disjunctive graph, which is to determine the processing sequence of each operation on each machine. In the new disjunctive graph, the maximum weight sum of the path from s to e is called the critical path, and the weighted sum of the path is the makespan of the scheduling.
A simple example is used to explain the symbols and concepts further. Assume that there exist three jobs, which have three operations each J1â€‰=â€‰(O_{1,1}, O_{1,2}, O_{1,3}), J2â€‰=â€‰(O_{2,1}, O_{2,2}, O_{2,3}), J3â€‰=â€‰(O_{3,1}, O_{3,2}, O_{3,3}). Here, O_{j,i} means the ith operation of the jth job. These operations are processed on three machines M1: (O_{1,1}, O_{2,1}, O_{3,1}), M2: (O_{1,2}, O_{2,3}, O_{3,3}), M3: (O_{1,3}, O_{2,2}, O_{3,2}). The disjunctive graph of this example can be shown in Figure 1.
The information of each node or operation can be represented by [m_{j,i}, p_{j,i}], where m_{j,i} and p_{j,i} means the processing machine and the processing time of O_{j,i}. Assume that the information of the operations is J1:([1,5], [2,2], [3,4]), J2:([1,3], [3,2], [2,4]), J3:([1,3], [3,2, [2,2]). When the direction of the disjunctive arc in Figure 1 is determined, we can obtain a scheduling scheme, and it can be shown in Figure 2 (Some of the edges, like the edge from O_{2,1} to O_{1,1}, the edge from O_{2,2} to O_{1,3} and the edge from O_{3,3} to O_{1,2}, are omitted to make the graph clearer).
Though the disjunctive graph can represent the processing sequence of different operations on the same machine, the exact start time and finish time of each operation cannot be obtained. The Gantt chart is usually used to represent the final result of the scheduling problem, and the Gantt chart of the feasible solution of the JSP is shown in Figure 3. The critical path of the solution in the disjunctive graph can be easily found in the Gantt chart, and it is connected and marked by solid red lines. The block formed by operations processed on the same machine in the critical path and nowait between any two adjacent operations can be called the critical block, as shown in Figure 3, where each of them is marked by a black dotted box.
However, if the direction of the disjunctive arc is arbitrarily determined, infeasible solutions may appear in the JSP. For example, if we exchange the processing order of O_{3,2} and O_{1,3} in Figure 2, the obtained disjunctive graph of the solution is shown in Figure 4 (Some of the edges, like the edge from O_{2,1} to O_{1,1}, the edge from O_{2,2} to O_{3,2} and the edge from O_{3,3} to O_{1,2}, are omitted to make the graph clearer). In this disjunctive graph, the operations O_{1,2}, O_{1,3}, O_{3,2}, O_{3,3} and O_{2,3} form a closed loop, and then we do not know which operation should process first. That is why a solution will be infeasible if a closedloop exists in the disjunctive graph. Therefore, in the disjunctive graph model of the JSP, its decision variable is the direction of each disjunctive arc, and its objective function is to ensure the feasibility of the solution and minimize the weighted sum of the critical path of the feasible solution.
3 Domain Knowledge in Local Search of JSP
Domain knowledge is a general term, which means the knowledge of a specialized discipline or field [19]. It has different meanings in different contexts. In this paper, domain knowledge refers to the properties of the optimization problem itself that can be used to design efficient optimization algorithms. When the domain knowledge of a problem has been fully explored, we can have a more profound understanding of the problem itself and design the strategies or methods beneficial to problemsolving. Although the domain knowledge is very important, few scholars discussed the domain knowledge of the problem for the design of neighbourhood structure in the existing literature. Instead of it, most scholars have designed a neighbourhood structure and then proved its effectiveness by experiments. Although the results obtained by these two methods are similar, the first way can help us have a deeper understanding of the problem, so as to guide the future research direction.
In this section, we summarize the domain knowledge used to design neighbourhood structures in the JSP and classify it into two categories: (1) the domain knowledge to guarantee the effectiveness of neighbourhood structures; (2) the domain knowledge to ensure that neighbourhood solutions are feasible. Based on the domain knowledge, we introduce the existing wellknown neighbourhood structures and show which relevant domain knowledge is applied to these neighbourhood structures. Finally, we point out the shortcomings of the existing domain knowledge and provide future research directions. To better describe this domain knowledge, it is necessary to understand the following definitions of symbols: the critical path is a path with the maximum weight sum from s to e in the disjunctive graph of a solution; the critical block is the block formed by operations processed on the same machine in the critical path and no wait between any two adjacent operations; \(u,v\) are two operations in the same critical block; \({O}_{j,i}\) is the ith operation in the jth job; \({m}_{{O}_{j,i}}\) is the machine used to process \({O}_{j,i}\); \({p}_{{O}_{j,i}}\) is the processing time of the \({O}_{j,i}\); \(jp[{O}_{j,i}]\) is the operation in the same job as \({O}_{j,i}\), and processing just before \({O}_{j,i}\); \(js[{O}_{j,i}]\) is the operation in the same job as \({O}_{j,i}\), and processing just after \({O}_{j,i}\); \(mp[{O}_{j,i}]\) is the operation processed on the same machine as \({O}_{j,i}\), and processing just before \({O}_{j,i}\); \(ms[{O}_{j,i}]\) is the operation processed on the same machine as \({O}_{j,i}\), and processing just after \({O}_{j,i}\); \(F({O}_{j,i})\) is the maximum weighted sum of a path from s to \({O}_{j,i}\) in the disjunctive graph of the solution (O_{j,i} is not included); \(R({O}_{j,i})\) is the maximum weighted sum of a path from \({O}_{j,i}\) to e in the disjunctive graph of the solution(O_{j,i} is not included).
3.1 Domain Knowledge to Guarantee the Effectiveness and the Feasibility of Neighbourhood Structures
In this part, we will introduce some propositions, among which the first three propositions are to improve the effectiveness of local search, and the last three propositions are to ensure that the neighbourhood solutions obtained by the local search are feasible. Of course, there are some other properties used to improve the effectiveness and feasibility of local search in the existing literature, but most of them are expanded or improved on these basic propositions, which are not mentioned here. This paper only briefly introduces these propositions, and please refer to relevant references for specific proofs.
Proposition 1.
When the order of the operations on the critical path does not change, the makespan will not decrease no matter how the order of other operations changes [20].
Proposition 2.
If the change of operations order occurs in a critical block, the makespan will not decrease when neither the first nor the last operation of the critical block does not change [21].
Proposition 3.
When only the first (last) operation of the first (last) critical block in the critical path changes, the makespan will not decrease [8].
Proposition 1 was proposed by Potts for the singlemachine scheduling problem in 1980 and was subsequently used for branch and bound. Although it was not proposed for the JSP, the domain knowledge contained in it is also applicable to the JSP [22, 23]. The critical path is equivalent to the processing bottleneck. When the processing bottleneck does not change, the makespan will not decrease no matter how the order of other operations changes. The proposal and application of Proposition 1 significantly reduce the invalid search in local searches. Propositions 2 and 3 further reduce the scope of local search based on Proposition 1 so that the efficiency of local search can be further improved.
Proposition 4.
The neighbourhood solution generated by changing the position of any two adjacent operations on any critical block cannot be infeasible [24].
Proposition 5.
Two operations, u and v, are processed on the same machine, and u processes before v. When it is satisfied \(F(u)+{p}_{u}\ge F(jp[v])+{p}_{jp[v]}\), the neighbourhood solution generated by changing the position of v to the position just before u must be feasible [16].
Proposition 6.
Two operations, u and v, are processed on the same machine, and u processes before v. When it is satisfied \(R\left(v\right)+{p}_{v}\ge R\left(js[u]\right)+{p}_{js[u]}\), the neighbourhood solution generated by changing the position of u to the position just after v must be feasible [16].
The above three propositions are domain knowledge to ensure that the neighbourhood solutions of local search are feasible. Proposition 4 is also proposed based on Proposition 1. Through Proposition 4, we can exchange any two adjacent operations on the critical block without generating infeasible solutions. Propositions 5 and 6 illustrate the constraints to ensure the neighbourhood solutions are feasible when one operation is inserted forward and backwards, respectively. With these two constraints, local search is no longer limited to the exchange of adjacent operations. However, these two constraints are not sufficient and necessary conditions to ensure that a neighbourhood solution is feasible, which will miss part of the feasible neighbourhood solution in the local search, resulting in inadequate local search.
3.2 Neighbourhood Structures Designed by the Domain Knowledge in the JSP
The neighbourhood structure is a rule to generate a slight disturbance in a given feasible solution to obtain a set of neighbourhood solutions for local search. To make the neighbourhood structures in JSP more efficient, they generally follow two rules below [25]: (a) disturbances must occur in the critical path; (b) the neighbourhood solutions obtained from the current solution must be feasible ones. Obviously, these two rules correspond to two types of domain knowledge used for local search in the JSP: effectiveness and feasibility. Based on the domain knowledge in Section 3.1, researchers designed various efficient neighbourhood structures. The emergence of these neighbourhood structures has greatly improved the solving quality of the JSP and has been widely cited by many scholars.
N1: A neighbourhood solution can be obtained by exchanging the processing order of any two adjacent operations in the critical block of the current solution [24], as shown in Figure 5. N1 is proposed based on the domain knowledge in Propositions 1 and 4. This neighbourhood structure can obtain many neighbourhood solutions, but most are not better than the current one. Because of the easy implementation, it is usually used as a kind of slight disturbance inserted into other neighbourhood structures to form a variable neighbourhood structure.
N5: A neighbourhood solution can be obtained by exchanging the first or last two operations in one critical block of the current solution. However, the solutions obtained by exchanging the first two operations in the first critical block and exchanging the last two operations in the last critical block are left out [8]. The movement of this neighbourhood structure is shown in Figure 6. N5 uses the domain knowledge in Propositions 1 and 2, 3 and 4. N5 applies the domain knowledge in Propositions 2 and 3 based on N1, which makes the local search with N5 much more efficient than N1.
N6: A neighbourhood solution can be obtained by moving any operation in the critical block to the position just before (after) the first (last) operation under the conditions described in Propositions 5 and 6. N6 is a deeper understanding of Proposition 2, that is, the first (last) operation on the critical block can be changed by inserting the operation inside the critical block into the position just before (after) the first (last) operation, rather than just by the exchange of adjacent operations [16], as shown in Figure 7. At the same time, infeasible solutions are directly removed by using the properties of Propositions 5 and 6.
N7: N7 is a deeper application of Proposition 2 based on N6. In addition to the neighbourhood solutions obtained by N6, a neighbourhood solution can also be obtained by moving the first (last) operation of a critical block to the position just after (before) other operations inside this critical block under the conditions described in Propositions 5 and 6 [9]. The movement of N7 can be shown in Figure 8. N7 can obtain more effective domain solutions than N6, so it can conduct a more adequate local search.
From the above description, we can see that although there is not much domain knowledge for local search in the JSP, different scholars can design different application methods from the same proposition. For example, for Proposition 2, Balas et al. chose to insert the first or last operation into the critical block, but Zhang et al. inserted the operations in the critical block to the position just before (after) the first (last) operation on this basis. For Proposition 1, most scholars changed the sequence of the operations inside the critical block, but Xie et al. [26] proposed to move the operations inside the critical path to the outside of the critical path, which also changed the processing sequence on the critical path. There are also many other types of neighbourhood structures in the JSP, such as variable neighbourhood structure [27], multioperation joint movement neighbourhood structure [28], but the domain knowledge used in these neighbourhood structures is similar, so they are not described here.
3.3 Summary of the Domain Knowledge for Local Search in the JSP
This section describes the domain knowledge for local search in the JSP and shows how to use this domain knowledge to design effective neighbourhood structures. More detailed descriptions can be obtained in related literature. These neighbourhood structures play an essential role in solving the JSP, and their achievements have been widely applied to different algorithms, and many benchmarks have been successfully refreshed.
Although effective neighbourhood structures can be designed based on the existing domain knowledge, it needs to be further explored in JSP due to the shortcomings of the existing domain knowledge. It can also be discussed in terms of effectiveness and feasibility. (1) The effectiveness: with the existing neighbourhood structures, a large number of neighbourhood solutions without improvement on the current solution can still be obtained. Therefore, domain knowledge that can further distinguish whether there is an improvement on the current solution is needed to improve the efficiency of local search. (2) The feasibility: although the constraint conditions to ensure the feasibility of neighbourhood solutions in existing literature are helpful, the disadvantage of them is that they may regard some feasible neighbourhood solutions as infeasible ones because these constraint conditions are only sufficient conditions to ensure the feasible solutions, but not necessary. This paper focuses on the domain knowledge of feasibility and studies the necessary and sufficient conditions to ensure that the neighbourhood solutions are feasible. On this basis, combined with other effective domain knowledge, a new neighbourhood structure is proposed, and the corresponding fast calculation method is given. Finally, the advantages of the proposed neighbourhood structure are verified by experiments.
4 Necessary and Sufficient Conditions for Feasible Neighbourhood Solutions
In this section, by analyzing the causes of infeasible solutions in the JSP, we give the necessary and sufficient conditions to judge the feasibility of neighbourhood solutions and prove their sufficiency and necessity. At the same time, we compare the proposed conditions with the existing conditions for feasible neighbourhood solutions and design a new neighbourhood structure by combining the proposed conditions with the existing domain knowledge. Finally, a quick calculation method to determine the feasibility of neighbourhood solutions is given in this section.
4.1 Analysis of the Causes of Infeasible Solutions
Unlike other shop scheduling problems, there exist infeasible solutions to the jobshop scheduling problem, which makes the problem much more challenging than the others. In this part, we will analyze the causes of infeasible solutions through the disjunctive graph in the JSP. As mentioned above, if a closedloop appears in the disjunctive graph of a solution in JSP, the solution must be infeasible. However, whether all infeasible JSP solutions have closed loops in the disjunctive graph is uncertain and needs further discussion. Therefore, Proposition 7 is introduced and proved below:
Proposition 7.
In the jobshop scheduling problem, the necessary and sufficient condition for an infeasible solution is the existence of a closedloop in the disjunctive graph of the solution.
Proof.
The sufficiency of Proposition 7 has been explained before, so only the necessity of this proposition will be given here. It is assumed that there is an infeasible solution whose disjunctive graph does not have a closed loop. Since this solution is infeasible, there is at least one operation whose start and end time cannot be calculated. We can call the corresponding vertex x. In the disjunctive graph of the JSP, every vertex, except s (start node), has at least one predecessor (another vertex, which points to x). If the start time and end times of x cannot be calculated, at least one predecessor cannot be calculated either. Since there is no loop in the disjunctive graph, the vertex that cannot be calculated will eventually transfer to s. However, since s is a virtual node, its start and end times are 0. Since s is a computable vertex, x is also a computable vertex. It is inconsistent with the hypothesis.
Although the conclusion of Proposition 7 seems obvious, the necessary condition is often overlooked by scholars. In the following part, we will demonstrate the necessary and sufficient conditions for feasible neighbourhood solutions according to the conclusion of Proposition 7.
4.2 Proof of Sufficiency and Necessity
According to Proposition 7, we can know that in the JSP, if the disjunctive graph of a solution exists in at least one closed loop, the solution is infeasible; if not, the solution is feasible. Therefore, the problem of sufficient and necessary conditions for feasible neighbourhood solutions can be transformed into sufficient and necessary conditions for forming a new acyclic disjunctive graph by changing the direction of the disjunctive arc from an acyclic disjunctive graph. It should be noted that the change in the direction of the disjunctive arc here is not arbitrary, but corresponds to the change in the processing sequence of the operations on the machine. However, the transformed problem is still very complex. Since the neighbourhood solution is feasible or infeasible, the necessary and sufficient conditions for feasible solutions are completely opposite to those for infeasible solutions. From this, we can further transform the problem into a necessary and sufficient condition for a looped disjunctive graph by changing the direction of the disjunctive arc from an acyclic disjunctive graph. When the final transformation problem is solved, the original problem can also be solved accordingly.
Proposition 8.
Two operations, u and v, are processed on the same machine, and u processes before v. When a neighbourhood solution is generated by changing the position of v to the position just before u, the necessary and sufficient condition to form a loop in the disjunctive graph of the neighbourhood solution is that there exists a path from u to jp[v] in the disjunctive graph of the current solution.
Proof. (1) Sufficiency: if there exists a path from u to jp[v] in the disjunctive graph of the current solution, the path will still exist in the neighbourhood solution because there is nothing changed about jp[v]. Then the loop jp[v]vu jp[v] exists in the disjunctive graph. (2) Necessity: if the neighbourhood solution is infeasible, there must exist a loop in the disjunctive graph of this solution according to Proposition 7, and u and v must be in the loop because there is no change in any other operations. Note the loop as vupv, where p is a path in the disjunctive graph of the neighbourhood solution. It is easy to know that only the jp[v] and w (the same operation as mp[u] in the current solution) connect v in the neighbourhood solution. If jp[v] is not in the p, then w must be in the p. However, due to p also existing in the current solution, there must exist a loop upu, which conflicts with the premise that the current solution is feasible. Therefore, jp[v] must be in p, and there must exist a path from u to jp[v] in the current solution.
Proposition 9.
Two operations, u and v, are processed in the same machine, and u processes before v. When a neighbourhood solution is generated by changing the position of u to the position just after v, the necessary and sufficient condition to form a loop in the disjunctive graph of the neighbourhood solution is that there exists a path from js[u] to v in the disjunctive graph of the current solution.
Proof. (1) Sufficiency: if there exists a path from js[u] to v in the disjunctive graph of the current solution, the path will still exist in the neighbourhood solution because there is nothing changed about js[u], and then the loop ujs[u]vu exists in the disjunctive graph. (2) Necessity: if the neighbourhood solution is an infeasible one, there must exist a loop in the disjunctive graph of this solution according to Proposition 7, and u and v must be in the loop because there is no change in any other operations. Note the loop as vupv, where p is a path in the disjunctive graph of the neighbourhood solution. It is easy to know that u only connects to the js[u] and w (the same operation as ms[v] in the current solution) in the neighbourhoods solution. If js[u] is not in the p, then w must be in the p. However, due to p also existing in the current solution, there must exist a loop vpv, which conflicts with the premise that the current solution is feasible. Therefore, js[u] must be in p and there must exist a path from js[u] to v in the current solution.
According to Proposition 8, we can know that whether there is a path from u to jp[v] in the current solution is the key to whether a loop exists in the disjunctive graph of a neighbourhood solution, generated by moving v to the position just before u from the initial solution. Similarly, according to Proposition 9, we can know that whether there is a path from js[u] to v in the current solution is the key to whether a loop in the disjunctive graph of a neighbourhood solution, generated by moving u to the position just after v from the initial solution. With these, it is easy to know the necessary and sufficient conditions, which do not exist paths from u to jp[v] or from js[u] to v in the current solution, for feasible neighbourhood solutions in the JSP.
4.3 Difference between Feasibility Conditions
To better understand the necessary and sufficient conditions mentioned here, they are compared with the conditions used in Propositions 5 and 6. Here we only use the condition in Proposition 5, which can generate feasible neighbourhood solutions by moving v to the position just before u, as an example.
The constraint condition is as follows: when \(F\left(u\right)+{p}_{u}\ge F\left(jp\left[v\right]\right)+{p}_{jp[v]}\) is satisfied, move v to the position just before u will not generate infeasible solutions. In the current solution, there may be one of three relationships among operations between u, v and jp[v], as shown in Figure 9. The known determination condition is that operation u is processed before the operation v, and the operation jp[v] is processed before the operation v, so the operation u to the operation v and the operation jp[v] to the operation v are represented by solid lines in Figure 9. However, the relationship between u and jp[v] is unclear, so it has three possibilities and is represented by dotted lines.
(1) For the first possibility as Figure 9(a), there exists a path from u to jp[v]. It means u must be processed before jp[v] and the numerical constraints between these two operations are \(F\left(u\right)+{p}_{u}<F\left(jp\left[v\right]\right)+{p}_{jp[v]}\), which is not satisfied with the numerical constraints in Proposition 5. (2) For the second possibility as Figure 9(b), there exists a path from jp[v] to u. It means jp[v] must be processed before u, and the numerical constraints between these two operations are \(F\left(u\right)+{p}_{u}\ge F\left(jp\left[v\right]\right)+{p}_{jp[v]}\), which is satisfied with the numerical constraints in Proposition 5. (3) For the third possibility as Figure 9(c), since there is no path connection between u and jp[v], the completion time of u may be larger or smaller than or equal to the completion time of jp[v]. According to the analysis of the three situations above, only the second possibility and part of the third possibility which is satisfied with the numerical constraints \(F\left(u\right)+{p}_{u}\ge F\left(jp\left[v\right]\right)+{p}_{jp[v]}\), can be regarded as feasible neighbourhood solutions by Proposition 5. However, with the necessary and sufficient conditions, we can know that all the neighbourhood solutions generated in the third possibility are feasible, and here is the difference between the necessary and sufficient conditions and the conditions in Proposition 5. Something similar occurs when a neighbourhood solution is generated by moving u to the position just after v.
The scheduling scheme in Figure 3 is used to explain further the limitations of the condition in Proposition 5, and it is shown again in Figure 10. In the current solution, O_{3,3} and O_{1,2} are in the same critical block and \(F\left({O}_{\mathrm{3,3}}\right)+{p}_{{O}_{\mathrm{3,3}}}<F\left(jp\left[{O}_{\mathrm{1,2}}\right]\right)+{p}_{jp\left[{O}_{1.2}\right]}\), which does not satisfy with the condition in Proposition 5. Then the neighbourhood solution, which moves O_{1,2,} to the position just before O_{3,3} , is considered as an infeasible solution in Proposition 5. However, according to Proposition 8, this neighbourhood solution is feasible, and the Gantt chart can be shown in Figure 11. Also, it is easy to know that the makespan of the current solution and the neighbourhood solution are 20 and 19, which means that the condition in Proposition 5 may miss some better solutions.
Combining the necessary and sufficient conditions mentioned above with the domain knowledge in Proposition 1, 2 and 3, a new neighbourhood solution NNS can be described as follows:
NNS: u and v are two operations on the same critical block, and at least one of them is the first or last operation in the critical block. When there is no path from u to jp[v] in the disjunctive graph of the current solution, the neighbourhood solution can be generated by moving v to the position just before u; or when there is no path from js[u] to v in the disjunctive graph of the current solution, a feasible neighbourhood solution can be generated by moving u to the position just after v.
4.4 Calculation for Feasible Neighbourhood Solutions
By using the sufficient and necessary conditions proposed in this paper, it is necessary to determine whether there is a path between two vertices in the disjunctive graph of the current solution, which can be obtained through the FloydWarshall algorithm or Johnson algorithm. However, the efficiency of the FloydWarshall algorithm or Johnson algorithm is not satisfactory in this problem. Therefore, a path matrix is proposed to indicate whether there is a path between any two vertices in a disjunctive graph. Unlike the adjacency matrix, the path matrix can represent the relationship between nonadjacent nodes. The pseudocode for calculating the path matrix is as follows:
V is the number of vertices in the graph, and if P[t][k]=1, it means that there exists a path from t to k. Through the pseudocode, we can see that the time complexity of path matrix calculation is O(V^{2}), which is smaller than the complexity of FloydWarshall algorithm O(V^{3}) and Johnson algorithm O(V^{2}logV). However, if the size of the problem is large, such calculations are still expensive. To further save calculation time, we proposed a fast calculation method, which does not directly calculate whether there is a path between two vertices but uses a mixed method to find all feasible neighbourhood solutions of the current solution. The neighbourhood solution generated by moving u to the position just after v is used as an example.
This algorithm is easy to understand based on the analysis of the constraints above. If the value returned is 1, it means that the generated neighbourhood solution is infeasible; if the value returned is 0, it means that the generated neighbourhood solution is feasible. Although, in essence, this method is still to judge whether there is a path between two nodes, the time needed to calculate will be significantly reduced after combining constraints. The algorithm used to judge the neighbourhood solution generated by moving v to the position just before u is similar to before.
5 Tabu Search Algorithm for JSP
In this section, the tabu search (TS) algorithm is introduced and used to test the neighbourhood structures. The algorithm uses a tabu list to avoid duplicate searches, and it can escape from local optima by proper move selection strategy. The iTSAB for JSP proposed by Ref. [8] achieved great success. Besides this, the TS and TS/SA proposed by Zhang et al. [9, 10] also performed very well. This paper uses the strategy in TS proposed by Zhang et al. [9] to test the neighbourhood structures.
5.1 Initial Solution
The initial solution has a certain influence on the optimization results of TS, but it does not mean that the better the fitness value of the initial solution is, the better the fitness value of the searched solution is, but that the position of the initial solution in the whole solution space has a certain influence on the optimization results. However, because the JSP is a complex discrete optimization problem, it is difficult to determine where the initial solution in the solution space has the best effect on the optimization. Therefore, the random generation method is used to obtain an initial solution in this paper.
5.2 Proposed Neighbourhood Structure
As mentioned above, this paper proposes a novel neighbourhood structure using domain knowledge for local search in the JSP. The domain knowledge used to ensure that the neighbourhood solution is feasible is the necessary and sufficient condition found in this paper. At the same time, a fast calculation method of feasible neighbourhood solution is given, which makes the algorithm efficient and sufficient for local search.
5.3 Evaluation of Neighbourhood Solutions
In order to reduce the computing time of neighbourhood solutions, the estimation strategy proposed by Balas and Vazacopoulos is used in the algorithm [16]. The core of this method is to calculate the parameters of all operations that change the processing order in the neighbourhood solution and select the maximum value as the estimated value. Suppose that the operations that change the processing order are {O_{1}, O_{2}, â€¦, O_{t}}, and then the estimated value is \(\mathrm{max}\{{F}{\prime}\left({O}_{i}\right)+{p}_{{O}_{i}}+{R}{\prime}\left({O}_{i}\right)\}\), where i={1, ..., t} [16, 29]. The empirical testing showed that this estimation method reduces 20% to 40% computing time than the exact approach. In addition, the experiment results showed that the optimal results of using approximate evaluation are not worse than the optimal results obtained using accurate decoding [9].
5.4 Tabu List and the Selection of Neighbourhood Solutions
The tabu list and the selection of neighbourhood solutions are vital points of the TS. The tabu list, including the tabu contents and length, is used to avoid duplicate searches. The selection of neighbourhood solutions indicates the evolutionary direction of the algorithm, and it is determined by the quality of the neighbourhood solutions and the tabu content previously. In this paper, the tabu list and selection strategy refer to the content in Ref. [9]. More details can be found in the relevant literature.
5.5 Termination Criterion
The algorithm stops when satisfied with any condition below: (1) the number of iterations reaches a maximum value; (2) the number of disimproving iterations reaches a maximum value; (3) the solution is proved optimal. The parameters of the specific termination criteria will be specified in different experiments later.
6 Computational Experiments and Analysis
In this section, the experiments on the neighbourhood structure with necessary and sufficient conditions proposed in this paper are presented to demonstrate the superiority of this new neighbourhood structure. The experiment is divided into three parts: (1) in the first part, the experiment compared the characteristics of different neighbourhood structures, including the number of neighbourhood solutions and the calculation time by each iteration; (2) in the second part, the experiment compared results from the proposed neighbourhood structure and the existing neighbourhood structures on instances of different sizes; (3) in the third part, the experiment compared the TS combined with the new neighbourhood structure with other local search algorithms, and the optimal solutions obtained by different algorithms in some classical instances are compared. The results of the same type of instances with the same size were combined to compare their mean relative errors. The size of the instance can be represented by (nÃ—m), where n is the number of jobs and m is the number of machines. The algorithm ran in the VC++ language on a personal computer with a CPU i79750H processor (2.6 GHz). The 152 wellknown benchmark problems taken from the literature were used to test the property of the neighbourhood structures, and they include the following classes [30]: (a) 40 instances denoted as LA0140; (b) 80 instances denoted as TA0180; (c) 10 instances denoted as ORB0110, 10 instances denoted as SWV0110, 5 instances denoted as ABZ59 and 4 instances denoted as YN14; d) 3 instances denoted as FT6, FT10, FT20. These instances can be found on the website: http://optimizizer.com/TA.php.
6.1 The Characteristics of Different Neighbourhood Structures
In this part, the characteristics of different neighbourhood structures are compared. To be fair, the number of iterations, instead of the number of disimproving iterations, was regarded as the termination criterion, and the number was 1 million. Only three neighbourhood structures, N5, N6, and N7, which performed better in the above neighbourhood structures, were selected compared with NNS. 120 instances from class (a) and class (b) of 15 different sizes were used in this experiment. To make the comparison of experimental results more prominent, the results of all neighbourhood structures are compared against the results of N5 because it generates the least number of neighbourhood solutions and costs the least calculation time by each iteration. In this paper, s_num and T represent the ratio of the number of neighbourhood solutions generated and the time spent by the neighbourhood structure in an iteration to the corresponding results in N5. In NNS, the T1 and T2 indicate the time used for algorithm 1 and algorithm 2, respectively. The results are shown in Table 1. Since the instances of LA and TA can contain all different sizes of data sets, the experimental results of these two kinds of instances are only listed in Table 1.
From the experimental results of this part, we can find that NNS can obtain the most neighbourhood solutions in the local search process, and when the ratio of n/m is larger, the gap between the neighbourhood solutions obtained by NNS and those obtained by other neighbourhood structures is larger. This phenomenon occurs because the larger the n/m value is, the more operations are in each critical block. When other constraints are used to judge whether the neighbourhood solution is feasible, a large number of feasible solutions will be regarded as infeasible. Of course, using NNS will take more computation time. By using the method proposed in this paper, the computation time of largescale problems can be greatly reduced, which makes the computation time of NNS within an acceptable range.
6.2 Results Compared with Other Neighbourhood Structures
Similar to the experiment in the first part, the termination criterion was 1 million iterations, and only N5, N6 and N7 were used to compare with NNS. 152 instances mentioned before were used in this part of the experiment. Each instance was run 10 times, and the best and the average makespan were presented. The mean relative error (MRE) was used here to show the gap between the optimal solution and the solution result, and it can be calculated by the formulation MRE=100Ã—(Câˆ’ LB_{best})/LB_{best}, where C presents the makespan in the experiment and LB_{best} presents the makespan of the optimal solution. The MRE_{b} is used to represent the MRE of the best solution, and the MRE_{av} is used to represent the mean performance. The results are shown in Table 2.
In this part of the experiment, we compared four different neighbourhood structures. From the experimental results, it is easy to know that the neighbourhood structure proposed in this paper is obviously superior to other existing neighbourhood structures. To further illustrate, this paper selected four instances and drew box diagrams under different neighbourhood structures, as shown in Figure 12, which showed the superiority of the neighbourhood structure proposed in this paper.
6.3 Comparison with Other Local Search Algorithms
Although the focus of this paper is not on the design of the new algorithm for the JSP, in order to further illustrate the effectiveness of the new neighbourhood structure, this paper will use TS with NNS to compare with the results listed in Ref. [31], which are also nonpopulation based metaheuristic algorithms. The algorithms mentioned in the paper contain iTSAB [8], TS/SA [10], TS/PR [12], and IEBO [31]. The instances used here were YN14, SVW0110, and TA0150, which are the most difficult ones. The termination criterion was the number of disimproving iterations, which was 1 million. In addition, if the current optimal solution is not updated after 100,000 iterations, a solution will be randomly generated as the current solution of the next iteration. Each instance was run 10 times. The best and the average results were presented. The MRE_{b} is used to represent the MRE of the best solution, and the MRE_{av} is used to represent the mean performance. The results are shown in Table 3.
As seen from the experimental results in Table 3, although the results in this paper are slightly inferior to the best results in existing studies, the differences are very small. It should be noted that the improved algorithm based on tabu search is used in other literature, but only the tabu search algorithm is used in this paper, which illustrates the effectiveness of the neighbourhood structure in this paper from another aspect. The specific results of each instance are shown in Table 4, where C_{b} and C_{a} mean the best and average results, and T means the mean calculation time.
6.4 Discussion
In this paper, the performance of NNS is verified by three parts of the experiments. In the first part of the experiment, the characteristics of the NNS neighbourhood structure are highlighted by comparing it with the existing neighbourhood structure. Compared with N5, N6, and N7 neighbourhood structures, NNS can obtain the most feasible neighbourhood solutions, especially for problems with large n/m values. Of course, NNS takes more computation time, but by using the hybrid method proposed in this paper, the computation time can be greatly reduced. In the second part of the experiment, 152 examples were solved by using the same algorithm configuration in different neighbourhood structures. By comparing the experimental results, we can see that the NNS neighbourhood structure has advantages. The third part of the experiment uses TS with NNS to compare with other local search algorithms. The experimental results show that although only the basic tabu search algorithm is used in this paper, the gap between the results from the tabu search algorithm with the proposed neighbourhood structure and the best results in the existing literature is very small, which further demonstrates the effectiveness of NNS.
7 Conclusion and Future Work
In this paper, the reason for generating infeasible solutions in the JSP is analyzed, and the sufficient and necessary conditions to ensure feasible neighbourhood solutions are proposed and proved. A new neighbourhood structure, NNS, is proposed by combining the proposed conditions and the existing domain knowledge. After that, a fast calculation method for this neighborhood structure. Compared with the existing famous neighbourhood structures, NNS can obtain more feasible neighborhood solutions with a small computational time increase. In addition, the new neighborhood structure shows better performance in most of the instances, which further shows the superiority of NNS. In future research, the following aspects are worthy of further study:

1)
Extending NNS to other scheduling problems: Since the problems, like flexible jobshop scheduling problems and jobshop scheduling problems with different constraints, also have infeasible solutions, and the reasons for them are the same as in this paper. Therefore, the work in this paper can be extended to these scheduling problems.

2)
Clipping the neighborhood solutions: Although the neighbourhood structure in this paper can obtain the most feasible neighbourhood solutions, a large part of them are not improved on the current solutions. Therefore, these unimproved neighborhood solutions can be removed by constraint to improve the efficiency of local search.

3)
Analysing the fitness landscape of the JSP: Most of the research on the JSP is focused on the mining and application of local domain knowledge, but the research on the global domain knowledge, such as the fitness landscape, is relatively few. Therefore, exploring the fitness landscape for the JSP is worthy of further study.
Data availability
The data that support the findings of this study are openly available in http://optimizizer.com/TA.php.
References
M M Ahmadian, A Salehipour, T C E Cheng. A metaheuristic to solve the justintime jobshop scheduling problem. European Journal of Operational Research, 2021 288(1): 1429.
P Zou, M Rajora, S Y Liang. A new algorithm based on evolutionary computation for hierarchically coupled constraint optimization: methodology and application to assembly jobshop scheduling. Journal of Scheduling, 2018, 21(5): 545563.
G Al Aqel, X Y Li, L Gao. A modified iterated greedy algorithm for flexible job shop scheduling problem. Chinese Journal of Mechanical Engineering, 2019, 32: 21.
L Gui, L Gao, X Y Li. Anomalies in special permutation flow shop scheduling problems. Chinese Journal of Mechanical Engineering, 2020, 33: 46.
H Xiong, S Shi, D Ren, et al. A survey of job shop scheduling problem: The types and models. Computers & Operations Research, 2022, 142: 105731.
O H Constantino, C Segura. A parallel memetic algorithm with explicit management of diversity for the job shop scheduling problem. Applied Intelligence, 2022, 52(1): 141153.
Y An, X Chen, K Gao, et al. Multiobjective flexible jobshop rescheduling with new job insertion and machine preventive maintenance. IEEE Transactions on Cybernetics, 2022, 53(5): 31013113
E Nowicki, C Smutnicki. An advanced tabu search algorithm for the job shop problem. Journal of Scheduling, 2005, 8(2): 145159.
C Y Zhang, P G Li, Z L Guan, et al. A tabu search algorithm with a new neighborhood structure for the job shop scheduling problem. Computers & Operations Research, 2007, 34(11): 32293242.
C Y Zhang, P G Li, Z L Guan, et al. A very fast TS/SA algorithm for the job shop scheduling problem. Computers & Operations Research, 2008, 35(1): 282294.
X Y Li, J Xie, Q J Ma, et al. Improved gray wolf optimizer for distributed flexible job shop scheduling problem. Science China Technological Sciences, 2022, 65(9): 21052115.
B Peng, Z P LÃ¼, T C E Cheng. A tabu search/path relinking algorithm to solve the job shop scheduling problem. Computers & Operations Research, 2015, 53: 154164.
C R Vela, S Afsar, J J Palacios, et al. Evolutionary tabu search for flexible duedate satisfaction in fuzzy job shop scheduling. Computers & Operations Research, 2020, 119: 104931.
S Mahmud, A Abbasi, R K Chakrabortty, et al. Multioperator communication based differential evolution with sequential Tabu Search approach for job shop scheduling problems. Applied Soft Computing, 2021, 108: 107470.
J BÅ‚aÅ¼ewicz, W Domschke, E Pesch. The job shop scheduling problem: Conventional and new solution techniques. European Journal of Operational Research, 1996, 93(1): 133.
E Balas, A Vazacopoulos. Guided local search with shifting bottleneck for job shop scheduling. Management Science, 1998, 44(2): 262275.
J Xie, X Y Li, L Gao, et al. A new neighbourhood structure for job shop scheduling problems. International Journal of Production Research, 2022, 61(7): 21472161.
Q Luo, Q Deng, G Gong, et al. An efficient memetic algorithm for distributed flexible job shop scheduling problem with transfers. Expert Systems with Applications, 2020, 160: 113721.
M S Islam, M P Nepal, M Skitmore, et al. A knowledgebased expert system to assess power plant project cost overrun risks. Expert Systems with Applications, 2019, 136: 1232.
C N Potts. Analysis of a heuristic for one machine sequencing with release dates and delivery times. Operations Research, 1980, 28(6): 14361441.
M Abedi, R Chiong, N Noman, et al. A multipopulation, multiobjective memetic algorithm for energyefficient jobshop scheduling with deteriorating machines. Expert Systems with Applications, 2020, 157: 113348.
G Zhang, L Zhang, X Song, et al. A variable neighborhood search based genetic algorithm for flexible job shop scheduling problem. Cluster Computing, 2019, 22: 1156111572.
Z Shao, W Shao, D Pi. Effective heuristics and metaheuristics for the distributed fuzzy blocking flowshop scheduling problem. Swarm and Evolutionary Computation, 2020, 59: 100747.
P J Van Laarhoven, E H Aarts, J K Lenstra. Job shop scheduling by simulated annealing. Operations Research, 1992, 40(1): 113125.
M M Nasiri, F Kianfar. A GES/TS algorithm for the job shop scheduling. Computers & Industrial Engineering, 2012, 62(4): 946952.
J Xie, X Y Li, L Gao, et al. A hybrid algorithm with a new neighborhood structure for job shop scheduling problems. Computers & Industrial Engineering, 2022, 169: 108205.
W Li, D Han, L Gao, et al. Integrated production and transportation scheduling method in hybrid flow shop. Chinese Journal of Mechanical Engineering, 2022, 35: 12.
S K Zhao. Research on multioperation joint movement neighbourhood structure of job shop scheduling problem.Â Journal of Mechanical Engineering,Â 2020, 56(13): 192206. (in Chinese)
L Gui, X Y Li, L Gao, et al. An approximate evaluation method for neighbourhood solutions in job shop scheduling problem. IET Collaborative Intelligent Manufacturing. 2022, 4(3): 157165.
J J Van Hoorn. The current state of bounds on benchmark instances of the jobshop scheduling problem. Journal of Scheduling, 2018, 21(1): 127128.
Y Nagata, I Ono. A guided local search with iterative ejections of bottleneck operations for the job shop scheduling problem. Computers & Operations Research, 2018, 90: 6071.
Acknowledgements
Not applicable.
Funding
Supported by National Natural Science Foundation of China (Grant Nos. U21B2029 and 51825502).
Author information
Authors and Affiliations
Contributions
LG made contributions to the conception, experiment, and writing; XL supervised the whole work and substantively revised it; LG made contributions to the design of the work; CW made contributions to the conception, and experiment. All authors read and approved the final manuscript.
Authorsâ€™ Information
Lin Gui, born in 1995, is currently a Ph.D. candidate at State Key Laboratory of Digital Manufacturing Equipment and Technology, Huazhong University of Science and Technology, China. He received his bachelor degree from Shandong University, China, 2018. His main research interests are shop scheduling and algorithm optimization.
Xinyu Li, born in 1985, is currently a professor at State Key Laboratory of Digital Manufacturing Equipment and Technology, Huazhong University of Science and Technology, China. He received his Ph.D. degree in industrial engineering from Huazhong University of Science and Technology, China, in 2009. His main research interests are intelligent manufacturing systems, shop scheduling, intelligent optimization and machine learning.
Liang Gao, born in 1974, is currently a professor at State Key Laboratory of Digital Manufacturing Equipment and Technology, Huazhong University of Science and Technology, China. He received his Ph.D. degree in mechanical engineering from Huazhong University of Science and Technology, China, in 2002. His main research interests are intelligent optimization method and its application in design and manufacturing
Cuiyu Wang, born in 1983, is currently a Ph.D. candidate at State Key Laboratory of Digital Manufacturing Equipment and Technology, Huazhong University of Science and Technology, China. She received her master degree from Huazhong University of Science and Technology, China. Her main research interests are shop scheduling and algorithm optimization.
Corresponding author
Ethics declarations
Competing Interests
The authors declare no competing financial interests.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Gui, L., Li, X., Gao, L. et al. Necessary and Sufficient Conditions for Feasible Neighbourhood Solutions in the Local Search of the JobShop Scheduling Problem. Chin. J. Mech. Eng. 36, 87 (2023). https://doi.org/10.1186/s10033023009118
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1186/s10033023009118
Keywords
 Scheduling
 Jobshop scheduling
 Local search
 Neighbourhood structure
 Domain knowledge