49
Operational Research & Management Operations Scheduling Introduction Operations Scheduling 1. Setting up the Scheduling Problem 2. Single Machine Problems 3. Solving Scheduling Problems

Operational Research & ManagementOperations Scheduling Introduction Operations Scheduling 1.Setting up the Scheduling Problem 2.Single Machine Problems

Embed Size (px)

Citation preview

Operational Research & Management Operations Scheduling

Introduction Operations Scheduling

1. Setting up the Scheduling Problem

2. Single Machine Problems

3. Solving Scheduling Problems

Operational Research & Management Operations Scheduling 2

Program

Week Subject Chapter1 Introduction, Single Machine Scheduling 1, 2, 32 Resource Constrainted Project Scheduling 43 Job Shop Scheduling 54 Flow Shop Scheduling 65 Economic Lot Scheduling 76 Interval Scheduling, Timetabling, Reservation 97 Workforce Scheduling 12

Operational Research & Management Operations Scheduling 3

We are very grateful for the slides prepared by colleagues from other

universities, in particular the slides of Siggi Olafsson has been used in our

course extensively.

Acknowledgement

Operational Research & Management Operations Scheduling

Topic 1

Setting up the Scheduling Problem

Operational Research & Management Operations Scheduling 5

Scheduling

Scheduling concerns optimal allocation or assignment of resources, over time, to a set of tasks or activities.

– Machines Mi, i=1,...,m (ith machine)

– Jobs Jj, j=1,...,n (jth job)

Schedule may be represented by Gantt charts.

Operational Research & Management Operations Scheduling 6

Notation

Static data:

– Processing time (pij) on machine i

– Release date (rj)

– Due date (dj)

– Weight (wj)

Dynamic data:

– Completion time (Cij) on machine i

– Flow Time (Fj = Cj – rj)

Operational Research & Management Operations Scheduling 7

Modeling

Three components for any machine scheduling model:

– Machine configuration

– Constraints and processing characteristics

– Objective and performance measures

Notation: | |

Characteristics for obviously present because of , are NOT mentioned.

Operational Research & Management Operations Scheduling 8

: Machine Configuration

Standard machine configurations:

– (1) Single-Machine models

– (Pm) Parallel-Machine models

– (Jm) Job Shop models jobs have different routes

– (Fm) Flow Shop models: jobs have same order and same machines

– (Om) Open Shop: routing also to be determined

Real world always more complicated:

– (FJc) Flexible Job Shop: with parallel machines at each workstation

– (FFc) Flexible Flow Shop: with parallel machines at each stage

Operational Research & Management Operations Scheduling 9

: Constraints

(rj) Release dates

(prec) Precedence constraints

(sjk) Sequence dependent setup times

(prmp) Preemptions (resume or repeat)

(block) Storage / waiting constraints

(Mj) Machine eligibility

(circ) Recirculation

Tooling / resource constraints

Personnel scheduling constraints

Operational Research & Management Operations Scheduling 10

: Objectives and Performance Measures

1. Throughput (TP) and makespan (Cmax)

2. Due date related objectives

3. Work-in-process (WIP), lead time (response time), finished

inventory

4. (Setup Times)

Operational Research & Management Operations Scheduling 11

1. Throughput and Makespan

Throughput

– Defined by bottleneck machines

Makespan

Minimizing makespan tends to maximize throughput and balance load

max 1 2max , ,..., nC C C C

Operational Research & Management Operations Scheduling 12

2. Due Date Related Objectives

LatenessMinimize maximum lateness

Tardiness

Minimize the weighted tardiness

Tardy job

Minimize the number of tardy jobs

jjj dCL

j jjw T

maxL

jjU

max{0, }j j jT C d

1 ifj j jU C d

Operational Research & Management Operations Scheduling 13

Due Date Penalties

jdjC

jL

jdjC

jT

jdjC

jU1

jdjC

In practice

Tardiness

Late or Not

Lateness

Operational Research & Management Operations Scheduling 14

3. WIP and Lead Time

Work-in-Process (WIP) inventory cost

Minimizing WIP also minimizes average lead time (throughput time)

Minimizing lead time tends to minimize the average number of jobs in system

Equivalently, we can minimize sum of the completion times:

orjjC j jj

w C

WIP TP jC

Operational Research & Management Operations Scheduling

Topic 2

Single-Machine Scheduling Problems

Operational Research & Management Operations Scheduling 16

Classic Scheduling Theory

Look at a specific machine environment with a specific objective

Analyze to prove an optimal policy or to show that no simple optimal policy exists

Thousands of problems have been studied in detail with mathematical proofs!

3 Examples: single machine

Operational Research & Management Operations Scheduling 17

1. Completion Time Models

Lets say we have

– Single machine (1), where

– the total weighted completion time should be minimized (wjCj)

We denote this problem as 1|| j jw C

Operational Research & Management Operations Scheduling 18

Optimal Solution

Theorem: Weighted Shortest Processing Time first - called the WSPT rule - is optimal for

Note: The SPT rule starts with the job that has the shortest processing time, moves on the job with the second shortest processing time, etc.

WSPT starts with job with largest j

j

w

p

1|| j jw C

Operational Research & Management Operations Scheduling 19

Proof (by contradiction)

Suppose it is not true and schedule S is optimal

– Then there are two adjacent jobs, say job j followed by job k such that

Do a pairwise interchange to get schedule S’

that isj kk j j k

j k

w wp w p w

p p

j k

k j

kj ppt

kj ppt

t

t

Operational Research & Management Operations Scheduling 20

Proof (continued)

The weighted completion time of the two jobs under S is

The weighted completion time of the two jobs under S’ is

Now:

Contradicting that S is optimal.

( ') ( ) ( )k k j k jC S Const t p w t p p w

( ) ( ) ( )j j j k kC S Const t p w t p p w

( ) ( ')

( ) ( ) ( ) ( )

0

j j j k k k k k j j

j j j k k k k k k j j j

j k k j

C S C S

t p w t p p w t p w t p p w

p w p w p w p w p w p w

p w p w

Operational Research & Management Operations Scheduling 21

More Completion Time Models

SPT rule

WSPT rule

NP-hard

preemptive SPT rule

NP-hard

NP-hard

polynomial algorithm

1|| jC jjCw||1

1| , |j jr prmp C1| , |j j jr prmp w C

1| |j jr C

1| | j jchain w C1| | j jprec w C

Operational Research & Management Operations Scheduling 22

2. Lateness Models

Lets say we have

– Single machine (1), where

– the maximum cost for late jobs should be minimized (hmax)

– subject to precedence constraints

We denote this problem as

hj(Cj) denotes the cost for completing job j at time Cj

e.g. hj(Cj) = Cj-dj (than hmax = Lmax and EDD optimal)

max1| |prec h

Operational Research & Management Operations Scheduling 23

Optimal Solution

Theorem: Lawler’s algorithm is optimal for

Lawler’s Backwards recursive algorithm (Minimizing Maximum Cost):

1. Determine makespan

2. Determine job j* with smallest

3. Schedule job j* as last job in the sequence

4. Repeat same procedure with one job less (j*)

Proof by contradiction

max jjC p

max( )jh C

max1| |prec h

Operational Research & Management Operations Scheduling 24

More Lateness Models

Lawler’s algorithm

EDD rule

B&B algorithm (App B2)

same B&B procedure

preemptive EDD ruleJob j is interrupted when job k arriveswith dk < dj

max1|| L

max1| |jr L

max1| , |jr prec L

max1| , |jr prmp L

max1| |prec h

Operational Research & Management Operations Scheduling 25

3. Tardiness Models

Lets say we have

– Single machine (1), where

– the number of late jobs should be minimized (Uj)

We denote this problem as 1|| jU

1 ifwith

0 otherwise

j j

j

C dU

Operational Research & Management Operations Scheduling 26

Optimal Solution

Theorem: Moore’s algorithm is optimal for

EDD rule with modification:

1. Three sets: J = empty; (complement of J) JC = {1..n}; (tardy jobs) JD

2. Determine job j* with smallest dj and add to J and delete from JC

3. If then remove job k from J with largest pj

and add k to JD

4. Repeat step 2 and 3 until JC is empty

Proof by induction

*j jj Jp d

1|| jU

Operational Research & Management Operations Scheduling 27

More Tardiness Models

Moore’s algorithm

NP-hard

NP-hard

NP-hard

special cases: dj = 0 WSPT

dj loose MS

otherwise: apparent tardiness heuristic

1|| jU1|| j jw U

1|| jT1|| j jw T

Operational Research & Management Operations Scheduling

Topic 3

Solving Scheduling Problems

(Appendix C)

Operational Research & Management Operations Scheduling 29

General Purpose Scheduling Procedures

Some scheduling problems are easy

– Simple priority rules

– Complexity: polynomial time

However, most scheduling problems are hard

– Complexity: NP-hard, strongly NP-hard

– Finding an optimal solution is infeasible in practice heuristic methods

Operational Research & Management Operations Scheduling 30

Different Methods

Basic Dispatching Rules

Composite Dispatching Rules

Branch and Bound

Beam Search

Simulated Annealing

Tabu Search

Genetic Algorithms

ConstructionMethods

ImprovementMethods

Operational Research & Management Operations Scheduling 31

Dispatching Rules

Other names: list scheduling, priority rules

Prioritize all waiting jobs

– job attributes

– machine attributes

– current time

Whenever a machine becomes free: select the job with the highest priority

Static or dynamic

Operational Research & Management Operations Scheduling 32

Release/Due Date Related

Earliest release date first (ERD) rule

– variance in throughput times (flow times)

Earliest due date first (EDD) rule

– maximum lateness

Minimum slack first (MS) rule

– maximum lateness

max ,0j jd p t

CurrentTime

ProcessingTime

Deadline

Operational Research & Management Operations Scheduling 33

Processing Time Related

Longest Processing Time first (LPT) rule

– balance load on parallel machines

– makespan

Shortest Processing Time first (SPT) rule

– sum of completion times

– WIP

Weighted Shortest Processing Time first (WSPT) rule

Operational Research & Management Operations Scheduling 34

Processing Time Related

Critical Path (CP) rule

– precedence constraints

– makespan

Largest Number of Successors (LNS) rule

– precedence constraints

– makespan

Operational Research & Management Operations Scheduling 35

Other Dispatching Rules

Service in Random Order (SIRO) rule

Shortest Setup Time first (SST) rule

– makespan and throughput

Least Flexible Job first (LFJ) rule

– makespan and throughput

Shortest Queue at the Next Operation (SQNO) rule

– machine idleness

Operational Research & Management Operations Scheduling 36

Discussion

Very simple to implement

Optimal for special cases

Only focus on one objective

Limited use in practice

Combine several dispatching rules:

Composite Dispatching Rules

Operational Research & Management Operations Scheduling

Example of Composite Dispatching Rule

Single Machine with Weighted Total Tardiness

1|| j jw T

Operational Research & Management Operations Scheduling 38

Setup

Problem:

No efficient algorithm (NP-Hard)

Branch and bound can only solve very small problems (<30 jobs)

Are there any special cases we can solve?

1|| j jw T

Operational Research & Management Operations Scheduling 39

Case 1: Tight Deadlines

Assume dj=0

Then

We know that WSPT is optimal for this problem!

max 0,

max 0,

j j j

j j

j j j j

T C d

C C

w T w C

Operational Research & Management Operations Scheduling 40

Case 2: “Easy” Deadlines

Theorem: If the deadlines are sufficiently spread out then the MS rule

is optimal (proof a bit harder)

Conclusion: The MS rule should be a good heuristic whenever deadlines are widely spread out

arg min max ,0select j jj d p t

Operational Research & Management Operations Scheduling 41

Composite Rule

Two good heuristics

– Weighted Shorted Processing Time (WSPT )

Optimal with due dates zero

– Minimum Slack (MS)

Optimal when due dates are “spread out”

– Any real problem is somewhere in between

Combine the characteristics of these rules into one composite dispatching rule

Operational Research & Management Operations Scheduling 42

Apparent Tardiness Cost (ATC)

New ranking index

When machine becomes free:

– Compute index for all remaining jobs

– Select job with highest value

max ,0( ) exp

( )j jj

jj

d p twI t

p K p t

Scaling constant

Operational Research & Management Operations Scheduling 43

Special Cases (Check)

If K is very large:

– ATC reduces to WSPT

If K is very small and no overdue jobs:

– ATC reduces to MS

If K is very small and overdue jobs:

– ATC reduces to WSPT applied to overdue jobs

Operational Research & Management Operations Scheduling 44

Choosing K

Value of K determined empirically

Related to the due date tightness factor

and the due date range factor

1max

1d

C

max min2

max

d d

C

Operational Research & Management Operations Scheduling 45

Beam Search

Is B&B with restricted branching

1. Quick evaluation of all candidates

2. Choose the F best options (filter width)

3. Evaluate F options more thoroughly

4. Choose the B best options (beam width) for branching

Operational Research & Management Operations Scheduling 46

Local Search

N(S) = Neighborhood of a solution S =

set containing all solutions that can be obtained by a simple modification of S

Step 1: Choose a starting solution S1 with value c(S1); k = 1;

Step 2: Evaluate all solutions S in N(Sk)

Step 3: Choose as Sk+1 the best solution only if c(Sk+1) < c(Sk) and

k = k+1; go to step 2

Otherwise stop (local optimum found)

Operational Research & Management Operations Scheduling 47

Tabu Search

TS = LS with worse solutions allowed

Step 3: - Choose as Sk+1 the best solution within N(Sk) unless

the associated modification is on the Tabu List.

- Add the modification Sk -> Sk+1 on the Tabu List.

- Remove oldest entry of the Tabu List.

Operational Research & Management Operations Scheduling 48

Graphically

Sk+2

Sk

Sk+1

If c(Sk+2) > c(Sk+1) then

Sk+1 is a strong candidate

for Sk+3

Operational Research & Management Operations Scheduling 49

Exercises

From chapter 3: 3.2, 3.4

From appendix C: C.1, C.4, C.6 (1 step), C.9

Single Machine Problems (see Blackboard)

Proof algorithm of Moore optimal for

Proof EDD optimal for max1|| L

1|| jU