• Tidak ada hasil yang ditemukan

Minimizing Maximum Cost) Step 1

Dalam dokumen Scheduling (Halaman 57-62)

Single Machine Models (Deterministic)

Algorithm 3.2.1 Minimizing Maximum Cost) Step 1

result that generalizes the Adjacent Pairwise Interchange argument used in the optimality proof for the WDSPT rule (see Exercise 3.21).

3.2 The Maximum Lateness

The objectives considered in the next four sections are due date related. The first due date related model is of a rather general nature, namely the problem 1|prec|hmax, where

hmax= m ax

h1(C1), . . . , hn(Cn)

with hj, j = 1, . . . , n, being nondecreasing cost functions. This objective is clearly due date related as the functions hj may take any one of the forms depicted in Figure 2.1. This problemallows for an efficientbackward dynamic programming algorithm even when the jobs are subject to arbitrary precedence constraints.

It is clear that the completion of the last job occurs at the makespanCmax= pj, which is independent of the schedule. LetJ denote the set of jobs already scheduled, which are processed during the time interval

[Cmax

jJ

pj, Cmax].

The complement of setJ, setJc, denotes the set of jobs still to be scheduled and the subsetJ of Jc denotes the set of jobs that can be scheduled immediately before setJ, i.e., the set of jobs all of whose successors are inJ. SetJis referred to as the set of schedulable jobs. The following backward algorithmyields an optimal schedule.

Algorithm 3.2.1 (Minimizing Maximum Cost)

3.2 The Maximum Lateness 43 hj(Cj)

hj*

hj**

Cj*,Cj**

j* j**

hj(Cj)

hj*

hj**

Cj*,Cj**

j*

j**

Fig. 3.3Proof of optimality of Theorem 3.2.2

Theorem 3.2.2. Algorithm 3.2.1 yields an optimal schedule for1|prec| hmax.

Proof. By contradiction. Suppose in a given iteration jobj∗∗, selected fromJ, does not have the minimum completion cost

hj kJc

pk

among the jobs inJ. The minimum cost jobj must then be scheduled in a later iteration, implying that jobjhas to appear in the sequence before jobj∗∗. A number of jobs may even appear between jobsj andj∗∗ (see Figure 3.3).

To show that this sequence cannot be optimal, take jobj and insert it in the schedule immediately following job j∗∗. All jobs in the original schedule between jobs j and j∗∗, including job j∗∗ itself, are now completed earlier.

The only job whose completion cost increases is jobj. However, its completion cost now is, by definition, smaller than the completion cost of jobj∗∗under the original schedule, so the maximum completion cost decreases after the insertion

of jobj. This completes the proof.

The worst case computation time required by this algorithm can be estab- lished as follows. There arensteps needed to schedule thenjobs. In each step at mostnjobs have to be considered. The overall running time of the algorithm is therefore bounded byO(n2).

The following example illustrates the application of this algorithm.

Example 3.2.3 (Minimizing Maximum Cost) Consider the following three jobs.

jobs 1 2 3

pj 2 3 5

hj(Cj) 1 +C1 1.2C2 10

The makespanCmax= 10 and h3(10)< h1(10)< h2(10) (as 10<11<12).

Job 3 is therefore scheduled last and has to start its processing at time 5.

To determ ine which job is to be processed before job 3, h2(5) has to be compared withh1(5). Either job 1 or job 2 may be processed before job 3 in an optimal schedule ash1(5) =h2(5) = 6. So two schedules are optimal:

1,2,3 and 2,1,3. ||

The problem1||Lmaxis the best known special case of 1|prec|hmax. The functionhj is then defined as Cj−dj and the algorithmyields the schedule that orders the job in increasing order of their due dates, i.e.,Earliest Due Date (EDD) first.

A generalization of 1 || Lmax is the problem1 | rj | Lmax with the jobs released at different points in time. This generalization, which does not allow preemption, is significantly harder than the problem with all jobs available at time 0. The optimal schedule is not necessarily a non-delay schedule. It may be advantageous to keep the machine idle just before the release of a new job.

Theorem 3.2.4. The problem1|rj|Lmax is strongly NP-hard.

Proof. The proof is based on the fact that3-PARTITIONreduces to 1|rj|Lmax. Given integers a1, . . . , a3t, b, such thatb/4 < aj < b/2 and 3t

j=1aj =tb, the following instance of 1|rj |Lmax can be constructed. The number of jobs,n, is equal to 4t−1 and

rj =jb+ (j−1), pj = 1, dj =jb+j, j= 1, . . . , t−1, rj = 0, pj =ajt+1, dj =tb+ (t−1), j=t, . . . ,4t−1.

Let z = 0. A schedule with Lmax 0 exists if and only if every job j, j = 1, . . . , t−1, can be processed between rj and dj = rj +pj. This can be done if and only if the remaining jobs can be partitioned over thet intervals

3.2 The Maximum Lateness 45 rt — 1dt — 1

rt — 2dt — 2 r2 d3

r2 d2 r1 d1

b b + 1 2b + 1 2b + 2 3b + 2 3b + 3 . . .

0 tb + t — 1

Fig. 3.41|rj|Lmaxis strongly NP-hard

of lengthb, which can be done if and only if3-PARTITION has a solution (see

Figure 3.4).

The 1|rj |Lmaxproblemis important because it appears often as a subprob- lemin heuristic procedures for flow shop and job shop problems. It has received a considerable amount of attention that has resulted in a number of reasonably effective enumerative branch-and-bound procedures. Branch-and-bound proce- dures are basically enumeration schemes where certain schedules or classes of schedules are discarded by showing that the values of the objective obtained with schedules fromthis class are larger than a provable lower bound; this lower bound is greater than or equal to the value of the objective of a schedule obtained earlier.

A branch-and-bound procedure for 1|rj |Lmax can be constructed as fol- lows. The branching process may be based on the fact that schedules are de- veloped starting fromthe beginning of the schedule. There is a single node at level 0 which is the top of the tree. At this node no job has been put yet into any position in the sequence. There aren branches going down ton nodes at level 1. Each node at this level has a specific job put into the first position in the schedule. So, at each one of these nodes there are stilln−1 jobs whose position in the schedule has not yet been determined. There aren−1 arcs emanating fromeach node at level 1 to level 2. There are therefore (n−1)×(n−2) nodes at level 2. At each node at level 2, the jobs in the first two positions are speci- fied; at levelk, the jobs in the firstkpositions are specified. Actually, it is not necessary to consider every remaining job as a candidate for the next position.

If at a node at levelk−1 jobsj1, . . . , jk1are scheduled as the firstk−1 jobs, then jobjk only has to be considered if

rjk<min

lJ

max(t, rl) +pl

,

whereJ denotes the set of jobs not yet scheduled andtdenotes the time jobjk

is supposed to start. The reason for this condition is clear: if jobjk does not satisfy this inequality, then selecting the job that minimizes the right-hand side instead ofjk does not increase the value of Lmax. The branching rule is thus fairly easy.

There are several ways in which bounds for nodes can be obtained. An easy lower bound for a node at level k−1 can be established by scheduling the remaining jobsJ according to thepreemptive EDD rule. The preemptive EDD rule is known to be optimal for 1 | rj, prmp | Lmax (see Exercise 3.24) and

Lower bound = 5

Lower bound = 6

Lower

bound = 7 Level 1

Level 0

Level 2

Level 3 Value of objective

function is 5 1, 2, *, * 1, 3, *, *

1, *, *, * 2, *, *, * 3, *, *, *

*, *, *, *

4, *, *, *

1, 3, 4, 2

Fig. 3.5Branch-and-bound procedure for Example 3.2.5

thus provides a lower bound for the problemat hand. If a preemptive EDD rule results in a nonpreemptive schedule, then all nodes with a higher lower bound may be disregarded.

Example 3.2.5 (Branch-and-Bound for Minimizing Maximum Lateness)

Consider the following 4 jobs.

jobs 1 2 3 4

pj 4 2 6 5

rj 0 1 3 5

dj 8 12 11 10

At level 1 of the search tree there are four nodes: (1,∗,∗,∗), (2,∗,∗,∗), (3,∗,∗,∗) and (4,∗,∗,∗). It is easy to see that nodes (3,∗,∗,∗) and (4,∗,∗,∗) may be disregarded immediately. Job 3 is released at time 3; if job 2 would start its processing at time 1, job 3 still can start at time 3. Job 4 is released at time 5; if job 1 would start its processing at time 0, job 4 still can start at time 5 (see Figure 3.5).

3.3 The Number of Tardy Jobs 47 Computing a lower bound for node (1,∗,∗,∗) according to the preemptive EDD rule results in a schedule where job 3 is processed during the time interval [4,5], job 4 during the time interval [5,10], job 3 (again) during interval [10,15] and job 2 during interval [15,17]. TheLmax of this schedule, which provides a lower bound for node (1,∗,∗,∗), is 5. In a similar way a lower bound can be obtained for node (2,∗,∗,∗). The value of this lower bound is 7.

Consider node (1,2,∗,∗) at level 2. The lower bound for this node is 6 and is determined by the (nonpreemptive) schedule 1,2,4,3. Proceed with node (1,3,∗,∗) at level 2. The lower bound is 5 and determined by the (nonpreemptive) schedule 1,3,4,2. From the fact that the lower bound for node (1,∗,∗,∗) is 5 and the lower bound for node (2,∗,∗,∗) is larger than 5 it follows that schedule 1,3,4,2 has to be optimal. ||

The problem1|rj, prec|Lmax can be handled in a similar way. This prob- lem, from an enumeration point of view, is easier than the problem without precedence constraints, since the precedence constraints allow certain schedules to be ruled out immediately.

3.3 The Number of Tardy Jobs

Another due date related objective is

Uj. This objective may at first appear somewhat artificial and of no practical interest. However, in the real world it is a performance measure that is often monitored and according to which managers are being measured. It is equivalent to the percentage of on time shipments.

An optimal schedule for 1 ||

Uj takes the formof one set of jobs that will meet their due dates and that are scheduled first followed by the set of remaining jobs that will not meet their due dates and that are scheduled last.

It follows fromthe results in the previous section that the first set of jobs have to be scheduled according to EDD in order to make sure thatLmax is negative;

the order in which the second set of jobs is scheduled is immaterial.

The problem1||

Uj can be solved easily using aforward algorithm. Re- order the jobs in such a way that d1 d2 ≤ · · · ≤ dn. The algorithmgoes throughniterations. In iteration kof the algorithmjobs 1,2, . . . , k are taken into consideration. Of thesekjobs, the subsetJ refers to jobs that, in an opti- mal schedule, may be completed before their due dates and the subsetJdrefers to jobs that already have been discarded and will not meet their due dates in the optimal schedule. In iterationkthe setJc refers to jobsk+ 1, k+ 2, . . . , n.

Algorithm 3.3.1 (Minimizing Number of Tardy Jobs)

Dalam dokumen Scheduling (Halaman 57-62)