You are on page 1of 10

2.

3 BIN-PACKING PROBLEM

where

2.3.1 Heuristic Algorithms

Example. Bin Packing Problem Object Weight w j 1 5 2 6 3 3 4 7 5 5 6 4

Capacity c j = 10, j = 1, 2, 3, 4, 5, 6
Optimal Solution: Bin 1: w1, w5, Bin 2: w2, w6, Bin 3: w3, w4

z( I ) = the optimal value for the instance I. Next-Fit Heuristic Algorithm: ( NF(I) 2z(I) )
NF( I ) = value generated by the Next-Fit Heuristic Object Weight wj 1 5
Bin 1

2 6
Bin 2

3 3
Bin 2

4 7
Bin 3

5 5
Bin 4

6 4
Bin 4

z( I ) = 3, NF( I ) = 4

: { bin U current object, Ncreate s bin


4

First-Fit Heuristic Algorithm: ( FF( I ) (17/10) z(I)) + 2 ) FF( I ) = value generated by the First-Fit Heuristic

Object Weight wj

1 5
Bin 1

2 6
Bin 2

3 3
Bin 1

4 7
Bin 3

5 5
Bin 4

6 4
Bin 2

z( I ) = 3, FF( I ) = 4

: q@-bin dO_iUcurrent object, pLk

U create s bin ,

Best-Fit Heuristic Algorithm: ( BF(I) (17/10) Z(I)) + 2 ) BF( I ) = value generated by the Best-Fit Heuristic Object Weight wj Object Weight wj 1 5
Bin 1

2 6
Bin 2

3 3
Bin 2

4 7
Bin 3

5 5
Bin 1

6 4
Bin 4

Z(I) = 3, BF(I) = 4 1 5
Bin 1

2 4
Bin 2

3 2
Bin 1

4 7
Bin 3

5 4
Bin 2

6 3
Bin 1

7 5
Bin 4

8 2
Bin 3

BF(I) = 4

Next-Fit Decreasing Heuristic Algorithm: Object Weight wj 4 7


Bin 1

2 6
Bin 2

1 5
Bin 3

5 5
Bin 3

6 4
Bin 4

3 3
Bin 4

Fisrt-Fit Decreasing Heuristic Algorithm: Object Weight wj 4 7


Bin 1

2 6
Bin 2

1 5
Bin 3

5 5
Bin 3

6 4
Bin 2

3 3
Bin 1

Best-Fit Decreasing Heuristic Algorithm: Object Weight wj 4 7


Bin 1

2 6
Bin 2

1 5
Bin 3

5 5
Bin 3

6 4
Bin 2

3 3
Bin 1

cut points Parent 1 Parent 2

1 2 3 1 4 4 3 1 4 3 2 2 3 2 3 3 2 2
Figure 2.5 Crossover operation It may be not feasible.
9

offspring

Object-Based Representation
objects 1, 2, 3, 4, 5, 6 1 2 3 | 4 5 | 6
Bin 1 Bin 2 Bin 3

3 2 1 | 4 5 | 6
Bin 1 Bin 2 Bin 3

4 5 | 2 1 3 | 6
Bin 1 Bin 2 Bin 3

Group-Based Representation
B = { 3, 6 }, E = { 5 }, C = { 4 }, D = { 2 }, and A = { 1 }
3, 6 5 4 2 1 object bin

Figure 2.6 Representation of grouping of objects.


10

Genetic Operators Procedure: Crossover ( grouping-based operation )

11

12

FFD can be applied.

Object Weight wj

1 5
Bin E

2 4
Bin H

3 2

4 7
Bin E

5 4

6 3

7 5

8 2

Bin E Bin D Bin B Bin D

13

Object Weight wj

1 5

2 4

3 2

4 7

5 4

6 3

7 5

8 2

Bin 1 Bin 2 Bin 1 Bin 3 Bin 2 Bin 1 Bin 4 Bin 3 selected for mutation

1, 3, 6,
Object Weight wj

2, 5,
1 5
Bin 1

4, 8
2 4
Bin 4

7
3 2 4 7 5 4 6 3 7 5 8 2

Insert 2, 5, by using FF heuristic

Bin 1 Bin 3

Bin 1 Bin 4 Bin 3


14

Insert object 2,
Insert object 5,

Bin 2

Object Weight wj

1 5

2 4

3 2

4 7

5 4

6 3

7 5

8 2

Bin 1 Bin 2 Bin 1 Bin 3 Bin 2 Bin 1 Bin 4 Bin 3 selected for mutation

1, 3, 6,

2, 5,

4, 8

Insert 1, 3 and 6 by using FFD heuristic Object Weight wj 3 2 8 2


Bin 3

6 3

2 4

5 4

1 5

7 5

4 7

Bin 2 Bin 2

Bin 4 Bin 3

Insert object 3,
Insert object 6, Insert object 1,

Bin 2 Bin 4 Bin 1


15

UjUn

16

Random permutation of 1, . . . , n i1 , i 2 , . . . , i n

FF heuristic applied to the object order i1 , i 2 , . . . , i n

17

18

19

10

You might also like