Single-Machine Sequencing with Independent Jobs

38
Single-Machine Sequencing with Independent Jobs Chapter 2 Elements of Sequencing and Scheduling by Kenneth R. Baker Byung-Hyun Ha R4

description

Single-Machine Sequencing with Independent Jobs. Chapter 2 Elements of Sequencing and Scheduling by Kenneth R. Baker Byung-Hyun Ha. R4. Outline. Introduction Preliminaries Problem without due dates: elementary results Flowtime and inventory Minimizing total flowtime - PowerPoint PPT Presentation

Transcript of Single-Machine Sequencing with Independent Jobs

Page 1: Single-Machine Sequencing with Independent Jobs

Single-Machine Sequencing with Independent Jobs

Chapter 2

Elements of Sequencing and Schedulingby Kenneth R. Baker

Byung-Hyun Ha

R4

Page 2: Single-Machine Sequencing with Independent Jobs

2

Outline

Introduction

Preliminaries

Problem without due dates: elementary results Flowtime and inventory Minimizing total flowtime Minimizing total flowtime: the weighed version

Problem with due dates: elementary results Lateness criteria Minimizing the number of tardy jobs Minimizing total tardiness Due dates as decisions

Summary

Page 3: Single-Machine Sequencing with Independent Jobs

3

Introduction

Pure sequencing problem Specialized scheduling problem in which an ordering of jobs completely

determines a schedule

Single-machine problem Simplest pure sequencing problem, but important Reveals a variety of scheduling topics in a tractable model

• A context in which to investigate many performance measures and solution techniques

• A building block in the development of a comprehensive understanding of scheduling concepts

Examples to be employed for complex problems• Single-machine problems as a part of complex ones• Solving imbedded single-machine problems and incorporating the results into

larger problems Bottleneck analysis in multiple-operation processes

• Decisions using resources as aggregated one

Page 4: Single-Machine Sequencing with Independent Jobs

4

Introduction

Characteristics of basic single-machine problemC1. A set of n independent, single-operation jobs is available for processing

simultaneously (at time zero)C2. Setup times for the jobs are independent of job sequence and are

included in processing timesC3. Job descriptors are deterministic and known in advanceC4. One machine is continuously available and never kept idle while work is

waitingC5. Once an operation begins, it proceeds without interruption (i.e. no

preemption is allowed)

Page 5: Single-Machine Sequencing with Independent Jobs

5

Introduction

Permutation schedule Sequence of n jobs permutation of job indices 1, 2, ..., n

Single-machine problem pure sequencing problem• A schedules can be completely specified by a permutation of integers

Total # of distinct schedule – n! Indication of position in sequence using brackets

[5] = 2 5th job in sequence is job 2 d[1] due date of 1st job in sequence

Page 6: Single-Machine Sequencing with Independent Jobs

6

Preliminaries

Job descriptors Input to scheduling problem Examples

• pj -- processing time

• Amount of processing required by job j

pj will generally include both processing time and facility setup time under C2

• rj -- ready time

• Time at which job j is ready (or available) for processing

• rj can be regarded as arrival time, but rj = 0 under C1

• dj -- due date

• Time at which processing of job j is due to be completed

Page 7: Single-Machine Sequencing with Independent Jobs

7

Preliminaries

Information for evaluating schedule Output from applying schedule Examples

• Cj -- completion time

• Time at which processing of job j is finished

• Fj -- flowtime

• Time job j spends in system: Fj = Cj – rj

• Response of system to individual demands for service (turnaround time)

• Lj -- lateness

• Amount of time by which completion time of job j exceeds its due date: Lj = Cj – dj

• Conformity of schedule to given due date• Negative value whenever job is completed early

• Tj -- tardiness

• Lj , if job j fail to meet its due date; 0, otherwise: Tj = max(0, Lj)

• Uj -- unit penalty

• Uj = 1, if Cj dj ; 0, otherwise

Page 8: Single-Machine Sequencing with Independent Jobs

8

Preliminaries

Due date related penalty functions

Lj

Cjdj

Tj

Cjdj

Uj

Cjdj

1

Page 9: Single-Machine Sequencing with Independent Jobs

9

Preliminaries

Performance measures 1-dimensional aggregated quantities about all jobs

• Commonly used for evaluation of schedules

Functions of set of completion time in schedule, usually• Z = f(C1, C2, ..., Cn)

Examples• Total flowtime -- F = j=1

n Fj

• Total tardiness -- T = j=1n Tj

• Maximum flowtime -- Fmax = max1jn {Fj}

• Maximum tardiness -- Tmax = max1jn {Tj}

• Number of tardy jobs, or total unit penalty -- U = j=1n Uj

• Mean flowtime, mean tardiness, proportion of tardy jobs

Problem description F-problem -- minimization of total flowtime T-problem Cmax-problem

Page 10: Single-Machine Sequencing with Independent Jobs

10

Preliminaries

Definition -- regular measures Performance measure Z is regular, if

(a) scheduling object is to minimize Z, and

(b) Z can increase only if at least one of the completion times in schedule increases

(b) Z' Z Cj' Cj for some job j, where Z = f(C1, C2, ..., Cn) is value of a measure of schedule S and Z' = f(C1', C2', ..., Cn') is value of the same measure of some different schedule S'

(b) Cj' Cj for all job j Z' Z

The measures presented in the previous slide are all regular• Then, non-regular measures?

Page 11: Single-Machine Sequencing with Independent Jobs

11

Preliminaries

Definition -- dominant set A set of schedules is dominant if it is sufficient to be considered for findin

g solution• Reduced search space from complete enumeration

Verifying dominant set D of schedules for regular measures1. Consider an arbitrary schedule S (which contains completion times Cj) th

at is excluded from D

2. Show that there exists a schedule S' in D, in which Cj' Cj for all j

3. Hence, Z' Z for any regular measure, and so S' is at least as good as S

4. Therefore, in searching for an optimal schedule, it is sufficient to consider only schedules in D

Basic single-machine problems Dominant sets for regular measures

Set of schedules without idle time C4 could be relaxed Set of permutation schedules (without preemption) C5 could be relaxed

Page 12: Single-Machine Sequencing with Independent Jobs

12

Preliminaries

Suppose we consider regular measures

Theorem 1 In the basic single-machine problem, schedule without inserted idle time

constitute a dominant set.

Theorem 2 In the basic single-machine problem, schedules without preemption

constitute a dominant set.

HOMEWORK #1 Prove Theorem 2

Page 13: Single-Machine Sequencing with Independent Jobs

13

Problem without Due Dates: Elementary Results

Outline Flowtime and inventory Minimizing total flowtime

• F-problem -- min. F = j=1n Fj

• 1 || Cj

Minimizing total flowtime: the weighed version• Fw-problem -- min. Fw = j=1

n wjFj

• 1 || wjCj

Page 14: Single-Machine Sequencing with Independent Jobs

14

Flowtime and Inventory

Two closely related objectives Low inventory levels -- minimizing average # of jobs in system Rapid turnaround of customers -- minimizing total flowtime

Notations J(t) -- number of jobs in system at time t, J -- time average of J(t) Fmax = F[n] = p1 + p2 + ... + pn -- makespan

A = np[1] + (n – 1)p[2] + ... + 2p[n-1] + p[n] A = JFmax = F F = F[1] + F[2] + ... + F[n]

n

n – 2

n – 1

2

1

J(t)

p[1] p[2] p[3] p[n-1] p[n]... t

n

n – 2

n – 1

2

1

J(t)

p[1] p[2] p[3] p[n-1] p[n]... t

flowtime-inventory relation

Page 15: Single-Machine Sequencing with Independent Jobs

15

Flowtime and Inventory

Relationship between flowtime and inventory J = F/Fmax -- J is directly proportional to F

The relationship extends well beyond single-machine problem• In dynamic environment where jobs arrive over time• In infinite-horizon models where new work arrives continuously• In probabilistic systems where process times are uncertain• In situations where inventory costs may vary among jobs

Emphasis on F-problem and its generalization in theory Because total flowtime actually encompasses a broader range of schedu

ling-related costs

Little’s law L = W, where

• L -- long-term average number of customers in a stable system -- long-term average arrival rate• W -- long-term average time a customer spends in the system

Page 16: Single-Machine Sequencing with Independent Jobs

16

Minimizing Total Flowtime

Minimizing the area under J(t) function Equivalent problem to F-problem Steepest slope to the left, the next steepest slope, ... Using shortest processing time (SPT) sequencing

• Sequencing jobs in nondecreasing order of processing times

n

n – 2

n – 1

2

1

J(t)

p[1] p[2] p[3] p[n-1] p[n]... t

Page 17: Single-Machine Sequencing with Independent Jobs

17

Minimizing Total Flowtime

Theorem 3 Total flowtime is minimized by Shortest Processing Time (SPT) sequenci

ng (p[1] p[2] ... p[n]).

Proof sketch of Theorem 3 (proof by contradiction) Suppose there is a sequence S that is optimal but not SPT sequence. In S, there exists a pair of adjacent jobs, i and j, with j following i, such th

at pi pj .

Construct sequence S' in which job i and j are interchanged. Fi + Fj Fj' + Fi' implies that F F', which is a contradiction.

Therefore, for all S, if S is optimal, then S is SPT sequence.

Si j

S'ij

CjCi Ci'Cj'

... ... ......

p(B) p(B)

Page 18: Single-Machine Sequencing with Independent Jobs

18

Minimizing Total Flowtime

Proof by contradiction General procedure

1. Suppose the statement to be proved is false. That is, suppose that the negation of the statement is true.

2. Show that this supposition leads logically to a contradiction.

3. Conclude that the statement to be proved is true.

Exercise: prove that there is no greatest integer.1. Suppose not. That is, suppose there is a greatest integer N.

2. Then, N n for every integer n.

Let M = N + 1.

M is an integer since it is a sum of integers.

M N, since M = N + 1.

So N is not the greatest integer, which is a contradiction.

3. Therefore, there is no greatest integer.

Page 19: Single-Machine Sequencing with Independent Jobs

19

Minimizing Total Flowtime

Theorem 3, revisited Predicates

• O(S) -- S is optimal, SPT(S) -- S is in SPT sequence

Definitions S, O(S) (S', F F') S, O(S) (S', F F') ---

Theorem 3 S, O(S) SPT(S)

Negation of Theorem 3 (S, O(S) SPT(S)) (S, O(S) SPT(S)) S, O(S) SPT(S) ---

Proof of Theorem 3 by contradiction• Suppose not. Then, by , there exists S such that O(S) SPT(S).• Then, since O(S), S', F F' by .• Because SPT(S), in S, there exists a pair of adjacent jobs, i and j, with j following

i, such that pi pj .

• Let S' be the same sequence with S except job i and j are interchanged.

• F F' because Fi + Fj Fj' + Fi' . That is S', F F'.

• So O(S) by , which is a contradiction to O(S).

Page 20: Single-Machine Sequencing with Independent Jobs

20

Minimizing Total Flowtime

Proof of Theorem 3 by construction1. Begin with any non-SPT sequence.

2. Find a pair of adjacent jobs i and j, with j following i, such that pi pj .

3. Interchange jobs i and j in sequence.

4. Return to Step 2 iteratively, improving the performance measure each time, until eventually the SPT sequence is constructed.

Another perspective of Theorem 3 Total flowtime as scalar product of two vectors

j=1n Fj = j=1

n i=1j p[i] = j=1

n (n – j + 1)p[j]

Solution of minimizing such a scalar product• One sequence with nonincreasing, the other with nondecreasing

Since one is already nonincreasing, the other should be nondecreasing

Page 21: Single-Machine Sequencing with Independent Jobs

21

Minimizing Total Flowtime

Related properties with Theorem 3 SPT sequencing minimizes J as well as F If waiting time of job j is defined as its time spent in system prior to the

start of its processing, SPT minimizes total waiting time. SPT minimizes the maximum waiting time

Page 22: Single-Machine Sequencing with Independent Jobs

22

Minimizing Total Flowtime: Weighted Version

Flowtime and inventory Fw = j=1

n wjFj -- total weighted flowtime

V(t) -- total value of inventory in the system at time t• V -- time average of V(t)

Generalized flowtime-inventory relation• A = j=1

n p[j] i=jn w[i] = VFmax = Fw = j=1

n wjFj

• Sequence which minimizes one will minimize the other

wj

w[n]

V(t)

p[1] p[2] p[3] p[n-1] p[n]... t

w[n] + w[n-1]

Page 23: Single-Machine Sequencing with Independent Jobs

23

Minimizing Total Flowtime: Weighted Version

Theorem 4 Total weighted flowtime is minimized by Shortest Weighted Processing T

ime (SWPT) sequencing (p[1]/w[1] p[2]/w[2] ... p[n]/w[n]).

HOMEWORK #2 Prove Theorem 4

Page 24: Single-Machine Sequencing with Independent Jobs

24

Problem with Due Dates: Elementary Results

Outline Lateness criteria

• Lmax-problem -- min. Lmax = maxj=1,...,n {Lj}

• 1 || Lmax

+ 1 || Lj , 1 || Tmax , 1 || –Lmin , 1 || Tmax(1)

, Cj(2)

Minimizing the number of tardy jobs• U-problem -- min. U = j=1

n Uj

• 1 || Uj

+ 1 || wjUj

Minimizing total tardiness• T-problem -- min. T = j=1

n Tj

• 1 || Tj

Due dates as decisions

Page 25: Single-Machine Sequencing with Independent Jobs

25

Lateness Criteria

Total lateness and maximum lateness Assuming 3 jobs {1, 2, 3}

• p1 = 5, p2 = 2, p3 = 3

• d1 = 6, d2 = 4, d3 = 8

• r1 = r2 = r3 = 0

Sequencing• (2, 1, 3)

Lateness (Cj – dj)

• C[1] = 2, C[2] = 7, C[3] = 10, d[1] = 4, d[2] = 6, d[3] = 8

• L[1] = 2 – 4 = –2, L[2] = 7 – 6 = 1, L[3] = 10 – 8 = 2

• L = 1, Lmax = 2

Theorem 5 Total lateness is minimized by SPT sequencing.

Proof sketch of Theorem 5 L = j=1

n Lj = j=1n (Cj – dj) = j=1

n (Fj – dj) = j=1n Fj – j=1

n dj

2 31

2 7 10

Page 26: Single-Machine Sequencing with Independent Jobs

26

Lateness Criteria

Theorem 6 Maximum lateness and maximum tardiness are minimized by Earliest Du

e Date (EDD) sequencing (d[1] d[2] ... d[n]).

Proof sketch of Theorem 6 Similar to proof of Theorem 3, we employ adjacent pairwise interchange

of two adjacent jobs i and j, where dj di but Ci Cj .

max{Li, Lj} = Lj max{Li', Lj'} Lmax Lmax'

Si j

S'ij

CjCi Cj'Ci'

... ... ......

p(B) p(B)

Page 27: Single-Machine Sequencing with Independent Jobs

27

Lateness Criteria

Another measure of urgency Slack time at time t -- sj = dj – t – pj

• Among jobs with identical due dates, longest job is most urgent

Minimum slack time (MST) sequencing• d[1] – p[1] d[2] – p[2] ... d[n] – p[n]

Theorem 7 Among schedules with no idle time, the minimum jobs lateness (Lmin) is

maximized by MST sequencing

Lmin is not a regular measure restricted to schedules without inserted idle time

Page 28: Single-Machine Sequencing with Independent Jobs

28

Minimizing the Number of Tardy Jobs

U-problem and EDD EDD is optimal sequence if there is no tardy job (U = 0) EDD is also optimal if there is only one tardy job

EDD may not be optimal if there are more than one tardy jobs

i j k l m... ...

di

dj

dk

dl

dm

i j...

di dj

...

Page 29: Single-Machine Sequencing with Independent Jobs

29

Optimal sequence form of U-problem Set B of early jobs and set A of late jobs

Algorithm 1 (Minimizing U)1. Index jobs using EDD order and place all jobs in B. A = .

2. If no jobs in B are late, stop. Otherwise, identify the first late job j[k] in B.

3. Identify the longest job among the first k jobs in sequence. Remove this job from B and place it in A. Return to Step 2.

Minimizing the Number of Tardy Jobs

... ...

B A

Early jobs Late jobs

longest [k]... ...... [k-1]

d[k-1] d[k]

...

Page 30: Single-Machine Sequencing with Independent Jobs

30

Minimizing the Number of Tardy Jobs

Proof of optimality of Algorithm 1 See p. 48 of Pinedo, 2008

Exercise Get optimal sequence which minimize U.

Weighted version of U-problem -- Uw-problem NP-hard, i.e., as difficult as, or even more difficult than, NP-Complete

• 0-1 knapsack problem reduces to Uw-problem

0-1 knapsack problem Uw-problem

Job j 1 2 3 4 5

pj

dj

12

78

69

410

312

Page 31: Single-Machine Sequencing with Independent Jobs

31

Minimizing Total Tardiness

Minimization of total tardiness Quantification of qualitative goal of meeting job due dates Time-dependent penalties on late jobs, no benefits from completing jobs

early Difficulties

• Tardiness is not a linear function of completion time• NP-hard

Adjacent-jobs analysis -- simple and possible analysis Consider only two adjacent jobs, i and j, and figure out the appropriate

order of decreasing total tardiness Let

• Tij = Ti(S) + Tj(S) = max{p(B) + pi – di, 0} + max{p(B) + pi + pj – dj, 0}

• Tji = Tj(S') + Ti(S') = max{p(B) + pj – dj, 0} + max{p(B) + pi + pj – di, 0}

i j... ...

B AS

j i... ...

B AS'

p(B) p(B)

Page 32: Single-Machine Sequencing with Independent Jobs

32

Minimizing Total Tardiness

Adjacent-jobs analysis (cont’d) Agreeability

• Two set of parameters, uj and vj are agreeable if ui uj implies vi vj

Case 1: agreeable processing time and due dates (pi pj, di dj)

• Case 1.1: p(B) + pi di

• It is preferable that job j precede job i.

• Case 1.2: p(B) + pi di

• It is preferable that job j precede job i.

Theorem 8• For any pair of jobs, suppose that processing times and due dates are agree

able. Then total tardiness (T) is minimized by SPT (or, equivalently, EDD) sequencing.

Page 33: Single-Machine Sequencing with Independent Jobs

33

Minimizing Total Tardiness

Adjacent-jobs analysis (cont’d) Case 2: parameters are not agreeable (pi pj, di dj)

• Case 2.1: p(B) + pi di

• It is preferable that job i (with earlier due date) precede job j.

• Case 2.2: p(B) + pi di

• Case 2.2.1: p(B) + pi + pj dj

It preferable that job i (with earlier due date) precede job j.

• Case 2.2.2: p(B) + pi + pj dj

» Case 2.2.2.1: p(B) + pj dj

It is preferable that job i precede job j unless p(B) + pi dj , in which case job j (shorter job) may precede job i.

» Case 2.2.2.2: p(B) + pj dj

It is preferable that job j (shorter job) precede job i.

Page 34: Single-Machine Sequencing with Independent Jobs

34

Minimizing Total Tardiness

Theorem 9 In case of T-problem, if jobs i and j are the candidates to begin at time t,

then the job with earlier due date should come first, except ift + max{pi, pj} max{di, dj},

in which case the shorter job should come first.

Combined results from Case 1 and Case 2

Review of Theorem 9 Outcome depends on time t when candidate jobs are compared Not sufficient but necessary condition of T-problem

• It does not tell whether job i and j should come early or late in schedule Consider following T-problem

• Check schedule (2, 1, 3)• Check optimal schedule (1, 3, 2)

Job j 1 2 3

pj

dj

38

86

310

Page 35: Single-Machine Sequencing with Independent Jobs

35

Minimizing Total Tardiness

Modified due date (MDD) at time t dj' = max{dj, t + pj}

MDD priority rule If jobs i and j are the candidates to begin at time t, then the job with the e

arlier modified due date should come first. MDD priority rule is consistent with Theorem 9.

Other specialized results for T-problem If EDD sequence produces no more than one tardy job, it is optimal. If all jobs have the same due dates, T is minimized by SPT sequencing. If it is impossible for any job to be on time in any sequence, T is minimiz

ed by SPT sequencing. If SPT sequencing yields no jobs on time, it minimizes T. ...

Page 36: Single-Machine Sequencing with Independent Jobs

36

Due Date as Decisions

Due date as a matter of negotiation In practice

• Reasonable models would introduce much more complexity

A simple step, here• Treating due date as a decision variable, subject to some constraints

Environment Due date can be selected at job’s arrival time (rj)

Selection of due date depends only on information about the job itself

Due date decision problem Decision variables -- dj

Objective• Min. D = j=1

n dj

Constraints• Cj dj for all j

With full knowledge over all jobs, SPT works for optimal solution

Page 37: Single-Machine Sequencing with Independent Jobs

37

Due Date as Decisions

Due date decision problem (cont’d) Possible rules selecting due date, considering only a job

• CON -- constant flow allowance: dj = rj + • SLK -- equal slack flow allowance: dj = rj + pj + • TWK -- total work flow allowance: dj = rj + pj

Some results (Baker & Bertrand, 1981)• CON due dates are dominated by either SLK or TWK due dates• TWK will tend to be the best rule most of time

Page 38: Single-Machine Sequencing with Independent Jobs

38

Summary

Basic single-machine model Fundamental in the study of sequencing and scheduling

Scheduling objectives Flowtime-related, lateness-related, ...

Problems 1 || Cj , 1 || wjCj

1 || Lj , 1 || Lmax , 1 || Tmax , 1 || –Lmin , 1 || Tmax(1)

, Cj(2)

1 || Uj , 1 || wjUj

1 || Tj

Solution strategies Using simple sequencing rules, such as SPT and EDD Using more intricate construction for U-problem

We could not solve T-problem

Due date decision problem