modelling a steel mill slab design problem

39
Modelling a Steel Mill Slab Design Problem Alan Frisch, Ian Miguel, Toby Walsh AI Group University of York

Upload: glynn

Post on 07-Jan-2016

59 views

Category:

Documents


3 download

DESCRIPTION

Modelling a Steel Mill Slab Design Problem. Alan Frisch, Ian Miguel, Toby Walsh AI Group University of York. Overview. The slab design problem An example Model A Model B A dual model A/B Results Conclusion/Future Work. Background. This work is based on the problem as stated in: - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Modelling a Steel Mill Slab Design Problem

Modelling a Steel Mill Slab Design Problem

Alan Frisch, Ian Miguel, Toby Walsh

AI Group

University of York

Page 2: Modelling a Steel Mill Slab Design Problem

Overview

• The slab design problem

• An example

• Model A

• Model B

• A dual model A/B

• Results

• Conclusion/Future Work

Page 3: Modelling a Steel Mill Slab Design Problem

Background

• This work is based on the problem as stated in:

• “Variable Sized Bin Packing with Color Constraints”, Dawande, Kalagnanam and Sethuraman 1998.

• Approximation algorithms guaranteed to be within some bound of an optimal solution.

Page 4: Modelling a Steel Mill Slab Design Problem

Motivation

• Many problems exhibit flexibility in portions of their structure.

• Example: the number required of a certain type of variable.

• Flexibility must be resolved during the solution process.

• Slab design is a representative example of this type of problem.

Page 5: Modelling a Steel Mill Slab Design Problem

The Slab Design Problem

• The mill can make different slab sizes.• Given j input orders with:

– A colour (route through the mill).– A weight.

• Pack orders onto slabs such that the total slab capacity is minimised, subject to:– Capacity constraints.– Colour constraints.

Page 6: Modelling a Steel Mill Slab Design Problem

Slab Design Constraints

• Capacity:– Total weight of orders assigned to a slab cannot

exceed slab capacity.

• Colour:– Each slab can contain at most p of k total

colours.– Reason: expensive to cut slabs up to send them

to different parts of the mill.

Page 7: Modelling a Steel Mill Slab Design Problem

An Example

23

1 1 1 1 12

1

• Slab Sizes: {1, 3, 4} ( = 3)• Orders: {oa, …, oi} (j = 9) • Colours: {red, green, blue, orange, brown} (k = 5)• p = 2

a b c d e f g h i

Page 8: Modelling a Steel Mill Slab Design Problem

An Example Solution

23

111

1

1

1

f

g i

e

c d

b

h

a

• 6 Slabs:

(size 4) (size 3) (size 1)(size 1)(size 3) (size 1)

2

Page 9: Modelling a Steel Mill Slab Design Problem

Model A – Redundant Variables

• Number of slabs is not fixed.– Assume greatest order weight does not exceed

maximum slab size.

• A list, S, of slab variables: {s1, …, sj}.

– Domains size .

• Solution quality:

i

i optVars

Page 10: Modelling a Steel Mill Slab Design Problem

Slab Variable Redundancy

• Some slab variables may be redundant:– 0 is added to the domain of each si.

– If si is not necessary to solve the problem, si = 0.

Page 11: Modelling a Steel Mill Slab Design Problem

Slab Variable Symmetry

• Slab variables are indistinguishable.

• So model A suffers from symmetry:– Counteract with binary symmetry-breaking

constraints: s1 s2, s2 s3, etc.

Page 12: Modelling a Steel Mill Slab Design Problem

Model A Order Matrix (Oa)

oa ob oc od

s1 0 0 1 1

s2 0 1 0 0

s3 1 0 0 0

s4 0 0 0 0

j

jiOai 1],[

j

i

i sjiOaoweightj ],[).(

Page 13: Modelling a Steel Mill Slab Design Problem

More Slab Symmetry

• Slab variables assigned the same size are indistinguishable.

• When si and si+1 have the same assignment, the corresponding rows of the order matrix are lexicographically ordered.

• E.g. 1001 0110.

Page 14: Modelling a Steel Mill Slab Design Problem

Model A Colour Matrix (colourMa)Red Green Blue Orange

s1 0 0 1 1

s2 0 1 0 0

s3 1 0 0 0

s4 0 0 0 0

Channelling:

1]2],[[1]2,[ iirorderColoucolourMaiiOa

pjicolourMaji

],[

Page 15: Modelling a Steel Mill Slab Design Problem

Model A of the Example Problem

23

1 1 1 1 12

1oa ob oc od oe of og oh oi

oa ob oc od oe of og oh oi

s1 1

s2 1

Red Green Blue Orange Brown

s1 1

s2 1

Page 16: Modelling a Steel Mill Slab Design Problem

A Solution: Model A

23

1 1 1 1 12

1oa ob oc od oe of og oh oi

oa ob oc od oe of og oh oi

s1 0 0 0 0 0 0 1 1 1

s2 1 0 1 0 0 0 0 0 0

s3 0 1 0 0 0 0 0 0 0

s4 0 0 0 1 1 1 0 0 0

… 0 0 0 0 0 0 0 0 0

Red Green Blue Orange Brown

s1 0 0 0 1 1

s2 1 1 0 0 0

s3 0 1 0 0 0

s4 0 0 1 1 0

… 0 0 0 0 0

s1 = 4, s2 = 3, s3 = 3, s4 = 3, si = 0 (5 i 9)

Page 17: Modelling a Steel Mill Slab Design Problem

Model A Implied Constraints

• Combined weight of input orders is a lower bound on optimisation variable:

• Lower bound on number of slabs required:

i

i optVaroweight )(

)(

)(

slabSizes

oweighti

i

• With symmetry-breaking constraints, decomposes into unary constraints on slab variables.

Page 18: Modelling a Steel Mill Slab Design Problem

Model A Implied Constraints (2)• AssWti is the weight of orders assigned to si.

– Prune domains by reasoning about reachable values via dynamic programming [Trick, 2001].

– Incorporate both size and colour information.– More powerful if done during search (future work).

• Minimum number of slabs required:

)max(

)(

AssWt

oweighti

i

Page 19: Modelling a Steel Mill Slab Design Problem

Model A Implied Constraints (3)

• Wastei = si – AssWti

– the unused portion of a slab.

• Upper bound on total waste:– Assume each order is assigned to an individual

slab, with smallest size able to hold it.– Sum waste in each case: leads to upper bound

for optimisation variable.

– Upper bound on Wastei is the worst of these cases.

Page 20: Modelling a Steel Mill Slab Design Problem

Model B – Abstraction

• 2-phase approach:1. Construct/solve an abstraction of the problem.

2. Solve independent sub-problems, assigning a subset of the orders to slabs of a common size.

• Solving phase 2 sub-problems either:– Provides a solution to the original problem, or:– Identifies new constraints which restrict set of

solutions at phase 1.

Page 21: Modelling a Steel Mill Slab Design Problem

Model B, Phase 1

• Number of slab sizes is fixed.

• A list, Z, of slab size variables, {z1, z2, …}.

– Domains: {0, …, j} number of slabs of corresponding sized used.

• Solution quality:

i

i optVariz

Page 22: Modelling a Steel Mill Slab Design Problem

Model B, Phase 1 Order Matrix (Ob)

oa ob oc od

z1 0 0 1 1

z3 0 1 0 0

z4 1 0 0 0

j

jiObi 1],[

j

i

i jzjiOboweightj ],[).(

Page 23: Modelling a Steel Mill Slab Design Problem

Model B, Phase 1 Colour Matrix (ColourMb)

Red Green Blue Orange

z1 0 0 1 1

z3 0 1 0 0

z4 1 0 0 0

Channelling:

1]2],[[1]2,[ iirorderColoucolourMbiiOb

pzjicolourMbj j

i

],[

Page 24: Modelling a Steel Mill Slab Design Problem

A Solution: Model B, Phase 1

23

1 1 1 1 12

1oa ob oc od oe of og oh oi

oa ob oc od oe of og oh oi

z1 0 0 0 0 0 0 0 0 0

z3 1 1 1 1 1 1 0 0 0

z4 0 0 0 0 0 0 1 1 1

Red Green Blue Orange Brown

z1 0 0 0 0 0

z3 1 1 1 1 0

z4 0 0 0 1 1

• z1 = 0, z3 = 3, z4 = 1

Page 25: Modelling a Steel Mill Slab Design Problem

Model B Implied Constraints

• Unary constraints on order matrix:

i

ii

i

zAssWt

oweight

)max(

)(

i

i optVaroweight )(

0],[)()(: jiObjslabSizesoweightji i

Page 26: Modelling a Steel Mill Slab Design Problem

Model B, Phase 2

• Model B, Phase 1 is ambiguous.• A Phase 1 solution does provide:

– Number and sizes of slabs required.– Size of slab each order is assigned to.– Quality of final solution.

• Phase 1 solution used to construct much simpler, independent, phase 2 sub-problems.

Page 27: Modelling a Steel Mill Slab Design Problem

Model B, Phase 2 Sub-problems

23

1 1 1 1 12

1oa ob oc od oe of og oh oi

oa ob oc od oe of

s1 1 0 1 0 0 0

s2 0 1 0 0 0 0

s3 0 0 0 1 1 1

• 3 Slabs of size 3 • 1 Slab of size 4

og oh oi

s1 1 1 1

Page 28: Modelling a Steel Mill Slab Design Problem

The Price of Ambiguity

• Model B, Phase 1 is ambiguous.

• Phase 2 sub-problems may be inconsistent.

• Due to interaction between weight/colour constraints.

3 31 1

oa ob oc od

p = 1

oa ob oc od

s1 ? ? ? ?

s2 ? ? ? ?

• 2 Slabs of size 4

Page 29: Modelling a Steel Mill Slab Design Problem

Conflict Recording• Not simply underestimation of optimisation

variable:– May be incorrect combination of slab sizes.– Or wrong assignment of orders to sizes.

• Solution:– Isolate reasons for failure.– Post constraints at phase 1.– Solve phase 1 again.

• Example:– oa = 4 ob = 4 oc = 4 od = 4 z4 > 2

Page 30: Modelling a Steel Mill Slab Design Problem

A Model B Solution Cycle

Phase 1

Phase 2

Solution

Constraints

Page 31: Modelling a Steel Mill Slab Design Problem

A Dual Model A/B

• Combines model A and model B, phase 1.

• Variables:– Explicit slab variables (si) and slab-size

variables (zi).

– Order matrices referring to explicit slabs (Oa) and to slab-sizes (Ob).

– Both types of colour matrix.

Page 32: Modelling a Steel Mill Slab Design Problem

Channelling Constraints

• Constraints for individual models as previously described.

• Channelling constraints between the models maintain consistency, aid pruning.

• Between S and Z:– (Number of occurrences of i in S) = zi.

• Between order matrices and S:– Oa[i, j] = 1 Ob[i, sj] = 1.

Page 33: Modelling a Steel Mill Slab Design Problem

A/B Search Strategy

• Instantiate model A variables first:– Channelling constraints ensure model B

variables instantiated.– Analogous to pure model A approach.

• Instantiate model B variables first:– Channelling constraints do not force

instantiation of model A variables.– Model A variables are constrained though.– Analogous to pure model B approach.

Page 34: Modelling a Steel Mill Slab Design Problem

A/B Search Strategies 2

• Other search strategies exploit more complete view offered by model A/B.

• Interleave instantiation of variables from 2 basic models:– Obtain most efficient pruning of the search

space.

Page 35: Modelling a Steel Mill Slab Design Problem

ResultsOrders Optimal Model A Model AB

12 77 83: 14, 0.1s

78: 486, 0.2s

77: 1841, 0.6s

83: 14, 0.1s

78: 452, 0.2s

77: 1714, 0.6s

13 79 83: 14, 0.1s

80: 451, 0.2s

79: 1536, 0.5s

83: 14, 0.1s

80: 407, 0.2s

79: 1447, 0.4s

14 87 95: 16, 0.1s

89: 819, 0.2s

88: 934, 0.3s

87: 8797, 1.2s

95: 16, 0.1s

89: 726, 0.3s

88: 841, 0.4s

87: 8612, 2.2s

15 92 95: 21, 0.1s

94: 5108, 1.1s

93: 5619, 1.2s

92: 17734, 3.6s

95: 21, 0.2s

94: 4950, 1.3s

93: 5456, 1.5s

92: 17190, 4.7s

Page 36: Modelling a Steel Mill Slab Design Problem

ResultsOrders Optimal Model A Model AB

16 99 107: 17, 0.1s

101: 5112, 0.9s

100: 5305, 0.9s

99: 92441, 17.8s

107: 17, 0.1s

101: 3673, 0.9s

100: 3866, 0.9s

99: 89618, 23.5s

17 103 107: 23, 0.1s

105: 13074, 2.6s

104: 26757, 5.5s

103: 237290, 50.2s

107: 23, 0.1s

105: 11556, 2.9s

104: 24792, 6.6s

103: 228918, 67.1s

18 110 119: 19, 0.2s

111: 1012, 0.4s

110: 1179281, 253.4s

119: 19. 0.1s

111: 977, 0.4s

110: 1153031, 350.3s

Page 37: Modelling a Steel Mill Slab Design Problem

Model B Results?

• On these problems, many solutions at phase 1.

• Cycle is therefore lengthy.

• Improve efficiency:– Model phase 1 as a dynamic CSP.– Reduce arity of recorded constraints.– Phase 1 heuristics

Page 38: Modelling a Steel Mill Slab Design Problem

Other Models

• Set variables:– Each represents a slab

– Domain is set of orders assigned.

• Activity-based dynamic CSP:– Model A slab variables used.

– Only `activated’ according to remaining capacity of activated slabs.

Page 39: Modelling a Steel Mill Slab Design Problem

Conclusions

• Results only on small instances.

• All models need further development:– More implied constraints.– Better heuristics

• Explore new models:– Set variables.– aDCSP.