Batch scheduling on a single machine with maintenance interval

: In the manufacturing industry, orders are typically scheduled and delivered through batches, and the probability of machine failure under high-load operation is high. On this basis, we focus on a single machine batch scheduling problem with a maintenance interval (SMBSP-MI). The studied problem is expressed by three-field representation as 1|𝐵, 𝑀𝐼| ∑ 𝐹 (cid:3037) + 𝜇 𝑚 , and the optimization objective is to minimize total flow time and delivery costs. Firstly, 1|𝐵, 𝑀𝐼| ∑ 𝐹 (cid:3037) + 𝜇 𝑚 is proved to be NP-hard by Turing reduction. Secondly, shortest processing time (SPT) order is shown the optimal scheduling of SMBSP-MI, and a dynamic programming algorithm based on SPT (DPA-SPT) with the time complexity of 𝑂(𝑛 (cid:2871) 𝑇 (cid:2869) ) is proposed. A small-scale example is designed to verify the feasibility of DPA-SPT. Finally, DPA-SPT is approximated to a fully-polynomial dynamic programming approximation algorithm based on SPT (FDPAA-SPT) by intervals partitioning technique. The proposed FDPAA-SPT runs in 𝑂( (cid:3041) (cid:3121) (cid:3084) (cid:3118) ) time with the approximation (1 + 𝜀) .


Introduction
Single machine scheduling problem is ubiquitous in manufacturing. As of December 2019, the number of small and micro enterprises in China accounted for 82.5% of the national number [1]. Although modern manufacturing has shifted toward intensification and large factories, in terms of quantity, small and micro enterprises still make up a large proportion. Unlike large enterprises that have a large number of machines and assembly lines, in small and micro enterprises, especially micro enterprises, there is only one machine in the workshop production. Due to the large number of machines in large enterprises, accidental machine failure has little impact on the completion of the entire production plan. In 2017, a single machine in the large-scale wafer factory of Magnesium Group failed, and the maintenance of the machine took a lot of time, resulting in a serious lag in production progress. The lag in production progress has led to insufficient capacity of memory products using wafers as raw materials, which has triggered a surge in the prices of related products worldwide. The influence of machine failure on large enterprises is still the same. For small enterprises with only one or a few machines, once one or several machines fail, it will be under a significant negative impact on their production plans. It can be seen that despite the fact that the occurrence of machine failure is a small probability event, once the machine fails, it will have many adverse effects. By reasonably shutting down and inspecting the machine regularly, the probability of machine failure can be greatly reduced.
In the actual production and trading process, the finished products are usually delivered to customers in batches. Based on this fact, many scholars have conducted research in the field of batch scheduling. Ikura etc. [2] studied single machine batch scheduling problem with the goal of minimizing the maximum completion time. An approximate algorithm was proposed, while the effect of this algorithm is not ideal. Chang etc. [3] further studied the same problem and proposed a Simulated Annealing Algorithm (SAA) with better optimization effect. In Chang's paper, Longest processing time (LPT) order was applied to optimize the initial solution of SAA. Lee etc. [4] proposed a pseudopolynomial time exact algorithm and a complete polynomial time approximate algorithm to minimize total completion time of SMBSP with dynamic job arrivals. Branch and bound algorithm (BBA) is another algorithm that is commonly used to solve single machine batch scheduling problems. For typical case, see reference XXX. In XXX, Azizoglu etc. [5] proposed a BBA to minimize total weighted completion time of SMBSP. In addition to the batch single-machine scheduling problem, research on the single machine scheduling problem with unavailable intervals (SMSP-UI) is also one of the research hotspots. Several researchers have made progress in SMSP-UI. Sanlaville etc. [6] and Ma etc. [7] independently reviewed the research in this field in recent decades. To optimize the total weighted completion time of SMSP-UI, Ma etc. [8] proposed a dynamic programming algorithm (DPA) and a BBA. both runs in pseudo-polynomial time. Although both DPA and BBA are feasible, they are both pseudo-polynomial time algorithms. In addition, Ma etc. [9] proposed a heuristic algorithm based on longest processing time (LPT) order to minimize max completion time of SMSP-UI. Xie etc. [10] designed a heuristic algorithm which runs in polynomial time to optimize delivery time of SMSP-UI with job rejection. Luo etc. [11] studied a mew branch of SMSP-UI, in which the maintenance time is related to workload. An approximate algorithm running in polynomial time was proposed to optimize total weighted completion time.
It is clear from the above literature review, however, despite the in-depth study in the field of SMBSP and SMSPUI, single machine batch scheduling with maintenance intervals (SMBSP-MI) is still a blind spot for research. Since the outbreak of the COVID-19 virus in January 2020, the production capacity of major mask manufacturers worldwide has been unable to meet demand, and a large number of household mask factories have appeared in this context. Most of these small mask factories work independently or independently from each other. Due to the serious shortage of production capacity, mask machines usually need to work at full load or overload, which greatly increases the probability of machine failure. Therefore, it is necessary to carry out regular shutdown and maintenance of the mask machine. This paper studies SMBSP-MI of a single mask machine scheduling environment. First, the mathematical programming model of SMBSP-MI is established, and then the SMBSP-MI is proved to be NP-hard. On this basis, shortest processing time (SPT) order is proved the optimal scheduling rule of SMBSP-MI, and a DPA based on SPT (DPA-SPT) is running in ( ) is proposed. Finally, an approximate method is added to reduce the time complexity of DPA-SPT to polynomial time.

Problem description
Since the outbreak of the COVID-19 virus in January 2020, the production capacity of major mask manufacturers worldwide has been unable to meet demand, and a large number of household mask factories have appeared in this context. Most of these small mask factories work independently or independently from each other. Due to the serious shortage of production capacity, mask machines usually need to work at full load or overload, which greatly increases the probability of machine failure. Therefore, it is necessary to carry out regular shutdown and maintenance of the mask machine. This paper studies the maintenance scheduling problem in the environment of a masking machine. The problem is described as follows: Mask orders for multiple customers are processed on one mask machine. The factory needs to process n quantities of raw materials into masks. Because different customers have different delivery times, the raw materials are processed in batches. Due to a large number of orders, the mask machine needs high-load work. To reduce and avoid the probability of machine failure due to high-load work and ensure smooth production, the factory regularly shuts down the mask machine for maintenance. To ensure that the delivery schedule is not affected while overhauling, the total process time and delivery cost of mask production are used as evaluation indicators The mathematical description of SMBSP-MI is: n jobs are processed in batches on single machine. The set of jobs is = { , , … , }. Jobs in J is divided into m batches, i.e., represents a batch of jobs, and is the set of all batches. Once a batch of jobs is processed, it is delivered to the customer. The unit batch delivery cost is . A maintenance interval (MI) is set during the machining process, where MI begins at time and ends at time . No job is allowed to be processed during MI. The goal is to optimize schedule of batches and jobs, so that the sum of total flow time ∑ and delivery cost total is minimized. SMBSP-MI is expressed by three-field representation as 1| , | ∑ + . The mathematical programming model of SMBSP-MI is expressed as follows.
Formula 1 is the objective function, in which is flow time of the kth scheduled batch, and is total delivery cost. Formula 2 indicates that the total flow time of all jobs is equal to the sum of the flow time of all batches. This formula makes it convenient to calculate the total flow time in an efficient way. Formula 3 indicates that the flow time of the ith job in the kth batch is equal to the sum of the flow time of the previous processed job and the completion time of . i=1 means that is the first job to be processed in the kth batch, thus the previous job of is i.e. the last job processed in the (k-1)th batch . The previous job of is while i >1, respectively. Formula 4 and 5 explains the calculation of 's completion time, where is a 0-1 variable to judge whether is allowed to be processed before MI. i.e. is allowed to be processed immediately while , otherwise it is to be processed after MI. The strong constraint of formula 6 ensures that the processing time of any job is not greater than , and the end of MI is not earlier than the sum of the processing time of all jobs.
Equal-size partition problem is described as: Given a set = ( , , . . . , , . . . , ), ∈ * , and ∑ = 2 . Are there two disjoint subsets and , where | | = | | and ∑ = ∈ ∑ = ∈ ? Theorem 1. SMBSP-MI is an NP-hard problem. Proof. The NP-hard attribute of SMBSP-MI is proved by the reduction of the Equal-Size Partition Problem. Let ≥ + 2. The Equal-Size Partition Problem is obviously meaningless when < + 2, so the situation of < + 2 is not considered. An example of equal-size partition problem is established bellow, variables of example see table 1.
In what follows, we will prove that the equal-size partition problem has a feasible solution, if and only if the constructed example has a solution which does not exceed U. Let the sets and be the solutions to Equal-Size Partition Problem. Let collection represent the set of jobs corresponding to set , represent the set of artifacts corresponding to collection .
Since there are n jobs in total, DPA-SPT contains n cycles of iterations. Several states are produced while containing the jth into S . Let =( , . . . , , . . . , ) be the set of the states produced in the jth cycle of iteration, in which = ( , , , , ) is one of the feasible states. Variables and parameters in are defined as follows: denotes finish time of the last job processed before ; denotes number of jobs in the last batch processed before ; denotes number of jobs in the first batch processed after (these jobs may be in the same batch with those processed before , if processing of the last batch is interrupt by MI); a denotes number of jobs processed after ; t denotes the sum of current total flow time and delivery cost.
Since DPA select the optimal job in every cycle of iteration, the current optimal schedule of SMBSP-MI before the jth iteration is = (1 , 12 , . . . , − 1 ). And by comparing t values of all states produced in the following cycle of iteration, the one with minimal t value is chosen as . And is at one of the possible position on the machine, i.e.
is located in the last batch processed before ; is located in one of other batches processed before ; is located in the first batch processed after ; is located in one of other batches processed after , respectively. The optimal value * will be found after all jobs are sequenced, and the optimal schedule of SMBSP-MI will be decided by backtracking, respectively.

FDPAA-SPT
Although DPA-SPT achieve best solution of small and medium scale problems, it is not feasible for large-scale problems. With the expansion of the problem scale, the complexity of DPA-SPT faces exponential dimension explosion. Taking into account this problem, the use of elimination is the core of approximation to reduce the complexity down to polynomial time. By pruning some bad states and the application of state pruning technology [17], the solution space that the algorithm needs to search is reduced, so as to reduce the complexity. In addition, due to elimination operation, the optimal solution may be missed, hence the improved algorithm is an approximate algorithm. In what follows, a fully-polynomial dynamic programming approximation algorithm based on SPT (FDPAA-SPT) is designed.
Take two large number L and V, where ≤ * ≤ . Take a ε > 0, let = , = . Divide [0, ] and [0, ] into and sub intervals, respectively. In this way, To get a polynomial-time approximation schedule, the state set obtained by the jth iteration of DPA-SPT is pruned. A new set * is produced, and * satisfies the following attribute: (1) * ∈ ; (2) There is only one * in the same subinterval of × ; (3) For any eliminated state ( , , , , ) , there is a state ( , , , , ) ∈ * locating in the same subinterval with it. The pseudo code of FDPAA-SPT is as follows. In what follows, we prove that no matter how is produced, it satisfies the assumption of theorem XXX.

conclusion
In the manufacturing industry, orders are typically scheduled through batch production and delivery mode, and the probability of machine failure under high-load operation is high. On this basis, we focus on a single machine batch scheduling problem with machine maintenance intervals. To solve this problem, the mathematical programming model is established. SMBSP-MI is proved to be an NP-hard problem, i.e., there is no exact algorithm that can obtain the optimal solution of large-scale problems in polynomial time. Hence, we consider designing an approximation algorithm that can obtain a highprecision solution in polynomial time. Our approach is to design an accurate algorithm based on optimal rules in the first place. Considering the dimensional explosion when solving large-scale problems, some of the poor solutions obtained by DPA-SPT are eliminated to reduce the complexity down to polynomial time. A small-scale example verifies the feasibility of DPA-SPT. As for the proposed approximation algorithm, no verification of the small and medium-scale is conducted, for the verification of the small and medium-scale problem is meaningless. Besides, although the approximation algorithm theoretically has a solution in polynomial time, it still consumes a lot of calculation time, thus no large-scale calculation examples are designed for verification. On the contrary, we proved that the approximate ratio of the algorithm is (1 + ).