You are on page 1of 21

Variable Neighborhood Search

for Bin Packing Problem


Borislav Nikolić, Hazem Ismail Abdel Aziz Ali, Kostiantyn Berezovskyi,
Ricardo Garibay Martinez, Muhammad Ali Awan
The Outline
• Introduction
– Heuristics
– Local search
– Metaheuristics
• Variable Neighborhood Search (VNS)
– Overview
– Basic Algorithim
• Scientific Paper on VNS
– Scope
– Minimum Bin Slack (MBS)
– VNS for Bin Packing Problem (BPP)
– The experiment and Results.
2
Heuristics
• Techniques for speeding up the process
• Applicable where exhaustive search is an overkill
• But why?
• Used for NP-Hard problems (TSP, BPP, AVS, …)
• Easy implementation
• Can lead towards optimal solution
• But …

3
Local search
• Assumes initial solution as fixed point
• Generates the neighborhood and compares
• If better ->
• Else finished!

• Looks perfect
• But …
4
Local search
• Unfavorable solution space
• Practically locked within initial solution
• Local optimum can be actually a very bad one
• Highly dependent on solution space
• Can be solved with some “tricks”
• Deliberately accept worse result to escape
• Looks like a gambling decision

5
Metaheuristics
• Way to tackle aforementioned problems
• Combination of techniques
• For better exploration of solution space
• But doesn’t guarantee optimality either!
• More complex implementation
• Criticized in the no free lunch theorems*
• Yet, highly used

* “No free lunch theorems for optimization” – Wolpert & Macready


6
Metaheuristics
Examples:
• Greedy Randomized Adaptive Search
Procedure (GRASP)
• Simulated Annealing (SA)
• TABU Search (TS)
• Ant colony optimisation
• Variable Neighborhood Search (VNS)

7
VNS - Overview
• Relatively young metaheuristic (1995)
• Systematically change the neighborhood
• Based on three facts:
 A local minimum w.r.t. one neighborhood structure is not
necessary so with another
 A global minimum is local minimum w.r.t. all possible
neighborhood structures
 For many problems local minima w.r.t. one or several
neighborhoods are close to each other

 N. Mladenović – A variable neighborhood algorithm – a new metaheuristic for combinatorial optimization


 N. Mladenović & P.Hansen – Variable neighborhood search
8
VNS – Basic Algorithim
N k , (k  1,..., k max )
- list of possible neighborhoods
• Of course, for local search kmax  1
• Initialization (initial solution and stopping cond.)
• Repeat until stopping condition
 k=1
 Repeat until
 Shaking – Generate random point at k-th neighborhood
 Local search – find local optimum
 Move or not
9
VNS – Basic Algorithim
• Stopping conditions (CPU time, # of iterations, …)
• Random points to avoid cycling (determinism)
• Can be easily improved
• Parallelized local search (1CPU = 1 neighborhood)
• Hybrids (VNS & Tabu, VNS & GRASP, …)
• Simplicity, precision, efficiency, robustness

10
Variations and descendents of VNS
• Variable neighborhood descent (VND)
• Reduced VNS (RVNS)
• Skewed VNS (SVNS)
• General VNS (GVNS)
• VN Decomposition Search (VNDS)
• Parallel VNS (PVNS)
• Primal Dual VNS (P-D VNS)
• Reactive VNS
• Backward-Forward VNS
• Best improvement VNS
• Exterior point VNS
• VN Simplex Search (VNSS)
• VN Branching . . . .

11
Scientific Paper on VNS
New heuristics for one-dimensional bin packing
By
 Work at the American University of Beirut
 Also work as consultants in industry
 More then 10 cooperative papers
 Scheduling, packing & cutting problems

Krysztof Fleszar, Khalil S. Hindi


Department of Systems Engineering, Brunel University
Published in 2000, often cited
12
Scope
• Presents new heuristic for solving 1D bin-
packing
• Combination of MBS and VNS
• Effective and computationaly efficient
• Remarkable performance on benchmarks
• Next slides explains:
– MBS algorithim
– VNS for BPP
– Experiments platform and Results
13
MBS
Z ' - Non-increasing list of remaining elements
n' - Number of remaining elements
ti - Size of i-th element
s( A) - Remaining slack in bin A
• Small elements finer grained and used early
• Stops search only on slack = 0
• Odd bins and even elements -> big problem

• Can be easily modified (MBS’)


• Use non-increasing order to stop search

• Outperforms FFD and BFD
14
VNS for BPP
• OK, MBS for Initial solution, but what after?
m

• Just a little bit formal: max f ( x )  


 1
(l ( )) 2

• Definition of possible “moves” (perturbations)


 Transfers
 Swaps

• Shaking:
 k-th neighborhood – performing k random moves
 Element can be moved only once per neighborhood
 All moves are treated as equal, without analyzing
 Of course, there is no point to swap elements of the same size!

15
VNS for BPP
• OK, next is local search
• Metric for finding a local optimum
 Transfers f  [l ( )  ti ]2  [l (  )  ti ]2  l ( )2  l (  )2
 Swaps f  [l ( )  ti  t j ]2  [l ( )  ti  t j ]2  l ( )2  l ( )2

0.4
0.4 f  (0.6  0.4)2  (0.5  0.4)2  0.52  0.62  0.24
0.5 0.5
0.2 0.2

0.2 0.3
0.3 0.2 f  (0.7  0.2  0.3)2  (0.6  0.3  0.2)2  0.72  0.52  0.15
0.5 0.5
0.3 0.3

• Always chooses move with the greatest value


16
VNS for BPP
• Steepest descent approach
• Might not always be the best idea!
• But let’s analyze performance
• In near-optimal solution very few “moves”
• Recall: kmax - max # of neighbors visited
• Tradeoff - computation time vs good optimum
• Good experimental results with kmax = 20

17
The experiment & the results
• Borland Pascal on Pentium II 400MHz
• Problem classes:
 U class – uniform distribution (20, 100) into bins of 150
 T class – “triplets” of elements from (25, 50) into bins of 100
 B class – divided in B1, B2, B3 problems, computationally very hard
 B1 – 704/720 solved optimally, items from (50, 500)
 B2 – 477/480 solved optimally, items from (50, 500)
 B3 – uniform distribution (20k, 35k) into bins of 100k, 3/10 solved optimally

• For 4 problems, better solutions were found


• But not proved to be optimal!

18
The experiment & the results
• MBS’ + VNS vs the rest
Algorithm hits inferior abs.dev.av abs.dev.max rel.dev.av rel.dev.max time av. time max.

MBS 678 692 1.02 9 1.42 16.67 0.05 8.99

MBS’ 1051 319 0.38 9 0.61 14.29 0.02 4.57

VNS 1248 122 0.09 2 0.18 5.00 0.09 4.57

MBS’+VNS 1329 41 0.03 2 0.04 2.94 0.14 5.05

• Robustness test with different random seed


• In 1340/1370 the same solution in all 10 runs
• In remaining 30 the difference was always 1 bin
19
Conclusions

• VNS very powerful tool


• Can be easily implemented
• Can be easily adapted for different problems
• Increasing kmax is not always fruitful
• Combined with MBS’ gives great results
• Practical complexity < theoretical complexity

20
21

You might also like