By: Dongping SONG Supervisors: Dr. Chris Hicks and Prof. Chris F. Earl

35
Using Simulated Annealing and Evolution Strategy scheduling capital products with complex product structure By: Dongping SONG Supervisors: Dr. Chris Hicks and Prof. Chris F. Earl Department of MMM Engineering University of Newcastle, Oct., 2000.

description

Using Simulated Annealing and Evolution Strategy scheduling capital products with complex product structure. By: Dongping SONG Supervisors: Dr. Chris Hicks and Prof. Chris F. Earl Department of MMM Engineering University of Newcastle, Oct., 2000. Contents. Introduction - PowerPoint PPT Presentation

Transcript of By: Dongping SONG Supervisors: Dr. Chris Hicks and Prof. Chris F. Earl

Page 1: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Using Simulated Annealing and Evolution Strategy scheduling

capital products with complex product structure

By: Dongping SONG

Supervisors: Dr. Chris Hicks and

Prof. Chris F. Earl

Department of MMM Engineering

University of Newcastle, Oct., 2000.

Page 2: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Contents

• Introduction

• Problem formulation

• A discrete event-driven model

• Simulated Annealing

• Evolution Strategy

• Case studies

• Conclusions

Page 3: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Introduction

Production scheduling -- the allocation of resources over time to perform a collection of tasks (Baker, 1974).

Two important points in scheduling:

Sequencing -- in which order to perform tasks on resources

Timing -- when to start and complete tasks

Page 4: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Introduction• The importance of sequencing has been well recognised, because

the optimal schedule can only be characterised by the sequences for performance measures such as mean flow-time, percentage of jobs tardy, mean tardiness, etc.

• However, timing scheduling is necessary

for performance measures such as earliness and tardiness costs, total discrepancy from the due dates, etc.

Page 5: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Introduction - effect of timingExample 1. One machine with three independent jobs.

job 1 job 2

job 2

job 3

job 1 job 3

job 2job 1 job 3

E 1

T 2E 1

T 2 T 3

d 1 d 2 d 3

Total cost =

Total cost =

Total cost =

E 1

T 2E 1

T 2 T 3

+

+

time

Schedule A:

Schedule B:

Schedule C:

Due dates

Page 6: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Introduction - effect of timingExample 2. Two machines four jobs s.t. job 1 becomes job 4 and job 2 becomes job 3 after completion.

Schedule A:

Schedule B:

job 1 job 3

job 4job 2

E 4

job 1 job 3

job 4job 2

Holding cost =

Holding cost =

E 4

E 1

M 1:

M 2:

M 1:

M 2:

time

E 1

Page 7: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Complex product structure

Introduction - a capital product

248:1

8 opers

. . .

244:1

9 opers

. . .7 opers

. . .

240:1

11 opers

. . .

236:1

16 opers. . .12 opers

235:1

10 opers

. . .

241:7

243

238230 242

232:12

226:15

234

235:10

233:12

239

240:11

236:16

229

247

248:8244:9

246

228

231

237 245

226:!

15 opers

. . .

232:1

12 opers

. . .

233:1

. . .

241:1

Page 8: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Gantt chart -- with 113 operations (13 assemblies).

Waiting time

Time period

product

Page 9: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Resource chart -- work-load on 13 machines.

Time period

Work-load

Machine

Page 10: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Introduction• Constraints in our scheduling problem:

– Operation precedence constraints– Resource capacity constraints– Due date constraints– Assembly co-ordination requirements

• Scheduling problem: to find optimal operation sequences and timings to meet above constraints and minimise total cost.

Page 11: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Problem formulation

• Notation: si -- planned start time for operation i; N -- total operation number.

• Solution space of schedules := RN{sequences on resources}.

• Solution space can be simplified to RN, because operations on the same resource have different start times (i.e. timings imply sequences).

Page 12: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Problem formulation

• The schedule problem can be formulated as a numerical optimisation problem.

• Find the optimal {si, i=1,..,N} to minimise the total cost

J(s) = (Work-in-progress holding costs+ product earliness costs

+ product tardiness costs)

Page 13: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Problem formulation

• Questions:

(1) How to execute a schedule that is characterised by {si} ?

(2) How to evaluate the cost function for a given schedule ?

Page 14: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Discrete event-driven model• Two types of events :

– the start of an operation

– the completion of an operation.

• Two constraints to trigger the start events :– Physical constraints : an event cannot occur before all

preceding events are completed.

– Planning constraints : an operation cannot be started before its planned start time si.

Page 15: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Discrete event-driven model

The evolution of the system for a given schedule {si} can be described by:

• If a resource is idle, an operation will be processed as soon as the physical and planning constraints are satisfied.

• If there is a queue of operations ready for processing, the operation with the earliest si will be processed first.

Page 16: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Simulated Annealing

• Neighbourhood of a solution -- by adding a random number to each si.

• Outer loop -- cooling the temperature T until T=0.

• Inner loop -- perform Metropolis simulation with fixed T to find equilibrium state.

Page 17: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Simulated Annealing

• Adjust the solution : – shift the whole schedule (optional)– impose precedence constraints (optional)– make non-negative

• Evaluate cost function :– run the DED model

Page 18: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Simulated AnnealingInitialisation

Metropolis simulation with fixedtemperature T

Adjust the solution

Evaluate cost function

Improvement

Accept newsolution

Accept new solutionwith a probability

Check for equilibrium

Stop criteria at outer loop

Return optimal solution

Coolingtemperature T

Generate new solution

NoYes

Yes

No

Yes

No

Page 19: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Evolution Strategy• Similarity of Genetic Algorithms and ES:

– model organic evolution.– iterative scheme including “selection”,

“crossover” and “mutation”.

• Difference of GA and ES:– GA uses binary or string representations,

suitable for combinatorial optimisation problem.

– ES uses continuous variable, suitable for numerical optimisation problem.

Page 20: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Evolution Strategy

s 1(n ,1) s 2

(n ,1) s 3(n ,1) ... ... s N-2

(n ,1) s N-1(n ,1) s N

(n ,1)

s 1(n ,2) s 2

(n ,2) s 3(n ,2) ... ... s N-2

(n ,2) s N-1(n ,2) s N

(n ,2)

Parent 1

Parent 2

offspring s 1(n ,2) s 2

(n ,1) s 3(n ,1) ... ... s N-2

(n ,2) s N-1(n ,1) s N

(n ,2)

• Crossover -- randomly copy elements from parents column by column.

Page 21: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Evolution Strategy• Mutation -- add a random number from a Normal distribution to each element.

offspring s 1 s 2 s 3 ... ... s N-2 s N-1 s N

offspring s 1 +z 1 s 2 +z 2 s 3 +z 3 ... ... s N-2 +z N -2 s N-1 +z N-1 s N + z N

z i ~ N (0, )

Page 22: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Evolution Strategy

• Adjust the solution :– shift the whole schedule (optional)– impose precedence constraints (optional)– make non-negative

• Evaluate cost function -- run the DED model.

• Selection -- choose a set of best offspring as parents for the next generation

Page 23: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Evolution StrategyInitialisation

Mutation for the offspring

Adjust the offspring

Select a set of best offspringto replace the parent generation

Stop criteria

Return optimal solution

Reduce standarddeviation for mutation

if necessary

Crossover to generate offspring

Evaluate cost function

Select candidate(s) from parentgeneration

Finish offspring generation

No

No

Yes

Yes

Page 24: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Case studies

Case Products Maching/Assembly operation

Resources

1 1 100/13 132 3 210/29 17

Characteristics of scheduling problems

Page 25: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Case study 1MRP+FIFO

MRP+EDD

MRP+SPT

SA ES

Total cost 187.78 185.59 188.56 89.22 87.79

Cost is reduced by 50% for SA and ES.

MRP -- material requirement planning

FIFO -- first in first out

EDD -- earliest due date first

SPT -- shortest processing time first

Page 26: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Case study 1 -- cost v.s cpuCost

CPU(s)

SA

Total cost v.s. CPU time for SA and ES

ES

Page 27: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Case study 1 -- ES methodCost

CPU(s)

Maximum cost at each generation

Maximum cost in all parents

Minimum cost at each generation

Page 28: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Case study 2

MRP+FIFO

MRP+EDD

MRP+SPT

SA ES

Total cost 925.34 927.88 931.16 472.57 416.43

Cost is reduced by 50% for SA and ES.

Page 29: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Case study 2 -- cost v.s. cpu

Cost

CPU(s)

Total cost v.s CPU time for SA and ES

SAES

Page 30: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Case study 2 -- ES methodCost

CPU(s)

Maximum cost at each generation

Maximum cost in all parents

Minimum cost at each generation

Page 31: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Conclusions

• SA and ES can reduce total cost by 50% compared with MRP+dispatching rules.

• ES is generally better than SA in both cost and CPU time.

• ES is more robust to its initial parameter selection than SA.

Page 32: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Conclusions• Suggestions for SA initial parameters:

– T0 and step-size is taken from [d/N, 20*d/N];

– Temperature cooling rate > 0.5 and step-size reduction factors > 0.70;

– No-improvement number at inner loop > N/2;

• Suggestions for ES initial parameters:– Offspring population is from [N/2, 2*N];

– Parent population is 1/10 to 1/5 of offspring;

– Initial standard deviation is from [d/N, 5*d/N].

Page 33: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

Further work• Compare our methods with GA (Pongcharoen, et

al.) for the same cost function.

• Develop hybrid optimisation methods by combining SA, ES with Perturbation Analysis or heuristics.

• Extend to stochastic situations such as dynamic customer demand arrivals and processing uncertainties.

Page 34: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

1.00.90.80.70.60.5

110

100

90

80

Temperature cooling factor

To

tal c

ost

SA -- effect of parameters

Initial temperature and temperature cooling factor

T0=1

T0=40

T0=20

T0=10

Page 35: By:  Dongping SONG Supervisors:  Dr. Chris Hicks  and Prof. Chris F. Earl

1.00.90.80.70.60.5

110

100

90

80

Standard dev. reduction factor

To

tal c

ost

ES -- effect of parameters

Offspring Number(ON)/Generation Number(GN) and Standard

deviation reduction factor

Solid-line : ON/GN=80/250dashed-line: ON/GN=100/400dotted-line: ON/GN=160/250dash-dotted: ON/GN=200/200