Computers & Operations Research 50 (2014) 14–23
Contents lists available at ScienceDirect
Computers & Operations Research journal homepage: www.elsevier.com/locate/caor
Parallel machine scheduling problem with preemptive jobs and transportation delay Hesam Shams, Nasser Salmasi n Department of Industrial engineering, Sharif University of Technology, Tehran, Iran
art ic l e i nf o
a b s t r a c t
Available online 18 April 2014
In this research the parallel machine scheduling problem with preemption by considering a constant transportation delay for migrated jobs and minimization of makespan as the criterion i.e., Pm|pmtn (delay)|Cmax is investigated. It is assumed that when a preempted job resumes on another machine, it is required a delay between the processing time of the job on these two machines. This delay is called transportation delay. We criticize an existing mathematical model for the research problem in the literature [Boudhar M, Haned A. Preemptive scheduling in the presence of transportation times. Computers & Operations Research 2009; 36(8):2387–93]. Then, we prove that there exists an optimal schedule with at most (m 1) preemptions with transportation among machines for the problem. We also propose a linear programming formulation and an exact algorithm for the research problem in case of equal transportation delay. The experiments show that the proposed exact algorithm performs better than the proposed mathematical model. & 2014 Elsevier Ltd. All rights reserved.
Keywords: Scheduling Parallel machine scheduling Transportation delays Migration delay Preemption Minimization of makespan Mathematical modeling
1. Introduction Parallel machine scheduling problems (PMSP) have received a great amount of attention during last decades based on their applications in real world. Fidge [1] discusses about the application of PMSP in computer processing, manufacturing lines, preemptive multitasking, and multi-stage systems as examples of the areas that parallel machine environment is observed. Several exact and heuristic algorithms are proposed to solve different types of PMS problems. In PMSP, preemption is occurred if the process of a job on a machine is interrupted and the process of another job is resumed. The remaining processing time of the preempted job can be performed later on that machine or on another machine. In most studies, when a job is preempted on a machine, it is assumed that there is no difference between processing the remaining part of the processing time of the job on the same machine or on another machine. McNaughton [2] studies several scheduling problems with different objective functions in which the preemption of jobs is allowed. He proposes an exact algorithm to solve the Pm|pmtn| Cmax problem (presented as Pm|prmp|Cmax in literature as well) optimally. Muntz and Coffman [3] propose an exact algorithm to solve the P2|pmtn, prec|Cmax problem which provides the optimal solution in a polynomial time.
n
Corresponding author. E-mail addresses:
[email protected] (H. Shams),
[email protected] (N. Salmasi). http://dx.doi.org/10.1016/j.cor.2014.04.008 0305-0548/& 2014 Elsevier Ltd. All rights reserved.
In real world, the process of a preempted job on another machine cannot be resumed immediately since time is required to transfer the job to another machine. Boudhar and Haned [4] name this changeover time as transportation delay. Rayward-Smith [5] considers the idea of transportation delay in interprocessor communication delays. He studies scheduling independent jobs with preemption on identical parallel machine in order to minimize makespan by considering equal transportation delay time for jobs among machines and shows that the problem is NP-complete. Fishkin et al. [6] study the Pm|pmtn(delay)|Cmax problem by considering equal transportation delay among machines. This problem can be presented as Pm|pmtn(delay¼ t)|Cmax. They show that based on the ratio of transportation delay time and the processing time of jobs, the problem instances can be classified as easy problems or strongly NP-hard problems. They propose a heuristic algorithm for the research problem in case of existing two parallel machines. They also prove that for the P2|pmtn(delay¼t)|Cmax problem there exists an optimal schedule with at most one preemption with transportation and for the P3|pmtn(delay¼t)|Cmax problem, there exists optimal schedule with at most two preemptions on jobs with transportation. They also conjecture that for the Pm|pmtn(delay¼t)| Cmax problem, there exists an optimal schedule with at most (m1) preemptions with transportation. Boudhar and Haned [4] study the Pm|pmtn(delay)|Cmax problem. They assume that the transportation delay times between the two machines are not equal. They propose a linear programming formulation and several heuristic algorithms for the research problem. They also prove that the problem is NP-hard.
H. Shams, N. Salmasi / Computers & Operations Research 50 (2014) 14–23
Haned et al. [7] study the Pm|pmtn(delay)|Cmax problem. They propose a heuristic algorithm for a special case of this problem with identical processing times and not fixed number of machines i.e., P|pmtn(delay ¼t), pj ¼p|Cmax, that solves the problem in a polynomial time. In order to prove that the P|pmtn (delay), pj ¼p|Cmax problem is NP-hard by reduction from the Hamiltonian chain problem, they consider an arbitrary instance of the problem. The arbitrary instance of the P|pmtn(delay), pj ¼p| Cmax problem is in case of that the number of machines is equal to m, i.e., m ¼m, the number of jobs is equal to (m þ1), i.e., n ¼ (m þ1), the processing time of jobs is also equal to m, i.e., pj ¼p ¼m and the transportation delays are equal to 1 and 2. For this special case of the P|pmtn(delay), pj ¼ p|Cmax problem, they prove that there exists an optimal schedule which the number of preempted jobs is equal to m 1. Recall that the conjecture discusses about the Pm|pmtn(delay ¼t)|Cmax problem. They also present a dynamic programming algorithm and a fully polynomial time approximation scheme (FPTAS) to solve the P2| pmtn(delay)|Cmax problem. In this research we criticize the mathematical model proposed by Boudhar and Haned [4] for the Pm|pmtn(delay)|Cmax problem. Then, we propose a valid mathematical model and an exact algorithm for the special case of the problem in which the transportation delay of jobs are equal on machines. We also provide a proof about the conjecture proposed by Fishkin et al. [6] about the number of preemptions with transportation for the Pm|pmtn(delay ¼ t)|Cmax problem. This paper is organized as follows. The proposed mathematical model by Boudhar and Haned [4] is criticized in Section 2. In Section 3, we prove that for a parallel machine problem with m machines in parallel, there exists an optimal schedule with at most (m 1) preemptions with transportation among machines. In Section 4, a mathematical formulation and an exact algorithm for the research problem are proposed. In Section 5, the specifications of test problems used to compare the performance of the mathematical model and the exact algorithm are explained. The results of the experiments on random test problems with different sizes are presented in Section 6 and finally, the conclusions are given in Section 7.
2. Evaluating the proposed mathematical model by Boudhar and Haned [4] Boudhar and Haned [4] proposed a mathematical model for the Pm|pmtn(delay)|Cmax problem. The parameters, decision variables, and the mathematical model are as follows:
Parameters pj B tik Decision variables Cmax qji sji xji αjij'i'
15
The model: ð1Þ
Min C max Subject to m
∑ qji ¼ pj
i¼1
j ¼ 1; …; n
sji þ qji rC max
ð2Þ
j ¼ 1; …; n
ð3Þ
i ¼ 1; …; m
8 sji þ qji sj0 i r ð1 αjij0 i Þ:B > > > < sj0 i þ qj0 i sji r αjij0 i :B > > > : αjij0 i þ αj0 iji ¼ 1
j ¼ 1; …; n i ¼ 1; …; m
8 sji þ qji þ t ii0 :xji sji0 r ð1 αjiji0 Þ:B > > < sji0 þ qji0 þt ii0 :xji0 sji rαjiji0 :B > > α 0 þα 0 ¼ 1 : jiji
(
ð4Þ 0
j0 ¼ 1; …; n ðj a j Þ
ji ji
j ¼ 1; …; n i ¼ 1; …; m
ð5Þ
0
0
i ¼ 1; …; m ði ai Þ
xji r B:qji
j ¼ 1; …; n
qji r B:xji
i ¼ 1; …; m j ¼ 1; …; n i ¼ 1; …; m
sji ; qji Z 0 xji ; αjij0 i ; αj0 iji ; αjiji0 ; αji0 ji A f0; 1g
0
ð6Þ 0
j ¼ 1; …; n ðj a j Þ 0
0
i ¼ 1; …; m ði a i Þ The objective function is minimization of makespan as presented by Eq. (1). Constraint set (2) is incorporated to the model to make sure that the sum of processing time of each job on all machines is equal to its required processing time. The makespan value should be greater than or equal to the completion time of each job. Thus, the makespan value should be greater than or equal to the completion time of each processed part of each job on any machine. Constraint set (3) is incorporated to the model for this reason. Constraint sets (4) are incorporated to the model to make sure that each machine is processing at most one job at any time. Constraint sets (5) are incorporated to the model to calculate the transportation delays for transported jobs. Based on these constraint sets, the start time of processing a job on a machine is greater than or equal to the completion time of processing the job on a machine which was processing the job before, plus the transportation delay. Constraint sets (6) are incorporated to the model to find the jobs processed on each machine.
The processing time of job j A large number The transportation delay time to transport a job between machines i and k The The The 1 0 8 > <1 > :
0
makespan value duration of time that job j is processed on machine i start time of processing job j on machine i if job j is processed on machine i otherwise if the process of job j on machine i is completed before 0
0
the process of job j on machine i is started otherwise
16
H. Shams, N. Salmasi / Computers & Operations Research 50 (2014) 14–23
The authors claim that the model is valid for the problems with arbitrary transportation delay of jobs on machines i.e., Pm|pmtn (delay)|Cmax. In our opinion, the proposed mathematical model is not a valid one for the proposed research problem. Our reasons are as follows: 1. The authors assume that the period of time that a job is processed on a machine i.e., qji is performed in one part without any interruption. In other words, the authors assume that any interruption of processing a job leads to a transportation. There are optimal solutions for the proposed research problem in which a job is processed on a machine for a while and then is preempted and after a while the process of the preempted job is resumed on the same machine. In this case, the decision variables defined by the authors as qji and tji do not support this situation. Such a situation is presented in Example 1 for the cases of equal transportation delay for the jobs among machines. In this example the solution provided by relaxing the assumption provides a sequence with better objective function value than the one provided by Boudhar and Haned [4] mathematical model. Example 1. Consider a parallel machine problem with three identical machines. Assume that four independent jobs should be processed with these machines. The processing time of jobs are presented in Table 1. It is assumed that the transportation delay time for a job between any two machines is equal to 20 time units. The optimal solution provided by Boudhar and Haned [4] mathematical model by using ILOG CPLEX 12.2.2 [8] is a schedule with objective function value equal to 75 as presented in Fig. 1a. However, a solution can be obtained based on the schedule presented in Fig. 1b with an objective function value equal to 70. It is clear in Fig. 1b that by preempting J1 (but not transporting it to another machine) a better solution can be obtained. This example shows that the proposed mathematical model by Boudhar and Haned [4] is not a comprehensive mathematical model. 2. The authors assume that the transportation delays of jobs are different for different machines. Then, they assume that if a job Table 1 The processing time of jobs. Jobs
J1
J2
J3
J4
Processing time (Pj)
60
60
60
30
Table 2 The transportation delay time between any two machines.
Machine 1 Machine 2 Machine 3
Machine 2
Machine 3
0 70 20
70 0 20
20 20 0
Fig. 2. (a) Solution obtained by the mathematical model for the example and (b) optimal schedule for the example.
is processed on two different machines, the transportation delay should be considered between their processing times of the jobs on those machines. The authors develop their mathematical model based on this assumption. In our opinion, this assumption is not valid if the job is processed on more than two machines as explained in Example 2. Example 2. Consider the same parallel machine problem explained in Example 1. Assume that the transportation delay time between any two machines is equal to the ones presented in Table 2. The solution obtained by Boudhar and Haned [4] mathematical model with the objective function value equal to 75 (solved by using ILOG CPLEX 12.2.2 [8]) is presented in Fig. 2a. A schedule with the objective function value equal to 70 can be obtained as presented in Fig. 2b. In this example, J4 is processed for the length of ten time units on M1. Then, it is transported to M3 to be processed for the length of ten time units on M3. Finally, it is transported to M2 to be processed for the length of ten time units. In this case, since the job is not transported directly from M1 to M2, it is not required that a transportation delay is considered between the processing time of J4 on these machines. This fact is ignored in constraint sets (5) of the proposed mathematical model by Boudhar and Haned [4]. In this model if a job is processed on two different machines, it is assumed that there exists transportation delay between them whereas it may be a third machine which the job is transported on it first and then transported from it. In general, different transportation delays are not considered in the mathematical model. 3. The authors do not consider the following constraint set in the mathematical model: n
Fig. 1. (a) Solution obtained by the mathematical model for Example 1 and (b) the optimal schedule for the example.
Machine 1
∑ qji r C max
j¼1
i ¼ 1; …; m
ð7Þ
H. Shams, N. Salmasi / Computers & Operations Research 50 (2014) 14–23
17
constraint set (7) implies that the makespan value should be greater than or equal to the processing time of jobs on each machine. Incorporating this constraint set to the model can speed up the solving time of the problem by commercial software since it makes the nodes fathomed faster.
3. The proof of conjecture proposed by Fishkin et al. [6] Fishkin et al. [6] prove that for the P2|pmtn(delay ¼t)|Cmax and the P3|pmtn(delay ¼t)|Cmax problems there exist optimal solutions with at most one and two transportations, respectively. Kozlov [9] also proves that there exists an optimal solution with at most three transportations for the P4|pmtn(delay ¼t)|Cmax problem. Fishkin et al. [6] propose the following conjecture for the Pm| pmtn(delay ¼t)|Cmax problem. Conjecture. For the Pm|pmtn(delay ¼t)|Cmax problem, there exists an optimal schedule with at most (m 1) preemptions with transportation of jobs among machines. In order to prove the conjecture, first we propose two lemmas and then use them for the proof. Lemma 1. For the Pm|pmtn(delay ¼ t)|Cmax problem, assume that k jobs are transported among machines. In this case, there exists an optimal schedule in which any combination of two jobs among k transported jobs are not processed on more than one common machine. Proof. Assume that for the Pm|pmtn(delay ¼t)|Cmax problem that is processing n jobs, there exists an optimal schedule with k (k rn) transported jobs. Consider two transported jobs such as J1 and J2. Assume that these jobs are processed on S (S4 1) common machines. For any two of S common machines as shown in Fig. 3a, we can reschedule the processing time of these jobs as shown in Fig. 3b by processing one of the jobs only on one machine. Without loss of generality, consider that the processing time of J1 on M1 is less than or equal to the processing time of J2 on M2. Therefore, we can change the processing time of J1 and J2 in which, all of the processing time of J1 is processed on M2 as shown in Fig. 3b. The transportation delay constraint has been satisfied in the rescheduled solution, since the completion time of processing J2 on M1 is not changed and the start time of processing J2 on M2 is postponed. By using this argument, it is easy to prove that the number of common machines that are processing both J1 and J2 are reduced to one machine.
Fig. 3. (a) Two of S common machines in the optimal schedule with k transported jobs and (b) rescheduling of J1 and J2.
Fig. 4. (a) k transported jobs with common machines and (b) the schedule with the job JD.
Lemma 2. For the Pm|pmtn(delay ¼t)|Cmax problem, assume that there exists an optimal schedule in which k jobs are transported on l different machines that each combination of any two jobs among the k transported jobs are processed on at most one common machine. In this case, there exists an optimal solution in which no other job with transportation can be processed by these l machines. Proof. Consider a sequence of processing jobs that k transported jobs are processed on l different machines. Assume that each combination of two jobs among k transported jobs have only one common machine as presented in Fig. 4a. For instance, M2 is the only machine that is processing both J1 and J2. Now assume that a job, say JD, is incorporated to this schedule to be processed with a transportation on M1 and Mk þ 1 as shown in Fig. 4b. In order to prove the lemma, we show that there is an optimal solution in which the process of JD can be processed on only one machine without any transportation. Two different scenarios can be observed. In the first scenario, the duration of time that JD is processed on M1 is less than or equal to the time that J1 is processed on M2, J2 is processed on M3, and so on. In this case, a reschedule can be obtained by transferring the processing time of JD on M1 to M2. In this case, the processing time of J1 on M2 is divided by two parts. The first part i.e., “the processing time of J1 on M2 – the processing time of JD on M1” is transferred to M1 and the rest of processing time of J1 is stayed on M2 as shown in Fig. 5a. It is clear that the transportation delay constraint is satisfied with this change. The same transformation is performed until the last machine to process JD only on Mk þ 1 as shown in Fig. 5b. In the second scenario, the duration of time that JD is processed on M1 is greater than or equal to the time that J1 is processed on M2. In this case, a reschedule can be obtained by transferring that
18
H. Shams, N. Salmasi / Computers & Operations Research 50 (2014) 14–23
part of the processing time of JD on M1 to M2 which is equal to the processing time of J1 on M2. In this case, J1 is completely processed on M1. In addition, the processing time of JD on M2 is divided by two parts. The first part i.e., “the processing time of JD on M1 – the processing time of J1 on M2” is stayed on M1 and the rest of processing time of JD is transferred to M2 as shown in Fig. 6. The transportation delay constraint has been satisfied in the reschedule since the completion time processing JD on M1 is less than the previous completion time processing J1 on M1 and the start time of processing JD on M2 is the same previous start time of processing J1 on M2. In the new reschedule, if the duration of time that JD is processed on M2 is less than or equal to the time that J2 is processed on M3, the first scenario is occurred. Otherwise, the second scenario is occurred. If the second scenario is occurred in all kþ 1 machines, then JD is processed on all k þ1 machines with k transportations and J1, J2, …, Jk are completely processed on M1, M2, …, Mk respectively. Based on these lemmas, the proof of conjecture can be presented as follows: Proof. Based on Lemma 1, there exists an optimal solution in which any combination of two jobs among k transported jobs are not processed on more than one common machine. Based on Lemma 2, also in this optimal solution, in which k1 jobs are transported on l machines that each combination of any two jobs among the k1 transported jobs are processed on one common machine. In this case, no other job with transportation can be processed by these l machines. We show that there exists an optimal schedule with at most m 1 transportations among machines. Consider two transported jobs such as J1 and J2 that are processed on a common machine. Assume that J1 is processed on Mc, M1, M2, …, Mp1 and J2 is processed on Mc, M'1, M'2, …, M'p2. It is clear that there exist p1 transportations for J1 and p2 transportations for J2. Assume that these two jobs are merged and a dummy job, say MJ1,2 is created. This dummy job is processed on Mc, M1, M2, …, Mp1, M'1, M'2, …, M'p2 with p1þp2 transportations. Again consider MJ1,2 and another job which is processed on these machines such as J3. Assume that J3
Fig. 5. (a) Rescheduling of jobs JD and J1 and (b) rescheduling of jobs JD and Jk.
Fig. 6. Rescheduling of jobs JD and J1.
is processed on Mc, M″1, M″2, …, M″p3 (with p3 transportations on p3þ 1 machines). Based on Lemma 1 and Lemma 2 the dummy job and J3 have only one common machine and no other job with transportation can be processed by these machines. By merging these two jobs in the same way that J1 and J2 are merged, a dummy job such as MJ1,2,3 is created with p1þp2þ p3 transportations. By continuing this process, all transported jobs are merged to one dummy job that is processed on all m machines. It is clear that if there is one job processed on m machines, there exist m 1 transportations among machines. Therefore, by merging all transported jobs to one job, there is an optimal solution for the problem with at most m 1 transportations.
4. The proposed mathematical models One linear mathematical model and an exact algorithm are proposed for the Pm|pmtn(delay ¼ t)|Cmax problem. To formulate the problem, we first prove a lemma and a theorem. Lemma 3. In the Pm|pmtn(delay ¼ t)|Cmax problem, for any preemption of jobs without transportation on a machine, at least two transportations of one job among machines are required. Proof. Assume that J1 is transported to a machine and is processed by interrupting the process of J2 which is completely processed on the machine as presented in Fig. 7a. As shown in Fig. 7a, J1 is transported from M1 to M2 and the process of J2 on M2 is interrupted by J1. If this schedule is a feasible one, the schedule can still stay feasible by postponing the process of J1 on M2 until the end of the processing time of J2 as shown in Fig. 7b since the time between processing J1 on these machines in this schedule is greater than or equal to the transportation delay. Now, assume that J1 is transported twice by interrupting the process of J2 which is completely processed on the machine in a feasible schedule as presented in Fig. 8. In this case the process of J2 is preempted in the schedule as shown in Fig. 8, J1 is transported from M1 to M2 and then, after a while is transported from M2 to M3, and the process of J2 is resumed on M2. The process of J1 on M2 cannot be started earlier because of transportation delay constraint between M1 and M2. If the process of J1 is postponed on M2, the process of J1 on M3 will be postponed because of transportation delay constraint between M2 and M3 and this provides a greater makespan than before and thus is not an optimal solution anymore. This proves that for any preemption without transportation for the Pm|pmtn(delay ¼t)|Cmax problem, at least two transportations of one job between machines are required. Theorem 1. For the Pm|pmtn(delay ¼t)|Cmax problem, there is an optimal solution in which each job can be preempted but not transported at most m 1=2 times on a machine. Proof. As mentioned in the conjecture, there exists an optimal schedule with at most (m 1) preemptions with transportation between machines for the Pm|pmtn(delay ¼t)|Cmax problem. Assume that a partial of each transported job (i.e., m 1 transported jobs) is processed on a machine. As discussed in Lemma 3, for each preemption without transportation, two transportations of one job are required. Since the number of transportation is equal to m 1, thus, the maximum number of preemption of a job on one machine is equal to m 1=2.
H. Shams, N. Salmasi / Computers & Operations Research 50 (2014) 14–23
J1
J2
J2
J1
J2
J1
19
J1 Time
Time
Fig. 7. (a) A feasible schedule and (b) a feasible schedule.
8 sjki þ qjki sj0 ki r ð1 αjkij0 ki Þ:B > > < sj0 ki þqj0 ki sjki r αjkij0 ki :B > > : α 0 þα 0 ¼1
J1 J1
J2
J2
jkij ki
0
8 sjki þ qjki sjk0 i r ð1 αjkijk0 i Þ:B > > < sjk0 i þqjk0 i sjki r αjkijk0 i :B > > : α 0 þα 0 ¼ 1
Fig. 8. An optimal feasible schedule.
jkijk i
4.1. The linear programming formulation
Parameters pj B t U Decision variables Cmax qjki sjki
jk ijki
0
ð13Þ 0
8 sjki þ qjki sjk0 i0 r ð1 αjkijk0 i0 Þ:B > > < sjk0 i0 þ qjk0 i0 sjki r αjkijk0 i0 :B > > : α 0 0 þα 0 0 ¼ 1 jkijk i
jk i jki
j ¼ 1; …; n k ¼ 1; …; U 0
i ¼ 1; …; m 0
k ¼ 1; …; U
The makespan value The length of processing time of the kth part of job j is processed on machine i The start time of processing the kth part of job j on machine i ( 1; if the kth part of job j is processed on machine i 0; otherwise 8 > < 1; if the process of the kth part of job0 j on machine 0 i is finished before 0 the process of the k th part of job j on machine i is started > : 0; otherwise
αjkij'k'i'
The model: ð8Þ
Min C max
8 sjki þ qjki þ t:xjki sjk0 i0 r ð1 αjkijk0 i0 Þ:B > > < sjk0 i0 þ qjk0 i0 þ t:xjk0 i0 sjki r αjkijk0 i0 :B > > : α 0 0 þα 0 0 ¼ 1 jkijk i
Subject to
jk i jki
j ¼ 1; …; n k ¼ 1; …; U i ¼ 1; …; m 0
0
ð15Þ
i ¼ 1; …; mði a i Þ 0
k ¼ 1; …; U
U
∑ ∑ qjki ¼ pj
j ¼ 1; …; n
i¼1k¼1
∑ ∑ qjki r C max
i ¼ 1; …; m
ð9Þ
(
xjki r B:qjki qjki r B:xjki
ð10Þ sjki ; qjki Z 0
j ¼ 1; …; n k ¼ 1; …; U i ¼ 1; …; m j ¼ 1; …; n i ¼ 1; …; m 0
j ¼ 1; …; n sjki þ qjki rC max
ð14Þ
0
i ¼ 1; …; mðia i Þ
The processing time of job j A large number The transportation delay time to transport a job between any two machines The maximum possible number of parts of a job on a machine which equals to ðm 1=2Þ þ 1
xjki
j¼1k¼1
j ¼ 1; …; n k ¼ 1; …; U i ¼ 1; …; m k ¼ 1; …; Uðk a k Þ
A mathematical model which is called Model 1 and an exact algorithm which is called Algorithm 1 for the Pm|pmtn(delay ¼t)| Cmax problem are proposed to solve the problem as the followings: Model 1: A mathematical model to find the optimal schedule of processing the jobs on machines is proposed in this section. The parameters, decision variables, and the mathematical model are as following:
U
0
j ¼ 1; …; nðj a j Þ
Time
n
ð12Þ
i ¼ 1; …; m
j kijki
J1
m
j ¼ 1; …; n k ¼ 1; …; U
k ¼ 1; …; U i ¼ 1; …; m
xjki ; αjkij0 ki ; αj0 kijki ; αjkijki0 ; αjki0 jki ; αjkijk0 i ; αjk0 ijki A f0; 1g
ð11Þ
0
j ¼ 1; …; nðj a j Þ 0
0
i ¼ 1; …; mðia i Þ
ð16Þ
20
H. Shams, N. Salmasi / Computers & Operations Research 50 (2014) 14–23
The objective function is minimization of makespan as presented by Eq. (8). Constraint set (9) is incorporated to the model to make sure that the sum of the processing time of each job on all machines is equal to its required processing time. The makespan should be greater than or equal to the sum of processing time of all jobs on each machine. Constraint set (10) is incorporated to the model for this reason. The makespan should be greater than or equal to the completion time of each job. Thus, the makespan should be greater than or equal to the completion time of each processed part of each job on any machine. Constraint set (11) is incorporated to the model for this reason. Constraint sets (12) and (13) are incorporated to the model to make sure that each machine is processing at most one job at any time. Constraint sets (14) support the fact that any job is processed on one machine at any time. Constraint sets (15) are incorporated to the model to calculate the transportation delays for transported jobs. Based on these constraint sets, the start time of processing a job on a machine is greater than or equal to the completion time of processing the job on a machine which was processing the previous job, plus the transportation delay. Constraint sets (16) are incorporated to the model to find the jobs processed on each machine. 4.2. The exact algorithm The complexity of the problem is originated from two major parts. First, assigning jobs to machines i.e., finding a solution including the duration of time that each job is processed on each machine. Second, finding a feasible schedule of processing the jobs on machines based on the provided solution. In Model 1, these two tasks are done simultaneously. In order to decrease the model complexity and still get the optimal solution, we propose a method to solve the problem optimally in several stages. First, we find the duration of time that each job should be processed on each machine in an optimal solution. Then, we find a feasible schedule of processing the jobs based on the provided optimal solution. Based on this motivation, we propose a three step algorithm to solve the problem optimally in a very efficient way which is called Algorithm 1 in this research as the followings: Algorithm 1. In this algorithm, as the first step only the duration of time that each job is processed on each machine in one of the multiple optimal solutions is calculated by a mathematical model called Model 2. In the provided solution, some jobs might be processed on several machines i.e., transported from one machine to another one, and some jobs might be processed on only one machine. Then, the schedule of processing the transported jobs on each machine based on the optimal solution obtained by Model 2 is found as the second step. At the third step, the schedule of processing the non-transported jobs on each machine is determined. The steps of the proposed algorithm are as the followings: Step1. In order to find the optimal processing time of each job on each machine a mathematical model, called Model 2 in this research, is proposed. This mathematical model provides the optimal value for the makespan as well as the duration of time that each job is processed on each machine. The parameters, decision variables, and the mathematical model for Model 2 are as the followings: Parameters: The parameters pj, t, B, and U with the same definition in Model 1 are used in this model. Decision variables: The decision variables Cmax and qjki with the same definition in Model 1 are used in Model 2. Also the following decision variable
is used for Model 2. 1 if any part of job j is processed on machine i xji 0 otherwise Model 2: Min C max
ð17Þ
Subject to Constraint sets (13) and (14) from Model 1. " # pj þ
m
∑ xji 1 :t r C max
i¼1
8 U > > > x r B: ∑ qjki > < ji k¼1
j ¼ 1; …; n
ð18Þ
j ¼ 1; …; n
U > > > > : ∑ qjki r B:xji
i ¼ 1; …; m
qjki Z 0
j ¼ 1; …; n
ð19Þ
k¼1
xji A f0; 1g
k ¼ 1; …; U i ¼ 1; …; m
Like Model 1, the objective function as minimization of makespan is presented by Eq. (17). The processing time of each job with its required transportation delays on machines should be less than or equal to the makespan. Constraint set (18) is incorporated to the model to support this fact. Constraint sets (19) are incorporated to the model to find the jobs processed on each machine. As mentioned, Model 2 is only capable of finding the duration of time that each job is processed on each machine in an optimal solution. Step2. In order to find a feasible schedule of processing the jobs based on the optimal solution provided in Step1, a feasible schedule of processing the transported jobs based on the optimal solution provided by Step1 is determined in this step. In order to find this schedule, the optimal solution of Model 2, i.e., the duration of processing each job on each machine, is fed to another mathematical model, called Model 3 in this research, to find the transported jobs schedule in the optimal schedule. The parameters, decision variables, and the mathematical model for Model 3 are as following: Parameters: The parameters pj, t, B, and U with the same definition in Model 1 are used in this model. Also the values of decision variables qjki and Cmax in the optimal solution of Model 2 are considered as the parameters of Model 3. Decision variables: The decision variables sjki, xjki, and αjkij'k’i' with the same definition in Model 1 are considered as the decision variables for Model 3. Model 3: Min C max ð20Þ Subject to Constraint sets (11), (12), (13), (14), (15), and (16) from Model 1. ð21Þ
qjki a pj
sjki Z 0
j ¼ 1; …; n i ¼ 1; …; m
xjki ; αjkij0 ki ; αj0 kijki ; αjkijki0 ; αjki0 jki ; αjkijk0 i ; αjk0 ijki
j ¼ 1; …; nðj a j Þ
A f0; 1g
i ¼ 1; …; mði a i Þ
0
0
0
0
qjki a pj
H. Shams, N. Salmasi / Computers & Operations Research 50 (2014) 14–23
21
Table 3 A summary comparison of two methods. Method Model 1 Algorithm 1
NBV ðn m UÞ þ ðn2 m2 U 2 Þ m nþ 5 ðm 1Þ
NIV 2 ðn m UÞ n m U þ ðm 1Þ
Model 3 is a simplification of Model 1 in which the decision variables Cmax and qjki in Model 1 are used as parameter in Model 3 since their values are obtained from the optimal solution of Model 2. Also, only the constraint sets that deal with finding the schedule of jobs are incorporated to this model. As it is mentioned, Model 3 finds only the schedule of transported jobs in the optimal schedule. Step3. In this step, the schedule of non-transported jobs on machines is determined in the optimal solution provided by Model 2 in Step2 by considering the schedule provided for transported jobs by Model 3 in Step3. With this information, an optimal schedule can easily be constructed. The schedule of transported jobs in the optimal schedule are fixed in Model 2, Then, the jobs that are not transported are scheduled arbitrary on machines during the time that the machines are not processed the transported jobs.
Big M
NC 1
2 þ1 2 n m U n þ U1 þ mU 2 n m þ 10 ðm 1Þ
2 3 n m U 1n þ U1 þ mU þ 1 þ mþ n nþ 2 n m þ 15 ðm 1Þ
Table 4 The number of problems that can be solved optimally by CPLEX. Number of machines Number of jobs Number of test problems that can be solved optimally by CPLEX
[2, 5]
[6, 10]
[11, 15]
[2, 20] [21, 50] [51, 100] [2, 20] [21, 50] [51, 100] [2, 20] [21, 50] [51, 100]
Total
Model 1
Algorithm 1
25 30 30 7 22 4 3 0 0 121
30 30 30 30 30 30 30 23 0 233
4.3. Comparison of the methods Motivated from Naderi and Salmasi [10], the complexity of the proposed mathematical model and Algorithm 1 is compared based on the number of binary variables (NBV), the number of integer variables (NIV), the number of constraints with Big M, and the number of constraints (NC). The results are presented in Table 3. In this table n presents the number of jobs, m is the number of machines. Moreover, U is the maximum possible number of parts of a job on a machine which equals to ((m 1/2) þ1). It is assumed that the maximum number of transported jobs occurred in Algorithm 1 which is equal to (m 1). Based on NBV, the complexity of Model 1 is calculated by ððn m UÞ þðn2 m2 U 2 ÞÞ. Therefore, the NBV is quadratic in m, n, and U. On the other hand, Algorithm 1 has the complexity of ðm n þ 5 ðm 1ÞÞ which is linear in m and n. the complexity reduction is happened in m, n, and U. This is because, Model 1 tries to schedule all jobs on machines. This scheduling requires a huge number of decision variables due to the problem constraints. In contrast, in Algorithm 1, there is no need to schedule all jobs on machines and only transported jobs are scheduled on machines. Considering NIV, the complexity of Model 1 and Algorithm 1 equal to 2 ðn m UÞ and n m U þðm 1Þ, respectively. The NIV in both Model 1 and Algorithm 1 are linear in n, m, and U. There is no complexity difference, because of seeking for the amount of processing time of each job on each machine in both methods. As shown in Table 3, the number of constraints including big M for Model 1 and Algorithm 1 are 2 n m U ½ð1=nÞ þ ð1=UÞ þ ð2=m UÞ þ 1 and 2 n m þ 10 ðm 1Þ, respectively. The complexity reduction is obtained in U. This is because of assigning all jobs in Model 1 and only transported jobs in Algorithm 1. This is obtained for the total number of constraints similarly which for Model 1 equals to 3 n m U ½ð1=nÞ þð1=UÞ þ ð2=m UÞ þ 1 þ m þn and for Algorithm 1 equals to n þ 2 n m þ 15 ðm 1Þ.
5. Test problem specification In this research, we propose two methods to solve the proposed research problem optimally. In the first method, a
Table 5 The average time of solution. Number of machines
[2, 5]
[6, 10]
[11, 15]
Total
Number of Jobs
[2, 20] [21, 50] [51, 100] [2, 20] [21, 50] [51, 100] [2, 20] [21, 50] [51, 100]
Number of test problems solved optimally by both models
Average running time (s) Model 1
Algorithm 1
25 out of 30 30 out of 30 30 out of 30 7 out of 30 22 out of 30 4 out of 30 3 out of 30 0 out of 30 0 out of 30 121 out of 270
8.06 27.87 454.13 39.36 94.01 1054.32 2424.82 586.08
0.32 0.40 0.40 0.53 0.62 0.51 0.18 0.42
mathematical model, i.e., Model 1 is directly used to find the optimal schedule. In the second method, i.e., Algorithm 1, the problem is solved optimally in several stages. In order to compare the performance of Model 1 and Algorithm 1, test problems are generated randomly. Based on experience, the most important factors in determining the degree of complication of the Pm|pmtn(delay ¼t)|Cmax problem are the number of machines, the number of jobs, and the interval time that the processing time of jobs are generated. Therefore, the classification of generated test problems is performed by considering these three parameters as the followings: Number of machines: test problems by considering the number of machines in parallel are generated in three different levels. In the first level, called L1, problems with 2–5 machines in parallel are considered. In the second level, called L2, problems with 6–10 machines in parallel are considered and finally, in the third level called L3, problems with 11–15 machines in parallel are generated. Number of jobs: the number of jobs is considered between 2 and 100. The value of this parameter is generated randomly in three different levels, using the uniform discrete distribution. If the problem has the number of jobs in the interval of [2, 20], the problem is considered in the first level based on the number of
22
H. Shams, N. Salmasi / Computers & Operations Research 50 (2014) 14–23
Table 6 The average required number of iterations and nodes. Number of machines
[2, 5]
[6, 10]
[11, 15]
Total
Number of jobs
[2, 20] [21, 50] [51, 100] [2, 20] [21, 50] [51, 100] [2, 20] [21, 50] [51, 100]
Average required number of iterations
Number of test problems solved optimally by both models
Model 1
Algorithm 1
Model 1
Algorithm 1
25 out of 30 30 out of 30 30 out of 30 7 out of 30 22 out of 30 4 out of 30 3 out of 30 0 out of 30 0 out of 30
467969 77536 610062 111223 50757 823776 8801720 – –
27 39 65 542 110 142 13 – –
18416.9 3575.3 2387.2 2456.3 625.7 3616.7 20141.0 – –
0.9 0.2 0.4 33.3 3.5 3.3 12.7 – –
121 out of 270
528286
88
6158.3
3
jobs factor. The problem is considered in the second and the third level based on the number of jobs factor if its number of jobs is in the interval of [21, 50] and [51, 100], respectively. Processing time of jobs: test problems are generated in three different levels based on their processing time. In the first level, the processing time of jobs are generated randomly from a discrete uniform distribution in the interval of DU [1, 10]. In the second level, the processing time of jobs are generated randomly from a discrete uniform distribution in the interval of DU [1, 40] and finally, in the third level, the processing time of jobs are generated randomly from a discrete uniform distribution in the interval of DU [1, 90]. Based on these classifications, 27 different classes of test problems (3 for the number of machines 3 for the number of jobs 3 for the processing times) are generated. For each class of test problems, 10 instances (i.e., 270 random test problems in total) are generated randomly to be solved by Model 1 and Algorithm 1. Based on Fishkin et al. [6], the Pm|pmtn(delay ¼ t)|Cmax problem instances might be easy or strongly NP-hard problems. In this research the test problems are generated in the range of NP-hard instances. Assume that pmax is equal to the maximum processing time of all jobs i.e., pmax ¼ maxnj¼ 1 pj , L is equal to summation of processing time of all jobs divided by number of machines i.e., L ¼ ∑nj¼ 1 pj =m, and Δ ¼ max fpmax ; Lg. Fishkin et al. [6] prove that in a problem instance, if the interval value of transportation delay i.e., t has a value that satisfies relation (22), then that problem can be considered as an NP-hard problem. t 4 Δ pmax
Average required number of nodes
comparison is performed only based on the test problems solved by both methods optimally. The results show that Algorithm 1 reached to the optimal solution in a significantly shorter time than Model 1. The results show that Model 1 was never able to solve a problem instance optimally that Algorithm 1 was not capable of solving it optimally. In contrary, Algorithm 1 was reached to the optimal solution for 112 out of 270 test problems that Model 1 was not able to solve them optimally. The results also show that none of test problems with more than 14 machines and 35 jobs was solved optimally with the proposed models. The number of iterations and the number of nodes during solving the problem optimally for the mathematical model and Algorithm 1 are presented in Table 6. These comparisons are performed only based on those test problems which are reached to an optimal solution by both methods. The results show that Algorithm 1 required significantly less iterations and nodes than Model 1 to solve the test problems optimally. In summary, the results show that Algorithm 1 is reached to the optimal solution faster than Model 1. Also, Algorithm 1 is capable of solving larger size problems. This is because of existence of multiple optimal solutions for the problem, which delays the convergence of the lower bound to the upper bound during solving problems by Model 1.
7. Conclusion
ð22Þ
This fact is considered during generating the test problems in order to generate NP-hard problems.
6. The results All test problems are solved by both Model 1 and Algorithm 1. ILOG CPLEX 12.2.2 [8] is used to solve the test problems. The experiments are performed on a personal computer with 3.1 GHz of Core i3 CPU and 4 GB of RAM. The results show that Model 1 was able to solve 121 out of 270 test problems optimally. The rest of them could not be solved by CPLEX (we faced with out of memory message). However, by using the same software, the optimal solution of 233 out of 270 test problems can be obtained by using Algorithm 1. A comparison of the performance of both methods based on the problems solved optimally is presented in Table 4. This comparison is presented based on different number of machines and number of jobs. A comparison about the time required solving the test problems is presented for Model 1 and Algorithm 1 in Table 5. This
In this research, the (Pm|pmtn(delay ¼t)|Cmax) problem is approached. First, an existing mathematical model in the literature for the Pm|pmtn(delay)|Cmax research problem is criticized. Then, we show that there exists an optimal schedule with at most (m 1) preemptions with transportation among machines for the research problem. Finally, two methods to solve the Pm|pmtn (delay ¼t)|Cmax problem optimally are proposed. Experiments are performed to compare the performance of the proposed algorithms. Since the proposed research problem is NP-hard, the proposed algorithms are not able to solve every problem instance optimally. Thus, heuristic and meta-heuristic algorithms needs to be developed to approximately solve large sized problems. Further research can be also performed by considering different transportation delay time for the jobs on different machines.
References [1] Fidge CJ. Real-time schedulability tests for preemptive multitasking. Real-Time Syst 1998;14:61–93.
H. Shams, N. Salmasi / Computers & Operations Research 50 (2014) 14–23
[2] McNaughton R. Scheduling with deadlines and loss functions. Manag Sci 1959;6:1–12. [3] Muntz RR, Coffman EG. Optimal preemptive scheduling on two-processor systems. IEEE Trans Comput 1969;100(11):1014–20. [4] Boudhar M, Haned A. Preemptive scheduling in the presence of transportation times. Comput Oper Res 2009;36(8):2387–93. [5] Rayward-Smith VJ. The complexity of preemptive scheduling given interprocessor communication delays. Inf Process Lett 1987;25:123–5. [6] Fishkin AV, Jansen K, Sevastyanov SV, Sitters R. Preemptive scheduling of independent jobs on identical parallel machines subject to migration delays. Algorithms–ESA 2005. Berlin Heidelberg: Springer; 2005; 580–91.
23
[7] Haned A, Soukhal A, Boudhar M, Huynh Tuong N. Scheduling on parallel machines with preemption and transportation delays. Comput Oper Res 2012;39(2):374–81. [8] CPLEX, ILOG. High-performance software for mathematical programming and optimization. URL: 〈http://www.ilog.com/products/cplex〉; 2005. [9] Kozlov A. To the conjecture on the minimum number of migrations in the optimal schedule for the Pm| pmtn (delay¼ d)| Cmax problem. Eraerts 2011:248. [10] Naderi B, Salmasi N. Permutation flowshops in group scheduling with sequence-dependent setup times. Eur J Ind Eng 2012;6(2):177–98.