The one-machine just-in-time scheduling problem with preemptions Yann Hendel, Nina Runge, Francis Sourd LIP6, 8 rue du Capitaine Scott 75015 Paris, France {Yann.Hendel, Nina.Runge, Francis.Sourd}@lip6.fr

Abstract This paper investigates the notion of preemption in scheduling with earliness and tardiness penalties. It is observed that the classical cost model where penalties only depend on completion times does not capture the just-in-time philosophy. Therefore we introduce a new model where the earliness costs depend on the start times of the jobs. To solve this problem, we propose an efficient partial representation of dominant schedules and a polynomial algorithm to compute the best schedule for a given representation. A neighborhood search is then derived and a lower bound is also presented. Experiments finally show that the gap between these upper and lower bounds is very small.

1

Introduction

Researchers and practitioners have shown interest in just-in-time scheduling for about two decades. A common idea is to notice that a job that completes either tardily or early in a schedule induces extra costs. Most of the time, just-in-time costs are function of the job completion time. However, in a context where preemption is allowed, such functions may not bring the desired results: indeed, when the job has been started, the goal is to complete it as soon as possible so that it can be removed from the production line. We also say that the work-in-process has to be minimized. If the costs only depend on the completion times of the job, idle time within the execution of the job will not be penalized and the work-in-process will be large. In order to avoid this problem, we propose a model that attaches the earliness costs to the job start, while tardiness costs remain tied to the completion of the jobs. More precisely, we adapt the classical one-machine earliness-tardiness problem to allow preemption and, in order to determine earliness-tardiness costs, we consider that each job has two due dates instead of one: one tied to the start time of the job and the 1

other tied to its completion time. Formally, we consider a set of jobs J = {J1 , . . . , Jn } which has to be scheduled on a single machine. Each job Jj ∈ J has a processing time pj . We define tardiness costs as Tj = max(0, Cj − dcj ) where Cj is the completion time of the job and dcj is the ideal completion time (or due-date) of job Jj , and earliness s c costs as Ej = max(0, dsj − Sj ) where Sj is the start time Pn of job Jj and dj = dj − pj is the ideal start time of job Jj . We want to minimize j=1 (αj Ej + βj Tj ). We call this problem JIT-POMP which stands for Just-In-Time Preemptive One-Machine Problem. This problem is NP-hard: if all earliness penalties are null, P there is an optimal solution without job interruption so that we have an instance of 1|| wi Ti which is NP-hard. We first make three remarks about this preemptive model. First, the earliness of a job is a function of its start time. Indeed, if earliness classically is estimated by the expression max(0, dcj − Cj ), we can show that there is an optimal schedule in which no job completes early. Indeed, if a job is early, an infinitesimal piece of length ǫ of it can be moved so that it becomes scheduled in the time interval [dcj − ǫ, dcj ]. Therefore, it has no cost at all, which means that the problem is equivalent to the single machine preemptive problem with only weighted tardiness costs. Second, if a job is scheduled without interruption, its cost is equal to its classical earliness-tardiness non-preemptive cost. Therefore, for a given instance, the optimal solution of the non-preemptive problem is an upper bound for JIT-POMP. Finally, we observe that there is no extra cost when a job is interrupted, which may be unrealistic. We prefer not to introduce such costs in our model for simplicity: the reader can check that we could easily add them in the computation of the lower bounds we propose but we would have to relax them to use the lower bound. P The non-preemptive problem, namely 1|| i fi (Ci ) with fi (Ci ) = max(αi (di −Ci ), βi (Ci − di )) has been extensively studied. One way to approach this NP-complete problem [8], is to solve a particular polynomial case, the so-called timing problem in which the order of the jobs has already been determined. This subproblem is often used as a core subroutine in a branch and bound procedure [11, 15] or in a local search procedure [9, 19, 7]. Garey et al. [8] have proposed an O(n log n) algorithm to solve the timing subproblem in the case of unary earliness-tardiness penalties. Several papers [6, 17, 5, 16, 14, 10] have extended this algorithm in order to improve its practical efficiency and to adapt it for problems with non-symmetric and even non convex penalties. One generalization that we will use in this paper, is to consider that the cost functions fi are convex and piecewise linear. P From here onwards, the number of segments of fi will be denoted by kfi k and s = i kfi k. Hendel and Sourd [10] have proposed an O(s log n) algorithm for this criterion. In this paper, we follow a similar approach for JIT-POMP. The first point is to find how to represent the set of solutions. A representation is a set R of constraints that are to be satisfied by the represented schedule. Therefore, when we consider the constraints of JIT-POMP plus the constraints of R, we may have a set of several possible 2

schedules. We will say that a representation is efficient if there is a polynomial algorithm (the so-called timing algorithm) that finds the best schedule in JIT-POMP subject to R. A possible representation would be to fix all the start times (that is R contains n constraints of the form “Si = ai ”). PHowever, the resulting problem JIT-POMP subject to R is equivalent to 1|pmtn, ri | wj Tj , which is NP-hard [13]. Therefore, this representation is not efficient. We show in the next section that an order for the start and completion times of the jobs is sufficient to get a polynomial timing problem. In section 2, we give a first efficient representation in which the schedule is defined by a sequence of the 2n start and completion times and the timing problem is solved by linear programming. In section 3, we propose some dominance properties on the sequences and the schedules in order to get a better representation in which the timing algorithm is strongly polynomial. In section 4, a lower bound for JIT-POMP is presented. Finally, in section 5, a local search procedure based on our efficient representation is proposed.

2

A linear programming-based representation

From here onwards, we denote by σ an order for the variables {S1 , . . . , Sn , C1 , . . . , Cn }. In this section, we show that we can obtain in polynomial time an optimal schedule with respect to σ. The input should then be a list (ν1 , ν2 , . . . , ν2n ) where νk is either a variable representing the start of a job or a variable representing the completion of a job. Clearly, if Ci is before Si in the list, the timing problem is not feasible and the cost of the represented schedule should be infinite. Therefore, we assume that, for every i, Si appears before Ci in the list. Moreover, from σ we can unambiguously compute the reverse function π, which for every variable Si or Ci , gives its position in the list, that is νπ(Si ) = Si and νπ(Ci ) = Ci . For example, if the representation R corresponds to the inequalities S1 ≤ S2 ≤ S3 ≤ C1 ≤ C3 ≤ C2 , then sequence σ is equal to (S1 , S2 , S3 , C1 , C3 , C2 ) and we have for instance π(C1 ) = P4 and π(S3 ) = 3. The relation between νk and the variable Si and Ci is given by νk = i 1π(Si )=k Si + 1π(Ci )=k Ci . We now introduce the values P (νi , νj ) (for i < j) that represent P the mandatory processing time that occurs between νi and νj . Formally, P (νi , νj ) = k∈J(νi ,νj ) pk with J(νi , νj ) = {k | π(νi ) ≤ π(Sk ) ≤ π(Ck ) ≤ π(νj )}. We are now ready to give the linear program to solve JIT-POMP subject to R:

3

(LP) :

min

n P

(αi Ei + βi Ti )

(1)

i=1

s.t.

Ei ≥ dsi − Si ,

i = 1, . . . , n

(2)

dci ,

i = 1, . . . , n

(3)

Ti ≥ Ci −

νj − νi ≥ P (νi , νj ), i
i = 1, . . . , n

(4) (5) (6)

This linear program provides the start and completion times for each job. Inequations (2-6) are clearly necessary conditions that must be satisfied by any preemptive schedule. In order to show that any solution to (LP) corresponds to a feasible schedule, we first observe that the objective function implies that we have Ei = max(0, dsi − Si ) and Ti = max(0, Ci − dci ) in any solution of (LP). Inequations (4) ensure that ν1 ≤ ν2 ≤ · · · ≤ ν2n . The existence of a feasible schedule such that the processing of Ji is done in [Si , Ci ] directly derives from Hall’s theorem [3]. To build the schedule, we observe that the start and completion times respectively induce release dates and deadlines; by Jackson’s rule we get a feasible schedule with less than 2n preemptions. As for the complexity, (LP) has O(n) variables but O(n2 ) constraints. It is therefore polynomial and it can even be solved in strongly polynomial time as Tardos’ method [18] can be applied. It can also be solved as special cases of the network problems with separable convex cost functions solved by Karzanov and McCormick [12] and Ahuja et al. [2]. However, in practice, the timing algorithm has to be called very often. In the next section, we present a second efficient representation which takes advantage of some dominance rules. The benefits of this second approach are twofold. First, we will show in section 3.3 that the resulting timing algorithm is faster. Second, we show in the beginning of section 5 that the size of the solution space is smaller.

3

A combinatorial algorithm for the timing problem

The timing algorithm we propose in this section does not work for all the sequences that satisfy Si ≤ Ci but only for a subclass of sequences which are dominant. This class is defined in section 3.1 and the algorithm is then presented in section 3.2. In section 3.3, we experimentally compare our algorithm to solving (LP) with ILOG CPLEX.

3.1

Valid sequences

We will denote by P (σ) the timing problem corresponding to the sequence σ and by Opt(σ) the optimal cost for P (σ). 4

Si

Sj

i

j

Ci

i

i

Cj

j

j t

i

i

i

i

j

j t

Si

C i = Sj

Cj

Figure 1: Proof of property 1

1111 0000 0000 1111 0000 1111

i

11 00 00 11 00 11 i 00 11 00 11 00 11

11 00 00 11 00 11 00 11 00 11 00 11

i

11111111111 00000000000 00000000000 i 11111111111 00000000000 11111111111

Si Ci i

1111 0000 0000 1111 0000 1111

i

11 00 00 11 00i 11 00 11 00 11 00 11

11 00 00 11 00 11 00 11 00 11 00 11

11111111111 00000000000 00000000000 11111111111 00000000000 11111111111

Ci

Figure 2: Proof of property 2 Property 1. For every sequence σ1 such that for a pair of jobs (Ji , Jj ), Si ≤ Sj ≤ Ci ≤ Cj , then there is a sequence σ2 such that Si ≤ Ci ≤ Sj ≤ Cj and Opt(σ2 ) ≤ Opt(σ1 ). Proof. We consider the execution intervals of Ji and Jj in a schedule whose cost is Opt(σ1 ). The execution intervals of Ji and Jj can be rearranged in such a way that Ji is totally processed before the start of Jj . To do so, we proceed iteratively: we consider the earliest piece of Jj which is executed before the last pieces of Ji . We swap the largest possible amount of the piece of Jj with the latest possible amounts of pieces of Ji (by doing so, another preemption may be added). We perform the same operations on the current schedule till Ji is entirely executed before Jj . Consequently the completion time of Ji is moved forward and the start time of Jj is postponed. Thus the costs induced by the two jobs can only decrease. We show an example of the transformation in figure 1 (the dotted rectangles represent other jobs).

5

Property 2. Let us consider a schedule where for a job Ji , there is some idle time between Si and Ci , then we can build a schedule with a lower or equal cost such that there is no idle time between Si and Ci . Proof. Consider a schedule where there is some idle time between the start of job Ji and its completion. The execution intervals of job Ji can be rearranged in order to fill the gaps between the start and the completion of Ji . In that manner, Ci and the cost of the schedule can only decrease. For any pair of jobs (Ji , Jj ), according to property 1, we have four possibilities: Si ≤ Sj ≤ Cj ≤ Ci , Sj ≤ Si ≤ Ci ≤ Cj , Si ≤ Ci ≤ Sj ≤ Cj or Sj ≤ Cj ≤ Si ≤ Ci . In the first two cases, we say that Jj (resp. Ji ) is nested in Ji (resp. Jj ). In the other cases, we say that Ji and Jj are separated. Thus, the first property ensures a structure which is analogous to the nested parenthesis structure [1]: for a given job Jj , each job started between Sj and Cj , must be finished before Cj , and is therefore nested in Jj . We call the subsequence associated with each job, a block: we call Bj the block associated with the job Jj , it contains all the jobs that are executed within the interval [Sj , Cj ]. Moreover, according to the second property, there is no idle time P in Bj , therefore, we denote by Pj the constant length of this block which is pj + Jk ∈Bj pk . A maximum block which is not nested in any other block is called a main block. A main block is a connex component of the inclusion graph of the blocks. It is clear that there is an optimal schedule with idle time only between the main blocks. A sequence with this nested parenthesis structure is said to be valid. Below is an example of a valid sequence of 11 jobs: σ11 =(S1 (S2 , C2 )(S3 (S4 , C4 )(S5 , C5 )C3 )(S6 (S7 (S8 , C8 )(S9 , C9 )C7 )C6 )C1 ) (S10 (S11 , C11 )C10 )

σ11 has two main blocks, B1 and B10 A nested parenthesis structure can be represented by a forest. Each main block is represented by a tree. A leaf represents a stand alone job Jj i.e. when Cj is the immediate successor of Sj in the sequence (and then, Cj − Sj = pj ). A node r with k sons in the left-right order, represents a job Jr such that Sr (resp. Cr ) precedes (resp. follows) k sub-sequences of the original sequence in their left-right order. The number of nodes in the tree corresponds to the number of jobs in the corresponding main block. The tree represented in figure 3 corresponds to the first main block of σ11 .

6

1

3

6

2 7 4

5 8

9

Figure 3: The date tree associated to the first main block of σ11

3.2

Solving the timing problem

In this section, we solve the timing problem corresponding to a valid sequence. For the sake of simplicity, a dummy job J0 is introduced in order to represent the idle time. This idle time is lower than maxi dci (for there is no idle time after the last due date). A new sequence σ0 is derived from σ by adding S0 and C0 respectively before and after the other dates of σ. The processing time of J0 is p0 = maxi dci . This job comes at no cost and it is easy to see that Opt(σ0 ) = Opt(σ). This way,Pσ0 is made up of a single main block B0 that starts at S0 = 0 and completes at C0 = ni=0 pi . 3.2.1

Data structure

Since there is a single main block, a single tree is used to represent the sequence σ0 . In each node r, we store: • Pr the total processing time between Sr and Cr • fr (t) the cost function of scheduling the block Br such that Cr = t (and Sr = t − Pr ). We are going to prove by induction that the information stored in each node can be derived from the information stored in the child nodes. Moreover, we also prove by induction that the cost functions fi are piecewise linear and convex. First, since a leaf represents a stand-alone job that is executed without preemption, the cost function stored is the classical earliness-tardiness function fi (Ci ) = max(αi (di − Ci ), βi (Ci − di )), which is piecewise linear and convex. We then consider a subtree, with a root which contains information about the job Jr . We assume that k blocks, denoted by B[1] , . . . , B[k] are nested in Br and we denote by T1 , . . . , Tk the subtrees in the left-right order. The tree Ti holds the cost function of B[i] , which is piecewise linear and convex by the induction hypothesis, and the length P[ i] of block B[i] . 7

B1′ (a)

B1

B2′ B2

B3′

B3

B4

B4′ B5

B6 t

Sr

(b)

Cr

B1′

B2′

B3′

B4′ t

Pr

Figure 4: Optimal schedules without a completion time constraint, next constrained by Sr and Cr . 3.2.2

Computation of a node P We first have Pr = ki=1 P[i] + pr . If we fix Cr , Sr is also fixed because there is no idle time inside the block (Sr = Cr − Pr ). The blocks B[1] , . . . , B[k] , in this order, have to be scheduled in a optimal manner within the time interval [Sr , Cr ], the sum of the idle periods in this interval being pr . However, we need to compute the cost of the block Br for every Cr . We now propose a method to compute the function fr (Cr ) efficiently. We first compute the optimal schedule when the sub-blocks are not constrained by Sr and Cr , then we show that the constrained optimal schedule is derived from this latter schedule. The sub-blocks are not constrained by Sr and Cr By the induction hypothesis, the blocks B[1] , . . . , B[k] have constant execution times and have convex and piecewise linear cost functions. Therefore, they can be assimilated to jobs which are executed without preemption and have convex piecewise linear cost functions. Thus, we can apply the timing algorithm provided by Hendel and Sourd [10] for the one-machine problem without preemption. The obtained schedule provides a new block decomposition: we ′ , . . . , B ′ the maximum sets of blocks without idle time. Every block B ′ denote by B[1] [l] [i] ′ (as a sum of convex and piecewise has a convex and piecewise linear cost function f[i] ′ (which is the sum of the processing times linear cost functions) and a processing time P[i] ′ its completion of the original blocks contained in this new block). We denote by C[i] ′ ). In figure 4, case (a), time in this schedule (which corresponds to the minimum of f[i] ′ , B ′ B[1] and B[2] have merged into B[1] [4] and B[5] into B[3] . 8

′ Cost of block B[i]

′ (t) f[i]

Cr

t ′ C[i]

τi

τi′

Figure 5: Cost function of a block Bj′ and its contribution to fr Computing the contribution of a block We next have to add the two constraints which force the jobs to be executed after Sr and before Cr : setting Sr force the far left blocks to be right-shifted and setting Cr force the far right blocks to be left-shifted (see figure 4, case (b)). We then say a block is critical when it is constrained by job Jr : ′ is said to be right-critical (resp. left-critical), when there is no idle time a block B[i] ′ and C (resp. when there is no idle time between S and B ′ ). If a block between B[i] r r [i] ′ is not critical, it is said to be on time and its completion time remains C ′ . B[i] [i] Pl Pl ′ + ′ and τ ′ = C ′ + p + ′ . The block B ′ is on Formally, let τi = C[i] P P r i j>i [j] j>i [j] [i] [i] ′ (C ′ ). B ′ is right-critical when P ≤ C < τ time when τi ≤ Cr ≤ τi′ and its cost is f[i] r r i [i] [i] Pl ′ ′ ′ ′ and its cost is given by f[i] (Cr − j>i P[j] ). B[i] is left-critical when Cr > τi and its cost Pl ′ (C − p − ′ is given by f[i] r r j>i P[j] ). ′ and B ′ are left-critical, B ′ is on time and B ′ is right On figure 4, case (b), B[1] [2] [3] [4] critical. ′ is the time at which f ′ is minimum, the contribution of the block B ′ to Since C[i] [i] [i] the computation of fr is convex and piecewise linear. Eventually, we obtain fr by adding all the block’s contributions and the earliness and tardiness costs of Jr . This sum is therefore piecewise linear and convex. We have thus proved the induction hypothesis stated in section 3.2.1.

9

Complexity The cost functions f[1] , . . . , f[k] are piecewise linear and convex and have respectively kf[1] k, . . . , kf[k] k segments. In Hendel and Sourd [10], it is proved that the P non constrained schedule can be obtained in O( kj=1 kf[j] k log n). Then the contribution ′ has to be computed: this contribution is derived from f ′ in O(kf ′ k) of each block B[i] [i] [i] ′ k + 1 segments. Finally, f (t) is obtained by adding these contriand has at most kf[i] r butions and by taking into account the earliness and tardiness costs P P of job Jr . On the whole, fr (t) is computed in O( kj=1 kf[j]k log n) and has at most kj=1 kfj k log n + k + 2 segments. 3.2.3

Computing the minimum cost

We now want to estimate the complexity to compute f0 (t). First, all the inner nodes of the tree have to be treated. We now show by induction that the cost function stored at each node has less than ′ 3n − 1 segments where n′ represents the total number of descendant nodes : each cost function stored at a leaf has (3 × 1 − 1) segments.PSuppose that a node which has k sub-trees representing n′1 , . . . , n′k nodes such that ki=1 n′i = n′ − 1 and each sub-tree has less than 3n′i − 1 segments. According to the previous section, it is clear that the P number of segments of Br is ki=1 3(n′i − 1) + 2 + k which is lower than 3n′ − 1. Each node of the tree has to be computed starting by its leaves. Each node has at most 3n − 1 segments, this calculus can be done in O(n2 log n). The complexity to calculate f0 (t) is in O(n2 log n).

3.3

Experimental results

In this section, we compare the efficiency of the linear program (LP) and the timing algorithm presented in section 3.2. 3.3.1

Instances

In order to solve (LP), we use CPLEX 9.1 on a 3.6 GHz PC with 3.5Go RAM. We have randomly generated instances with 200, 300, 400, 500 and 600 jobs. The processing times are generated from the uniform distribution [1, 10]. The due dates are generated P from the uniform distribution [max(0, P (1 − 3R/2)), P (1 + R/2)] where P = j∈J pj and R is a parameter. When R is large, the due dates are scattered between 0 and P (1 + R/2). When R = 0.0, all jobs have a common due date. R has the values 0.0, 0.2, 0.4, 0.6, 0.8 and 1.0. Earliness and tardiness penalties are generated from the uniform distribution [1, 5]. For each value of R and n, we have generated 10 instances. The execution of the timing algorithm requires a fixed sequence. These sequences are generated randomly by inserting one job at a time at a randomly determined position

10

in the partial fixed sequence. 3.3.2

Results

The timing algorithm is implemented in Java. The timing algorithm and CPLEX are executed with the same instances and the same fixed sequences. Results are reported in table 1. As illustrated by figure 6 for instances with R = 0.2, we observe that the timing algorithm generally runs more than 100 times faster than CPLEX. An interesting observation is the fact that the execution time of CPLEX for a given number of jobs is quite constant. But executing the timing algorithm on instances with R = 0.0, that means instances with a common due date, the timing algorithm runs faster than when R > 0.0. This can be explained by the fact that the optimal schedule contains no idle time. The results are presented in the table below. The first value is the execution time of the timing algorithm. The second value is the execution time of CPLEX. The execution times are in milliseconds. n 200

300

400

500

600

R = 0.0 9.3 900.1 96.78 11.0 2562.2 232.93 7.8 4970.1 637.19 12.6 9148.3 726.06 17.2 14914.1 867.10

R = 0.2 6.4 912.3 142.55 28.2 2632.9 93.37 34.3 4976.6 145.09 56.4 9298.5 164.87 106.3 15257.8 143.54

R = 0.4 9.4 903.1 96.07 23.5 2587.5 110.11 48.5 5059.4 104.32 56.3 9020.4 160.22 93.7 14818.7 158.15

R = 0.6 6.2 915.7 147.69 29.9 2531.3 84.66 45.3 4973.3 109.79 53.5 8835.9 164.85 93.5 14082.7 150.62

R = 0.8 6.3 871.8 138.38 29.6 2448.6 82.72 32.9 4903.1 149.03 54.7 8824.9 161.33 107.7 13632.7 126.58

R = 1.0 7.9 890.7 112.75 20.2 2489.2 123.23 40.9 4915.6 120.19 54.6 9008.1 164.98 110.8 14096.7 127.23

Table 1: Comparaison Timing (top) - CPLEX (middle) - Ratio (bottom).

11

100000 Timing ILOG CPLEX

10000

CPU time

1000

100

10

1 200

250

300

350

400 Number of tasks

450

500

550

600

Figure 6: Comparaison of the Timing algorithm with CPLEX (R = 0.2)

4

A lower bound

In this section, we propose a lower bound for JIT-POMP which is an adaptation of the ones proposed by Sourd and Kedad-Sidhoum [15] and independently by B¨ ulb¨ ul et al. [4] for the non-preemptive case. The main idea of the lower bound is to compute a minimum cost matching: each job Ji is divided into pi operations oi1 , oi2 , . . . , oipi which have unit execution times. These operations are to be assigned to T distinct time slots [t − 1, t) where 1 ≤ t ≤ T and T is the horizon of the schedule. The assignment costs are assumed to be operationindependent: we define for each job and each time slot an assignment cost cit . The matching problem can now be expressed as a transportation problem: P P (TP) : min ni=1 Tt=1 cit xit PT s.t. xit = pi , ∀j = 1, . . . , n Pt=1 n ∀t = 1, . . . , T j=1 xit ≤ 1, xit ≥ 0,

∀j = 1 . . . n and ∀t = 1, . . . , T

Since the time complexity depends on T , it has to be finite and as small as possible. 12

The value of T we use to compute the lower bound of JIT-POMP, is the makespan of the optimal schedule of 1|rj , pmtn|Cmax where rj = dsj (problem which can be solved in polynomial time using Jackson’s rule). We can easily prove that an optimal schedule completes before T . To obtain a valid lower bound the above described transportation problem has to verify some additional sufficient conditions concerning the assignment costs cit . Property 3. A sufficient condition for (TP) to provide a lower bound for JIT-POMP is to satisfy the following conditions: (1) For each job Ji , the assignment costs of the operations have to be non-increasing between the interval [1, dci ] and non-decreasing between the interval [dci + 1, T ]. (2) The costs cit are nonnegative. (3) For each job Ji and for each time point t, we have X cit′ ≤ αi max(0, (dsi − t)) + βi max(0, ((t + pi ) − dci )) t
Proof. For any feasible preemptive schedule, we can define a feasible (non-optimal) solution to (TP) P by setting xit = 1 if and only if Ji is in process in the time slot [t − 1, t). Proving that it cit xit is less than the cost of the corresponding schedule is sufficient to prove the validity of the lower bound. We prove a slightly stronger result that is, for Pdci P any job Ji , t=1 cit xit ≤ αi Ei and Tt=dc +1 cit xit ≤ βi Ti . i To prove the first inequality, we first observe that condition (3) with t = dsi gives Pdci s c t′ =dsi +1 cit′ = 0. From condition (2), we have that cit = 0 for t = di + 1, . . . , di . Pdsi Pdsi Therefore, we only have to prove that t=1 cit xit ≤ αi Ei . We define ni = t=1 xit be s the number of operations assigned before di in (TP). If ni = 0, then the inequality is Pdsi Pdsi obviously satisfied. Otherwise, we have Si < dsi . We have t=1 cit xit = t=S cit xit ≤ i +1 PSi +ni PSi +pi t=Si +1 cit ≤ t=Si +1 cit . The first inequality comes from condition (1) and the second inequality comes from condition (2). Finally, deriving condition (3) with t = Si gives P i +pi Pdci that St=S c ≤ αi Ei , which proves that t=1 cit xit ≤ αi Ei . The proof of the other i +1 it inequality is symmetrical. For the non-preemptive problem, condition (3) alone is sufficient (and necessary) for the validity of the (TP) lower bound. The following example shows that conditions (1) and (2) are indeed necessary in the preemptive case. Let us consider two jobs J1 and J2 such that (p1 = 2, d1 = 5, α1 = 2, β1 = 100) and (p2 = 3, d2 = 4, α2 = 100, β2 = 100). The assignment costs of job J1 satisfy condition (3) but violate (1) and (2). They are defined as follows: 13

ds2

ds1

J1

dc2

J2

dc1 J1 t

6

0

0

0

2

o1

o2

o2

o2

o1

0

1

2

3

4

5

t

Figure 7: The value of the schedule is 6, but the minimal matching has a value of 8. c11 = 6 c21 = 100

c12 = 0 c22 = 0

c13 = 4 c23 = 0

c14 = −2 c24 = 0

c15 = 2 c25 = 100

c1i = 98, i > 5 c1i = 100, i > 5

As illustrated by figure 7, the value of the minimal matching is 8 whereas the value of the optimal schedule is 6, which clearly proves that such assignment costs do not give a valid lower bound. The assignment costs proposed by Sourd and Kedad-Sidhoum [15] and B¨ ulb¨ ul et al. [4] both satisfy conditions (1) and (3) but the cost proposed in the latter paper may be negative. Therefore, we will consider the costs of Sourd and KedadSidhoum which are given by  j dc −t k j  if t ≤ dcj ,  αj pj c′jt =

(7)

l cm   β t−dj j

pj

if t > dcj .

This lower bound provides good results for the non-preemptive case. Since the optimum of JIT-POMP is smaller that the optimum of the non-preemptive case, the gap between the lower bound and the optimum is even smaller. To compute the lower bound, Sourd and Kedad-Sidhoum [15] have proposed an O(n2 T ) algorithm which is based on the Hungarian algorithm.

5

Neighborhood search

We now consider the general problem and the aim of this section is to find good sequences for S1 , C1 , . . . , Sn , Cn that lead to near optimal solutions. The solution space corresponds to the set of valid sequences defined in section 3.1. We first observe that if the set of feasible solutions is defined as in section 2, its size would be (2n)! 2n . With the dominance (2n n) rules (1) and (2), the size is significantly reduced: since there are Cn = n+1 well 14

parenthesed words (Cn is the number of Catalan) and n! ways to assign the n jobs to (2n)! the n pairs of parentheses, the size of the solution set is “only” n!Cn = (n+1)! . However, this set is still too large to be completly enumerated and thus this section is devoted to local search.

5.1

Neighborhood definition

Local Search methods are known to provide good results for just-in-time scheduling problems. In this section, we propose a neighborhood search for the preemptive problem. The considered neighborhood is based on the data structure introduced in section 3.2. A simple descent method is then implemented and the experimental results are reported finally. We only define this neighborhood on valid sequences. For a given solution, we create its neighborhood by modifying its sequence σ. The basic idea is to delete, for each job Ji , the corresponding events Si and Ci from σ and to insert them again at new positions. These new positions are well defined in the tree representation: 4 positions are considered for each job Jj : • around the job Jj : ... Si Sj ... Cj Ci ... • within the job Jj : ... Sj Si ... Ci Cj ... • before job Jj : ... Si Ci Sj ... Cj ... • after job Jj : ... Sj ... Cj Si Ci ... The described modifications can easily be interpreted in the tree representation. The node i which corresponds to the job Ji is deleted from the tree. Then, for each job Jj , the node i is reinserted as follows: • node i is inserted between j and its father • node i is inserted as son of node j and the sons if j become the son of node i • node i is inserted as left brother of node j • node i is inserted as right brother of node j The definition of the neighborhood ensures that the parenthesis structure is preserved. At each new sequence we apply the timing algorithm presented in section 3.2. The size of the neighborhood is at most 4n2 .

15

5.2 5.2.1

Experimental results Algorithms

The goal of this section is to test the efficiency of our neighborhood and to detect the classes of instances that are harder to solve. Therefore, we limit our study to a simple descent, which gives satisfactory results with respect to the lower bound. Clearly, more elaborated meta-heuristics would improve the quality of the solutions at the price of longer computation times. Our algorithm has two steps. First, an initial solution is obtained by executing an iterated descent for the non-preemptive problem based on the neighborhood defined in Hendel and Sourd [9]. This approach finds good solutions for the one-machine justin-time scheduling problem without preemption. This choice is motivated by the fact that this heuristic is fast and we observed that there are in general few preemptions in optimal solutions. Then, a descent based on the neighborhood defined in section 5.1 is launched. In fact, in our experimental results, we compare the “best fit” and the “first fit” implementations of the neighborhood search. In the best fit method, the best sequence is chosen once the entire neighborhood is known. This best sequence will serve as an initial solution for the next iteration. In the first fit method, a new iteration is started as soon as a better solution is found. 5.2.2

Instances

The generation scheme of these instances is based on those of the literature [11, 15]. There are no release dates specified. We tested instances with n = 30, 60, 90 jobs. The processing times are generated from the uniform distribution [10, 100) and the earliness-tardiness penalties are drawn from the uniform distribution [1, 5]. The due date of each job is drawn from Pthe uniform distribution [dmin , dmin + ρP ] where dmin = max(0, P (τ − ρ/2)) and P = nj=1 pj . The two parameters τ and ρ are respectively the tardiness and range parameters. These instances are available online1 . 5.2.3

Results

The neighborhood search was implemented in Java and the code was run on a 3.6 GHz PC with 3.5Go RAM. The main conclusion is that execution times are satisfying since instances up to 90 jobs can be solved in a reasonable time. The table below presents the average execution times in seconds ordered by the size of the instances. The best fit and first fit algorithms are compared. We observe the first fit version is executed 50% faster than the best fit version. 1

http://www-poleia.lip6.fr/∼sourd/project/et/sks30-90.zip

16

n Best fit First fit

30 15.67 7.72

60 307.51 17.25

90 2109.33 1101.77

Table 2: Execution times in seconds n Best fit First fit

30 8.17% 8.39%

60 5.94% 5.28%

90 4.95% 5.20%

Average 6.35% 6.29%

Table 3: Quality of solution

To evaluate the quality of a solution, we compare its value to the lower bound presented in section 4. The deviations between the lower bound and the value of the neighborhood search for the best fit and first fit algorithms are presented in table 3. For the best fit version, we observe an average deviation of 6.35%. The first fit version provides an average deviation of 6.29%. We observe that the two versions provide results of equivalent quality, while the first fit method is significantly faster. Clearly, multiple executions of the neighborhood search can improve the upper bound (and therefore the deviation). For example, after seven executions of the first fit algorithm, the average deviation has improved to 5.16%. To determine the instances that are difficult to solve, that means the deviation between the lower bound and the result of the neighborhood search is high, the instances are sorted according to τ and ρ. Table 4 shows results of instances with n = 60 jobs obtained with the first fit version. For each value of τ and ρ four values are displayed: 1. the deviation between the best lower bound and the result of the neighborhood search (Dev LB/Heur), 2. the deviation between the non-preemptive solution and the neighborhood search which expresses a possible improvement of the solution by allowing preemption (Dev NP/Heur), 3. the deviation between the non-preemptive solution and the best lower bound (Dev NP/LB), 4. the computation time of the descent phase (CPU Time). The value of τ does not influence the quality of the solution but the value of ρ does. The deviation between the non-preemptive solution and the lower bound is tighter for the 17

τ Dev LB/Heur Dev NP/Heur Dev NP/LB CPU Time ρ Dev LB/Heur Dev NP/Heur Dev NP/LB CPU Time

τ = 0.2 3.52% 1.28% 4.90% 139.2s ρ = 0.2 0.96% 0.56% 1.53% 84.4s

τ = 0.5 5.26% 1.95% 7.50% 171.8s ρ = 0.5 3.22% 0.96% 4.23% 188.4s

τ = 0.8 4.43% 2.27% 7.02% 206.5s ρ = 0.8 9.04% 3.98% 13.66% 244.8s

Table 4: Variation of quality for 60 jobs

small ρ and we observe a less important improvement between the non-preemptive upper bound and the preemptive solution. On the other hand, when ρ is great, the difference between the upper bound and the lower bound is more important and preemption is able to improve the solution. In average, preemption improves non-preemptive solution of 2%. When comparing the computation times, we remark that instances with larger τ and ρ leads to longer descents.

6

Conclusion

We have introduced a new earliness-tardiness problem in order to deal with preemption. We have proposed a polynomial algorithm to solve the essential timing sub-problem. Then, we have shown the interest of this algorithm in solving the general problem: indeed, our descent algorithm finds near-optimal feasible schedules. An interesting perspective would consist in finding a more compact encoding of the feasible schedule in order to obtain both a faster timing problem and a smaller solution set. Such an approach would require new dominance properties on the sequences. A branch and bound approach based on the lower bound presented in section 4 could be considered in order to get optimal solutions.

References [1] A.V. Aho and J.D. Ullman (1994). Foundation of Computer Science. W.H. Freeman. [2] R.K. Ahuja, D.S. Hochbaum, J.B. Orlin (2003). Solving the convex cost integer dual network flow problem. Management Science 49, 950-964.

18

[3] J. Bang-Jensen and G. Gutin (2000). Digraphs: theory, algorithms and applications. Springer-Verlag. [4] K. B¨ ulb¨ ul, P. Kaminsky, and C. Yano (2004). Preemption in single machine earliness/tardiness scheduling. Working paper. [5] Ph. Chr´etienne and F. Sourd (2003). Scheduling with convex cost functions. Theoretical Computer Science 292, 145–164. [6] J.S. Davis and J.J. Kanet (1993). Single-machine scheduling with early and tardy completion costs. Naval Research Logistics 40, 85–101. [7] B. Esteve, C. Aubijoux, A. Chartier and V. Tkindt (2006). A recovering beam search algorithm for the single machine Just-in-Time scheduling problem. European Journal of Operational Research 172, 798–813. [8] M.R. Garey, R.E. Tarjan and G.T. Wilfong (1988). One-Processor Scheduling with Symmetric Earliness and Tardiness Penalties. Mathematics of Operations Research 13, 330–348. [9] Y. Hendel and F. Sourd. Efficient neighborhood search for the one-machine earlinesstardiness scheduling problem. European Journal of Operational Research 173, 108– 119. [10] Y. Hendel and F. Sourd. An improved earliness-tardiness timing algorithm Computers & Operations research. In press, available online: www.science-direct.com [11] J.A. Hoogeveen and S.L. van de Velde (1996). A Branch-and-Bound Algorithm for Single-Machine Earliness-Tardiness Scheduling with Idle Time. INFORMS Journal on Computing 8, 402–412. [12] A.V. Karzanov and S.T. McCormick (1997). Polynomial methods for separable convex optimization in unimodular linear spaces with applications. SIAM Journal on Computing 26, 1245-1275. [13] J.K. Lenstra, A.H.G. Rinnooy Kan, and P. Brucker(1977). Complexity of machine scheduling problems. Annals of Discrete Mathematics 1, 343–362. [14] Y. Pan and L. Shi (2005). Dual Constrained single machine sequencing to minimize total weighted completion time. IEEE Trans. on Automation Science and Engineering 2, 344–357 [15] F. Sourd and S. Kedad-Sidhoum (2003). The one-machine scheduling with earliness and tardiness penalties. Journal of Scheduling 6, 533–549. 19

[16] F. Sourd (2005). Optimal Timing of a sequence of tasks with general completion costs. European Journal of Operational Research 165, 82–96. [17] W. Szwarc and S.K. Mukhopadhyay (1995). Optimal Timing Schedules in EarlinessTardiness Single Machine Sequencing, Naval Research Logistics 42, 1109–1114. ´ Tardos (1986). A strongly polynomial algorithm to solve combinatorial linear [18] E. programs. Operations Research 34, 250–256. [19] G. Wan and B.P.C. Yen (2002). Tabu search for single machine with distinct due windows and weighted earliness/tardiness penalties. European Journal of Operational Research 142, 271–281.

20

The one-machine just-in-time scheduling problem with ...

the jobs. To solve this problem, we propose an efficient partial representation of dominant ... Researchers and practitioners have shown interest in just-in-time scheduling for about ...... In press, available online: www.science-direct.com.

199KB Sizes 1 Downloads 113 Views

Recommend Documents

The one-machine just-in-time scheduling problem with ...
for S1,C1,...,Sn,Cn that lead to near optimal solutions. The solution .... τ and ρ leads to longer descents. ... IEEE Trans. on Automation Science and Engineer-.

Solving an Avionics Real-Time Scheduling Problem by Advanced IP ...
center Matheon in Berlin, by DFG Focus Program 1307 within the project “Algo- ... Solving an Avionics Real-Time Scheduling Problem by Advanced IP-Methods. 13 execution times. Baruah et .... We call this model the congruence- formulation.

Cost Sharing in a Job Scheduling Problem
Every job has a processing time and incurs cost due to waiting (linear in its waiting time). ... Efficient ordering directs us to serve the jobs in decreasing order of the ratio of per unit time ...... Cost Sharing in a Job Scheduling Problem. Tech-

A Scheduling Method for Divisible Workload Problem in ...
previously introduced are based on the master-worker model. ... cess runs in a particular computer. ..... CS2002-0721, Dept. of Computer Science and Engi-.

A Scheduling Method for Divisible Workload Problem in Grid ...
ing algorithms. Section 3 briefly describes our hetero- geneous computation platform. Section 4 introduces our dynamic scheduling methodology. Section 5 con-.

Chapter 2 The Problem with Promising - WordPress.com
cisely by communicating the intention of creating such obligations. These examples all involve the exercise of a normative power, of a power to change.

Chapter 2 The Problem with Promising - WordPress.com
adversely affected, because a socially valuable practice is damaged. ... is hard to see how it would make any sense for people to conform to its rules, except when .... pass (and not run out in front of me) only because I chose to drive along the.

Modulo Scheduling with Regular Unwinding
requires bi ≥ 0 resources for all the time inter- ..... Proof: We defined the modulo scheduling problem ... Definition 1 A q-stationary p-unwinded schedule is a.

Scheduling Multipacket Frames With Frame Deadlines⋆
As a last example, consider a database (or data center) engaged in trans- ferring truly huge files (e.g., petabytes of data) for replication purposes. It is common ..... in C. However, all frames have integer sizes, and thus their total size if at mo

MODULO SCHEDULING WITH REGULAR UNWINDING 1 Introduction
1 Introduction. 1.1 Modulo Scheduling .... In parallel machine scheduling problems, an opera- ... πi = λi The processing period of operation Oi is λi, implying ...

The Stability of Longest-Queue-First Scheduling With ...
is throughput-optimal if it can stabilize the system for all sets of arrival rates that are stabilizable ... requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. ... cumulative

Optimistic Scheduling with Geographically Replicated Services in the ...
availability in face of network or cluster level failures. When designed correctly ... algorithms that 1) actively detect and 2) concurrently resolve inconsistency as ...

Modulo Scheduling with Regular Unwinding
Modulo Resource Constraints Each operation Oi requires bi ≥ 0 resources for all the time intervals. [σi + kλ, σi + .... with renewable resources [Dinechin 2003]:.

Scheduling Multipacket Frames With Frame Deadlines⋆
As a last example, consider a database (or data center) engaged in trans- ferring truly huge files (e.g., petabytes of data) for replication purposes. It is common ..... in C. However, all frames have integer sizes, and thus their total size if at mo

On the Link Adaptation and User Scheduling with ...
where uk denotes the scheduled user index in the k-th cell, h. (0) u0 ... denotes the source data symbol of user uk, and n. (0) ..... best at every scheduling instance. In this .... for broadband space-time BICM hybrid-ARQ systems with co-channel.

Dynamic Scheduling with Microsoft Project 2013: The ...
Dynamic Scheduling with Microsoft Project 2013: The Book by and for ... features of Project 2013 (including Project Pro for Office 365) and enable you to create ...

Fast Modulo Scheduling Under the Simplex Scheduling ...
framework, where all the computations are performed symbolically with T the .... Indeed the renewable resources in an instruction scheduling problem are the ...

1 The Inefficacy Objection to Consequentialism and the Problem with ...
natural distinction between a 'cooperative' collectively-desirable option and a 'non-cooperative' collectively-undesirable option, conditional on being chosen by everyone. 15 Just as given what we know about how elections work, no one should think th