Professional Documents
Culture Documents
DC Meetig Presentation 1
GIST OF PRESENTATION
Abstract.
Overview of Research.
Module I : User Input
Module II : Encoding
Module III : Genetic Algorithm
Module IV & V : Decoding & Result
Conclusion.
DC Meetig Presentation 3
Abstract Contd..
The work is mainly concentrated on the
problem of
Finding the best mix of boxes that yield
maximal container volume utilization,
DC Meetig Presentation5
START
User Input
Module GET
INPUT
GENETIC
ALGORITHM
Heuristic
Genetic
Algorithm NO
IS THE
Module SOLUTION
FEASIBLE ?
YES
Decoding
Module DECODE GA
Developed CHROMOSOMES
Optimized
Solution or SOLUTION
Output
DC Meetig Presentation 6
Module STOP
Module I
INPUT PARAMETERS
INPUT :
Container : Standard Size
No. of boxes : to be packed
Box Dimensions : Length, Width & Height.
Box specification : Shape and Weight.
Box Constraints : Orientation, position, etc
DC Meetig Presentation 7
DC Meeting Presentation
8
Slide
Proposed GUI for User Input
DC Meetig Presentation 9
Module II
ENCODING TO GA CHROMOSOMES
S.N Description Actual GA Code Byte String Location
o Value length
BOX SPECIFICATION
1. 4 100 3 0th to 2nd
location
2. 5 101 3
Length
3. 6 110 3
4. 7 111 3
BOX POSITION
7. Left side 2 010 3
DC Meetig Presentation 11
GA Encoding contd..
S.No Description Actual GA Code Byte String
. Value length Location
ORIENTATIONS
13. No Rotation 0 00 2
DC Meetig Presentation 12
EXAMPLE FOR GA ENCODING
Box 1 Box 2 Box 3 Box 4
Length : 4 mts 5 mts 4 mts 7 mts
Breadth : 4 mts 5 mts 5 mts 4 mts
Height : 4 mts 7 mts 6 mts 5 mts
Position : Left side
Orientation : No constraint
• Parent 1 :
100 100 100 101 101 111 100 101 110
111 100 101 010 11
Similarly
• Parent 2 :
10010111011110010110010010010110111101111
DC Meetig Presentation 13
Module III
GENETIC ALGORITHM
• Genetic Algorithm is a search technique
used to find approximate or best solution
to optimization and search problems.
Stages of Genetic Algorithm
1. Generate Population randomly.
2. Choose the initial population.
3. Evaluate the fitness value.
4. Select the best pair.
5. Reproduction or Cross over.
6. Mutation
7. Repeat until terminating condition reached.
DC Meetig Presentation 14
Cooking A Cookie
9 0 3 2 4 4 3 1 3 6
8 0 0 1 4 6 5 6 4 3
7 2 0 2 4 7 5 4 4 6
6 4 0 2 4 8 7 6 6 1
5 0 4 6 8 9 8 7 6 4
Sugar In 4 2 6 1 1 8 5 1 4 3
Kilogr
ams 3 2 3 4 4 6 7 7 6 3
2 0 1 2 3 4 4 1 4 4
1 0 1 2 3 7 3 5 4 1
1 2 3 4 5 6 7 8 9
Flour in Kilograms
Initialization
– Many individuals are randomly generated from
the initial population.
– Random generation is similar to Roulette
Wheel selection.
• Example:
– Parents : 1-1, 1-2, … 2-2, …3-5, … 6-8,..9-
9.
• Mutation
– Mutation is used to ensure that potential solution
are not lost and it only brings innovations in the
new generations.
• Cross Over:
– Parent 1 : 5 – 1
– Parent 2 : 2 – 4
• After Cross Over (First Generation)
• Child 1 : 5 – 4
• Child 2 : 2 – 1
• Fitness Value for child 2 : 2 – 1 is 1 => low
survival of fitness so the child dies
• Fitness Value for child 1 : 5 – 4 is 8 => high
survival of fitness.
• Mutation:
–Child 1 : 5 – 4
• Randomly change the gene 4 to 5
• Child 1 = 5 – 5
–The Fitness value = 9 (Optimal
solution)
GA STAGE I :
GENERATE POPULATION RANDOMLY
Fitness Function
F(x) = packed volume + constraint penalty
Packed Volume =
sum of (Length(x) * Length(y) * Length(z) ) of all boxes
DC Meetig Presentation 21
GA Stage III
SELECTION OF POPULATION
– During each successive epoch, a
proportion of the existing population is
selected for breeding of new
generation. i.e. selecting the fittest
parent for next generation.
DC Meetig Presentation 22
GA Stage IV
REPRODUCTION / CROSS OVER
DC Meetig Presentation 23
Example for Crossover
1 01011 2 2 01001
2 11001 1 11011
3 11001 4 3 11011
4 11111 3 11101
DC Meetig Presentation 24
GA Stage IV
MUTATION
Mutation is used to ensure that potential
solution are not lost and it only brings
innovations in the new generations.
Randomly swap the gene
Mutation Mutant
Parent Location parent
11001 3 11101
DC Meetig Presentation 25
GA Stage V
TERMINATION
– The generation is repeated until the
termination condition is reached.
– Some of the commonly used termination
conditions are:
• If a solution reached minimum criteria.
• If fixed number of generations reached.
• If allotted time/money/cost reached.
• If successive iteration no longer produce
better result.
• By manual inspection.
• And so on.DC Meetig Presentation 26
APPLICATIONS
Artificial Creativity.
Container loading optimization.
Automated design, including composite material design,
Mechatronics design and multi-objective design for weight savings,
etc.
Configuration applications, particularly physics applications of
optimal molecule configurations.
Learning fuzzy rule base using genetic algorithms.
Linguistic analysis
Mobile communications infrastructure optimization.
Molecular Structure Optimization (Chemistry).
Multiple population topologies and interchange methodologies.
Optimization of data compression systems.
Plant floor layout optimization.
Scheduling applications, including job-shop scheduling.
Software engineering
Solving the machine-component grouping problem
Design of water distribution systems.
Distributed computer network topologies.
Electronic circuit design, known as Evolvable hardware
And many more. DC Meetig Presentation 27
Module IV
DECODING
DC Meetig Presentation 28
Module V
RESULT
OUTPUT :
.
Optimal combination of boxes with maximal
usage of container volume
DC Meetig Presentation 29
Proposed GUI to display output
DC Meetig Presentation 30
Proposed GUI to display output
DC Meetig Presentation 31
1D BIN PACKING
Optimizing only one parameter.
Classification:
– Homogenous and Heterogeneous problems.
– Single and Multiple Container Loading.
DC Meetig Presentation 34
BIN-PACKING ALGORITHMS
Stability
Stability
Heuristic
method
method
Knapsack
Decomp Strip
3D BIN-PACKING Packing
ALGORITHMS
Wall Hybrid
building
Algorithm Geometric
Tree
Generating Method
Heuristic
DC Meetig Presentation 35
The Next Big Step
Genetic
Algorithm
n
Heuristic Tech.
io
ut
Optimization Tech.
ol
Experiences
Ev
Computational Time
DC Meetig Presentation 36
DETAILS OF THE DEVELOPED SIMPLE
GENETIC ALGORITHM PROGRAM
Software
SoftwarePlatform
PlatformSelected:
Selected: Visual
VisualBasic
Basic
Reference
Reference :: Reference
ReferenceBooks
Books(Goldberg)
(Goldberg)
Problem
Problem :: Finding
Findingthe
themaximum
maximum value
valuefor
forthe
the
function
functionXX2
2
Assumed
AssumedInput
Inputparameters
parameters ::
Population
Populationsize
size: : 44
String
Stringlength
length : : 3,4,5,…9
3,4,5,…9
Termination
Termination : : 100
100Generations
Generationsorordesired
desiredvalues.
values.
Crossover
Crossover :: Single
Singlepoint
pointcrossover
crossover
Mutation
Mutation :: 11%%
Type
Type :: Binary
Binarycoded
codedGA
GA
Fitness
Fitnessfunction
function
F(x) = X 2
F(x) = X2
DC Meetig Presentation 37
PROBLEM DEFINITION &
EXPECTED RESULT
Expected
String For Binary Actual Real
S.No. Output
length Digit Number (X)
F(x) = X2
1 3 111 7 49
2 4 1111 15 225
3 5 11111 31 961
4 6 111111 63 3969
5 7 1111111 127 16129
6 8 11111111 511 261121
7 9 111111111 1023
DC Meetig Presentation
1046529 38
DEVELOPED GUI FOR USER INPUT
DC Meetig Presentation 39
INITIALIZING THE PARAMETERS
Generation = 100
Mutation probability = 0.01
Desired value = square of real value for the
given string length
No of parents = 4
String length = 5
DC Meetig Presentation 40
RANDOM GENERATION OF PARENTS
USING RANDOMIZE FUNCTION
For
Forj j==11totono
noofofparents
parents
For
Fori i==11totostrlength
strlength
Randomize
Randomize
Genome(j)
Genome(j)==genome(j)
genome(j)&&CInt(Rnd())
CInt(Rnd())
Eg:
Eg:
Parent No Generated Parent
Parent 1/1 00000
Parent 2/1 01011
Parent 3/1 11001
Parent 4/1 11001
DC Meetig Presentation 41
FINDING THE FITNESS VALUE FOR THE
RANDOMLY GENERATED PARENTS
Converting the binary string into real number
and squaring
For i = 1 to strlength
temp = temp + (gene(k) * (2 ^ (i - 1)))
k=k–1
Parent No Generated Parent X value
Eg:
Parent 1/1 00000 0
Parent 2/1 01011 11
Parent 3/1 11001 25
DC Meetig Presentation 42
Parent 4/1 11001 25
CHECK FOR DESIRED VALUE
• If the value of best parent = desired value
then terminate
• Else repeat steps
DC Meetig Presentation 43
KILLING THE WORST PARENT AND
REPRODUCING NEW MATING POOL
Calculating the survival value =
Calculated fitness value / Average of fitness value
Parent
01011 11 11 0.180 0.7213 1 11001 1
2/1
Parent
11001 25 25 0.409 1.6393 2 11001 4 2
3/1
Parent
11001 25 25 0.409
DC Meetig 1.6393
Presentation 2 11001 3 45
4/1
CROSSOVER
01011 2 2 01001
11001 1 11011
11001 4 2 11001
11001 3 11001
DC Meetig Presentation 46
MUTATION
Apply Mutation operator
It will be applied to only 1 % of generations.
Mutation site selected will be random
swapping of binary digit occurs at that site.
DC Meetig Presentation 47
GENERATION I
Actu
Pare Genera X Functi al Mati cross cross new Mut Muta
nt ted val on Value Value coun ng over over gener Loc, nt
No Parent ue Value /sum /avg t pool pair site ation Str Child
Par
ent 010 0100
1/1 00000 0 0 0 0 0 11 2 2 1
0.18 0.72
Par 032 131
ent 786 147 110 1101 110
2/1 01011 11 11 9 5 1 01 1 1 0, 11
0.40 1.63
Par 983 934
ent 606 426 110 1100
3/1 11001 25 25 6 2 2 01 4 2 1
0.40 1.63
Par 983 934
ent 606 426Presentation 110
DC Meetig 1100 48
4/1 11001 25 25 6 2 2 01 3 1
GENERATION II
Par 0.10 0.41 11 11
ent 4651 8604 01 10
1/2 01001 9 9 163 651 0 1 2 2 11001 3, 1
Box Specification
1. Length 4 100 3 0th to 2nd location
2. 5 101 3
3. 6 110 3
4. 7 111 3
5. Breadth -do- -do- 3 3rd to 5th Location
6. Height -do- -do- 3 6th to 8th Location
Box Position
7. Left side 2 010 3 37th to 39th Location
8. Right side 3 011 3
9. Under 4 100 3
10. Above 5 101 3
Orientations
13. No Rotation 0 00 2 40th to 41st Location
14. Only Horizontal 1 01 2
DC Meetig Presentation 52
15. Only Vertical 2 10 2
INITIALIZING THE PARAMETERS
Generation
Generation ==500
500
Mutation
Mutationprobability
probability ==0.01
0.01
Desired
Desiredvalue
value ==Maximum
MaximumValue
Valuegenerated
generated
No.
No.ofofparents
parents ==100
100
String
Stringlength
length ==42
42
DC Meetig Presentation 53
CONCLUSION
• In this research work a new heuristic
algorithm using genetic approach will be
developed to maximize the space
utilization in container with wide Varity of
boxes along with practical constraints.
DC Meetig Presentation 57
DC Meetig Presentation 58