Implementation exercises for the course Heuristic Optimization Dr. - - PowerPoint PPT Presentation

implementation exercises for the course heuristic
SMART_READER_LITE
LIVE PREVIEW

Implementation exercises for the course Heuristic Optimization Dr. - - PowerPoint PPT Presentation

Implementation exercises for the course Heuristic Optimization Dr. Franco Mascia 1 fmascia@ulb.ac.be IRIDIA, CoDE, ULB February 29, 2012 1Slides based on last years excersises by Dr. Manuel L opez-Ib a nez. Dr. Franco Mascia


slide-1
SLIDE 1

Implementation exercises for the course Heuristic Optimization

  • Dr. Franco Mascia1

fmascia@ulb.ac.be

IRIDIA, CoDE, ULB

February 29, 2012

1Slides based on last year’s excersises by Dr. Manuel L´

  • pez-Ib´

a˜ nez.

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-2
SLIDE 2

Exercise 1.1: Iterative Improvement for the PFSP

Implement perturbative local search algorithms for the PFSP

1

Permutation Flow Shop Scheduling Problem (PFSP)

2

First-improvement and Best-Improvement

3

Transpose, exchange and insert neighborhoods

4

Random initialization vs. NEH heuristic

5

Statistical Empirical Analysis

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-3
SLIDE 3

The Permutation Flow Shop Scheduling Problem (1/4)

Example in ceramic tile production Tiles need several processing steps with different machines Tiles of different type require specific processing times for each machine Goal: find a schedule of the jobs that minimizes an objective function (makespan or total completion time)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-4
SLIDE 4

The Permutation Flow Shop Scheduling Problem (1/4)

Example in ceramic tile production Tiles need several processing steps with different machines Tiles of different type require specific processing times for each machine Goal: find a schedule of the jobs that minimizes an objective function (makespan or total completion time)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-5
SLIDE 5

The Permutation Flow Shop Scheduling Problem (1/4)

Example in ceramic tile production Tiles need several processing steps with different machines Tiles of different type require specific processing times for each machine Goal: find a schedule of the jobs that minimizes an objective function (makespan or total completion time)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-6
SLIDE 6

The Permutation Flow Shop Scheduling Problem (1/4)

Example in ceramic tile production Tiles need several processing steps with different machines Tiles of different type require specific processing times for each machine Goal: find a schedule of the jobs that minimizes an objective function (makespan or total completion time)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-7
SLIDE 7

The Permutation Flow Shop Scheduling Problem (2/4)

Flow Shop Scheduling Several scheduling problems have been proposed with different formulations and constraints. In permutation flow shop problems:

jobs composed by operations to be executed on several machines all jobs pass through the machines in the same order all jobs available at time zero pre-emption not allowed each operation has to be performed on a specific machine each job at most on one machine at a time each machine at most one job at a time

The Permutation Flow Shop Scheduling Problem (PFSP) Jobs pass trough all machines in the same order (FCFS queues) No constraints: infinite buffers between machines, no blocking, no no-wait requirements (steel production)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-8
SLIDE 8

The Permutation Flow Shop Scheduling Problem (2/4)

Flow Shop Scheduling Several scheduling problems have been proposed with different formulations and constraints. In permutation flow shop problems:

jobs composed by operations to be executed on several machines all jobs pass through the machines in the same order all jobs available at time zero pre-emption not allowed each operation has to be performed on a specific machine each job at most on one machine at a time each machine at most one job at a time

The Permutation Flow Shop Scheduling Problem (PFSP) Jobs pass trough all machines in the same order (FCFS queues) No constraints: infinite buffers between machines, no blocking, no no-wait requirements (steel production)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-9
SLIDE 9

The Permutation Flow Shop Scheduling Problem (2/4)

Flow Shop Scheduling Several scheduling problems have been proposed with different formulations and constraints. In permutation flow shop problems:

jobs composed by operations to be executed on several machines all jobs pass through the machines in the same order all jobs available at time zero pre-emption not allowed each operation has to be performed on a specific machine each job at most on one machine at a time each machine at most one job at a time

The Permutation Flow Shop Scheduling Problem (PFSP) Jobs pass trough all machines in the same order (FCFS queues) No constraints: infinite buffers between machines, no blocking, no no-wait requirements (steel production)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-10
SLIDE 10

The Permutation Flow Shop Scheduling Problem (2/4)

Flow Shop Scheduling Several scheduling problems have been proposed with different formulations and constraints. In permutation flow shop problems:

jobs composed by operations to be executed on several machines all jobs pass through the machines in the same order all jobs available at time zero pre-emption not allowed each operation has to be performed on a specific machine each job at most on one machine at a time each machine at most one job at a time

The Permutation Flow Shop Scheduling Problem (PFSP) Jobs pass trough all machines in the same order (FCFS queues) No constraints: infinite buffers between machines, no blocking, no no-wait requirements (steel production)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-11
SLIDE 11

The Permutation Flow Shop Scheduling Problem (2/4)

Flow Shop Scheduling Several scheduling problems have been proposed with different formulations and constraints. In permutation flow shop problems:

jobs composed by operations to be executed on several machines all jobs pass through the machines in the same order all jobs available at time zero pre-emption not allowed each operation has to be performed on a specific machine each job at most on one machine at a time each machine at most one job at a time

The Permutation Flow Shop Scheduling Problem (PFSP) Jobs pass trough all machines in the same order (FCFS queues) No constraints: infinite buffers between machines, no blocking, no no-wait requirements (steel production)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-12
SLIDE 12

The Permutation Flow Shop Scheduling Problem (2/4)

Flow Shop Scheduling Several scheduling problems have been proposed with different formulations and constraints. In permutation flow shop problems:

jobs composed by operations to be executed on several machines all jobs pass through the machines in the same order all jobs available at time zero pre-emption not allowed each operation has to be performed on a specific machine each job at most on one machine at a time each machine at most one job at a time

The Permutation Flow Shop Scheduling Problem (PFSP) Jobs pass trough all machines in the same order (FCFS queues) No constraints: infinite buffers between machines, no blocking, no no-wait requirements (steel production)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-13
SLIDE 13

The Permutation Flow Shop Scheduling Problem (2/4)

Flow Shop Scheduling Several scheduling problems have been proposed with different formulations and constraints. In permutation flow shop problems:

jobs composed by operations to be executed on several machines all jobs pass through the machines in the same order all jobs available at time zero pre-emption not allowed each operation has to be performed on a specific machine each job at most on one machine at a time each machine at most one job at a time

The Permutation Flow Shop Scheduling Problem (PFSP) Jobs pass trough all machines in the same order (FCFS queues) No constraints: infinite buffers between machines, no blocking, no no-wait requirements (steel production)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-14
SLIDE 14

The Permutation Flow Shop Scheduling Problem (2/4)

Flow Shop Scheduling Several scheduling problems have been proposed with different formulations and constraints. In permutation flow shop problems:

jobs composed by operations to be executed on several machines all jobs pass through the machines in the same order all jobs available at time zero pre-emption not allowed each operation has to be performed on a specific machine each job at most on one machine at a time each machine at most one job at a time

The Permutation Flow Shop Scheduling Problem (PFSP) Jobs pass trough all machines in the same order (FCFS queues) No constraints: infinite buffers between machines, no blocking, no no-wait requirements (steel production)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-15
SLIDE 15

The Permutation Flow Shop Scheduling Problem (2/4)

Flow Shop Scheduling Several scheduling problems have been proposed with different formulations and constraints. In permutation flow shop problems:

jobs composed by operations to be executed on several machines all jobs pass through the machines in the same order all jobs available at time zero pre-emption not allowed each operation has to be performed on a specific machine each job at most on one machine at a time each machine at most one job at a time

The Permutation Flow Shop Scheduling Problem (PFSP) Jobs pass trough all machines in the same order (FCFS queues) No constraints: infinite buffers between machines, no blocking, no no-wait requirements (steel production)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-16
SLIDE 16

The Permutation Flow Shop Scheduling Problem (3/4)

Given A set of n jobs J1, . . . , Jn jobs, where each job Ji consists of m

  • perations oi1, . . . , oim performed on M1, . . . , Mm machines in that
  • rder, with processing time pij for operation oij.

Objective Find a permutation π that minimizes the sum of the completion times

  • f all jobs n

i=1 Cπ(i)m, where Cij is the completion time of job Ji on

machine Mm.

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-17
SLIDE 17

The Permutation Flow Shop Scheduling Problem (3/4)

Given A set of n jobs J1, . . . , Jn jobs, where each job Ji consists of m

  • perations oi1, . . . , oim performed on M1, . . . , Mm machines in that
  • rder, with processing time pij for operation oij.

Objective Find a permutation π that minimizes the sum of the completion times

  • f all jobs n

i=1 Cπ(i)m, where Cij is the completion time of job Ji on

machine Mm.

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-18
SLIDE 18

The Permutation Flow Shop Scheduling Problem (3/4)

Given A set of n jobs J1, . . . , Jn jobs, where each job Ji consists of m

  • perations oi1, . . . , oim performed on M1, . . . , Mm machines in that
  • rder, with processing time pij for operation oij.

Objective Find a permutation π that minimizes the sum of the completion times

  • f all jobs n

i=1 Cπ(i)m, where Cij is the completion time of job Ji on

machine Mm.

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-19
SLIDE 19

The Permutation Flow Shop Scheduling Problem (3/4)

Given A set of n jobs J1, . . . , Jn jobs, where each job Ji consists of m

  • perations oi1, . . . , oim performed on M1, . . . , Mm machines in that
  • rder, with processing time pij for operation oij.

Objective Find a permutation π that minimizes the sum of the completion times

  • f all jobs n

i=1 Cπ(i)m, where Cij is the completion time of job Ji on

machine Mm.

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-20
SLIDE 20

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-21
SLIDE 21

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-22
SLIDE 22

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-23
SLIDE 23

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-24
SLIDE 24

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-25
SLIDE 25

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-26
SLIDE 26

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-27
SLIDE 27

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-28
SLIDE 28

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-29
SLIDE 29

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-30
SLIDE 30

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-31
SLIDE 31

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-32
SLIDE 32

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-33
SLIDE 33

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-34
SLIDE 34

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-35
SLIDE 35

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-36
SLIDE 36

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3 3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-37
SLIDE 37

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3

M2 J1 J1 J2 J2 J3 J3 J4 J4 J5 J5 M1 M3

5 10 15 20 time

J1 J2 J3 J4 J5

3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-38
SLIDE 38

The Permutation Flow Shop Scheduling Problem (4/4)

Computing completion times

Cπ(1)j = j

h=1 pπ(1)h

j = 1, . . . m Cπ(k)1 = k

h=1 pπ(h)1

k = 1, . . . n Cπ(k)j = max{Cπ(k−1)j, Cπ(k)(j−1)} + pπ(k)j k = 2, . . . n j = 2, . . . m Job J1 J2 J3 J4 J5 pj1 3 3 4 2 3 pj2 2 1 3 3 1 pj3 4 2 1 2 3

M2 J1 J1 J2 J2 J3 J3 J4 J4 J5 J5 M1 M3

5 10 15 20 time

J1 J2 J3 J4 J5

3 6 10 12 15 5 7 13 16 17 9 11 14 18 21 Makespan = 21 Sum of Completion times = 73

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-39
SLIDE 39

Exercise 1.1: Iterative Improvement for the PFSP

Implement 12 iterative improvements algorithms for the PFSP

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-40
SLIDE 40

Exercise 1.1: Iterative Improvement for the PFSP

Implement 12 iterative improvements algorithms for the PFSP Pivoting rule:

1

first-improvement

2

best-improvement

Neighborhood:

1

Transpose

2

Exchange

3

Insert

Initial solution:

1

Random permutation

2

NEH heuristic (Nawaz et al. 1983)

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-41
SLIDE 41

Exercise 1.1: Iterative Improvement for the PFSP

Implement 12 iterative improvements algorithms for the PFSP Pivoting rule:

1

first-improvement

2

best-improvement

Neighborhood:

1

Transpose

2

Exchange

3

Insert

Initial solution:

1

Random permutation

2

NEH heuristic (Nawaz et al. 1983)

2 pivoting rules × 3 neighborhoods × 2 initialization methods = 12 combinations

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-42
SLIDE 42

Exercise 1.1: Iterative Improvement for the PFSP

Implement 12 iterative improvements algorithms for the PFSP Don’t implement 12 programs! Reuse code and use command-line parameters

pfsp-ii --first --transpose --neh pfsp-ii --best --exchange --random-init ...

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-43
SLIDE 43

Exercise 1.1: Iterative Improvement for the PFSP

Iterative Improvement

π := GenerateInitialSolution()

while π is not a local optimum do choose a neighbour π′ ∈ N(π) such that F(π′) < F(π)

π := π′

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-44
SLIDE 44

Exercise 1.1: Iterative Improvement for the PFSP

Iterative Improvement

π := GenerateInitialSolution()

while π is not a local optimum do choose a neighbour π′ ∈ N(π) such that F(π′) < F(π)

π := π′

Which neighbour to choose? Pivoting rule Best Improvement: choose best from all neighbours of s ✔ Better quality ✘ Requires evaluation of all neighbours in each step First improvement: evaluate neighbours in fixed order and choose first improving neighbour. ✔ More efficient ✘ Order of evaluation may impact quality / performance

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-45
SLIDE 45

Exercise 1.1: Iterative Improvement for the PFSP

Iterative Improvement

π := GenerateInitialSolution()

while π is not a local optimum do choose a neighbour π′ ∈ N(π) such that F(π′) < F(π)

π := π′

Which neighbour to choose? Pivoting rule Best Improvement: choose best from all neighbours of s ✔ Better quality ✘ Requires evaluation of all neighbours in each step First improvement: evaluate neighbours in fixed order and choose first improving neighbour. ✔ More efficient ✘ Order of evaluation may impact quality / performance

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-46
SLIDE 46

Exercise 1.1: Iterative Improvement for the PFSP

Iterative Improvement

π := GenerateInitialSolution()

while π is not a local optimum do choose a neighbour π′ ∈ N(π) such that F(π′) < F(π)

π := π′

Which neighbour to choose? Pivoting rule Best Improvement: choose best from all neighbours of s ✔ Better quality ✘ Requires evaluation of all neighbours in each step First improvement: evaluate neighbours in fixed order and choose first improving neighbour. ✔ More efficient ✘ Order of evaluation may impact quality / performance

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-47
SLIDE 47

Exercise 1.1: Iterative Improvement for the PFSP

Iterative Improvement

π := GenerateInitialSolution()

while π is not a local optimum do choose a neighbour π′ ∈ N(π) such that F(π′) < F(π)

π := π′

Initial solution Random permutation NEH heuristic

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-48
SLIDE 48

Exercise 1.1: Iterative Improvement for the PFSP

Iterative Improvement

π := GenerateInitialSolution()

while π is not a local optimum do choose a neighbour π′ ∈ N(π) such that F(π′) < F(π)

π := π′

NEH heuristic For each job compute the total processing time on the m machines: ∀i,j ∈ N, Pj = m

i=1 pij.

Sort the jobs in non ascending order of Pj, take the first two jobs and evaluate the two possible sequences. Repeat until all jobs sequenced: At ith step select the ith job in the sorted list and tentatively insert it in all possible i positions. Select the position minimising the objective function.

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-49
SLIDE 49

Exercise 1.1: Iterative Improvement for the PFSP

Iterative Improvement

π := GenerateInitialSolution()

while π is not a local optimum do choose a neighbour π′ ∈ N(π) such that F(π′) < F(π)

π := π′

Which neighborhood N(π)? Transpose Exchange Insertion

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-50
SLIDE 50

Exercise 1.1: Iterative Improvement for the PFSP

A B C D E F A C B D E F A B C D E F A E C D B F transpose neighbourhood A B C D E F A C D B E F exchange neighbourhood insert neighbourhood

¼ ¶ ¼ ¼ ¶ ¼ ¼ ¶ ¼

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-51
SLIDE 51

Exercise 1.1: Iterative Improvement for the PFSP

A B C D E F A E C D B F exchange neighbourhood

¼ ¶ ¼

Example: Exchange πi and πj (i < j), π′ = Exchange(π, i, j) Only jobs after i are affected! Do not recompute the evaluation function from scratch! Equivalent speed-ups with Transpose and Insertion

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-52
SLIDE 52

Exercise 1.1: Iterative Improvement for the PFSP

A B C D E F A E C D B F exchange neighbourhood

¼ ¶ ¼

Example: Exchange πi and πj (i < j), π′ = Exchange(π, i, j) Only jobs after i are affected! Do not recompute the evaluation function from scratch! Equivalent speed-ups with Transpose and Insertion

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-53
SLIDE 53

Exercise 1.1: Iterative Improvement for the PFSP

A B C D E F A E C D B F exchange neighbourhood

¼ ¶ ¼

Example: Exchange πi and πj (i < j), π′ = Exchange(π, i, j) Only jobs after i are affected! Do not recompute the evaluation function from scratch! Equivalent speed-ups with Transpose and Insertion

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-54
SLIDE 54

Exercise 1.1: Iterative Improvement for the PFSP

A B C D E F A E C D B F exchange neighbourhood

¼ ¶ ¼

Example: Exchange πi and πj (i < j), π′ = Exchange(π, i, j) Only jobs after i are affected! Do not recompute the evaluation function from scratch! Equivalent speed-ups with Transpose and Insertion

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-55
SLIDE 55

Exercise 1.1: Iterative Improvement for the PFSP

A B C D E F A E C D B F exchange neighbourhood

¼ ¶ ¼

Example: Exchange πi and πj (i < j), π′ = Exchange(π, i, j) Only jobs after i are affected! Do not recompute the evaluation function from scratch! Equivalent speed-ups with Transpose and Insertion

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-56
SLIDE 56

Exercise 1.1: Iterative Improvement for the PFSP

Instances PFSP instances with 50 jobs and 5, 10, or 20 machines. More info: http://iridia.ulb.ac.be/∼stuetzle/Teaching/HO/ Experiments Apply each algorithm k once to each instance i and compute:

1

Relative percentage deviation ∆ki = 100 · costki − best-knowni best-knowni

2

Computation time (tki) Report for each algorithm k Average relative percentage deviation Sum of computation time

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-57
SLIDE 57

Exercise 1.1: Iterative Improvement for the PFSP

Instances PFSP instances with 50 jobs and 5, 10, or 20 machines. More info: http://iridia.ulb.ac.be/∼stuetzle/Teaching/HO/ Experiments Apply each algorithm k once to each instance i and compute:

1

Relative percentage deviation ∆ki = 100 · costki − best-knowni best-knowni

2

Computation time (tki) Report for each algorithm k Average relative percentage deviation Sum of computation time

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-58
SLIDE 58

Exercise 1.1: Iterative Improvement for the PFSP

Instances PFSP instances with 50 jobs and 5, 10, or 20 machines. More info: http://iridia.ulb.ac.be/∼stuetzle/Teaching/HO/ Experiments Apply each algorithm k once to each instance i and compute:

1

Relative percentage deviation ∆ki = 100 · costki − best-knowni best-knowni

2

Computation time (tki) Report for each algorithm k Average relative percentage deviation Sum of computation time

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-59
SLIDE 59

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Statistical test Paired t-test Wilcoxon signed-rank test

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-60
SLIDE 60

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Background: Statistical hypothesis tests (1) Statistical hypothesis tests are used to assess the validity of statements about properties of or relations between sets of statistical data. The statement to be tested (or its negation) is called the null hypothesis (H0) of the test. Example: For the Wilcoxon signed-rank test, the null hypothesis is that ‘the median of the differences is zero’. The significance level (α) determines the maximum allowable probability of incorrectly rejecting the null hypothesis. Typical values of α are 0.05 or 0.01.

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-61
SLIDE 61

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Background: Statistical hypothesis tests (1) Statistical hypothesis tests are used to assess the validity of statements about properties of or relations between sets of statistical data. The statement to be tested (or its negation) is called the null hypothesis (H0) of the test. Example: For the Wilcoxon signed-rank test, the null hypothesis is that ‘the median of the differences is zero’. The significance level (α) determines the maximum allowable probability of incorrectly rejecting the null hypothesis. Typical values of α are 0.05 or 0.01.

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-62
SLIDE 62

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Background: Statistical hypothesis tests (1) Statistical hypothesis tests are used to assess the validity of statements about properties of or relations between sets of statistical data. The statement to be tested (or its negation) is called the null hypothesis (H0) of the test. Example: For the Wilcoxon signed-rank test, the null hypothesis is that ‘the median of the differences is zero’. The significance level (α) determines the maximum allowable probability of incorrectly rejecting the null hypothesis. Typical values of α are 0.05 or 0.01.

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-63
SLIDE 63

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Background: Statistical hypothesis tests (1) Statistical hypothesis tests are used to assess the validity of statements about properties of or relations between sets of statistical data. The statement to be tested (or its negation) is called the null hypothesis (H0) of the test. Example: For the Wilcoxon signed-rank test, the null hypothesis is that ‘the median of the differences is zero’. The significance level (α) determines the maximum allowable probability of incorrectly rejecting the null hypothesis. Typical values of α are 0.05 or 0.01.

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-64
SLIDE 64

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Background: Statistical hypothesis tests (1) Statistical hypothesis tests are used to assess the validity of statements about properties of or relations between sets of statistical data. The statement to be tested (or its negation) is called the null hypothesis (H0) of the test. Example: For the Wilcoxon signed-rank test, the null hypothesis is that ‘the median of the differences is zero’. The significance level (α) determines the maximum allowable probability of incorrectly rejecting the null hypothesis. Typical values of α are 0.05 or 0.01.

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-65
SLIDE 65

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Background: Statistical hypothesis tests (2) The application of a test to a given data set results in a p-value, which represents the probability that the null hypothesis is incorrectly rejected. The null hypothesis is rejected iff this p-value is smaller than the previously chosen significance level. Most common statistical hypothesis tests are already implemented in statistical software such as the R software environment (http://www.r-project.org/).

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-66
SLIDE 66

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Background: Statistical hypothesis tests (2) The application of a test to a given data set results in a p-value, which represents the probability that the null hypothesis is incorrectly rejected. The null hypothesis is rejected iff this p-value is smaller than the previously chosen significance level. Most common statistical hypothesis tests are already implemented in statistical software such as the R software environment (http://www.r-project.org/).

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-67
SLIDE 67

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Background: Statistical hypothesis tests (2) The application of a test to a given data set results in a p-value, which represents the probability that the null hypothesis is incorrectly rejected. The null hypothesis is rejected iff this p-value is smaller than the previously chosen significance level. Most common statistical hypothesis tests are already implemented in statistical software such as the R software environment (http://www.r-project.org/).

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-68
SLIDE 68

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Example in R

best.known <- read.table ("best-known.dat") a.cost <- read.table("ii-best-ex-rand.dat")$V1 a.cost <- 100 * (a.cost - best.known) / best.known b.cost <- read.table("ii-best-ins-rand.dat")$V1 b.cost <- 100 * (b.cost - best.known) / best.known t.test (a.cost, b.cost, paired=T)$p.value [1] 0.8819112 wilcox.test (a.cost, b.cost, paired=T)$p.value [1] 0.0019212

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-69
SLIDE 69

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Example in R

best.known <- read.table ("best-known.dat") a.cost <- read.table("ii-best-ex-rand.dat")$V1 a.cost <- 100 * (a.cost - best.known) / best.known b.cost <- read.table("ii-best-ins-rand.dat")$V1 b.cost <- 100 * (b.cost - best.known) / best.known t.test (a.cost, b.cost, paired=T)$p.value [1] 0.8819112 wilcox.test (a.cost, b.cost, paired=T)$p.value [1] 0.0019212

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-70
SLIDE 70

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Example in R

best.known <- read.table ("best-known.dat") a.cost <- read.table("ii-best-ex-rand.dat")$V1 a.cost <- 100 * (a.cost - best.known) / best.known b.cost <- read.table("ii-best-ins-rand.dat")$V1 b.cost <- 100 * (b.cost - best.known) / best.known t.test (a.cost, b.cost, paired=T)$p.value [1] 0.8819112 wilcox.test (a.cost, b.cost, paired=T)$p.value [1] 0.0019212

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-71
SLIDE 71

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Example in R

best.known <- read.table ("best-known.dat") a.cost <- read.table("ii-best-ex-rand.dat")$V1 a.cost <- 100 * (a.cost - best.known) / best.known b.cost <- read.table("ii-best-ins-rand.dat")$V1 b.cost <- 100 * (b.cost - best.known) / best.known t.test (a.cost, b.cost, paired=T)$p.value [1] 0.8819112 wilcox.test (a.cost, b.cost, paired=T)$p.value [1] 0.0019212

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-72
SLIDE 72

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Example in R

best.known <- read.table ("best-known.dat") a.cost <- read.table("ii-best-ex-rand.dat")$V1 a.cost <- 100 * (a.cost - best.known) / best.known b.cost <- read.table("ii-best-ins-rand.dat")$V1 b.cost <- 100 * (b.cost - best.known) / best.known t.test (a.cost, b.cost, paired=T)$p.value [1] 0.8819112 wilcox.test (a.cost, b.cost, paired=T)$p.value [1] 0.0019212

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-73
SLIDE 73

Exercise 1.1: Iterative Improvement for the PFSP

Is there a statistically significant difference between the solution quality generated by the different algorithms? Example in R

best.known <- read.table ("best-known.dat") a.cost <- read.table("ii-best-ex-rand.dat")$V1 a.cost <- 100 * (a.cost - best.known) / best.known b.cost <- read.table("ii-best-ins-rand.dat")$V1 b.cost <- 100 * (b.cost - best.known) / best.known t.test (a.cost, b.cost, paired=T)$p.value [1] 0.8819112 wilcox.test (a.cost, b.cost, paired=T)$p.value [1] 0.0019212

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-74
SLIDE 74

Exercise 1.2 VND algorithms for the PFSP

Implement 4 VND algorithms for the PFSP Type:

1

piped VND

Pivoting rule: first-improvement Neighborhood order:

1

transpose → exchange → insert

2

transpose → insert → exchange

Initial solution:

1

Random permutation

2

NEH heuristic

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-75
SLIDE 75

Exercise 1.2 VND algorithms for the PFSP

Variable Neighbourhood Descent (VND) k neighborhoods N1, . . . , Nk

π := GenerateInitialSolution()

i := 1 repeat choose the first improving neighbor π′ ∈ Ni(π) if ∄π′ then i := i + 1 else

π := π′

i := 1 until i > k Piped VND Simply chain different II algorithms one after the other Use final solution of one II as initial solution of the next

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-76
SLIDE 76

Exercise 1.2 VND algorithms for the PFSP

Variable Neighbourhood Descent (VND) k neighborhoods N1, . . . , Nk

π := GenerateInitialSolution()

i := 1 repeat choose the first improving neighbor π′ ∈ Ni(π) if ∄π′ then i := i + 1 else

π := π′

i := 1 until i > k Piped VND Simply chain different II algorithms one after the other Use final solution of one II as initial solution of the next

  • Dr. Franco Mascia

Exercises for Heuristic Optimization

slide-77
SLIDE 77

Exercise 1.2 VND algorithms for the PFSP

Implement 4 VND algorithms for the PFSP Instances: Same as 1.1 Experiments: one run of each algorithm per instance Report: Same as 1.1 Statistical tests: Same as 1.1

  • Dr. Franco Mascia

Exercises for Heuristic Optimization