FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
The application of Genetic Algorithms to the Berth Allocation Problem
1. Slide 1
The Application of Genetic
Algorithms to the Berth
Allocation Problem
Foo Hee Meng
18 August, 2000
2. Slide 2
Quick Summary
• The Berth Allocation Problem (BAP)
– Allocation of berthing space to container
vessels (ships) in a transshipment port
• Objective
– Minimize container handling effort
• Solution Method
– Genetic Algorithm (GA)
• Focus of Thesis
– devise good way to apply GA to BAP
– what are the problems, how to deal with them.
3. Slide 3
Presentation Outline
• Introduction
– The Berth Allocation Problem (BAP)
– Focus of thesis
• “Traditional” GA applied to the BAP
• Our solution - The BAP-GGA
• System Implementation
• Experimentation
• Conclusion
8. Slide 8
Why is this Problem Important?
• Large potential savings in container
handling costs
– worldwide traffic doubled between 1990 - 1998
to 175mil. TEU (World Bank)
– PSA handled 16 mil. TEU in 1999 (ST)
• Recurring costs
– Container traffic seasonal
• Limited land area
Twenty-foot Equivalent Units
Small percentage savings
mean large dollar savings
Plan for 1 week
use for next few weeks
9. Slide 9
Previous Work
• Leong and Hum 1992
– Modeled problem as a network flow problem.
– Did not consider cross-sectional distances.
• Important - PPT, Europe (Pallotino)
• Loh 1996
– Modeled BAP as a generalization of the QAP
– QAP = Quadratic Assignment Problem
– QAP factors in distances of assignment locations
– QAP is NP-Hard
– Proposed a Genetic Algorithm (GA) solution
10. Slide 10
Focus of Loh’s Work
• Establish basic Problem Model
– QAP BAP
• Demonstrated feasibility of GA solution
– eval. QAP benchmarks using BAP
• Proof of concept system
– tested with 2 small, hand-crafted data sets
• (50 vessels, 3 sections)
Start of R&D effort by RAS Group
11. Slide 11
Our Adopted Solution Approach
Vessels Sections
1. Section Assignment
(Partitioning)
Allocation of vessels to
sections.
2. Wharf mark assignment
(Packing)
Assign wharf locations to
vessels within allocated
sections.
14. Slide 14
Assumptions
• Any vessel can be assigned to any section
– no bias
• All vessels are berthed upon arrival
– no delay
• Vessels can berth along the whole length of
the section
– no berthing between sections
15. Slide 15
The BAP Partitioning Problem
• Allocation of sections to vessels to minimize transshipment cost
• Do not consider which wharf location to allocate each vessel to.
• Hence, the need to incorporate capacity constraint
16. Slide 16
The Berth Capacity Constraint
• At any instance of time within the planning period, the total berth usage of all
vessels assigned to each section cannot exceed the length of that section.
t
0 L t S
19. Slide 19
BAP-GA
1.0
BAP-GA
2.0
BAP-GP
[Ong00]
BAP-BB
[Xu99]
GAApproach
Objectives:
• Evaluate Loh’s
engine to realistic
data sets.
Lessons:
• Traditional GA -
do not solve BAP
Partitioning well.
• Not scalable.
Branch & Bound
(BAP-BB)
Optimal
Solutions
Very Slow
Modified
Fidducia-
Mattheyses
(BAP-GP)
Locally
Optimal Solutions
Very Fast
The BAP Partitioners
GA
Objectives:
• Address drawbacks
of [Loh96].
• Answer question:
why traditional GA
not suitable?
21. Slide 21
Focus of Thesis
• Devise a suitable GA for solving the BAP
Partitioning Problem
– Good (in terms of quality) solutions
– reasonable planning time (say 1 night)
• Answer question why “traditional” GA
methods fail
22. Slide 22
Thesis Contributions
• Devised good GA for BAP Partitioning
– < 19% improvement for 40% data sets over GP
– Locate feasible allocations where GP could not
– < 6 hrs on P2-300Mhz
• Identified reasons for “traditional” GA failure
– unsuitable encoding
– problem with busy schedules
• Conducted Extensive Experimentation
– ~60,000 individual expt. runs on various GA param. combi.
23. Slide 23
• No real data
• GA Evaluation Problem
– Many parameters to tune
– Long running times
• No real data
– Generate Realistic Data
• GA Evaluation Problem
– Adopt Successive Refinement Strategy
Difficulties Faced
24. Slide 24
Presentation Outline
• Introduction
• “Traditional” GA applied to the BAP
• Our solution - The BAP-GGA
• System Implementation
• Experimentation
• Conclusion
25. Slide 25
Genetic Algorithms
• A class of stochastic, population based, search
algorithms that mimic the process of natural
selection in the natural world.
– One class of Evolutionary Algorithms (EA)
• Genetic Programming, Simulated Evolution
• Some history
– John Holland at the Univ. of Michigan 1970s
• Formal model of natural selection and genetics
– Ken. DeJong - late 70s
• Experimental work to verify Holland’s theory
– David Goldberg (at U. Mich.) 1980s
• first applied GA to solve a real-world problem
26. Slide 26
Applying GA to Optimization
Problem
Chromosomes
Encoding
Solution
Decoding
Genetic
Algorithm
Fittest
Chromosome
27. Slide 27
Generation
The GA Process
Randomly
Generate
Initial Population of
chromosomes
Select
chromosomes
for
Mating
based on
Fitness
Select
Survivors
based on
Fitness
Perform
Mutation
on
chromosomes
Put
Children
back into
Population
Recombine
chromosomes
to
Produce
Children
(Mating)
Evaluate
chromosomes
in
Population
based on
Fitness
N
Y
Stop?
Done
28. Slide 28
Applying GA To Problem
• Define Encoding scheme
– solution instance chromosome
• Define Fitness Function
– measure of individual’s (associated to chromosome) survivability
• Define Selection scheme
– ie. How to choose who should mate
• Define Crossover scheme
– recombination procedure (mating)
• Define Mutation scheme
– variation procedure
• Define Replacement scheme
– ie. Who should live and who should die
• “Roulette wheel” or proportional selection
– fitter have higher probability of getting to mate.
• Steady State Replacement
– replace fixed number of least fit in population with children.
34. Slide 34
Applying GA To Problem
• Define Encoding scheme
– solution instance chromosome
• Define Fitness Function
– measure of individual’s (associated to chromosome) survivability
• Define Selection scheme
– ie. How to choose who should mate
• Define Crossover scheme
– recombination procedure (mating)
• Define Mutation scheme
– variation procedure
• Define Replacement scheme
– ie. Who should live and who should die
35. Slide 35
Calculating Fitness
• Objective Function
= Transshipment Cost + ( Overshoot Cost)
• BAP Objective is to Minimize
• But GA Objective is to Maximize Fitness
– Need to convert Min problem to Max problem
Primary Objective • Relaxation of Berth
Capacity Constraint
• Penalize infeasible
allocations.
• Discriminate among
infeasible allocations
• >> Trans. Cost
• Differentiate
feasible and
infeasible obj.
values
39. Slide 39
Literature Survey
• Revisit of GA fundamentals
– Introductions: [Gold89], [Mich92], [Reev93]
– Theory: [Holl75]
• GAApplications to similar problems
– Jones and Beltramo [JoBe91]
• Initial application of GA on clustering/partitioning
– Bui and Moon ([BuMo94] and [BuMo94a])
• multiway partitioning and ratio-cut partitioning
– Kochhar and Heragu [KoHe98]
• GA approach to Multi-Floor Facility Layout (MFFLP)
– Falkenauer [Falk97]
• Grouping GA (GGA) for grouping problems
40. Slide 40
Key Survey Findings
• Better understanding of how GA works
– [Holl75], [Gold89], [Mich92], [Falk97]
• Which are the more important GA operators
– Encoding scheme
– Crossover scheme
– Mutation scheme
– [Reev93], [Falk97], [Kers97]
– The Focus of our study is on these 3 operators
41. Slide 41
“Traditional”
GA
Domain Specific
• Object Membership Encoding
– reordering of chromosome [BuMo94]
– multi-point crossovers [BuMo94]
– swap mutator [JoBe91]
• Object Membership/Neighborhood Search Hybrid
– Limited NS [BuMo94] [BuMo94a]
– NS post-process [BuMo94] [BuMo94a]
• Order Based Encoding
– PMX, OX, CX crossovers [JoBe91]
– Greedy decoder [JoBe91]
– First Fit decoder [KoHe98]
• Grouping GA (GGA) [Falk97]
Key GAApproaches Studied
(Classified According to Encoding Scheme)
42. Slide 42
The Order Based Encoding
• [JoBe91] - clustering/partitioning,
[KoHe98] - Multi-floor facility layout
• Initially used to solve the TSP
• To solve other problems - need decoder
5 3 10 8 1 11 6 4 12 97132
5 3 10 8 1 11 6 4 12 97132
Decoding
Procedure
Section 1
Section 2
Section 3
3
5
13
11
1
2
4
6
7
8
9
10
12
15 3
20
10 5
12
25
3045
20
43. Slide 43
Unsuitability of Order Based GA
• The encoding scheme is very bad
• “Incompleteness” of decoder
– difficult (when solving practical problems) to
guarantee completeness of decoder
• Very high redundancy of encoding
– Number of possible permutations is n!
– Number of possible Object Membership
configurations is only mn
– Level of redundancy is (n! / mn)
• 100 vessels, 4 sections - (100! / 4100) ~ (10157/1060)
– Most of the time GA is doing nothing useful!
44. Slide 44
• Order Based Encoding
– Redundant and incomplete encoding
• Object Membership Encoding
– Context insensitivity of crossover
– Problems handling busy schedules
• Object Membership/Neighborhood Search Hybrid
– GA/NS Contribution
– Problems with NS Methods dealing with busy periods
Unsuitability of Traditional GA
45. Slide 45
Unsuitability of Obj. Mem. GA
(Context Insensitivity of Crossover)
Section 1
Section 2
Section 3
3
5
11
13
10
2
4
6
7
8
9
1
12 15 3
20
10 5
12
25
3045
20
2 3 4 5 6 7 8 9 131211101
1 1 1 2 2 2 2 2 33313
Vessel Number :
Section Number :
BAP Chromosome
Reason:
Traditional
crossover works
object-wise - not
group wise
46. Slide 46
Inversion or Reordering
• [BuMo94] - multiway partitioning
[BuMo94a] - ratio-cut partitioning
• Cluster groups of genes together so that
crossover has less chance of breaking up
good subgroups
• Use WDFSR preprocess - Weighted Depth
First Search Reordering
• However, still has high prob. of breaking up
good subgroups
47. Slide 47
• Random initialization - population infeasible
• GA waste time getting to feasible region
numgen
Unsuitability of Obj. Mem. GA
(Problem dealing with Busy Schedules)
48. Slide 48
Limitations of NS Methods
• BAPS 1.0 Partitioner, [Ong00] - BAP-GP
• NS Methods - Local Adjustment
– cumulatively improve solution by performing small adjustments
• Choice of neighborhood
– 1-move? 2-move? How to choose?
• The Problem maneuvering busy periods
– Overflow bucket [Ong00]
49. Slide 49
• Unsuitable encoding
– Use Grouping GA (GGA) encoding
• Difficulty locating feasible allocations
– Use greedy initializer
– Use timezone mutator
How we deal with Traditional GA
Limitations
• Unsuitable encoding
• Difficulty locating feasible allocations
50. Slide 50
Falkenauer’s Insights on Encoding
• Good solutions of Grouping problems
usually composed of subgroups of objects
with high affinity to one another.
– Meaning of affinity - diff. for diff. prob.
– For BAP Partitioning - large transshipment
connections + “knapsack”-type goodness-of-fit
• GA encoding and recombination should
facilitate the creation and exchange of
subgroups with high affinity.
62. Slide 62
Affinity - The Greedy Heuristic
• Primary Heuristic - allocate to section to
cause least increase in transshipment cost.
• Secondary Heuristic - allocate to section
with largest available capacity
3
5
13
11
1 2
4
6
7
8
9
10
12 15 3
20
10 5
12
25
3045
20
3
63. Slide 63
Resolving Busy Schedules
• Random initialization - infeasible allocations
– Greedy Initializer
• Problem with Neighborhood Search
– Timezone Reallocator (mutator)
• Generate a random permutation of all the vessels
• Apply Greedy Heuristic on the list
• Higher density time periods are more likely to be cause of
infeasibility.
• However, cannot discount lower density time periods.
• k-move heuristics have problems dealing with them
• Instead of performing local adjustment - empty and reallocate
64. Slide 64
Time Zones
• Chop up planning window into non-interfering time periods called
time-zones
z1 z2 z4 z5 z6 z7 z8 z9z3
65. Slide 65
Zone Densities
•Make use of proportional selection to choose time-zone to have vessels
emptied and reallocated (greedy)
z1 z2 z4 z5 z6 z7 z8 z9z3
Timezone Mutator
13 15 16% 12 11 9 7 610
66. Slide 66
Summary of BAP-GGA Features
• Unsuitable encoding
– Grouping GA (GGA) encoding and crossover
• Busy schedules
– Greedy Initializer
– Timezone mutator
67. Slide 67
Presentation Outline
• Introduction
• “Traditional” GA applied to the BAP
• Our solution - The BAP-GGA
• System Implementation
• Experimentation
• Conclusion
69. Slide 69
Structure of BAP-GGA.
GA Genetic Algorithm
GA Population
BAP
GGA
Chromosome
BAP
GGA
Chromosome
BAP
GGA
Chromosome
...
Chromosome Handling Functions
• Crossover - inject, 1-point
• Mutator - timezone, flip
Standard GA Processes
• Roulette wheel selector, Steady-state replacement
BAP
Fitness Function
GALib
Component
Self
implemented
70. Slide 70
Presentation Outline
• Introduction
• “Traditional” GA applied to the BAP
• Our solution - The BAP-GGA
• System Implementation
• Experimentation
– Data Generation
– Experimentation System
– Evaluating the various GA studied
– Result Analysis
• Conclusion
71. Slide 71
Data Generation
• Obtain Domain Information
– Port Survey [Foo96]
– publicly available sources (PortView, WWW)
– domain data for data generation
• Design and build data generation system
– BAP Expt. Framework [Foo99]
– Flexible, comprehensive
• Generated 100 realistic data sets
– The BENCHMARK data set collection
72. Slide 72
BENCHMARK Data Set Collection
Port Structures
5 (Brani)1 2 3 4
60
16696 240 240 240
208120 302 302 302
250144 362 362 362
292422 422 422
0.25
0.4
0.5
0.6
0.7
A
B
D*
• 5 data sets in each
box.
• Num. in box is num.
of vessels
Port Section
Layouts
* Average Berthing Demand
600m
600m
600m
600m
600m
600m
600m
600m
600m
600m1,800m
1,200m
1,200m
600m
480m
800m
200m
73. Slide 73
BAP Experimentation System
BAP
Experimental
Framework
Result
Analysis
Subsystem
Data
Generation
Subsystem
Expt. Run Subsys.
BAPS
BAP
Package
BAP
Solver
BAP-XX
Packer
BAP-XX
Packer
BAP-XX
PackerBAP-XX
Partitioner
BAP-XX
Partitioner
BAP-XX
Partitioner
74. Slide 74
• Object Membership Encoding
– WDFS Reordering, multi-point crossovers [BuMo94]
– swap mutator [JoBe91]
• Object Membership/Neighborhood Search Hybrid
– Various hybridization schemes
• Order Based Encoding
– PMX, OX, CX crossovers [JoBe91]
– Greedy decoder [JoBe91], First Fit decoder [KoHe98]
• Grouping GA (GGA) [Falk97]
– Random, Greedy initialization
– Inject, 1-point crossover
– flip, timezone mutator
GA Combinations Evaluated
110 Various GA
Combinations!
75. Slide 75
Strategy for GA Evaluation Problem
• Focus on GA elements that give biggest payoff
– Encoding, Crossover, Mutation
• Quick prototyping of GA solvers
– Use library of GA components (GALib)
• “Production-line” experimentation system
– BAP Experimental Framework
– Automate expts, clone
• Successive Refinement
– Progressively evaluate larger data sets
– 4 stage evaluation process
76. Slide 76
Other Data Set Collections
• BENCHSUB collection
– 15 representative data sets from BENCHMARK
• SMALLDATA collection
– 16 data sets (26-42 vessels, 2-3 sections) - opt.
– Created by Xu in [Xu99]
• TESTDATA collection
– 21 data sets (6-15 vessels, 2-3 sections) - opt.
– handcrafted
77. Slide 77
Stage 0
PMX O
X
CX
First Fit
Greedy
Crossover
Decoder
Crossover
Mutator
Reordering
1pt 2pt 3pt 4pt 5pt
No Reorder
WDFS Reorder
flip
swap
Uniform
1pt
random
Inject
flip
timezone
Crossover
Mutator
greedy Initializer
BAP-GGA
Object
Membership
Order
Based
78. Slide 78
Stage 3
PMX O
X
CX
First Fit
Greedy
Crossover
Decoder
Crossover
Mutator
Reordering
1pt 2pt 3pt 4pt 5pt
No Reorder
WDFS Reorder
flip
swap
Uniform
1pt
random
Inject
flip
timezone
Crossover
Mutator
greedy Initializer
BAP-GGA
Object
Membership
Order
Based
Data sets:
- BENCHSUB collection
- 15 data sets from
BENCHMARK.
Popsize/numgen:
- 50/100, 50/400,
100/200
Limited Experimention
(still open)
83. Slide 83
BAP-GA
2.0
BAP-GP
[Ong00]
BAP-BB
[Xu99]
Branch & Bound
(BAP-BB)
Optimal
Solutions
Very Slow (> 1 hour)
Modified
Fidducia-
Mattheyses
(BAP-GP)
Good Solutions
(~ 87 % Best)
Very Fast
(< 1 min per run)
GA
Better
Solutions
(~ 95% Best)
Fast
(~ 1 min per run)
The BAP Partitioners
84. Slide 84
Compared with BAP-GA 1.0
BAP-GGA is best (<= 1.0)
BAP-GGA is worse than BAP-GA 1.0 (feasible) < 1.2
BAP-GGA did not find feasible soln (BAP-GA 1.0 did not)
BAP-GGA found feasible soln (BAP-GA 1.0 did not)
BAP-GGA worse than BAP-GA 1.0 (feasible) > 1.2
Port Structure
51 2 3 4
60
16696 240 240 240
208120 302 302 302
250144 362 362 362
292422 422 422
0.25
0.4
0.5
0.6
0.7
A
B
D
BAP-GGA did not find feasible soln (BAP-GA 1.0 found)
BAP-GA 1.0 Hybrid GA
- ~ 5 hours per run (10 runs)
BAP-GGA
- < 10 mins per run (10 runs)
72
21
1
0
6
0
Best Ratio
0.74
85. Slide 85
Compared with BAP-GP (800 runs)
BAP-GGA is best (<= 1.0)
BAP-GGA is worse than BAP-GP-800 (feasible) < 1.2
BAP-GGA did not find feasible soln (BAP-GP-800 did not)
BAP-GGA found feasible soln (BAP-GP-800 did not)
BAP-GGA worse than BAP-GP-800 (feasible) > 1.2
Port Structure
51 2 3 4
60
16696 240 240 240
208120 302 302 302
250144 362 362 362
292422 422 422
0.25
0.4
0.5
0.6
0.7
A
B
D
BAP-GGA did not find feasible soln (BAP-GP-800 found)
BAP-GGA
- < 10 mins per run (10 runs)
- low mutation rate (0.05)
38
53
0
0
7
2
Best Ratio
0.81
• Large solution space
- 5 sections
• All sections are small
• GA has not stabilized.
86. Slide 86
BENCHMARK Data Set Collection
Port Structures
5 (Brani)1 2 3 4
60
16696 240 240 240
208120 302 302 302
250144 362 362 362
292422 422 422
0.25
0.4
0.5
0.6
0.7
A
B
D*
• 5 data sets in each
box.
• Num. in box is num.
of vessels
Port Section
Layouts
* Average Berthing Demand
600m
600m
600m
600m
600m
600m
600m
600m
600m
600m1,800m
1,200m
1,200m
600m
480m
800m
200m
87. Slide 87
Longer BAP-GGA Runs
BAP-GGA is best (<= 1.0)
BAP-GGA is worse than BAP-GP-800 (feasible) < 1.2
BAP-GGA did not find feasible soln (BAP-GP-800 did not)
BAP-GGA found feasible soln (BAP-GP-800 did not)
BAP-GGA worse than BAP-GP-800 (feasible) > 1.2
Port Structure
51 2 3 4
240
302
362
422
0.25
0.4
0.5
0.6
0.7
A
B
D
BAP-GGA did not find feasible soln (BAP-GP-800 found)
BAP-GGA
- double num of gen. (1000)
- < 20 mins per run (10 runs)
- low mutation rate (0.05)
Best Ratio
0.96
88. Slide 88
Increasing Population Size
BAP-GGA is best (<= 1.0)
BAP-GGA is worse than BAP-GP-800 (feasible) < 1.2
BAP-GGA did not find feasible soln (BAP-GP-800 did not)
BAP-GGA found feasible soln (BAP-GP-800 did not)
BAP-GGA worse than BAP-GP-800 (feasible) > 1.2
Port Structure
51 2 3 4
240
302
362
422
0.25
0.4
0.5
0.6
0.7
A
B
D
BAP-GGA did not find feasible soln (BAP-GP-800 found)
BAP-GGA
- double popsize (100)
- < 20 mins per run (10 runs)
- low mutation rate (0.05)
Best Ratio
0.95
Larger solution space
requires larger GA
coverage
89. Slide 89
Compared with BAP-GP (800 runs)
BAP-GGA is best (<= 1.0)
BAP-GGA is worse than BAP-GP-800 (feasible) < 1.2
BAP-GGA did not find feasible soln (BAP-GP-800 did not)
BAP-GGA found feasible soln (BAP-GP-800 did not)
BAP-GGA worse than BAP-GP-800 (feasible) > 1.2
Port Structure
51 2 3 4
60
16696 240 240 240
208120 302 302 302
250144 362 362 362
292422 422 422
0.25
0.4
0.5
0.6
0.7
A
B
D
BAP-GGA did not find feasible soln (BAP-GP-800 found)
BAP-GGA
- < 10 mins per run (10 runs)
- low mutation rate (0.05)
38
53
0
0
7
2
Best Ratio
0.81
• Exisitence of very
small section (200m)
• Multi-start (800)NS
could not resolve.
90. Slide 90
Increasing Mutation Rate (Timezone)
BAP-GGA is best (<= 1.0)
BAP-GGA is worse than BAP-GP-800 (feasible) < 1.2
BAP-GGA did not find feasible soln (BAP-GP-800 did not)
BAP-GGA found feasible soln (BAP-GP-800 did not)
BAP-GGA worse than BAP-GP-800 (feasible) > 1.2
Port Structure
51 2 3 4
250
292
0.25
0.4
0.5
0.6
0.7
A
B
D
BAP-GGA did not find feasible soln (BAP-GP-800 found)
BAP-GGA
- < 20 mins per run (10 runs)
- mutation rate (0.5)
Best Ratio
0.91
91. Slide 91
Summary of Analysis
• BAP-GGA gives good results but in longer
time (compared to BAP-GP).
– How long depends on size of solution space.
– < 19% better results possible
– finds feasible solutions where NS type methods have diff.
– < 20mins per run on slow P2-300Mhz
– < 6hrs total planning time
• BAP-GGA performs better than traditional GA
– Strength of GGA encoding, Inject crossover
• BAP-GGA able to resolve busy schedules
– Strength of Timezone mutator
92. Slide 92
Presentation Outline
• Introduction
• “Traditional” GA applied to the BAP
• Our solution - The BAP-GGA
• System Implementation
• Experimentation
• Conclusion
93. Slide 93
Contributions
• Identified key problems of Traditional GA approaches
to solve the BAP Partitioning Problem
– unsuitable encoding
– difficulty handling busy schedules
• Devised GA (BAP-GGA) using techniques that address
these problems
– GGA encoding
– Greedy Initialization
– Timezone based reallocation
94. Slide 94
BAP-GA
2.0
BAP-GP
[Ong00]
BAP-BB
[Xu99]
Branch & Bound
(BAP-BB)
Optimal
Solutions
Very Slow
Modified
Fidducia-
Mattheyses
(BAP-GP)
Good Solutions
Very Fast
GA
Better
Solutions
Fast
The BAP Partitioners
Each addresses a different planning need
95. Slide 95
Short Term Extensions
• Other GA Operators
– Selection scheme
• rank-based [Whit89], stochastic univ. sel. [Hanc91]
– Replacement scheme
• replace-bad (not worst) [Reev97], replace-old [Mich91]
• Objective Function
– what is a good value for ?
• Incorporation of fast FM heuristic [Ong00]
– how to incorporate?
96. Slide 96
Long Term Extensions
• Incorporate Yard Capacity to model.
– Container handling rate of Quay and Yard cranes.
– Storage capacity of Yard
• Study effects of various port structures.
• Study of solutions generated by various
combinations of Partitioning and Packing
solvers
103. Slide 103
The Quadratic Assignment Problem
• Facility Layout Problem
• Given a floor area of a factory evenly partitioned into n equal blocks and n departments,
we want to assign all departments to floor blocks so as to minimize the total material
handling cost.
• NP-Hard
104. Slide 104
A Special Case of the BAP
• n vessels assigned to n sections to minimize container handling effort.
• Each vessel must be assigned a unique section.
• Same problem as QAP.
105. Slide 105
The General BAP
• n vessels assigned to m sections (m < n) to minimize transshipment cost.
• Vessels must be assigned a sections that have space to accommodate them.
• Generalization of QAP.
• NP-Hard
107. Slide 107
Key Ideas Behind GA
• All organisms endowed with different traits (attributes)
– eg. number of fingers, webbed feet, long neck
– determined at birth by their genes inherited from parents
• Genes encapsulated into structures called chromosomes
• Some traits are better suited for survival
– eg. long neck for reaching leaves on trees
• Fitness
– ie. how well each individual is able to survive in the environment
• All individuals compete for survival and mating
– strong will flourish, weak will die off
– genes from stronger individuals get passed on to next generation
• Mutation introduces variation to the genes
– new traits also appear
108. Slide 108
Key GAAbstractions
• Organism = chromosome = organism
– the chromosome is the organism
• Chromosome = string of chars
– each string element represents a gene
• Fitness = fitness function
– maps chromosome to a real number
– usually dependant on values of string elements
• Who lives and dies based on fitness value
– replacement scheme
• Selection for mating also based on fitness value
– ie. fitter organisms get to mate more
• Mutation acts to alter string elements
109. Slide 109
BAPS 1.0 Experimentation
• Focus - to perform evaluation of Loh’s proposed
GA combinations
• Constructed 100 realistic data sets
– BENCHMARK data set collection
• Best GA:
– Uniform crossover
– NS/flip mutator
• Long running times - days
– unbounded NS
• Compared not favorably with BAP-GP
– FM based partitioner (fast)
110. Slide 110
An Appeal
• Please support Open Source software efforts
and the Free Software Movement
• This research has benefited much from the
fact that there is a freely available,
powerful, stable OS from which to run
expts on cheap PCs.
114. Slide 114
Strategy for GA Evaluation Problem
• Focus on GA elements that give biggest payoff
– Which are they?
• Quick prototyping of GA solvers
– Use library of GA components (GALib)
• “Production-line” experimentation system
– BAP Experimental Framework
– Automate expts, clone
• Successive Refinement
– 4 stage evaluation process
115. Slide 115
Calculating Fitness
• Objective Function
= Transshipment Cost + ( Overshoot Cost)
– relaxation of Berth Capacity Constraint
– deal with infeasible allocations
– is a very large number
• >> Transshipment Cost
• differentiate feasible and infeasible allocations
• BAP Objective is to Minimize
• But GA Objective is to Maximize Fitness
– Need to convert Min problem to Max problem
116. Slide 116
BAPS 1.0 Conclusions
• Results
– GA without NS perform badly
– Results not very good compared with BAP-GP
• Questions
– Why does GA (without NS) perform badly?
– What is NS contribution to search?
117. Slide 117
The Fitness Landscape
• Height of each point
- determined by fitness function
• How points located next to
one another - determined by the
neighborhood function
• Encoding, crossover and mutation
scheme determine the landscape
118. Slide 118
Data Generation Parameters
• Port Structure
– section lengths, distances between them
• Berthing Demand
– how busy the port is
• Planning window - 84 hrs (1/2 week)
• Mix of vessels - 70% SML, 30% MED class
• Num. containers moved ~ 50% of capacity
120. Slide 120
Total Berth Demand
The Average Berth Demand
Planning Window
Total
Berthing
Length
• ABD = Total Berth Demand / (Total Berthing Length × Planning Window)
Density
121. Slide 121
Port Survey
• Objective - to obtain primary data figures
and gather domain related info.
• All info. from publicly available sources
– PortView, WWW
• Documented in [Foo96] (same title)
– RAS Internal document
• Key primary data:
– vessel classes (eg. panamax, post-panamax)
• vessel lengths, durations of stay, capacities
– port structures
129. Slide 129
Selecting Who Should Mate
• Standard way (Holland) -
known as “roulette wheel” or
proportional selection.
• Individuals in population have
probability of being selected
based on their fitness relative
to the population average.
• Fitter have higher prob. of
mating.
Fitness Roulette
1000
2000
5000
8000
1000
Individual 1
Individual 2
Individual 3
Individual 4
Individual 5
131. Slide 131
More Fit
Individuals
Less Fit
Individuals
Who Should Live and Who Should Die
Population of
Generation n
Individuals
From
Generation n
New
Individuals
Population of
Generation n+1
Number of individuals to kill = Number of children to produce
= Replacement Rate × Population Size
Steady State Replacement
132. Slide 132
Stage 1
PMX O
X
CX
First Fit
Greedy
Crossover
Decoder
Crossover
Mutator
Reordering
1pt 2pt 3pt 4pt 5pt
No Reorder
WDFS Reorder
flip
swap
Uniform
1pt
random
Inject
flip
timezone
Crossover
Mutator
greedy Initializer
BAP-GGA
Object
Membership
Order
Based
Data sets:
- TESTDATA collection
- 6-15 ves., 2-3 sect.
Popsize/numgen:
- 5/100, 5/400, 20/100
133. Slide 133
Stage 2
PMX O
X
CX
First Fit
Greedy
Crossover
Decoder
Crossover
Mutator
Reordering
1pt 2pt 3pt 4pt 5pt
No Reorder
WDFS Reorder
flip
swap
Uniform
1pt
random
Inject
flip
timezone
Crossover
Mutator
greedy Initializer
BAP-GGA
Object
Membership
Order
Based
Data sets:
- SMALLDATA
- 26-42 ves., 2-3 sect.
Popsize/numgen:
- 20/100, 20/400, 80/100