Two Parallel-Machine Scheduling Problems with Function Constraint

,e objective of this paper is to minimize both the makespan and the total completion time. Since parallel-machine scheduling which contains the function constraint problem has been a new issue, this paper explored two parallel-machine scheduling problems with function constraint, which refers to the situation that the two machines have a same function but one of the machines has another. We pointed out that the function constraint occurs not only in the manufacturing system but also in the service system. For the makespan problem, we demonstrated that it is NP-hard in the ordinary sense. In addition, we presented a polynomial time heuristic for this problem and have proved its worst-case ratio is not greater than 5/4. Furthermore, we simulated the performance of the algorithm through computational testing. ,e overall mean percent error of the heuristic is 0.0565%. ,e results revealed that the proposed algorithm is quite efficient. For the total completion time problem, we have proved that it can be solved in O(n4) time.


Introduction
e scheduling problem studied in this paper was motivated by the manufacturing of the metal processing industry. In the traditional manufacturing, a lathe machine and a milling machine have different functions. Generally speaking, the lathe machine is a tool that rotates a workpiece about an axis of rotation to perform various operations such as cutting, deformation, knurling sanding, and turning. e milling machine is used to cut the plane, while the shape of the forming surface, the spiral groove, or the tooth shape of the gear is milled with a special-shaped milling cutter. During milling, the workpiece is mounted on a table or an indexing head attachment, and the milling cutter performs a cutting motion, supplemented by a table for feeding motion. And now, a 5-axis machining center for milling and turning has all the functions of lathe machine and milling machine. As the company's performance grows rapidly, companies must purchase machines to meet customer needs. While newly purchased machines tend to have more function than older machines, functional alternatives occur between machines. We named this phenomenon as function constraint (e.g., lathe machine versus 5-axis machining centers for milling and turning). e function constraint occurs not only in the manufacturing system but also in the service system. In the service system, the parallel-machine is composed by the employees. e senior staff, the junior employees, and the new employees all have the ability to limit and replace.
Parallel machine in a production environment can be divided into three categories according to the nature of the machine: identical, uniform, and unrelated parallel machines. For decades, the parallel-machine production scheduling problem has been extensively studied under various classical scheduling performance measurement criteria. e makespan and total completion time are the two best important performance measurement criteria. e makespan is also called the maximum completion time or the completion time of the last workpiece on the last machine. e makespan is usually used to measure the utilization of machinery and equipment. If one shortens the makespan and the machine utilization and production efficiency is improved, more flexible time can be reserved to prevent the sudden occurrence of the production line. e completion time refers to the time spent in the system from the time of the workpiece that arrives at the site to its completion, and the total completion time is the sum of the completion time of all the workpieces. erefore, the total completion time is expected to be minimized. at is, the inprocess inventory of the factory is expected to be minimized to reduce the cost of inventory.
Chung et al. [1] explored a two identical parallel-machine scheduling problem with molds constraints. eir objective is to minimize the makespan. For the problem is NP-hard, they give three heuristics and analyze each heuristic has a worst-case performance ratio of 3/2. Computational results revealed that heuristics are efficient even for the large-sized problem. Xu and Yang [2] studied a two parallel-machine scheduling with a periodic availability constraint.
eir objective is to minimize the makespan. Because the problem is NP-hard, they present a mathematical programming model to solve it and, next, compare the performance of the longest processing time first (LPT) algorithm with the list scheduling (LS) via computational experiments. Most of the results showed that the LPT is better than the LS. Xu et al. [3] examined a two parallel machine scheduling problem to minimize the makespan. e problem is known as NP-hard. ey applied the branch-and-bound method to solve the small-sized problem and presented a Tabu search algorithm for the large-sized problem. Ji and Cheng [4] presented a fully polynomial-time approximation scheme for parallel-machine scheduling under a grade of service provision to minimize makespan consideration. Lee et al. [5] addressed a makespan minimization scheduling problem on identical parallel-machine. ey applied the simulated annealing method, and several heuristic algorithms have been proposed to tackle the problem. Computational results demonstrated that the simulated annealing method is efficient and better than the existing methods. Yin et al. [6] explored parallel-machine scheduling of deteriorating jobs with potential machine disruptions. e authors examined two cases of machine disruption (i.e., performing maintenance immediately on the disrupted machine when a disruption occurred and not performing machine maintenance). e nature of the jobs has two types: nonresumable and resumable. ey determined the computational complexity status of various cases of the total completion time minimization problem and provided pseudopolynomial-time solution algorithms and fully polynomial-time approximation schemes for them.
Zhao et al. [7] explored a two parallel-machine scheduling problem where one machine is not available in a specified time period. e unavailable time period is fixed and known in advance. ey proposed a fully polynomialtime approximation scheme for the total weighted completion time minimization problem and generalized the results to the case with m parallel machine. Kuo and Yang [8] studied parallel-machine scheduling with time-dependent processing time. For the total completion time and the total load problems, they showed that the two problems are polynomially solvable. Gerstl and Mosheiov [9] proposed a general position-dependent processing time model. ey considered scheduling problems which combine the option of job rejection and the model on parallel machine. eir objectives are total flow-time and total load. ey proved that both problems can be solved in polynomial time in the number of jobs. Huang and Wang [10] stressed parallel-machine scheduling problems with deteriorating jobs. ey showed that the total absolute differences in completion time and the total absolute differences in waiting time minimization problems can be solved in polynomial time.
Wang and Wang [11] studied a three-machine permutation flow shop scheduling problem with time-dependent processing times. e objective is to find a sequence that minimizes the makespan. Several dominance properties and a lower bound are derived to speed up the elimination process of a branch-and-bound algorithm. Moreover, two heuristic algorithms are proposed to overcome the inefficiency of the branch-and-bound algorithm. Computational results show that the heuristic algorithm M-NEH performs effectively and efficiently.
Parallel-machine scheduling combines the function constraint problem is a new issue. erefore, this paper explored two parallel-machine scheduling problems with function constraint. e objectives are to minimize the makespan and the total completion time. e rest of the paper is organized as follows. In Section 2, we introduced the notation and formally formulated our problems. In Section 3, we demonstrated the computational complexity status and presented a heuristic algorithm, worst-case ratio, and computational experiments for the makespan minimization problem. In Section 4, we formulated the total completion time minimization problem as an assignment. In the last section, we concluded the paper and suggested issues for the future research.

Problem Formulation
ere are n jobs in the set N � (J 1 , J 2 , ..., J n 1 , J n 1 +1 , ..., J n ). Assume set N consists of two classes of job that are the first class jobs and the second class jobs. Let n 1 and n 2 denote the number of jobs of the first class and the second class, respectively. Let S 1 and S 2 denote the set of the jobs of the first class and the second class, respectively. at is, N � S 1 ∪ S 2 , where S 1 � (J 1 , J 2 , ..., J n 1 ) and S 2 � (J n 1 +1 , ..., J n ). Let p j denote the processing time of J j (j � 1, 2, ..., n). Assume there are two parallel machines M i (i � 1, 2), where M 1 can process the first class jobs only and M 2 can process both of the first class jobs and the second class jobs. Some common assumptions are as follows: (1) all jobs are non-preemptive and available for processing at time zero; (2) each machine can handle at most one job at a time and cannot stand idle until the last job assigned to it has finished processing; and (3) each job can be processed on at most one machine at a time. e objectives are to minimize the makespan and the total completion time. We used "fc" to denote the function constraint relations between the two machines. Following the common scheduling notation, the problems can be described as P2|fc|C max and P2|fc|TC, respectively.

Minimization of the Makespan
In this section, we confirmed the complexity and presented the worst-case bound for P2|fc|C max . First, we excluded the case of the sum of processing time in the second class jobs is larger than the sum of processing time in the first class jobs because the first class jobs processed on M 1 and the second class jobs processed on M 2 are optimal for the abovementioned case. Second, we analyze the complexity of the problem P2|fc|C max .
ird, we presented a heuristic approach and analyze the worst-case bound of the algorithm. Finally, a computational experiment was conducted to evaluate the performance of the proposed algorithm.

e Heuristic and Worst-Case Bound.
e special case of all the jobs belongs to the first class, n 1 � n, and then the problem P2|fc|C max becomes the classical problem P2‖C max . It is known in advance that P2‖C max is NP-hard in the ordinary sense [18]. erefore, the following theorem holds.

Theorem 1. Scheduling problem P2|fc|C max is NP-hard in the ordinary sense.
A simple heuristic approach is described in Algorithm 1. A simple sort can be done in O(n log n) (e.g., heap sorting). Hence, the complexity of Step 1 is O(n log n). e complexity of Step 2 is O(n). Overall, the complexity of the algorithm is O(n log n).
A straightforward result is given as follows.

Lemma 1.
For the problem P2|fc|C max , the following holds: (1) C * max ≥ n j�n 1 +1 p j , where C * max denotes the makespan of the optimal schedule (2) C * max ≥ ( Proof. Assume J k is the last processed job based on the LPT approach. If J k ∈ S 2 , then C max (LPT) � C * max . erefore, the following proof processes are under the assumption of J k ∈ S 1 .
If k � 1, then C max (LPT) � C * max . For the case of k ≥ 2, assume s k denotes the starting time of J k . Since there is no idle time on the machines prior to the time s k , (1) Consider the following two cases: p k ≤ C * max /2 and p k > C * max /2. When p k ≤ C * max /2, we have (2) When p k > C * max /2, based on optimal consideration, we have n j�n 1 +1 p j ≤ C * max /2 and each machine cannot arrange two jobs that belong to S 1 and whose job's index is less or equal to k. erefore, J k is the only job that belongs to S 1 and being processed on M 2 . at is, C max (LPT) � p k + n j�n 1 p j . Within the optimal sequence, J k is the only job that belongs to S 1 and can be processed on M 2 . We have C * max ≥ C max (LPT). Hence, C * max � C max (LPT).

e Computational Experiments.
Although the worst case above seems quite good from the theoretical aspects, 25% errors cannot be accepted from the application dimensions. erefore, some computational experiments were conducted to evaluate the performance of the LPT approach. e LPT approach was coded in Visual BASIC 6.0 and implemented on a personal computer with Intel core i7 16G CPU. Some test problems for each environment were randomly generated, the details of which are as follows: (1) n is equal to 50, 100, 150, 200, 250, 300, 500, and 1000 (2) n 1 is uniformly distributed over [1, n]. n 2 � n − n 1 (3) p i is uniformly distributed over [1,50], [1,100], [1,200], [1,500], and [1,1000] A ratio of ((C max (LPT) − LB) × 100)/LB is used as an index to evaluate the performance of the LPTapproach, where C max (LPT) is the solution found by the LPT approach and LB Discrete Dynamics in Nature and Society is the solution found by lower bound. e ratio is computed for 300 test problems in each problem size; hence, 12000 (300 × 8 × 5) test problems are generated for the proposed problem P2|fc|C max . e computational results are shown in Table 1. e results revealed that the mean percentage errors of the LPT approach are 0.0214, 0.0397, 0.0560, 0.0741, and 0.0905 with five different processing time distribution periods, respectively. From Table 1, we found that the larger the problem the smaller the error percentages and the wider the processing time range the larger the error percentages. e overall mean percent error of the LPT approach is 0.0565%.

Minimization of the Total Completion Time
In this section, we showed that the problem P2|fc|TC can be solved in O(n 4 ) time. Let (k 1 , k 2 ) denotes the vector of the number of jobs allocated to M 1 and M 2 , where 1 ≤ k 1 ≤ n 1 and n 2 ≤ k 2 ≤ n − 1. We excluded the case of (k 1 , k 2 ) � (0, n) because it becomes a single machine scheduling problem and the SPT (shortest processing time first) is optimal. Let J [ij] and p [ij] denote a job scheduled in the jth position on a machine i and its processing time, respectively. For the convenience, we rename the job sequences processing on M 1 and M 2 as J [11] , J [12] , ..., J [1k 1 ] and J [21] , J [22] , ..., J [2k 2 ] , respectively. en, the total completion time can be calculated as follows: We rewrite equation (3) as where Assume the position of job that is processing on M 1 and M 2 is 1, . . . , k 1 and k 1 + 1, k 1 + 2, k 1 , k 2 (n), respectively. Obviously, the second class of jobs cannot be scheduled at the previous position of k 1 . en, we gave the elements of assignment vector as follows: Constraint of the second line at a ij ensures that the second class jobs are not scheduled before the position of k 1 under minimization consideration. For a given vector (k 1 , k 2 ), P2|fc|TC can be formulated as the following assignment problem: It is well-known that an assignment problem can be solved in O(n 3 ) time. For a given vector of (k 1 , k 2 ), 1 ≤ k 1 ≤ n 1 , and n 2 ≤ k 2 ≤ n − 1, problem P2|fc|TC can be solved in O(n 3 ) time.
Step 1. Arrange the first class jobs in nonincreasing order, without loss of generality, and assume the LPT sequence remains J 1 , J 2 , ..., J n 1 .
Step 2. Assign J n 1 +1 , J n 1 +2 , ..., J n to the M 2 . After that, whenever a machine is freed, the longest job among those not yet processed in the first class is put on the machine. ALGORITHM 1: e longest processing time first (LPT) approach.

Conclusions
is paper explored two parallel-machine scheduling problems with function constraint. We pointed out that the function constraint occurs not only in the manufacturing system but also in the service system. erefore, this work is meaningful.
In this research, two important and famous classical objectives, the makespan and the total completion time, were studied. For the makespan problem, we demonstrated that it is NP-hard in the ordinary sense. We presented a polynomial time heuristic for this problem and have proved its worstcase ratio is not greater than 5/4. Computational testing of the heuristic was conducted, and the results revealed that the overall mean percent error of the proposed algorithm is 0.0565%. For the total completion time problem, we have proved that it can be solved in O(n 4 ) time.
Future research may examine other topics such as the total load, total tardiness, and number of tardy jobs or extending the model to the uniform parallel-machine setting or other settings.

Data Availability
No data were used to support this study.

Conflicts of Interest
e authors declare that they have no conflicts of interest.