52
A Lookahead Heuristic for the Minimization of Open Stacks Problem Marco A. M. Carvalho [email protected] Federal University of Ouro Preto - Brazil Nei Y. Soma [email protected] Technological Institute of Aeronautics - Brazil OR54 Annual Conference – Edinburgh, UK 04-06 September 2012

A Lookahead Heuristic for the Minimization of Open Stacks Problem

  • Upload
    giona

  • View
    31

  • Download
    1

Embed Size (px)

DESCRIPTION

A Lookahead Heuristic for the Minimization of Open Stacks Problem. Marco A. M. Carvalho mamc@ iceb.ufop.br Federal University of Ouro Preto - Brazil Nei Y. Soma soma@ ita.br Technological Institute of Aeronautics - Brazil OR54 Annual Conference – Edinburgh, UK 04-06 September 2012. - PowerPoint PPT Presentation

Citation preview

Page 1: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

A Lookahead Heuristic for the Minimization of Open Stacks Problem

Marco A. M. [email protected] University of Ouro Preto - Brazil

Nei Y. [email protected] Institute of Aeronautics - Brazil

OR54 Annual Conference – Edinburgh, UK04-06 September 2012

Page 2: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

2

INTRODUCTION

Problem DescriptionMotivationExample

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 3: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

3

Introduction

• A factory manufactures different types of products in batches;

• Customers place orders for different products– The contents of each order are placed in a separated

stack during manufacturing;– When the stack receives the first product, it is opened;– When the stack receives the last product , it is closed• The products are delivered;• The space is freed.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 4: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

4

Introduction

• There is a limitation on the physical space used in the production environment– There is not enough space for all customer’s stacks to be

opened simutaneously;– If the number of open stacks increases beyond the available

space, stacks must be removed in order to give space to the new stacks.

• The sequence in which the products are manufactured can reduce the maximum number of simultaneously open stacks– This is the aim of the Minimization of Open Stacks Problem

(MOSP).OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 5: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

5

Motivation

• The problem is NP-Hard and has a variety of equivalent problems:– Cutting stock

• Cutting Patterns Sequencing.– VLSI design

• Gate Matrix Layout Problem;• PLA Folding.

– Graph Problems• Pathwidth;• Interval Thickness;• Node Search Game;• Narrowness;• Split bandwidth;• Edge and Vertex Separation.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 6: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

6

Example #1

• Six customers;• Six product types.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 7: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

7

Example #1

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

• Manufacturing Sequence:• Open Stacks: 0

Page 8: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

8

Example #1

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

• Manufacturing Sequence:• Open Stacks: 3

Page 9: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

9

Example #1

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

• Manufacturing Sequence:• Open Stacks: 4

Page 10: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

10

Example #1

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

• Manufacturing Sequence:• Open Stacks: 5

Page 11: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

11

Example #1

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

• Manufacturing Sequence:• Open Stacks: 4

Page 12: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

12

Example #1

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

• Manufacturing Sequence:• Open Stacks: 4

Page 13: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

13

Example #1

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

• Manufacturing Sequence:• Open Stacks: 2

Page 14: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

14

Introduction

• Formally, given a boolean matrix M:– Rows correspond to customer’s orders;– Columns correspond to products;– mij = 1 iff order i contains product j;

– mij = 0 otherwise;– Stacks are associated to rows

• First product is manufactured: stack opened;• Last product is manufactured: stack closed;

• The objective is to find a permutation of columns such that the maximum number of open stacks is minimized.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 15: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

15

Example #1 Revisited

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

p1 p2 p3 p4 p5 p6c1 1 0 0 1 1 0c2 1 1 0 0 0 0c3 0 0 1 1 0 0c4 1 1 1 0 1 0c5 0 1 0 1 1 1c6 0 1 0 0 0 1

Page 16: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

16

Example #1 Revisited

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

p6 p2 p1 p3 p4 p5c1 1 -- 1 1c2 1 1c3 1 1 c4 1 1 1 -- 1c5 1 1 -- -- 1 1c6 1 1

p2 p4 p5 p1 p3 p6c1 1 1 1 c2 1 -- -- 1c3 1 -- -- 1 c4 1 -- 1 1 1c5 1 1 1 -- -- 1c6 1 -- -- -- -- 1

Manufacturing Sequence

Stac

ks

Max Open Stacks: 6

Manufacturing Sequence

Stac

ks

Max Open Stacks: 4

Page 17: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

17

A LOOKAHEAD HEURISTIC

RepresentationPreprocessingBreadth-First SearchProducts SequencingImprovement Rules

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 18: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

18

Representation

• In MOSP graphs, nodes correspond to customer’s orders– Edges connect customers that ordered at least one

product in common;– Multiple edges and loops are not considered;– Each product produces a clique in the graph;– There are polynomial algorithms for some special

topologies.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 19: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

19

MOSP Graph

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 20: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

20

MOSP Graph

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 21: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

21

MOSP Graph

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 22: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

22

MOSP Graph

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 23: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

23

MOSP Graph

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 24: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

24

MOSP Graph

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 25: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

25

MOSP Graph

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 26: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

26

Preprocessing #1

• If the MOSP graph is disconnected, the problem is decomposable.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 27: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

27

Preprocessing #2

• Let c(pi) determine the set of customers that ordered product pi

– If c(pj) ⊆ c(pi), then pi and pj can be considered as one product.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

p1 p2 p3 p4 p5 p6c1 1 0 0 1 1 0c2 1 1 0 0 0 0c3 0 0 1 1 0 0c4 1 1 1 0 1 0c5 0 1 0 1 1 1c6 0 1 0 0 0 1

p1 p2p6 p3 p4 p5

c1 1 0 0 1 1c2 1 1 0 0 0c3 0 0 1 1 0c4 1 1 1 0 1c5 0 1 0 1 1c6 0 1 0 0 0

Page 28: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

28

Breadth-First Search

• The MOSP resembles the Matrix Bandwidth Minimization Problem (MBM)– The MBM problem aims to find a permutation of rows

and columns which keeps the nonzero elements of a matrix as close as possible to the main diagonal.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 29: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

29

Breadth-First Search

• The Cuthill-Mckee (1969) heuristic for MBM explores a corresponding graph by Breadth-First Search (BFS):– Choice of lower degree nodes• Ties are broken in favor of the lower index node;

– The sequence of the search determines the permutation of rows and columns.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 30: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

30

Breadth-First Search

• The BFS has never been applied to the MOSP solution– MOSP instances may not be sparse, symmetric or

square, as MBM matrices; – The band structure is not a required condition.

• However, when applied to the MOSP, it generates good results.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 31: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

31

Breadth-First Search

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Not examinedExaminedAll neighbors examined

Page 32: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

32

Products Sequencing

• After sequencing the nodes (orders), we obtain the products permutation:– The orders are analyzed using LIFO policy;– Each ordered product is inserted in the solution using

LIFO policy.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 33: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

33

Products Sequencing

• Q={3, 1, 4, 5, 2, 6}

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

p1 p2p6 p3 p4 p5c1 1 0 0 1 1c2 1 1 0 0 0c3 0 0 1 1 0c4 1 1 1 0 1c5 0 1 0 1 1c6 0 1 0 0 0

p2 p6c1 0 0c2 1 0c3 0 0c4 1 0c5 1 1c6 1 1

Page 34: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

34

Products Sequencing

• Q={3, 1, 4, 5, 2, 6}

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

p1 p2 p6c1 1 0 0c2 1 1 0c3 0 0 0c4 1 1 0c5 0 1 1c6 0 1 1

p1 p2p6 p3 p4 p5c1 1 0 0 1 1c2 1 1 0 0 0c3 0 0 1 1 0c4 1 1 1 0 1c5 0 1 0 1 1c6 0 1 0 0 0

Page 35: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

35

Products Sequencing

• Q={3, 1, 4, 5, 2, 6}

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

p4 p5 p1 p2 p6c1 1 1 1 0 0c2 0 0 1 1 0c3 1 0 0 0 0c4 0 1 1 1 0c5 1 1 0 1 1c6 0 0 0 1 1

p1 p2p6 p3 p4 p5c1 1 0 0 1 1c2 1 1 0 0 0c3 0 0 1 1 0c4 1 1 1 0 1c5 0 1 0 1 1c6 0 1 0 0 0

Page 36: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

36

Products Sequencing

• Q={3, 1, 4, 5, 2, 6}

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

p3 p4 p5 p1 p2 p6c1 0 1 1 1 0 0c2 0 0 0 1 1 0c3 1 1 0 0 0 0c4 1 0 1 1 1 0c5 0 1 1 0 1 1c6 0 0 0 0 1 1

p1 p2p6 p3 p4 p5c1 1 0 0 1 1c2 1 1 0 0 0c3 0 0 1 1 0c4 1 1 1 0 1c5 0 1 0 1 1c6 0 1 0 0 0

Page 37: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

37

Products Sequencing

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

p3 p4 p5 p1 p2 p6c1 1 1 1c2 1 1c3 1 1c4 1 -- 1 1 1c5 1 1 -- 1 1c6 1 1

Max Open Stacks: 4

Manufacturing Sequence

Stac

ks

Page 38: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

38

Breadth-First Search

• Breadth-First Search features:– Low degree nodes are not the problem’s bottleneck• Sequenced first.

– Clique’s and high degree nodes tend to be sequenced contiguously;

– Preprocessing #1 is inherent;– Computational complexity;– Ease of implementation.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 39: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

39

Improvement Rules

• Special topologies of the MOSP graph cause BFS to generate errors:– Cliques loosely connected;– A dominant clique with a few nodes in its

neighborhood.

• Improvement rules:1. Close inactive open stacks, by anticipating its

product's manufacturing;2. Delay the opening of new stacks, by postponing its

product’s manufacturing.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 40: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

40

Improvement Rule #1

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

p4 p5 p2p6 p1 p3c1 1 1 -- 1 c2 1 1c3 1 -- -- -- 1c4 1 1 1 1c5 1 1 1c6 1

Manufacturing Sequence

Stac

ks

Max Open Stacks: 6

p4 p5 p1 p2p6 p3

c1 1 1 1

c2 1 1

c3 1 -- -- -- 1

c4 1 1 1 1

c5 1 1 -- 1

c6 1

Manufacturing Sequence

Stac

ksMax Open Stacks: 5

Page 41: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

41

Improvement Rule #2

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

p5 p3 p1 p2p6 p4c1 1 -- 1 -- 1c2 1 1 c3 1 -- -- 1c4 1 1 1 1c5 1 -- -- 1 1c6 1

Manufacturing Sequence

Stac

ks

Max Open Stacks: 6

p5 p1 p2p6 p3 p4

c1 1 1 -- -- 1

c2 1 1

c3 1 1

c4 1 1 1 1

c5 1 -- 1 -- 1

c6 1

Manufacturing Sequence

Stac

ksMax Open Stacks: 5

Page 42: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

42

COMPUTATIONAL EXPERIMENTS

Data setsComputational Environment

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 43: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

43

Datasets

• First Constraint Modeling Challenge (2005)– 5,806 smaller instances;– Decomposable instances;– Polynomial topologies of MOSP graphs.

• Harder Instances (2009)– 200 larger instances;– No decomposable instances;– No polynomial topologies of MOSP graphs.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 44: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

44

Computational Experiments

• Intel i5 Quad Core 3.2 GHz processor;• 16 GB RAM;• Ubuntu 12.4.1; • No optimization options;• Chu and Stuckey (2009) original code, compiled and

run as recommended– MOSP state-of-the-art exact method.

• Implementation of Becceneri, Yanasse and Soma (2004) as originally described– MOSP state-of-the-art heuristic.

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 45: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

45

Dataset #1

• Running times (ms)

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Method Min Mean Max

Chu and Stuckey 0.00 1.65 6,865.00

Lookahead 0.00 29.72 1,424.00

Becceneri et al. 0.00 0.02 24.00

Method Lookahead Becceneri et al.

Best solutions 832 (14%) 41 (0.71%)

Optimal solutions 5,644 (97.21%) 4,889 (84.21%)

Max error from optimal 2 stacks 8 stacks

Gap from Optimal 0.18% 1.32%

• Solutions

Page 46: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

46

Dataset #1

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 610%

5%

10%

15%

20%

25%

Average Gap from Optimal

Lookahead

Becceneri et al

collections of instances

gap

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 610.000.501.001.502.002.503.003.504.004.50

Average Error

Becceneri et al

Lookahead

collections of instances

# of

stac

ks

Page 47: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

47

Dataset #2

• Running times (ms)

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Method Lookahead Becceneri et al.

Best solutions 144 (72%) 4 (2%)

Optimal solutions 110 (55%) 44 (22%)

Max error from optimal 4 stacks 15 stacks

Gap from Optimal 1.41% 7.27%

• Solutions

Method Min Mean Max

Chu and Stuckey 0.00 12,851.00 945,151.00

Lookahead 0.00 1,587.00 15,220.00

Becceneri et al. 0.00 5.34 20.00

Page 48: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

48

Dataset #2

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 113 120 127 134 141 148 155 162 169 176 183 190 19702468

10121416

Error

Becceneri et al

Lookahead

Instances

# of

stac

ks

1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 113 120 127 134 141 148 155 162 169 176 183 190 1970%

20%

40%

60%

80%

100%

120%

140%

Gap from Optimal

Becceneri et alLookahead

Instances

gap

Page 49: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

49

SUMMARY

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 50: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

50

Summary

• A novel approach to MOSP;• O(p3) heuristic, where p denotes the number of products

– Outperforms the state-of-the art heuristic in solution quality• Smaller gaps from optimal;• Robust - smaller errors;• Higher index of optimal solutions.

– Fast.• Can be used to generate good upper bounds;• Can be used directly to solve MOSP and equivalent

problems.OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 51: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

51

Acknowledgements

• Prof. Geoffrey Chu (University of Melbourne);• This work was funded by the State of São Paulo

Research Foundation - FAPESP, process 2009/51831-9 (first author).

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK

Page 52: A  Lookahead  Heuristic for the Minimization of Open Stacks Problem

52

THANK YOUQuestions?

OR54 Annual Conference, 04-06 September 2012 – Edinburgh, UK