You are on page 1of 59

R.E.A.C.H.

ing Optimum Designs


through Processes Inspired by
Principles of Evolution
Partha Chakroborty
Professor
Department of Civil Engineering
IIT, Kanpur
The Next Half-Hour
Evolution
Genetic Algorithm
Some Applications of Genetic Algorithm
Evolution 101 (I)
Evolution
Evolution is the process by which modern organisms
have descended from ancient ones
Microevolution
Microevolution is evolution within a single
population; (a population is a group of organisms
that share the same gene pool). Often this kind of
evolution is looked upon as change in gene
frequency within a population
Evolution 101 (II)
For evolution to occur
Heredity
Information needs to be passed on from one generation to
the next
Genetic Variation
There has to be differences in the characteristics of
individuals in order for change to occur
Differential Reproduction
Some individuals need to (get to) reproduce more than others
thereby increasing the frequency of their genes in the next
generation
Evolution 101 (III)
Heredity
Heredity is the transfer of characteristics (or
traits) from parent to offspring through genes
Evolution 101 (IV)
Genetic Variation
Is about variety in the population and hence
presence of genetic variation improves chances of
coming up with something new
The primary mechanisms of achieving genetic
variation are:
Mutations Gene Flow Sexual Reproduction
Evolution 101 (V)
Mutation
It is a random change in DNA
It can be beneficial, neutral or harmful to the
organism
Not all mutations matter to evolution
Evolution 101 (VI)
Gene Flow
Migration of genes from one population to
another
If the migrating genes did not exist previously in
the incident population then such a migration adds
to the gene pool
Evolution 101 (VII)
Sexual Reproduction
This type of producing young can introduce new
gene combinations through genetic shuffling
Evolution 101 (VIII)
Differential Reproduction
As the genes show up as traits (phenotype) the
individuals get affected by what is around; some
die young while others live
Those who live compete for mates; only the
winners pass on their gene to the next generation
In some sense the fitter (with respect to the
current environment) gets to leave more of his/her
genes in the next population; often the term
fitness is used to describe the relative ability of
individuals to pass on their genes
Evolution 101 (IX)
Overview
Differential Reproduction
Variation
Heredity
From Organisms to Abstract Beings (I)
110010
111001
000000
010010
101010
000010
110011
The fight to survive (selection operation)
From Organisms to Abstract Beings (II)
110010
111001
010010
101010
110011
The Survivors and Mating
Offsprings
111 010
110 00 0
111 010 0
Genetic Algorithms (I)
Basic Questions
How does one decide who survives
How does one decide how successfully each
survivor produces offsprings
How are the offsprings related to the parents
How does one ensure that genetic variation is
maintained even though with every generation
individuals are supposed to become fitter
Genetic Algorithms (II)
Population of
individuals or alternative
(feasible) solutions
Next generation
of
individuals
Mating pool of
fitter
individuals
Evaluate individuals
on their fitness
Select individuals
based on fitness
for subsequent mating
Select individuals
& exchange charac-
teristics to create
new individuals
Arbitrarily change
some characteristic
Heredity
Genetic Algorithms (III)
What is an individual?
x
y
z
x,y,z
24,2,11 1001,0000,1101
b
a
d
c
e
(a,b)(b,c)(c,d)(h,i) a,b,c,d,i
f
g
h
i
a
c
d
f
i
e
b
h
g
Genetic Algorithms (IV)
Generation of initial population
Basic Tasks
Evaluation

Selection (Reproduction operation)
Exchange characteristics to develop new
individuals (Crossover operation)
Arbitrarily modify characteristics in new
individuals (Mutation operation)
Genetic Algorithms (V)
Reproduction / Selection Operator
The purpose is to bias the mating pool (those who
can pass on their traits to the next generation)
with fitter individuals
Assign p as the prob. of choosing
an individual for the mating pool

p is proportional to the fitness

Choose an individual with prob. p
and place it in the mating pool

Continue till the mating pool size
is the same as the initial populations
Choose n individuals randomly

Pick the one with highest fitness

Place n copies of this individual in
the mating pool

Choose n different individuals and
repeat the process till all in the
original population have been chosen
Genetic Algorithms (VI)
Crossover operator
1 0 0 1 1 0 1
1 1 0 0 1 1 1
1 0 0 1 1 1 1
1 1 0 0 1 0 1
Genetic Algorithms (VII)
Mutation
1 0 0 1 1 0 1 1 0 0 0 1 0 1
Genetic Algorithms (VIIIa)
Results from a small example:
6 , 0
) 7 ( ) 11 ( ) , (
2 1
2 2
2 1
2
2
2
1 2 1
s s
+ + + =
x x
x x x x x x f
Minimize
Initial Population Generation 10
Genetic Algorithms (VIIIb)
G
e
n
e
r
a
t
i
o
n

2
0

G
e
n
e
r
a
t
i
o
n

3
0

G
e
n
e
r
a
t
i
o
n

4
0

G
e
n
e
r
a
t
i
o
n

5
0

Genetic Algorithms (IX)
Issues
Generation of initial population
Evaluation
Reproduction operation
Crossover and Mutation operations and
feasibility issues
Representation
Genetic Algorithms
Benefits to engineers as an optimization tool
Problem formulation is easier
Allows external procedure based declarations
Can work naturally in a discrete environment
Optimizing with Genetic Algorithms
Some Examples
Some Applications
Engineering component / equipment design
Engineering process optimization
Portfolio optimization
Route optimization; optimal layout; optimal packing
Schedule optimization
Protein structure analysis
Decision making / decision support systems
Transit Routing: Description
Transit Routing: Characterization (I)
The purpose is to determine a set of routes
which serve many people quickly and without
using too many transfers.
The number of passengers using a particular
route depends on the layout of the route as well
as the layout of the other routes.
Evaluation of a route set (note, it is not very
meaningful to evaluate a route in isolation) is
not easy. Obtaining an objective function is
not possible.
A solution is a route set; each route within a
route set is a meaningful juxtaposition of links.
Transit Routing: Characterization (II)
Defining meaningful juxtaposition (a feasible
route) through algebraic relations is difficult.
Traditional MP formulation is at best extremely
difficult and most probably impossible.
Procedure based determination of the
goodness and feasibility are more practical.
Transit Routing: Formulation (I)
The problem is formulated for a GA based
solution.
The initial population of route sets are created
using problem specific information.
Tournament selection is chosen.
Problem specific crossover and mutation
operators are devised.
Transit Routing: Formulation (II)
Representation.
Transit Routing: Formulation (III)
Crossover (inter-string).
Parents
Children
Transit Routing: Formulation (IV)
Crossover (intra-string).
Transit Routing: Formulation (V)
Mutation.
Transit Routing: Results
0
1
14
6
7
13
8
12
4
10
3 5
9
2
11
Mandls Swiss
network --- a
benchmark problem
Single Vehicle Routing: Description (I)
Single Vehicle Routing: Description (II)
Nodes can be visited in any
order and at any time
Some nodes cannot be
visited before others; no
restrictions on visit time
Travelling Salesman
Problem
Pick-up and Delivery
Problem
Some nodes cannot be
visited before others;
restrictions on visit time
Dial-a-ride Problem
Single Vehicle Routing: Description (II)
A
B
C
D
F
E
K
J
I
H
G
A
B
C
D
F
E
K
J
I
H
G
A-B-C-H-G-D-E-F-I-J-K-A
A-B-C-D-E-F-G-K-J-H-I-A
A-B-C-D-E-F-H-G-I-J-K-A
A-B-C-D-E-F-H-G-K-J-I-A
Single Vehicle Routing: Formulation
A

g
e
n
e
r
a
l

f
o
r
m
u
l
a
t
i
o
n

f
o
r

a
l
l

t
y
p
e
s

o
f

S
V
R
P
:

A

m
u
t
a
t
i
o
n
-
o
n
l
y

G
A

a
p
p
r
o
a
c
h

Single Vehicle Routing: Results (I)
TSP; 202 node problem; geospherical distances,
(GR202 --- a benchmark problem)
O
p
t
i
m
a
l

(
r
e
p
o
r
t
e
d

i
n

l
i
t
e
r
.
)

N
e
a
r
-
o
p
t
i
m
a
l

(
o
b
t
a
i
n
e
d

h
e
r
e
)

Single Vehicle Routing: Results (II)
PDP; 70 node problem; Euclidean distances,
(ST70PD --- a modified benchmark problem)
O
p
t
i
m
u
m

Single Vehicle Routing: Results (IIIa)
GA evolving a good TSP route, Eil51, Initial Best
Single Vehicle Routing: Results (IIIb)
GA evolving a good TSP route, Eil51, Intermediate
Single Vehicle Routing: Results (IIIc)
GA evolving a good TSP route, Eil51, Intermediate
Single Vehicle Routing: Results (IIId)
GA evolving a good TSP route, Eil51, Intermediate
Single Vehicle Routing: Results (IIIe)
GA evolving a good TSP route, Eil51, Intermediate
Single Vehicle Routing: Results (IIIf)
GA evolving a good TSP route, Eil51, Final Best
Single Vehicle Routing: Results (IIIg)
GA evolving a good TSP route, Eil51, Initial Best
Transit Scheduling: Description (I)
Stops
Transfer stops
Transit Scheduling: Description (II)
From a scheduling standpoint determining the
schedule of bus arrivals and departures at a
transfer stop is important as these stops typically
represent major stops and also because at these
stops passengers can transfer from one route to
the other.
Given the fleet size, the idea is to determine
the schedule such that the total time spent
waiting (for a bus) by transferring and non-
transferring passengers is minimized.
Transit Scheduling: Characterization (I)
Lets look at one transfer station with 3 routes
time
Transit Scheduling: Characterization (II)
Waiting time for non-transferring passengers
Arrival rate

=
i k
d d
k
i
k
i ik
k
i
k
i
dt t d d t v
1
0
1
) )( ( IWT
time
Route i
k
-
t
h

b
u
s

Transit Scheduling: Characterization (III)
Waiting time for transferring passengers
time
Route i
k

Route j
l

=

=
i
i j
j k l
k
ij
k
i
l
j
kl
ij
a d e o ) ( TT
Transit Scheduling: Formulation (I)
) .( ) .( Minimize
2 1
TT N IWT N +
Subject to
i j l k j i T a d
k i h a a
i j k j i
i j k j i M a d
k i s a d
k i s a d
kl
ij
k
i
l
j
i
k
i
k
i
kl
ij
kl
ij
k
i
l
j
i
k
i
k
i
i
k
i
k
i
= s
s
= =
= > +
>
s

, , , , ) (
,
, , , 1
, , , , 0 ) 1 ( ) (
,
,
1
min
max
o
o
o
l
l
Transit Scheduling: Formulation (II)
The MP formulation is an NLMIP problem. Efficient
solution techniques do not exist.
A GA formulation was attempted to solve this and
similar problems. The general characteristics of
the formulation are:
(a) Headway and stopping times used as variables
(b) Variables d are computed through external
procedures
(c) Binary coding, single point crossover, and
bitwise mutation used
(d) One set of constraints remained; these were
handled using penalty functions
Transit Scheduling: Results (I)
3 routes, 8-10-12
buses, only IWT
3 routes, 8-10-12
buses, TT+IWT
Transit Scheduling: Results (II)
3 transfer stations, 6
routes, 10-12-8-12-8-10
buses, TT+IWT
R1
R5
R4
R3
R2
R6
S3
S2
S1
Transit Scheduling: Results (III)
3 routes, fleet
distribution unknown,
only IWT
3 routes, fleet
distribution unknown,
TT+IWT
Thats it !!!!!


Thank you

You might also like