Upload
others
View
8
Download
0
Embed Size (px)
Citation preview
IN DEGREE PROJECT MATHEMATICS,SECOND CYCLE, 30 CREDITS
, STOCKHOLM SWEDEN 2018
Automating and optimizing pile group design using a Genetic Algorithm
ARIAN ABEDIN
WOLMIR LIGAI
KTH ROYAL INSTITUTE OF TECHNOLOGYSCHOOL OF ENGINEERING SCIENCES
Automating and optimizing pile group design using a Genetic Algorithm
ARIAN ABEDIN WOLMIR LIGAI Degree Projects in Optimization and Systems Theory (30 ECTS credits) Degree Programme in Industrial Engineering and Management (120 credits) KTH Royal Institute of Technology year 2018 SupervisorS at Tyréns AB: Mahir Ülker-Kaustell Supervisor at KTH: Per Enqvist Examiner at KTH: Per Enqvist
TRITA-SCI-GRU 2018:259 MAT-E 2018:57
Royal Institute of Technology School of Engineering Sciences KTH SCI SE-100 44 Stockholm, Sweden URL: www.kth.se/sci
Abstract
In bridge design, a set of piles is referred to as a pile group. The design
process of pile groups employed by many firms is currently manual, time
consuming, and produces pile groups that are not robust against place-
ment errors.
This thesis applies the metaheuristic method Genetic Algorithm to auto-
mate and improve the design of pile groups for bridge column foundations.
A software is developed and improved by implementing modifications to
the Genetic Algorithm. The algorithm is evaluated by the pile groups it
produces, using the Monte Carlo method to simulate errors for the pur-
pose of testing the robustness. The results are compared with designs
provided by the consulting firm Tyrens AB.
The software is terminated manually, and generally takes less than half
an hour to produce acceptable pile groups. The developed Genetic Al-
gorithm Software produces pile groups that are more robust than the
manually designed pile groups to which they are compared, using the
Monte Carlo method. However, due to the visually disorganized designs,
the pile groups produced by the algorithm may be difficult to get ap-
proved by Trafikverket. The software might require further modifications
addressing this problem before it can be of practical use.
Sammanfattning
.
Inom brodesign refereras en uppsattning palar till som en palgrupp. Vid
design av palgrupper tillampar for tillfallet manga firmor manuella och
tidskravanade processer, som inte leder till robusta palgrupper med avse-
ende pa felplaceringar.
Denna avhandling tillampar en metaheuristisk metod vid namn Gene-
tisk Algoritm, for att automatisera och forbattra designprocessen gallande
palgrupper. En mjukvara utvecklas och forbattras stegvis genom modifi-
kationer av algoritmen. Algoritmen utvarderas sedan genom att Monte
Carlo simulera felplaceringar och evaluera de designade palgruppernas ro-
busthet. De erhallna resultaten jamfors med fardig-designade palgrupper
givna av konsultforetaget Tyrens AB.
Den utvecklade mjukvaran avbryts manuellt och kraver generellt inte mer
an en halvtimme for att generera acceptabla palgrupper. Den utvecklade
algoritmen och mjukvaran tar fram palgrupper som ar mer robusta an
de designade palgrupperna vilka dem jamfors med. Palgrupperna som
skapats av den utvecklade algoritmen har en oordnad struktur. Saledes
kan ett godkannande av dessa palgrupper fran Trafikverket vara svart att
fa och ytterligare modifikationer som atgardar detta problem kan behovas
innan algoritmen ar anvandbar i praktiken.
Acknowledgements
First and foremost, we would like to express our greatest gratitude and
appreciation to Mahir Ulker-Kaustell, our supervisor at Tyrens AB, who
formulated the problem treated in this thesis and whose help and guid-
ance throughout the work has been of utmost importance. Without him,
this thesis would not have been possible.
Further, we would like to thank Anna Jacobson, head of the bridge de-
partment at Tyrens AB, who gave us the opportunity to work with this
interesting problem.
We also want to thank our supervisor at KTH Royal Institute of Technol-
ogy, Per Enqvist, for his support and for allowing us to treat the problem
presented in this thesis. His feedback on the report has been especially
valuable.
Finally, we would like to thank our families for their unwavering support
throughout this work, and so much more.
Contents
1 Introduction 1
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Purpose and scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Outline of the thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Mathematical model 6
2.1 Pile group analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Mathematical pile group model . . . . . . . . . . . . . . . . . . . . . 6
2.3 Combining loads to calculate pile forces . . . . . . . . . . . . . . . . . 9
3 Optimization and the Genetic Algorithm 13
3.1 Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.1.1 Optimization problems . . . . . . . . . . . . . . . . . . . . . . 14
3.1.2 Size and complexity . . . . . . . . . . . . . . . . . . . . . . . . 14
3.1.3 Optimization methods . . . . . . . . . . . . . . . . . . . . . . 15
3.2 Metaheuristic methods . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2.1 Genetic Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2.2 Ant Colony Optimization . . . . . . . . . . . . . . . . . . . . 16
3.2.3 Particle Swarm Optimization . . . . . . . . . . . . . . . . . . 17
3.2.4 Basic Local Search . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2.5 Iterated Local Search . . . . . . . . . . . . . . . . . . . . . . . 17
3.2.6 Simulated Annealing . . . . . . . . . . . . . . . . . . . . . . . 18
3.2.7 Tabu Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2.8 Choice of metaheuristic . . . . . . . . . . . . . . . . . . . . . . 18
3.3 Genetic Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3.1 Population and generation . . . . . . . . . . . . . . . . . . . . 21
3.3.2 Fitness value . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3.3 Elite clones . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
i
3.3.4 Crossover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.3.5 Mutation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4 Implementation of GA 26
4.1 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.2 Using the Genetic Algorithm . . . . . . . . . . . . . . . . . . . . . . . 27
4.2.1 Pile cap as a grid . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.2.2 Initial population . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.2.3 Fitness function . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.2.4 Pile distance constraints . . . . . . . . . . . . . . . . . . . . . 31
4.2.4.1 Pile head distance constraints . . . . . . . . . . . . . 31
4.2.4.2 Pile body distance constraints . . . . . . . . . . . . . 31
4.2.5 Problem formulation . . . . . . . . . . . . . . . . . . . . . . . 33
4.2.6 Elite clones . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.2.7 Crossover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.2.8 Mutation operator and mutation rate . . . . . . . . . . . . . . 38
4.3 Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5 Development and evaluation of the software 41
5.1 Fitness functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.2 Crossover changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.3 Mutation rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.4 Discretization of the variables . . . . . . . . . . . . . . . . . . . . . . 46
5.5 Error simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6 Results 49
6.1 Results for pile groups produced by GA . . . . . . . . . . . . . . . . . 49
6.2 Gradual improvement of GA pile group - 22 piles . . . . . . . . . . . 53
7 Discussion 56
7.1 GA software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
8 Conclusions and suggestions for future research 60
8.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.2 Suggestions for future research . . . . . . . . . . . . . . . . . . . . . . 60
A List of Figures 62
ii
B Division of labor 83
B.0.1 Mathematical model . . . . . . . . . . . . . . . . . . . . . . . 83
B.0.2 Genetic Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 83
B.0.3 Development and evaluation of the software . . . . . . . . . . 84
B.0.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
B.0.5 Discussion, conslusion and future research . . . . . . . . . . . 85
Bibliography 86
iii
Chapter 1
Introduction
Bridges are structures built in order to provide passage over a river, chasm, road, or
other obstacles. In order to provide a passage, naturally bridges have to be able to
withstand the forces acting on the bridge in normal circumstances. For this purpose,
a deep foundation is utilized when the soil is weak and compressible. The deep
foundation transfers these forces to the bedrock beneath the soil, which provides the
necessary stability [4]. Such a foundation is comprised of a number of piles going
from the bedrock up to a concrete block on the bottom of a bridge column, referred
to as a pile cap. Safely transferring forces to the bedrock requires the piles to be
positioned on the pile cap in such a way that they can tolerate forces in all directions
that may occur, given all possible event scenarios for the bridge [25]. This leads to
the problem of designing a group of piles with respect to their position on the pile
cap, their angles relative the pile cap, pile lengths and the number of piles used. An
image of the relevant parts in a bridge structure is presented in Figure 1.1.
Figure 1.1: Basic bridge structure.
1
A configuration of piles is referred to as a pile group. The distribution of forces
amongst these piles is highly sensitive to pile head positions, pile lengths, pile angles
and the number of piles present. Forces acting on the piles arise from different types
of varying loads, such as traffic, wind and thermal effects. Permanent loads on the
bridge structure, arising due to the structure’s own weight, are also present.
These variable and permanent loads are combined according to some specified rules,
and the most unfavorable load combination for each pile is determined, yielding the
corresponding pile forces for the entire pile group. As each pile is constrained to
tolerate a maximum force and a minimum force, the requirement on each pile group
is that the forces acting on any pile do not exceed the tolerable amount of force in the
most unfavorable load situation [25]. For clarity, an image of a basic pile is displayed
in Figure 1.2 [1].
Figure 1.2: Pile and its main components.
2
1.1 Background
Tyrens AB is a consulting firm in the civil engineering market and it is in their in-
terest to effectivate the design process of pile groups. When designing a pile group,
Tyrens currently employs heuristic and manual techniques, which are time consuming
and require experience and knowledge in pile group design in order to obtain feasible
configurations. This results in a lengthy process of trial and error in order to obtain
a pile group design that is acceptable.
Automation of the pile group design process resulting in a feasible design would
be highly preferable. Heuristic approaches result in pile groups that are feasible in
regards to the forces present but do not necessarily ensure optimality with respect
to robustness. Factors such as variations in soil properties can cause the piles to
occasionally deviate from the designed angles and positions during the process of
driving piles into the earth. Due to these deviations, piles cannot be driven into the
ground with high precision. An example of a deviation in pile angle is shown in Figure
1.3.
Figure 1.3: Left image; designed pile group. Right image; actual pile group driveninto the bedrock. The angle of the right-most pile in the actual pile group is differentcompared to the design. Exaggerated for clarity.
As such, pile heads connect to the pile caps at a different position than specified, or
point at a different angle than intended. These deviations require a re-assessment of
the pile group and may in some cases require driving in additional piles, or even re-
quire a modification to the pile cap in order to increase its size. Such actions lengthen
3
the foundation laying process as well as increase the costs. Therefore, it is desirable
for the initial pile group designs to be more robust against the aforementioned devi-
ations, i.e. remain feasible in terms of pile forces and distances between piles. This
would reduce the costs of laying foundation for bridges and similar structures and
improve the safety of such structures.
Previous research on pile groups for various purposes have used the optimization
method Genetic Algorithm. In addition, the Genetic Algorithm has been shown to
require less computing time than some alternative methods for a similar problem [3].
Discussion on comparisons with other metaheuristic methods is presented in Section
3.2. Based on past research and comparisons to other metaheuristic methods, the
Genetic Algorithm is elected for solving this problem.
1.2 Purpose and scope
The purpose of this thesis is to automate the design of feasible pile groups by use
of a Genetic Algorithm, and optimize pile groups with regards to robustness within
practical time limits. The algorithm is to be developed in MATLAB as a software,
and modifications are made to more effectively solve the problem. Monte Carlo
simulations will be run on the pile groups produced by the Genetic Algorithm in
order to evaluate their robustness.
1.3 Outline of the thesis
The outline of this thesis is the following;
In Chapter 2, the mathematical model describing the pile groups will be presented.
In Chapter 3, optimization theory will be discussed briefly and an analysis of meta-
heuristic methods and the Genetic Algorithm is given.
In Chapter 4, the implementation of the Genetic Algorithm for this specific problem
and the problem formulation is presented.
4
In Chapter 5, the GA software is modified and evaluated with regards to algorithm
efficiency.
In Chapter 6, the produced results are presented.
In Chapter 7, a discussion of the problem and the results is presented.
Lastly in Chapter 8, conclusions drawn regarding the work are stated and suggestions
for future research are presented.
5
Chapter 2
Mathematical model
In this chapter, the mathematical model describing the pile groups and the arising
pile forces given a set of load combinations is formulated. A short introduction will
be given in Section 2.1 and the mathematical model is formulated in Section 2.2 and
Section 2.3.
2.1 Pile group analysis
Various events taking place in the proximity of a bridge are considered, and every
event gives rise to various forces acting on the bridge and therefore the supporting
columns. One event can simply be a car decelerating on the bridge, while another
could be a strong wind blowing from a certain angle. The forces acting on the columns
are computed for each event, and these events are used to calculate potential forces
onto the piles [25].
Each pile can tolerate a certain amount of force, and by testing several different
events, it is possible to calculate the maximal and minimal forces acting on any given
pile, for any considered combination of events. These maximal and minimal forces
acting upon a pile will have to be within the tolerable force levels, defined later in
this chapter, which would imply the ability of the bridge to withstand the considered
events.
2.2 Mathematical pile group model
In this section, the mathematical computations necessary to obtain the maximal and
minimal forces acting on individual piles are presented. The calculations are divided
into two parts, one for computing permanent forces arising due to the weight of the
6
construction itself, and one for computing the variable forces. Both types of forces are
thereafter combined to create forces for different load combinations. This yields the
maximal and minimal forces acting on an individual pile, given the most unfavorable
load combinations [25].
The forces acting on a single pile are dependent on pile head positions in the xy-plane
of the pile cap, pile tilt, rotation angles as well as the number of piles in the pile group.
Therefore, the transformation of forces from the bridge column to any specific pile
head is dependent on the arrangement of all the piles in the physical system.
The aforementioned pile properties define an individual pile i, and are used to deter-
mine the robustness and feasibility of the pile group. The coordinates of each pile
foot are calculated as
(xf,i, yf,i, zf,i) = (xh,i, yh,i, zh,i) + Li · (sin θi cosφi, sin θi sinφi, cos θi), (2.1)
where (xh,i, yh,i, zh,i) is the location of pile head i on the pile cap, Li is the length of
pile i, θi is the pile tilt angle of pile i and φi is the rotation angle of pile i. Next, the
bedrock at the feet of the piles is represented by the plane equation
ax+ by + cz + d = 0. (2.2)
Since each pile foot coordinate (xf,i, yf,i, zf,i) should lie on the bedrock, (2.1) is com-
bined with (2.2), yielding
a(xh,i + Li sin θi cosφi) + b(yhi + Li sin θi sinφi) + c(zhi + Li cos θi) + d = 0. (2.3)
Solving (2.3) for Li results in
Li =−(axh,i + byh,i + czh,i) + d
a sin θi cosφi + b sin θi sinφi + c cos θi. (2.4)
The piles are modelled as compressible springs with one degree of freedom along their
length, so it it necessary to calculate their stiffness. The stiffness matrix for each
individual pile is given as
Ki =AE
Li
dx2i dxidyi dxidzidxidyi dy2i dyidzidxidzi dyidzi dz2i
(2.5)
where A is the cross sectional area of a pile, E is the Young’s modulus of the pile
material which describes tensile elasticity, and dxi = sin θi cosφi, dy = sin θi sinφi
7
and dz = cos θi describe the stiffness along the three axes for each pile i. Since the
piles all have the same properties, A and E are the same for all piles. Ki, i = 1, . . . n
are combined on the diagonal elements of a large sparse matrix K to create a stiffness
matrix for all piles
K =
K1 0 · · · 00 K2 · · · 0...
.... . .
...0 0 · · · Kn
(2.6)
where n is the number piles.
The transformation of forces from the point of applied force on the pile cap to the
pile heads is performed using a constraint matrix. These constraints define the rigid
body connection between the bridge column, or the point of applied force, and the
pile heads. The connection is between three degrees of freedom (d.o.f.) of translation
from the column, and six d.o.f. at the pile heads. Since there are more d.o.f. than
constraint equations, the constraint matrix has more columns than rows [10]. The
constraint matrix is defined as
C =
I3x3 0 0 0 −I3x3 c1
0 I3x3 0 0 −I3x3 c2...
.... . .
......
...0 0 0 I3x3 −I3x3 cn
(2.7)
where ci is
ci =
0 zh,i −yh,i−zh,i 0 xh,iyh,i −xh,i 0
. (2.8)
The matrix (2.7) is then partitioned into an invertible and non-invertible part, cor-
responding to constraints to be retained and constraints to be ‘condensed’ out. This
is performed because the solution would not be unique due to the equation system
having more d.o.f. than equations [10]. The partition looks like
C =[Cc Cr
]=[I Cr
]. (2.9)
As such, the solution to the constraint equations defined by the matrix are given by
T =
[−C−1
c ·Cr
I6×6
]=
[−Cr
I6×6
](2.10)
8
which is used as a transformation matrix
Kr = T TKT , (2.11)
and is further transformed into a Green’s matrix by
DG = TK−1r . (2.12)
Finally, to calculate the forces on the pile heads for small position shifts of the pile
heads, the transformation is
Fp,i =AE
Li
[1 −1
] [dxi dyi dzi0 0 0
]DG,i. (2.13)
The rows of DG that correspond to a given pile i are denoted DG,i. The transfor-
mation (2.12) is a 1× 6 vector calculated for each pile, and therefore the full matrix
with n piles is
Fp =
Fp,1Fp,2
...Fp,n
. (2.14)
Fp is a matrix that linearly translates forces from the bridge column to forces affecting
any individual pile connected to the pile cap. Since pile positions and angles are the
only varying values that are used to obtain this matrix, the translation of forces is
directly related to the configuration of piles.
2.3 Combining loads to calculate pile forces
For any given bridge column to be considered, there is a set of possible loads. Some
of these loads are permanent such as the bridge’s own weight, and some loads are
variable depending on which events occur on the bridge such as cars driving by or a
strong wind blowing in a certain direction.
Each possible load, both permanent and variable, have varying strengths ψ, often
ranging from 0.6 to 1.5, depending on the severity of the event. This is used to
express a variance for the strength of the loads. The varying intensities are taken
into account, and several such loads are combined to create a hypothetical event for
a bridge. The loads are expressed as a matrix with forces in each of the Cartesian
coordinates, moments, intensities and an indicator for whether the corresponding load
is a permanent load or a variable one.
9
F =
Fx Fy Fz Mx My Mz ψmax ψmin PermanentFx Fy Fz Mx My Mz ψmax ψmin Permanent...
......
......
......
......
Fx Fy Fz Mx My Mz ψmax ψmin VariableFx Fy Fz Mx My Mz ψmax ψmin Variable
Each hypothetical event is expressed as a combination of several forces and moments
F in the three Cartesian coordinates [25]. The transformation of forces is linear at
this point;
Fpile = F · Fp (2.15)
where F is a combination of forces matrix and Fp is the force transformation matrix
in (2.14). Hence, the forces Fpile acting on the piles are computed. All such Fpile are
calculated, and the greatest as well as the lowest values are determined.
In order to only assess the cases that lead to maximal or minimal forces, ψ is assigned
the value that results in the most disadvantageous contribution of each load. If a
variable load is actually advantageous, that load is not considered in the combination.
This process is visualized in Algorithm 1 below.
10
Algorithm 1 Combining loads
1: procedure Permanent loads2: TotalPermMax = 03: TotalPermMin = 04: for i = 1 to piles do5: ForcesPerm = F · Fp(i)6: for j = 1 to permanent loads do7: PermMax = max(ForcesPerm)8: PermMin = min(ForcesPerm)9: end for10: TotalPermMax = TotalPermMax + PermMax · ψmax11: TotalPermMin = TotalPermMin + PermMin · ψmin12: end for13: end procedure14: procedure Variable loads15: TotalVarMax = 016: TotalVarMin = 017: for i = 1 to piles do18: ForcesVar = F · Fp(i)19: for j = 1 to variable loads do20: VarMax = max(ForcesVar)21: VarMin = min(ForcesVar)22: end for23: if VarMax·ψmax > 0 then24: TotalVarMax = TotalVarMax + VarMax · ψmax25: end if26: if VarMin·ψmin < 0 then27: TotalVarMin = TotalVarMin + VarMin · ψmin28: end if29: end for30: end procedure31: procedure Combine loads32: PileForcesMax(i) = TotalPermMax(i) + TotalVarMax(i)33: PileForcesMin(i) = TotalPermMin(i) + TotalVarMin(i)34: end procedure
The resulting objects PileForcesMax and PileForcesMin are matrices of size n × n
where n is the number of piles, see (2.16) and (2.17). The diagonal of the matrices
corresponds to the maximal and and minimal forces for each pile, and the diagonal
elements are always the worst forces for their piles. Each row shows the forces onto
all the piles, given the load combination that gives the maximal or minimal forces for
the pile corresponding to the diagonal element of the row.
11
PileForcesMax =
Fmax1,1 Fmax
1,2 Fmax1,3 · · · Fmax
1,n
Fmax2,1 Fmax
2,2 Fmax2,3 · · · Fmax
2,n...
......
. . ....
Fmaxn,1 Fmax
n,2 Fmaxn,3 · · · Fmax
n,n
(2.16)
In this case, Fmax1,1 would be the maximal force that pile 1 would be subjected to.
Then Fmax1,2 , Fmax
1,3 , · · · , Fmax1,n are the forces acting on piles 2, 3, · · · , n for the same
load combination. Fmax2,2 on the next row is the maximal force acting on pile 2, and
no other row has a larger force on pile 2. Fmax2,2 ≥ Fmax
i,2 ,∀i = 1, · · · , n.
PileForcesMin =
Fmin1,1 Fmin
1,2 Fmin1,3 · · · Fmin
1,n
Fmin2,1 Fmin
2,2 Fmin2,3 · · · Fmin
2,n...
......
. . ....
Fminn,1 Fmin
n,2 Fminn,3 · · · Fmin
n,n
(2.17)
Similarly, Fmin1,1 is the minimal force acting on pile 1, Fmin
2,2 the minimal force acting
on pile 2 and so on.
These greatest and lowest force values are required to be within a certain interval of
tolerable force values for the piles to withstand the loads. Since only the diagonal
elements are considered, Fi,i will be referred to as Fi. In this thesis, the interval of
tolerable forces is
0 ≤ Fmini < Fmax
i ≤ 1000 kN, i = 1, . . . , n (2.18)
The lower bound in the interval exists partially to avoid tension in a pile, since
concrete has a low tensile strength [2], and partially because piles are divided into
sections and any pulling force might cause them to disjoint.
12
Chapter 3
Optimization and the GeneticAlgorithm
In this chapter, the mathematical prerequisites that describe optimization, meta-
heuristics and the Genetic Algorithm are presented.
In Section 3.1, mathematical optimization theory is discussed. Thereafter, in Sec-
tion 3.2, metaheuristic methods are presented. Lastly, in Section 3.3, the Genetic
Algorithm is presented in-depth.
3.1 Optimization
Optimization is the selection of the best elements for the purpose of maximizing or
minimizing the value of a certain function, under a set of constraints (or in some
cases no constraints), which limit the selection of elements. The overall selection is
evaluated by a function specific to a problem, called the objective function, and the
value of this function is to be maximized or minimized [15]. In general, a constrained
optimization problem can be defined mathematically as [18]
minimize f(x)
subject to hi(x) = 0, i = 1, 2 . . . ,m
gj(x) ≤ 0, j = 1, 2 . . . , p
x ∈ S.
where x =[x1 x2 ... xn
]is an n-dimensional vector of unknown decision or selec-
tion variables and f , hi and gj are real-valued functions of the variables in x. S is a
subset of n-dimensional space. The function f is the objective function while hi, gj
and S represent the constraints.
13
3.1.1 Optimization problems
As previously mentioned, optimization problems can be constrained or unconstrained.
Constraints imposed on a problem can be comprised of either simple bounds on the
decision variables, or complex equalities and inequalities modeling the relationship
between these variables [20].
The mathematical functions that model a system also determine the type of the
corresponding optimization problem. For example, a linear program (LP) is an op-
timization problem in which the objective function is linear in the unknowns, and
the constraints are comprised of linear equalities and inequalities [18]. Other com-
mon types of problems include quadratic programming (QP), in which the objective
function is quadratic in the unknowns and the constraints are linear, and nonlinear
programming (NLP), where at least one of the functions is nonlinear. The word pro-
gramming here does not refer to computer programming, but is instead a synonym
for planning [15].
Mathematical optimization problems can also be stochastic or deterministic, as well
as continuous or discrete. Stochastic programming is applied to probabilistic models
of uncertainty, where some of the parameters and data involved are uncertain or
unknown, while deterministic optimization problems involve known parameters [22].
Models in which some or all variables take on a discrete set of values are known as
mixed integer programs (MIP) or pure integer programs respectively.
3.1.2 Size and complexity
The amount of computational resources required to solve an optimization problem is
determined by its time and space complexity. Time complexity involves the number
of iterations or search steps necessary to solve the problem, where each iteration takes
a fixed amount of time, while space complexity involves the amount of memory on
a computer necessary to solve the problem [21]. The complexity of an optimization
problem depends on its size, i.e. the number of decision variables, the size of the solu-
tion space, the type of objective function and constraints, and is also closely related
to the complexity of the algorithm that is used, and many algorithms are tailored to
a particular type of problem.
14
Computation problems in general can be divided into sets of complexity classes, de-
pending on the asymptotic behavior of the computational resources necessary to solve
the problem. For example, the complexity class P (polynomial) involves problems
that can be solved with an algorithm with polynomial time complexity in a worst
case scenario. This means that the time necessary to solve problems of complexity
class P is bounded by a polynomial function O(nk). Thus, for all problems in P, there
exists an algorithm that can solve the problem in time O(nk), for some k. Problems
in other complexity classes, such as NP, are treated in a similar manner [21].
3.1.3 Optimization methods
For many problems, it may not be possible to use analytical methods to solve for
a global optimal solution, and reasonably feasible and optimal solutions, i.e. local
optima, will have to suffice [15]. If a given problem is too large and complex, methods
that intelligently search through the solution space may be employed, instead of ana-
lytical methods [18]. Heuristic and metaheuristic methods are some such procedures.
3.2 Metaheuristic methods
A heuristic method is a procedure that is likely to discover a good solution which is
not necessarily optimal, for a specific problem being considered [15]. The procedure
is often an iterative algorithm where each iteration attempts to find a better solution
than found previously. Heuristic methods are often based on common sense on how
to search for a good solution [15]. They are important tools for problems that are
too complicated to be solved analytically, because such methods are utilized to find a
feasible solution that is reasonably close to being optimal. Metaheuristic methods, or
metaheuristics, are heuristic methods developed to be a general solution method that
can be applied to a variety of different problems rather than designed to fit a specific
one [15]. These are useful for avoiding having to develop new heuristic methods to
fit a problem that cannot be solved optimally.
Blum and Roli (2003) summarize metaheuristic methods into the following points:
• Metaheuristics are strategies that ”guide” the search process.
• The goal is to efficiently explore the search space in order to find (near-) optimal
solutions.
• Techniques which constitute metaheuristic algorithms range from simple local
search procedures to complex learning processes.
15
• Metaheuristic algorithms are approximate and usually non-deterministic.
• They may incorporate mechanisms to avoid getting trapped in confined areas
of the search space.
• The basic concepts of metaheuristics permit an abstract level description.
• Metaheuristics are not problem-specific.
• Metaheuristics may make use of domain-specific knowledge in the form of heuris-
tics that are controlled by the upper level strategy.
• Today’s more advanced metaheuristics use search experience (embodied in some
form of memory) to guide the search [6].
There are many popular and tried metaheuristic methods, and some of the most
noteworthy ones will be described in short. Metaheuristics can be divided into groups
using various criteria. Here, they are divided into population-based methods and
trajectory methods.
3.2.1 Genetic Algorithm
The Genetic Algorithm, henceforth sometimes referred to as GA, is one metaheuristic
among several others based on evolution, such as Evolutionary Programming, Evolu-
tionary Computation and Evolution Strategies. The Genetic Algorithm is a stochastic
search-based optimization algorithm inspired by the process of evolution by means of
natural selection, primarily fit for nonlinear optimization problems, where gradient-
based methods cannot be applied due to lack of smoothness of the objective function
[13, 12]. The algorithm makes use of processes such as selection, crossover, and mu-
tation to improve upon a set of solutions and converge towards an optimal solution.
Each solution consists of a set of properties, and it is through manipulation of these
properties that the Genetic Algorithm can converge towards a good solution [16]. Due
to the use of a set of solutions, it can be described as a population-based method.
3.2.2 Ant Colony Optimization
Ant Colony Optimization, or ACO, is an algorithm based the behavior of ants when
finding the shortest path to an objective. It is performed by defining a completely
connected graph whose vertices are components to a solution, with paths between
vertices. The solutions are often limited to completely feasible solutions. ACO utilizes
artificial ants to walk through the graph, and these ants leave behind a pheromone
trail based on the fitness of the solution. The vertices the ants walk through are
combined into a solution. The pheromone trail affects the other ant’s probability of
16
choosing a path, but this pheromone trail becomes weaker over time if no ant had
walked over it again [6]. This creates a search method that attempts to find most
popular path, which corresponds to a solution. As there must be several ants, ACO
is also a population-based method [5].
3.2.3 Particle Swarm Optimization
The Particle Swarm Optimization method is inspired by migrating flocks of birds
attempting to reach a destination. One solution is one bird, and the flock is spread
out over an area. The flock attempts to fly the path that the bird closest to the
destination took, and so in PSO, each solution attempts to mimic the best solution.
On the way to the best solution, each solution estimates its own area for possible
improvements [11]. This would allow the PSO to scan a large area, but collectively
search towards a certain direction.
3.2.4 Basic Local Search
Basic Local Search is also called Iterative Improvement, and is one of the most basic
metaheuristics. It works by testing solutions near its current solutions, and moving
to the solution that is better than its current one. Selection of fitness can be dif-
ferent, such as picking the first good local solution found or the best local solution.
Since this algorithm always gets stuck in the first local optimum, its performance is
unsatisfactory [6]. Instead, it can be modified or combined with other metaheuristics.
3.2.5 Iterated Local Search
Iterated Local Search is a general trajectory method and due to its simplicity and
generality, it can be combined with other metaheuristics [6]. It starts from an initial
point and performs a local search to find a local optimum. Once such an optimum
is found, the algorithm perturbs the solution and continues with a local search. If
another local optimum is found, it perturbs the best of these optima and continues.
The perturbations must be random, but must also be neither too strong nor too weak.
A strong perturbation would essentially make this algorithm a restarting local search
while a weak one would not allow it to leave the proximity of its first local optima
[6, 12].
17
3.2.6 Simulated Annealing
Simulated Annealing is an algorithm that allows moves resulting in worse solutions
than the current one, with the goal to eventually find a global optimum. It starts
with an initial solution and a so-called temperature parameter T . At each iteration,
a new solution is randomly sampled and evaluated based on the current solution,
the new solution, and T . The new solution is accepted if it has a better objective
function value, but worse solutions are also accepted with a certain probability. This
probability depends on T , and a higher T results in a higher probability [6, 12].
The temperature T is decreased during the search process, which leads the algorithm
to initially explore the feasible space but converge towards better solutions as T is
decreased. The rate at which T decreases is important to the convergence towards a
global optimum [6, 12].
3.2.7 Tabu Search
Any application of Tabu Search includes a local search procedure as a subroutine
[15]. It performs a search in close proximity to its current solution, and picks a
direction where the new solution is an improvement. The key strategy of Tabu Search
is allowing moves that do not improve upon the solution. This algorithm has a
risk of leaving a local optimum only to move back towards it. For that purpose,
Tabu Search has a list of forbidden moves in a list called a ”tabu list”. This would
theoretically prevent an algorithm from going in circles, and instead move towards
a global optimum [15, 12]. Often times it is impractical to implement a tabu list of
complete solutions because managing such large data is inefficient. Solution attributes
are stored instead, which is components belonging to solutions, moves, or differences
between two solutions [6]. This creates a problem where an attribute can forbid
solutions that were not visited. A solution to this problem is the creation of aspiration
criteria that allow the algorithm to move towards a forbidden solution if it meets an
aspiration criterion [6]. One such criterion is selecting solutions that are better than
the current best one.
3.2.8 Choice of metaheuristic
Although there are several algorithms fit for the purpose of optimizing problems that
are too large and complex to be solved analytically, the nature of this problem makes
certain algorithms unfit to be considered. Exhaustive treatment of the complexity
and nature of the problem treated in this thesis will be presented in Chapter 4.
18
• Simulated Annealing is potentially a good algorithm for finding a global
optimum, but it is very dependent on the speed of reduction of T . The optimal
speed is unknown and should be tested, but a speed too low would take longer
time than otherwise necessary with other algorithms. This is because a low
speed would be similar to a brute force method of randomly finding optima. It
would be more desirable to use a method that does not need a lot of testing
and altering due to slight changes in the problem, such as analyzing different
pile groups.
• Tabu Search would need to keep track of tabu lists. However, for problems
that are nonlinear, discrete and complex, the risks of forbidding unexplored so-
lutions that share an attribute with an explored solution is high. Minor changes
can have major effects in this problem, and therefore, unintentionally forbidding
any unexplored solutions is viewed as a weakness. Although aspiration criteria
would offset this, this algorithm would be similar to the population-based meth-
ods but without any population. As such, Tabu Search would have a tendency
to get stuck in a local optimum and have a difficult time finding the local path
towards an improvement.
• The Iterated Local Search would be a good method for finding local optima.
One weakness is that perturbations cannot be too strong or too weak, which
results in a similar problem to Simulated Annealing, since this would require
testing and altering the perturbations for different pile groups. However, due
to its simplicity, the perturbations may be left to random chance, and the algo-
rithm could occasionally find the right perturbation strength randomly. Since
the Iterated Local Search is quick in terms of computing time, having several
too weak or too strong perturbations does not necessarily result in extreme
computing times.
• PSO performs very well in some types of problems [11]. In problems similar
to the one treated in this thesis however, there is no general direction towards
which all solutions could migrate. Attempting to mimic the best solution could
either converge all solutions towards the same local optimum or not improve
the solutions at all. Since pile forces have to be evaluated as a whole pile group,
mimicking a few of the piles from the best solution will not necessarily result in
any improvement if the other piles are not compatible with the mimicked piles.
19
• ACO results in a needlessly complicated and convoluted implementation. Using
ACO, the artificial ants pick a random trail on a graph to the end, and an entire
path is one solution. To define the pile group problem as a graph, it would be
necessary to create a much larger graph than the problem itself, to account
for all possible pile positions and angles. In addition, the order in which the
solutions are created is irrelevant, since pile groups are evaluated when all piles
are assigned. Therefore, ACO is deemed impractical for larger cases of the
described problem. Combined with the fact that graphs are typically made to
take only feasible solutions into account, ACO would not be fit for this problem.
• GA-studies with different objectives have been performed on pile group prob-
lems [3, 7, 8, 17], which encourages the choice of GA for the problem treated in
this thesis. The algorithm produces satisfactory solutions for problems of this
nature, and is in general an acceptable technique for difficult problems where
classic optimization methods fail due to unsteadiness, non-differentiable func-
tions, noise, and other factors [16]. Developing a GA software tailored to this
specific problem is expected to improve the computing speed over the general
GA.
Another aspect in which GA differs from many other algorithms is how well it
finds local optima. For the described problem, finding a global optimum is not
necessary and it is enough to find as good of a local optimum as reasonably
possible. GA is fit for solving problems with many local optima [16], but the
algorithm does not know whether a solution is globally optimal or not. There
are several proposed modifications to GA that may increase the probability of
finding a global optimum [16].
If finding a global optimum is of utmost importance, using metaheuristic meth-
ods such as Simulated Annealing [27] might be a decent choice, although in this
particular problem, doing so would require a lot of time due to the large solution
space. Thus, GA offers a compromise between time and result, although are
some problems in which the algorithm performs worse in both time and result
than other metaheuristics [11], which implies potential for improvement using
another metaheuristic.
20
3.3 Genetic Algorithm
For the reasons mentioned above, the choice of GA for solving this problem is deemed
justified. The remainder of this chapter is dedicated to explain the algorithm.
3.3.1 Population and generation
In GA, a population is a group of solutions, also referred to as individuals [16]. For a
given optimization problem, a group of potential solutions is initially generated, i.e.
the first generation. This generation is far from an optimum and does not necessarily
have to be feasible, but serves as a beginning to a long chain of generations that will
eventually converge towards an optimum. Thus, a generation is the population in a
particular iteration.
3.3.2 Fitness value
Within a population, each solution or individual has a corresponding fitness value
calculated with a fitness function [19]. The fitness value indicates how good, or fit,
a solution is. Solutions with better fitness values have a higher chance to be used
in crossovers, and the very best solutions in a generation may be cloned to the next
generation.
3.3.3 Elite clones
Within each population, some number of the most fit solutions are chosen to carry
over to the next generation of solutions as clones. These solutions guarantee that the
best fitness value of each generation will either be maintained from one generation
to another or improved upon, while providing properties of higher quality within a
population. An example of two elite clones carrying over from one generation to the
next is shown in Figure 3.1.
Figure 3.1: Elite clones (E) carrying over to the next generation. The P’s representparents and the C’s represent their children.
21
3.3.4 Crossover
Crossover is a reproduction function. Within each generation, a smaller group of
solutions is selected to combine their properties in order to create new solutions, and
these new solutions are considered a new generation. The crossover group is called
parents, and the ”genes” of two (or more) such parents are combined in a randomized
way to produce one (or more) new solution, their child [26]. It is these children that
make up a new generation, and since parent solutions mostly have good fitness values,
the new generation is expected to be better in terms of fitness.
The crossover is a convergence operator which directs solutions towards local optima,
since the the more ”fit” parents have a higher chance of producing children and thus,
future descendants will share similarities. The time performance of GA as well as
the avoidance of premature convergence is highly impacted by the particular choice
of crossover technique. [26]. Two common examples are given below:
1. The k-point crossover randomly selects k shared crossover points in the chromo-
some strings of two parents, and the data between the crossover points is swapped
and combined to produce two new children [26]. A simple example is shown in
Figure 3.2.
Figure 3.2: Illustration of the k-point crossover.
2. The uniform crossover selects individual genes from each parent instead of whole
chromosome segments, with the probability of a gene being inherited from parent
1 being p1, and the corresponding probability for parent 2 being p2 = 1− p1 [26].
Figure 3.3 demonstrates the concept.
22
Figure 3.3: Illustration of the uniform crossover.
3.3.5 Mutation
Each solution may be subject to mutations; random changes in one or more properties
(genes) of a solution according to some probability, referred to as the mutation rate.
Mutations exist in order to maintain and introduce diversity into a population. With
more diversity, the algorithm has a lower risk of ending up in suboptimal local minima
[14]. Different types of mutation operators exist, including, but not limited to:
• bit flip mutation, where a random bit of data in the chromosome is flipped,
• mutations that replace the value of a randomly selected gene with a random
value from a given probability distribution, and
• mutations that interchange the values of two randomly selected genes.
A bit flip mutation is illustrated in Figure 3.4.
Figure 3.4: Illustration of a bit flip mutation.
In other words, mutation is a divergence operator, and increases the probability of the
algorithm to search for more solutions in the search space. A mutation probability
too high results in a completely random search that will hinder convergence, and a
probability too low will result in convergence towards the local optima most similar
to the most fit initial individuals.
23
Now, the GA described in Section 3.3 is a simple, general version that can in theory
be implemented into any defined optimization problem [16]. In this thesis, the GA
that is implemented for the specific problem described will be presented in Chapter
4 and Chapter 5. A flowchart of the simple, general version of GA is shown in Figure
3.5.
Generate initialpopulation
Evaluatefitness values
Stop criterionfulfilled?
End
Save bestindividuals
as eliteclones
Do crossoversand mutations
New generation
Yes
No
Figure 3.5: Flowchart describing the most basic GA.
Before moving on, some basic terminology regarding GA in the context of the work
presented in this thesis is shown in Table 3.1.
24
GA terms Practical terms
Population All pile groups
Generation Pile groups in an iteration
Individual or solution A single pile group
Parents Pile groups used to producea new pile group
Child A pile group produced from combiningprevious generation parents
Elite clone A pile group unchanged from theprevious generation
Table 3.1: Terminology table.
25
Chapter 4
Implementation of GA
In this chapter, the implementation and performance enhancements of GA on the
specific problem of designing and optimizing pile groups is described. Section 4.1
gives a short introduction explaining the method employed. Section 4.2 and Section
4.3 present the GA implementation.
4.1 Method
In order to solve the problem of automating and optimizing the design of pile groups,
a proof of concept software is developed in MATLAB. The function of the software is
divided into two parts; one is the Genetic Algorithm that performs the automation
and the optimization, and the other is the calculations using the mathematical model
described in Chapter 2 that define the constraints and the physical forces in the model.
Initially, the problem was researched thoroughly by studying previous pile group de-
signs and through interviews with Mahir Ulker-Kaustell from Tyrens AB, in order
to understand the problem of designing pile groups. The summary of that research
was presented in Chapter 2. Afterwards, genetic algorithms were researched for the
purpose of understanding the ideas behind them, and to be able to develop a soft-
ware utilizing such an algorithm on this specific problem. The research on genetic
algorithms was presented in Chapter 3.
Numerical values used in this problem were gathered from previous pile group designs
and query to Tyrens staff. Included are values for pile cross section area, pile material
Young’s modulus, pile length, pile angle of approach relative to the pile cap, pile cap
dimensions and the number of piles used.
26
Later in this chapter, the application of GA onto the problem is described, and the
calculations on the physics and constraints are presented.
4.2 Using the Genetic Algorithm
The software requires definitions of parameters such as the number of piles used or
pile cap dimensions, before initializing the GA process. The specific case used as a
starting point is a large bridge column, anchoring one side of a bridge with 70 piles.
The parameters for this case are presented in Table 4.1.
Parameters Example values
Population size 20Number of piles 70Pile cross section area 729 cm2
Pile elastic modulus 32 · 109
Pile cap dimensions 120× 180Size of grids 1.2mAllowed pile tilt interval 5◦ − 20◦
Allowed minimum distance between pile heads 1.2mAllowed minimum distance between piles underground 1.2mAllowed maximum pile force 1000 kNAllowed minimum pile force 0 kNDesired pile force 500 kNDefinition of equation plane z + 10 = 0Force point of application on the pile cap 0× 138Penalty value 70Mutation rate 560-1
Strength of angle mutation interval 5◦ − 15◦
Number of best individuals selected as potential parents 4Number of random individuals selected as potential parents 5Number of elite clones 2
Table 4.1: The parameters necessary to GA with values from example case.
4.2.1 Pile cap as a grid
Pile caps, the large plates of reinforced concrete that connect a supporting column
above and the piles below, are varying from case to case in terms of dimensions and
design. These dimensions can be determined concurrently with the pile group design,
which means that should a pile cap’s size be inadequate to design a fitting pile group,
it is possible to design a pile cap with different dimensions before producing the actual
27
pile cap.
As piles have standard widths, it is possible to surmise that a pile group design should
not put piles close together relative their width and a certain amount of margin. In
addition, there are regulations for minimum pile head distances [25]. Due to this, the
pile cap is divided into a grid, with all squares in the grid being of the same size.
Using this grid, it is possible to require that at most one pile can be anchored to a
grid square in the design. This would help the pile designs be more robust in terms of
positioning sensitivity, but would reduce the total possible solutions and thus slightly
reduce the complexity of the problem. An image of the grid system is visualized in
Figure 4.1
Figure 4.1: Pile cap with the grid system visualized.
A reduction in complexity leads to fewer possible designs for any given case, which
could lead to a solution that may be globally optimal in the grid-separated design,
28
but suboptimal in a free-placement design. For the purpose of maximizing robust-
ness, even small margins on the scale of centimeters could be valuable. Therefore,
to preserve some lost complexity due to the grid-design, the piles are allowed to be
placed anywhere on the grid squares as long as there is no other pile inside the same
grid. This creates a problem of two piles being too close despite being in separate
grid squares, if the grids are in proximity to each other, and the piles are connected
at an edge of a grid square. Therefore, many possible solutions are reintroduced into
the model, but the grid no longer automatically forces a margin of error around the
pile position.
Apart from increasing robustness in terms of pile positioning sensitivity, dividing the
pile caps into grids results in drastic improvements of the software efficiency. One
huge improvement is in the penalty constraint calculation, and another is for the
crossover and mutation processes. This will be discussed further in Sections 4.2.3,
4.2.7 and 4.2.8.
4.2.2 Initial population
An initial population, comprised of a number of pile group designs, is created by
producing the correct quantity of piles for each pile group. Each such design has an
identical number of piles, and the number of designs, or individuals, is determined
in the variable definition and can be changed by the user. The tilt and rotation of
each pile and each pile’s position on the pile cap is random and uniformly distributed.
This would result in a suboptimal and infeasible population of pile groups. However,
this randomized population would be the most efficient method of starting the GA
iterations. The different piles throughout the entire generation will be combined to
select only the best combination among them by the process of crossovers, which will
be improved further through mutations.
Furthermore, a random creation would solve the problem of GA iterations being
cold-started if the pile groups in the first generation were too similar. Such a ho-
mogenized generation would rely heavily on mutations to create unique individuals,
but mutations are rare and it would therefore take several iterations before the ini-
tial population gave rise to a well-differentiated population. The act of randomizing
the pile groups also makes it capable of functioning equally well for differently sized
pile caps, and with other quantities of piles. Thus, this is a good general method of
29
creating an initial population.
Finally, another reason behind employing a randomized pile group generation over
a more sensible design of an initial population is because any other heuristic design
of an initial population would be created with bias, possibly hindering the GA from
reaching a good solution due to this bias in an initial population. An unbiased,
evenly spread out generation is a simple and efficient start for a GA since it will lead
to broader searches in the solution space.
4.2.3 Fitness function
For the purpose of reducing a pile group design’s sensitivity to pile angles and posi-
tions, a fitness function that will lead the populations towards a robust design has
to be chosen. Due to the mathematical model defined in Chapter 2, pile forces are
directly related to and solely depend on pile positions and angles. Thus, it necessarily
follows that robustness in terms of pile forces translates into robustness in terms of
pile positions and angles, and a fitness function that maximizes the robustness in
terms of pile forces is used for the algorithm. Also, the condition that the growth of
the fitness function of a pile group with a high fitness value would be larger than if
the fitness value were lower should be ensured.
The interval (2.18) gives the upper and lower bound of tolerable forces acting on each
pile, Fu and Fl. Defining Fm = Fu−Fl
2= 1000−0
2= 500 [kN ] as the average of the
two, and following the aforementioned conclusions, a robust pile group should have
the worst pile being exposed to a force as close to Fm as possible. Thus, the fitness
function is defined to be on the multi-objective form
f(Fmaxi , Fmin
i ) = maxi
((Fmaxi − Fm)2) + max
i((Fmin
i − Fm)2). (4.1)
Minimizing (4.1) achieves what is sought after. The terms are squared since force
values below Fm are allowed. Therefore,
Fl ≤ Fmini < Fmax
i ≤ Fu, i = 1, . . . , n (4.2)
must hold for a pile group to be considered feasible in terms of forces due to (2.18),
where n is the number of piles in a pile group.
30
4.2.4 Pile distance constraints
4.2.4.1 Pile head distance constraints
The mathematical calculations for the distances between pile heads are somewhat
computationally taxing, as all piles would have to be compared to each other. Thus,
the number of times such a calculation would have to be performed is n(n − 1)/2,
where n is the number of piles in a pile group.
To improve upon this, the computations that yield the distances between pile heads
utilize the grid system described in Section 4.2.1. Since only one pile can be anchored
to each grid square, calculating the distance of a pile to its neighbors requires between
between zero to four computations, depending on the occupancy of nearby grids. For
an arbitrary pile i, the algorithm checks if there is a pile j in the grid square to the
left and the three neighboring grid squares in the grid row below. If such a pile does
exist, the distance between these two piles is computed as
di,j =√
(xi,h − xj,h)2 + (yi,h − yj,h)2 (4.3)
where (xi,h, yi,h) are the pile head coordinates of pile i and (xj,h, yj,h) are the pile head
coordinates of pile j. If the distance is below a certain predefined length, typically
di,j < 1.2m, the difference between pile head distances and the allowed distances are
summed together into one number, and are used to penalize the fitness function:
Wd =n∑i,j
(1.2− di,j), di,j < 1.2, ∀i, j = 1, ...n, i 6= j. (4.4)
4.2.4.2 Pile body distance constraints
Obtaining the smallest distance between each pair of pile bodies is similarly compu-
tationally demanding since, again, given n piles the algorithm has to do n(n − 1)/2
computations. The grid system described in Section 4.2.1 cannot be utilized here
since it only applies to the pile cap. Thus, the method that calculates the smallest
distance for the piles reduces the computation time by avoiding the use of nested
loops. The distance values are calculated by modeling each pile as an infinite line in
3-D space:
L(t) = Lh + t(Lf − Lh) = Lh + tv (4.5)
31
where Lh is a vector of the pile head coordinates, Lf a vector of the pile foot coordi-
nates and v = Lf − Lh is the direction vector of the line. Given two arbitrary lines,
L1(t1) and L2(t2), W(t1, t2) is defined as
W(t1, t2) = L1(t1)− L2(t2) (4.6)
and is a vector that connects the two lines for arbitrary points given by t1 and t2.
Computing the smallest distance, defined as
Wmin = ||W(t∗1, t∗2)|| (4.7)
between L1(t1) and L2(t2) and the corresponding two points on each line, is equiva-
lent to computing the values of t1 and t2 that minimize ||W(t1, t2)||, i.e. t∗1 and t∗2.
(4.7) is uniquely perpendicular to the direction vectors v1 and v2, i.e. v1 ·Wmin = 0
and v2 ·Wmin = 0. Thus, t∗1 and t∗2 are obtained by solving
Lh,1 · v1 + (v1 · v1)t1 − (Lh,2 + t2v2) · v1 = 0
Lh,1 · v2 + (v1 · v2)t1 − (Lh,2 + t2v2) · v2 = 0,(4.8)
which yields
t∗1 =(v1 · v2)(v2 · (Lh,1 − Lh,2))− (v2 · v2)(v1 · (Lh,1 − Lh,2))
(v1 · v1)(v2 · v2)− (v1 · v2)2
t∗2 =(v1 · v1)(v2 · (Lh,1 − Lh,2))− (v1 · v2)(v1 · (Lh,1 − Lh,2))
(v1 · v1)(v2 · v2)− (v1 · v2)2.
(4.9)
Computing (4.7) is the same as minimizing
Wmin = (Lh,1 − Lh,2 + t1v1 − t2v2) · (Lh,1 − Lh,2 + t1v1 − t2v2). (4.10)
Each pile i is defined for ti ∈ [0, 1]. Therefore, when calculating (4.9), if either t∗1 or
t∗2 or are outside of this interval, the corresponding ti is set to either 0 or 1 depending
on if ti < 0 or ti > 1 and the derivative of (4.10) is calculated with respect to the
other t, giving the final solution pair (t?1, t?2).
For example, if t1 > 1, the derivative of (4.10) with respect to t2 is computed with
t1 = 1 substituted, and is solved for t2. If t2 ∈ [0, 1], the pair (t?1, t?2) has been found.
If t2 is outside the interval, the same procedure is repeated.
32
The above calculations are performed for each possible two pile combinations. Such
pile body distances are collected into a vector [Wmin,1,2,Wmin,1,3, ...Wmin,i,j] for all
distances under a certain predefined length, typically Wmin < 1.2 m. The difference
between pile body distances and the allowed distances are summed together into one
number, and will be used to penalize the fitness function:
Wc =n∑i,j
(1.2−Wmin,i,j),Wmin,i,j < 1.2, ∀i, j = 1, ...n, i 6= j. (4.11)
4.2.5 Problem formulation
Defining
vi,g =
{1 if pile i is in grid g
0 otherwise,
allows for the implementation of the constraint
n∑i=1
vi,g ≤ 1, g = 1, ..,m (4.12)
where m is the number of grid squares on the pile cap. The expression (4.12) states
that each grid square g may at most contain a single pile. Apart from the pile head
distance and pile body constraints, the allowed region for pile head positions on the
pile cap is defined as
xi ∈ [xmincap , xmaxcap ], i = 1, . . . , n (4.13)
yi ∈ [ymincap , ymaxcap ], i = 1, . . . , n. (4.14)
Similarly, the allowed rotation and tilt angles of a pile are given by the constraints
φi ∈ [φmin, φmax], i = 1, . . . , n (4.15)
θi ∈ [θmin, θmax], i = 1, . . . , n. (4.16)
Lastly, the constraint that states that the length of each pile has to reach the prede-
fined bedrock plane is given by
Li =−(axh,i + byh,i + czh,i) + d
a sin θi cosφi + b sin θi sinφi + c cos θi, i = 1, . . . , n (4.17)
where the values for Li are used in the calculations that determine Fmaxi and Fmin
i .
33
The constraints for pile forces and distances between piles are used in the fitness
function, and the remaining constraints are hard-coded into the software. To ensure
that piles are not too close to each other in a design, a penalty function that increases
the fitness value whenever this condition is not met is defined. This creates a relaxed
problem with a larger feasible region.
The constraint (4.2) defines the forces that are considered feasible for a pile group.
However, since the objective is to get the pile forces as close to Fm as possible, that
force constraint is not explicitly stated due to being superfluous. The constraint will
be fulfilled eventually if it is possible to do so, despite not being explicitly stated in
the problem formulation.
Now, using (4.1), (4.4), (4.11) and (4.12)-(4.17), the minimization problem can be
written as
minimizeFmaxi ,Fmin
i
(maxi
((Fmaxi − Fm)2) + max
i((Fmin
i − Fm)2)))· (1 +Wd · β) · (1 +Wc · β)
subject ton∑i=1
vi,g ≤ 1, g = 1, ..,m
xi ∈ [xmincap , xmaxcap ], i = 1, . . . , n
yi ∈ [ymincap , ymaxcap ], i = 1, . . . , n
φi ∈ [φmin, φmax], i = 1, . . . , n
θi ∈ [θmin, θmax], i = 1, . . . , n
Li =−(axh,i + byh,i + czh,i) + d
a sin θi cosφi + b sin θi sinφi + c cos θi, i = 1, . . . , n
This minimization problem is a mixed integer nonlinear programming (MINLP) prob-
lem, as well as being a multiobjective problem with two functions based on Fmaxi and
Fmini . The complexity of the problem arises due to the combination of loads and
the many degrees of freedom that it entails, matrices defined in the mathematical
problem being non-invertible, the pile distance constraints, constraints involving the
maximal and minimal forces of each pile and the way in which the objective function
and grid constraints are defined.
The constraints are included as penalties with multiplier β in the fitness function as
a form of constraint relaxation instead of an explicit constraint in order to allow for a
larger feasible space, and thus lower the risk of ending up in suboptimal local minima.
34
If the constraints are defined explicitly, no infeasible solutions would be generated,
but the algorithm could in theory be terminated before the desired optimal solution
is achieved, if the only possible child bred by two parents is an infeasible one. With
relaxed constraints, such solutions are allowed due to a larger feasible space, but these
solutions have a larger fitness value.
By using constraints as a sum of distances shorter than the desired margin and
increasing the fitness value multiplicatively, the function allows the generations to
incrementally improve despite still being infeasible. Two piles at a distance of 0.3m
from each other will still yield fitness value improvement if they move to 0.4m from
each other, despite not meeting the distance margin requirement of, for instance,
1.2 m minimum. The penalty term is zero for solutions that meet the pile distance
requirement, and the GA finds better solutions by increasing robustness in terms of
pile forces. This is different from usual relaxations such as Lagrangian [18]. Since the
penalty multiplier term β disappears for feasible solutions, there is no requirement on
β to be a specific value as long as it is large enough, unlike a Lagrangian multiplier.
As such, it is assigned a sufficiently large value to discourage infeasible solutions.
4.2.6 Elite clones
The number of elite solutions is chosen to be small relative to the number of total
solutions within a population, so as to allow for more variation and randomness. The
geometric properties of the piles of an individual determine the fitness value that it
yields, and since these properties do not necessarily carry over from a solution to its
offspring, the existence of elite individuals is justified mostly by them maintaining
or improving the fitness value from one generation to the next. Although these elite
individuals were initially exempt from mutations, it was later decided that they should
mutate under the condition that if their mutation worsens these elite individuals, the
mutation is reverted and the elite individuals remain as they were previously.
4.2.7 Crossover
To account for the fact that solutions with a better fitness value should have a higher
chance of reproducing, some number of solutions with the lowest fitness values are
chosen to always be included in the ”parent” group, instead of assigning a higher
probability of more ”fit” parents reproducing. The preference for more fit parents
is done in order to allow quicker convergence towards optima, analogous to natural
35
selection. The remaining solutions to be included are chosen at random with no re-
gards to their fitness value in order to increase diversity. Two parents, including the
elite clones, may only produce one child, rather than two or more, to further increase
diversity within the population.
The crossover process is initially implemented by choosing two ”parent” pile groups,
and applying the uniform crossover technique with p1 = p2 = 0.5, where p1 is the
probability of a child inheriting a pile from parent 1, and p2 the corresponding prob-
ability for parent 2. Each pile is taken as a whole, with its geometrical properties
untouched, and put into the ”child”, until the child pile group has as many piles as
necessary. Due to this randomness, a child may not necessarily have a fitness value
comparable to either parent. The non-linearity of the problem ensures that no one or
few piles have any specific value, instead the piles can only be evaluated as a whole.
Therefore, inherited piles do not necessarily possess the robustness of the parent pile
group. In addition, identifying the strengths of a pile group in terms of their position
is difficult, if not impossible.
Besides the problem of children not necessarily inheriting the fitness of their parents,
it is quite possible that two feasible parents can create an infeasible child. Since the
selection of piles would be random, a child inheriting a pile from one parent can also
inherit another pile from the other parent that happens to be positioned very close
to the first pile. This leads to the children being worse than either parent in some
cases.
An improvement to this random crossover is the implementation of the grid system
described in Section 4.2.1. It is designed such that children inherit piles randomly,
unless the pile it inherits is positioned in an occupied grid square. Due to this, the
instances of children having piles too close to each other is greatly reduced, though not
completely eliminated. Since piles can be positioned anywhere on the grid square,
the possibility of two piles being positioned too close without occupying the same
grid still exists. By increasing the grid size, it is possible to reduce this risk even
further, though it would reduce the complexity of the problem. The grid system
thus introduces some structure into the crossover technique, which addresses some
of the aforementioned issues, and allows for faster convergence towards local optima.
Algorithm 2 displays the pseudo code for the crossover function.
36
Algorithm 2 Crossover function
1: procedure Crossover2: ChildPileGroup = []3: i = 14: while i < piles do5: ChosenParent =Random 50 % of Parent1,Parent26: if ChosenParent(i) is in an empty grid then7: ChildP ileGroup = [ChildP ileGroupChosenParent(i)]8: i = i+ 19: end if10: end while11: end procedure
For clarity and visual appeal of the crossover technique, see Figure 4.2 and Figure
4.3.
Figure 4.2: Two parent pile groups chosen to create a new pile group.
37
Figure 4.3: New pile group inheriting the piles with a probability of 50% from eachparent. Colored for comparison.
4.2.8 Mutation operator and mutation rate
Mutations are processes that randomly change any pile group in some way, and is
the main operator that finds better solutions when the algorithm converges towards
a local minimum. Mutation is the only operator that allows the population to reach
solutions that are not combinations of the first generation. The initial population
has a limited number of unique piles, defined by pile angles and pile positions. Since
the initial population does not contain all possible piles, it is necessary to have muta-
tions that can change the piles into completely new ones, as the crossover process does
not change the piles themselves, merely the combination of these piles in a pile group.
Mutations occur on the children and the elite clones in a pile group, i.e. mutations
occur after the crossover process is finished and the next generation is fully formed.
The implementation works by randomly mutating or changing the values of a pile
group in any of the following ways:
• by moving a pile in a pile group from one grid square to another but keeping
its position inside the grid square,
• moving a pile somewhere else within its own grid square, and
• changing the tilt or rotation angle of a pile.
38
When a mutation causes the pile in a pile group to move from one grid square to
another, the grid system described in Section 4.2.1 is utilized, analogous to how the
crossover operator utilized the grid, and for the same reasons.
The probability of a mutation is tested in order to find a mutation rate that efficiently
allows the generations to converge to an optimal solution. A mutation rate that is too
high would interfere with the crossover process by changing the pile groups too much,
which would lead to the generations consisting of more or less random pile groups,
whereas a low mutation rate would hinder the generations from creating solutions that
are not merely combinations of the initial population. Pseudo code for the mutation
operator is displayed in Algorithm 3.
Algorithm 3 Mutation function
1: procedure Mutate2: for j = 1 to individuals do3: for i = 1 to piles do4: if Move inside grid RandomNumber < MutationRate then5: Individual(Pile(xy–Coordinates)))=Random xy-coordinates
within the current grid6: end if7: if Move to another grid RandomNumber < MutationRate then8: Individual(Pile(xy–Coordinates)))=xy-coordinates to a new,
empty grid9: end if10: if Change pile rotation RandomNumber < MutationRate then11: Individual(Pile(Rotation)))=Random rotation angle12: end if13: if Change pile tilt RandomNumber < MutationRate then14: Individual(Pile(Tilt)))=Random tilt angle15: end if16: end for17: end for18: end procedure
Defining the mutation rate p as the probability of a mutation of any pile parameter
of any pile, the probability of exactly k mutations occurring over a total of 4n (there
are n piles in a pile group, each with 4 decision parameters) variables is(4n
k
)pk(1− p)4n−k. (4.18)
The probability of at least x mutations occurring is
39
4n∑k=x
(4n
k
)pk(1− p)4n−k. (4.19)
Expressions (4.18) and 4.19 are later used to find the desired mutation rate.
4.3 Termination
Several termination criteria for the algorithm can be employed. Common criteria
include
• when an upper limit on the number of generations has been reached,
• when the fitness function has reached a defined value, or
• when the probability of any meaningful improvements in future generations is
sufficiently low [23].
Naturally, since the objective of this thesis is to improve upon manually designed pile
groups, the termination of the algorithm is carried out manually when the algorithm
has produced a satisfactory pile group.
40
Chapter 5
Development and evaluation of thesoftware
In this chapter, the software is evaluated and improved based on computing time
and in terms of being applicable to real life scenarios. The changes and improve-
ments to the genetic algorithm software are included in this chapter, and a program
that simulates errors in pile placement and pile angles is developed in order to deter-
mine robustness, referred to as ”error simulations” throughout this and later chapters.
Section 5.1 describes the changes to the fitness functions that were considered. Sec-
tions 5.2 and 5.3 present changes and modifications of the crossover and mutation
operators. Section 5.4 describes a discretization of the variables and lastly, Section
5.5 explains the error simulations.
5.1 Fitness functions
The fitness function defined in Section 4.2.5 acts as a starting point, but different
fitness functions were compared to it in order to find the function that best results
in convergence towards a feasible and robust solution. The original fitness function
to be minimized is
(maxi
((Fmaxi − Fm)2) + max
i((Fmin
i − Fm)2))) · (1 +Wd · β) · (1 +Wc · β) (5.1)
where
Wc =n∑i,j
(1.2−Wmin,i,j),Wmin,i,j < 1.2, ∀i, j = 1, ...n, i 6= j,
Wd =n∑i,j
(1.2− di,j), di,j < 1.2, ∀i, j = 1, ...n, i 6= j
41
as previously described in Section 4.2.5. These Wd and Wc are used as a value
together with a penalty multiplier β, which linearly increases the fitness value as
a penalty for defying a constraint. This ensures that the fitness value is reduced
for increased distances between piles, until all distances are larger than the required
distance margin. The other fitness functions that were evaluated are
(maxi
((Fmaxi − Fm)b) + max
i((Fm − Fmin
i )b))) · (1 +Wd · β) · (1 +Wc · β) (5.2)
where b = 3 or 4, and
emaxi(Fmaxi −Fm))+maxi((F
mini −Fm)2)) · (1 +Wd · β) · (1 +Wc · β). (5.3)
The difference between these fitness functions is primarily in how much they will seek
to have equal margin of error to the maximum and minimum allowed force. The
original fitness function with the square difference was chosen because the behavior
of Fmaxi and Fmin
i is not symmetrical, thus it is important that improvements in Fmaxi
are not overseen due to slight deterioration in Fmini .
The GA fitness function seeks to have a certain distance margin between piles, typ-
ically at least 1.2 m between the pile centers. An attempt was made to increase
robustness in distances between piles by dividing the Wc into two parts where
Wc1 =n∑i,j
{1, if Wmin,i,j < 1.2
0, otherwise∀i, j = 1, ...n, i 6= j
which is the number of piles closer than 1.2 m to each other, and
Wc2 = [(2−Wmin,1,2), (2−Wmin,1,3), ..., (2−Wmin,n−1,n)]
1.2 <Wmin,k < 2, ∀i, j = 1, ...n, i 6= j
is a term for pile body distances between 1.2 m and 2 m. This creates a constraint
that penalizes pile distances that are allowed, but are still less than 2 m away from
each other. This would allow the GA software to attempt to produce more robustness
against piles coming in contact with each other due to placement errors. The new
combined pile body distance penalty term would be
Wnew = (1 + β ·N) · (1 + β ·max(Wc2)) · (1 +β
2·M∑Wc2
M)
where N is the number of elements in Wc1 and M is the number of elements in Wc2 .
42
This is a sort of relaxation, and it was impossible to obtain adequate results without
knowing an optimal value for the relaxation multiplier β, since the large margin is
impossible to fulfill and therefore the penalty term never disappears. The constraints
described in Section 4.2.4 have a term that disappears for feasible solutions, unlike
this modification. The penalty and the new constraint act similarly to a Lagrangian
Relaxation to the problem [18]. Since β can be interpreted as the utility ratio of
improving forces or improving pile distances, it becomes a parameter that needs
to be known to get a satisfactory solution. Even if such a fuzzy value was to be
estimated, it would also change with every parameter as different pile groups have
different difficulties of improving forces or pile distances. As such, it is both difficult
to calculate β, and it has to be calculated for every new pile group. Therefore this
constraint was tested but not implemented due to the aforementioned reasons.
5.2 Crossover changes
It has been determined that as the algorithm approaches a local optimum, the con-
tribution from the crossover function is diminished. The algorithm explores other
solutions in the search space and produces improvements because of the mutation
operator. Since it is of interest to have a low computing time, a conditional function
is created that occasionally turns off the crossover functionality as well as reduces the
individuals in a population to only the elite clones.
With the crossovers disabled, the algorithm will then focus on the mutation function
on the elite clones, and since one of them is approaching a local optimum, the only
method of improvement would be to mutate one or a few variables at a time. After a
certain amount of generations, the population is increased to the original value and the
crossover functionality is turned back on. This function results in the GA temporarily
working as a Basic Local Search on a population consisting of solely elite clones,
because the mutations on elite clones are reverted if the fitness worsens. Without
crossovers, the mutations produce new solutions local to the current solutions, but
these solutions are reverted unless they become better. Hence, when the crossovers
are disabled, the solutions move towards the direction with the most improvements
like a Basic Local Search. The new crossover technique is presented in Algorithm
4.
43
Algorithm 4 Crossover function
1: procedure Crossover2: if Crossover function diminished then3: Turn off crossover for x iterations4: end if5: if Crossover function useful then6: ChildPileGroup = []7: i = 18: while i < piles do9: ChosenParent =Random 50 % of Parent1,Parent210: if ChosenParent(i) is in an empty grid then11: ChildP ileGroup = [ChildP ileGroupChosenParent(i)]12: i = i+ 113: end if14: end while15: end if16: end procedure
The downside with this function, which is not a part of the usual Genetic Algorithm
functions, is that it improves only by mutations. Therefore, some potential improve-
ments that would require many changes at the same time are more rare due to the
lack of crossovers.
The advantage with this new function is the great reduction of computing speed. Since
the aim of the algorithm is to find any robust solution that will work in practice, this
version is an overall improvement. It can be seen in Figure 5.1 that temporarily
turning off crossovers when the contribution of the crossover operator is diminished
results in no significant decrease in solution fitness. However, the computing time is
reduced by approximately 66%. It should be noted that crossovers are very valuable at
at the start of an execution, and turning them off completely would not be beneficial.
44
Figure 5.1: The convergence behavior of the algorithm with the two crossover versions.
5.3 Mutation rates
Different mutation rates have been tested using (4.18) and (4.19) as well as testing
the GA convergence in order to find the most fitting rate for convergence towards an
optimum. The rate 1/8n is found to be close to optimal, where n denotes the number
of piles in a pile group. A comparison between results of similar mutation rates as
well as an adaptive mutation rate that takes on the values of the other rates can be
found in Appendix, figures A.16 through A.20. This mutation rate gives on average
one mutation per pile group. After many iterations of the algorithm, pile groups
come fairly close to a local optimum, and too strong or too numerous mutations risk
moving the pile group away from its local optimum. By assigning on average one
mutation rate per pile group, the process of mutations allows the algorithm to se-
lectively improve each variable step by step, rather than testing many changes at once.
Because the mutations are random, these numerous mutations are likely to change
both piles that are well placed, and piles that could be improved. The net result is
45
that the algorithm gets stuck with a certain pile group because the probability of all
the numerous mutations being beneficial is extremely low. The downside with the
mutation rate 1/8n is that the probability of a pile group not having a single mutation
in any particular iteration is about 60%. Therefore, there is a significant probability
of one iteration having no effect on a particular pile group at all. This is addressed
by setting a minimum of one mutation per pile group per iteration. Each pile group
is therefore mutated at least once per iteration.
5.4 Discretization of the variables
A discretization with less intervals of variables is applied to make the produced pile
groups more visually appealing on the schematics as well as easier to drive down in
practice. The angles and pile positions are discretized to a reasonable degree, only
allowing angles in increments of 45◦ in rotation, and pile head positions on specific
positions. The tilt angle of piles is also discretized using intervals of 5◦. Piles are no
longer allowed to be placed anywhere on a grid, and are instead placed at the start
of a grid, for more structured pile head positions. Such discretization creates pile
groups that have less potential for robustness, but better practical usefulness due to
their ordered structure. In addition, the visual appeal is potentially more valuable
than some improvements in robustness since the pile designs have to be approved
manually by Trafikverket, and a very robust pile group may seem too disorganized to
be approved. Side effects of this change is that it approaches a solution significantly
faster with a loose discretization, due to the reduced feasible space.
The GA software with a more precise discretization can potentially find more robust
solutions but at the cost of time and appearing disorganized. With a much larger
room of possible solutions, the GA software would produce a pile group that is better
in all aspects compared to any manually created pile groups, since it can compare
pile groups much faster and considers more possibilities than a human does.
Thus, the final version of the developed GA has been obtained. A flowchart of the
algorithm is presented in Figure 5.2.
46
Figure 5.2: Flowchart of the Genetic Algorithm developed in this thesis.
5.5 Error simulation
The robustness of a pile group is tested by assigning errors of random strengths drawn
from the standard normal distribution. The error simulation uses the distribution
N (0, σ2) to simulate placement errors, with the values loosely based on historical
error data. The standard deviations σ used in the Monte Carlo method is presented
in Table 5.1.
47
σx [m] σy [m] σφ [°] σθ [°]
0.1 0.1 3 2
Table 5.1: Error standard deviation.
Since the error simulations are supposed to simulate piles that are already driven
down, there are no requirements on distance margin between piles, such as 1.2 m.
Therefore the required distance to be feasible only forbids actual collisions. Therefore
in the error simulations, the smallest allowed distances between piles is 0.4 m. For
every pile group produced by the algorithm, using the data in Table 5.1, 1000 error
simulations are carried out and the forces as well as the number of pile collisions are
stored. These simulations are also carried out on the pile groups previously designed
by Tyrens AB in order to compare the robustness.
48
Chapter 6
Results
A genetic algorithm software for optimizing the design of pile groups with respect
to robustness in placement errors has been developed. The error simulation results
for different parameter values are presented in this chapter. In addition, the results
obtained with the developed GA software are compared with real pile groups designed
by traditional methods currently employed by Tyrens AB and other firms. The pro-
duced pile groups are comprised of 10, 22, 32, 33 and 70 piles, and each pile group is
associated with its own set of possible loads acting on the bridge column, as well as
its own pile cap dimensions.
It should be noted that the error simulation results are not representative of actual
probabilities in practice, but are performed as a measure of robustness. The error
standard deviation is loosely based on historical data, but the probabilities of pile
groups being infeasible are inaccurate. Factors affecting error probabilities are also
not considered.
The average time to run 1000 iterations for each pile group is presented in Table 6.1.
10 piles 22 piles 32 piles 33 piles 70 piles
Time [s] 57 72 90 92 180
Table 6.1: The average time for 1000 iterations for each pile group.
6.1 Results for pile groups produced by GA
The developed GA software is used to produce pile groups for some real bridge cases,
and the designed GA pile groups are compared to the traditionally designed pile
49
groups that were used in practice. Included is information regarding how many iter-
ations it took for GA to produce the pile group and each pile group’s maximum and
minimum pile forces. The results from the error simulation are also displayed, show-
ing the percent of cases a pile group becomes infeasible with respect to any desired
constraints, unacceptable pile forces, and due to collisions between piles. Lastly, the
figure plots of the produced pile groups are included in Appendix A.
The numerical values for the results are presented in the tables below.
GA pile group Traditional pile group
Iterations 15 000 -Nr of collisions 0 0Largest force [kN] 814 972Smallest force [kN] 66 71Infeasible total [%] 34 58Infeasible due to forces [%] 34 49Infeasible due to collisions [%] 0 12
Table 6.2: Results for the GA pile group - 70 piles.
The first example, seen in Table 6.2 shows a GA pile group with better maximal
forces compared to the traditional pile group. In addition, the robustness measured
using error simulation has shown that the traditional pile group becomes infeasible
in 58% of Monte Carlo cases. In comparison, the GA pile group becomes infeasible
in 34% of cases, showing a greater degree of robustness.
GA pile group Traditional pile group
Iterations 4000 -Nr of collisions 0 0Largest force [kN] 942 988Smallest force [kN] 271 288Infeasible total [%] 71 96Infeasible due to forces [%] 71 96Infeasible due to collisions [%] 15 1
Table 6.3: Results for the GA pile group - 33 piles.
In Table 6.3, it can be seen that the pile group produced by the GA software has
more margin of error in maximal pile forces compared to the traditional pile group. In
this case, it can also be noted that although nearly all pile groups become infeasible
50
in the error simulation, the GA pile group is more robust overall compared to the
traditional pile group. Although the GA pile group is less robust to collisions, the
increased robustness in forces makes up for that loss.
GA pile group Traditional pile group
Iterations 7700 -Nr of collisions 0 0Largest force [kN] 817 910Smallest force [kN] -13 −82Infeasible total [%] 10 40Infeasible due to forces [%] 6 40Infeasible due to collisions [%] 5 0
Table 6.4: Results for the GA pile group - 10 piles.
In Table 6.4, the GA pile group is compared to an old traditional pile group. At
the time of creation of the old pile group, the calculation of forces was done with a
slightly different method. While the current force calculation methodology puts the
real pile group’s minimal force at −82 kN , the previously used method calculated a
positive minimal force, making the pile group theoretically feasible at that time. This
is taken into account during the error testing, allowing down to −150 kN . The GA
pile group outperforms the real pile group in terms of forces and overall robustness.
GA pile group Traditional pile group
Iterations 10000 -Nr of collisions 0 0Largest force [kN] 757 832Smallest force [kN] 102 −101Infeasible total [%] 3 45Infeasible due to forces [%] 2 45Infeasible due to collisions [%] 2 0
Table 6.5: Results for the GA pile group - 32 piles.
Again, as in the previous case in Table 6.4, the traditional pile group shown in Table
6.5 is an older pile group design and the minimal forces were calculated using a
different methodology. The current methodology puts the pile group’s minimal force
at −101 kN . Taking this into account, the minimal forces are once again allowed
to be negative, down to −180 kN . The GA software manages to produce a positive
51
minimal force as well as a lower maximal force compared to the real pile group, and
it can be seen that it is very robust.
1 2 3 4 5 Traditional
Iterations 4000 7500 7000 8000 8000 -Nr of collisions 0 0 0 0 0 0Largest force [kN] 830 904 834 830 871 975Smallest force [kN] 103 95 58 106 42 41Infeasible total [%] 28 31 34 17 49 80Infeasible due to forces [%] 19 31 33 12 46 79Infeasible due to collisions [%] 11 0 30 6 4 66
Table 6.6: Results for the GA pile group - 22 piles.
Table 6.6 shows five separate GA software execution results for the same bridge col-
umn. All parameters are identical, but the software finds a local optimum group at
different iteration counts. It can be seen that all five pile groups produced by GA
have better maximal and minimal forces compared to the traditional pile group, and
all five GA pile groups display more robustness. This comparison is made to test
whether solutions are consistent over different GA runs, and how these pile groups
compare to the traditional pile group.
Lastly, to show the convergence behavior of the developed GA and that it is consistent
for every pile group, a graph of the fitness value as a function of iterations is shown in
Figure 6.1. It can be seen that although the different problems converge and become
feasible at vastly different rates, the end result is still comparable. That is, the GA
creates feasible pile groups regardless of bridge column if such a feasible pile group is
possible.
52
Figure 6.1: The convergence behavior of the developed GA with mutation rate 1/8nfor each pile group.
6.2 Gradual improvement of GA pile group - 22
piles
In this section, the improvements over time is presented in order to obtain a clearer
understanding of how the GA software operates and its convergence. The pile groups
are taken from the same execution of the GA algorithm at iteration 1, 10, 100, 1000
and 2000, using the pile group comprised of 22 piles. The result values are presented
in Table 6.7 below and can be compared to results in Table 6.6.
53
Iterations 1 10 100 1000 2000
Nr of collisions 7 4 0 0 0Largest force [kN] 1543 1231 1055 907 907Smallest force [kN] -214 -374 -89 90 90Infeasible total [%] 100 100 98 27 26Infeasible due to forces [%] 100 100 98 22 21Infeasible due to collisions [%] 100 18 6 6 6
Table 6.7: Values of the GA pile group during the optimization process - 22 piles.
From Table 6.7, it can be noted that the algorithm converges to a solution relatively
quickly at 1000 iterations and does not improve in terms of largest and smallest
forces. It does however improve upon the robustness, possibly simply due to the ran-
domness of the simulation results, as only 1000 iterations are performed. Note that,
as can be seen in Table 6.6, pile groups that are more robust in terms of pile forces
exist for this specific case, all of which were produced after more than 2000 iterations.
Figure plots of the evolution of the GA pile group comprised of 22 piles is shown in
Figure 6.2, with the number of iterations increasing from left to right, top to bottom.
54
Figure 6.2: Evolution figures of the GA pile group - 22 piles. The final pile groupobtained at 2000 iterations is omitted due to no visual changes.
55
Chapter 7
Discussion
The objective of this thesis was to develop a software that automatically designs a
robust pile group. Therefore, in this chapter, the method and results for this thesis
are discussed around whether the objective is met, and potential alterations and im-
provements are explained.
Section 7.1 discusses the performance of the developed software and Section 7.2 gives
a discussion on the obtained results.
7.1 GA software
The GA software performs well compared to conventional designs methods. From the
results, it can be observed that the pile groups produced by the software outperform
the traditional pile groups both in terms of pile forces but also in terms of absolute
robustness. The robustness of the GA-pile groups is overall better for all considered
cases. In addition, the main advantage of the developed software is the automation
of the design process and the speed at which a new pile group can be produced. As
such, the GA pile groups outperform traditional pile group design method both in
time effectiveness and robustness. It can also be seen in the results that in many
cases, the number of iterations required before arriving at a satisfactory pile group is
often around 4000-8000 iterations, the corresponding time for each pile group can be
gathered from Table 6.1
Although the time to run one iteration depends on a number of parameters such as
population size, or parameters that vary between different bridges and columns such
as pile cap size, an iteration count of 10 000 take less than half an hour. This implies
that for each new problem, an acceptable pile group may be produced within an hour
56
including parameter definition time in the software. For the purpose of automatizing
the pile group design, the software performs adequately.
The discretization of variables for GA has been made as a trade-off between robust-
ness and structure. A continuous GA version, in which the possible pile rotation can
take any value and the pile heads can be positioned anywhere on the pile cap as long
as there is at most one pile inside a grid, has the potential finding better solutions
than the discretized version. A continuous GA software could in theory even yield
a global optimum in terms of possible pile forces, but would take a long amount of
time to do so and the freedom in pile head positioning and pile angles would result in
an erratic structure. The discretized GA finds solutions and converges towards local
optima faster than a continuous GA, but since the pile head positions are limited
to the start of a grid and pile rotations are in increments of 45◦, reaching the same
global optimum as a continuous version is almost surely impossible.
The pile group designs have to follow regulations for bridge pile groups and be manu-
ally approved by Trafikverket [25]. The disorganized structure of pile groups created
by the GA software may be difficult to get approval for. There are two ways in which
more structure can be achieved using the GA software. One is to add a penalty term
for disorganization such as lack of symmetry, and one is to create constraints to force
pile groups to always be organized. However, a penalty term that does not contain an
indicator function has shown to be extremely impractical to work with, as described
in Section 5.1. Such a term would require a relaxation multiplier that would indicate
how much more important structure is over pile forces minimization. Implementing
structure as constraints on the other hand would be simpler but the resulting pile
groups would always abide by constraints. An example would be symmetrical pile
groups, which in some cases are very difficult to make feasible and robust if the bridge
column forces are not symmetrical.
7.2 Results
In Table 6.6, five different pile groups produced under identical parameters specific
to the GA, such as population size and mutation rate, are presented. Both in terms
of maximal and minimal forces as well as robustness after error testing, pile group
1, which was developed after 4 000 iterations, is comparable to the other pile groups.
Pile group 1 is second best in terms of forces and total robustness. This result implies
57
that as a GA computation approaches a feasible pile group, it quickly converges to a
local feasible optimum. There may be a probability of finding a good local optimum
quickly, and also a probability of finding a worse local optimum somewhat slower.
This explains why a pile group is comparable to others that have been attempted to
improve over almost twice the iteration count. Therefore, the GA software produces
pile groups that strongly depend on the random initial solutions and the random
crossovers and mutations. Sometimes, a better solution might be found faster by
restarting the software rather than waiting for further improvements.
It can be theorized that given a long enough computation time, the GA software
would eventually find a way to a global or near-global optimum due to the random-
ness of mutations. Despite finding a local minimum quickly, allowing the software to
iterate over a long period of time still yields improvements. Indeed, this incremental
improvement can be seen in Figure 6.1, implying that rather than having to restart
the algorithm, giving it more time may also improve a pile group. However, as the
solutions converge this improvement becomes more difficult, which means that com-
puting time required to find a global or near global optimum will be much higher
than finding a local optimum that is sufficiently robust. It should be noted that a
regular GA converges towards local optima and is unable to find a global optimum
[13].
An adaptive crossover function was implemented to reduce the computing time, de-
scribed in Section 5.2. This function improves the computation time significantly,
by temporarily focusing solely on random mutations with no help from the crossover
function. During this state with disabled crossovers, the algorithm is essentially a Ba-
sic Local Search on the elite clones. The downside to this function is that potential
improvements from crossovers occur more rarely, because crossovers are sometimes
turned off. It can, however, be seen in Figure 5.1 and Figures A.16 through A.20
that pile groups continue improving during 30 000 iterations, which indicates that the
results are not negatively affected by this function. Therefore, the typical functions
of GA such as population and crossover are not fully useful for this problem, implying
algorithm inefficiency.
With crossovers being temporarily disabled at times, the only function that adds di-
versity to the population is the mutation function. Due to the mutation rate being
extremely low, averaging between one and two mutations per pile group and iteration,
58
large changes cannot occur which may hinder the search towards a global optimum.
The mutation rates are low because it was discovered that minuscule changes in a pile
group could have large effects on the end result, so the optimal mutation rate was one
that only allowed one or two changes for a pile group per iteration in the majority
of cases. A higher mutation rate would lock the algorithm out of any local optimum
due to how high the probability is for most of such mutations to be disadvantageous.
A pile group that is one mutation from an optimum would have too many mutations
at once and the probability of only having one mutation in the one correct variable
would be low.
It is optimal for the mutation rate to be low for this specific problem but it creates a
slight problem where the software converges towards various local optima, and risks
being stuck there for many iterations. This is because finding a better solution than
the current local optimum may require several mutations at once, which are rare
due to the low mutation rate. A function to increase the mutation rate once the
software stops improving over many iterations was attempted, but did not perform
significantly differently which can be seen in Figures A.16 through A.20. It can be
seen that given long enough time, the GA software eventually finds an improvement
but one small improvement may occur after a long time, making it less practical to
wait for an almost globally optimal solution. This implies that a faster convergence
for this specific problem can only be achieved using another metaheuristic.
59
Chapter 8
Conclusions and suggestions forfuture research
This chapter presents the conclusions that are drawn regarding the work as well as
suggestions for future research.
8.1 Conclusions
In this thesis a GA software was developed, that automatizes the design process of
pile groups and finds a suitable local optimal solution in terms of robustness. Modi-
fications to the GA have been added, such as the function that occasionally disables
crossovers for some iterations. The function does not adversely affect the results but
improves the computing time. The trade-off between optimality and structure has
also been discussed. The GA-pile groups were tested using the Monte Carlo method,
and the results were compared to real, traditionally designed pile groups.
The tests show that the GA pile groups outperform the traditional manual method
of designing pile groups, both in speed and in robustness. Several modifications to
the GA software were implemented in order to improve performance for this specific
problem. It is determined that the GA software is useful, but may require further
work to be applicable in designing pile groups due to its disorganized structure.
8.2 Suggestions for future research
Given factors like the abutment, bridge structure, location and outer loads, if sym-
metries in pile forces that would arise could be identified, the developed GA can be
modified such that it takes these symmetries into account. It could then only produce
60
some fraction of a potential pile group and mirror the results due to the identified
symmetries. This would reduce the computation time, by reducing the number of piles
in a population. Such a symmetric design would also have a more organized struc-
ture, possibly appearing more reliable when being assessed by Trafikverket. This is a
suggested area of improvement. On the other hand, in situations where computation
time is not of interest, creating a GA with nearly continuous variables could in the-
ory produce extremely robust pile groups, and even solutions near a global optimum
whose robustness may outweigh the impracticality of its structure.
The pile distance constraint has been relaxed as a penalty function in order to in-
crease diversity and reduce the risk of being stuck in local optima. Infeasible parents
also have the possibility of producing feasible and robust children, another argument
for relaxation. However, whether this is efficient has not been fully established. It
could be that disallowing all infeasible individuals from a population would result in
faster convergence towards optima, or at least good feasible solutions. Further insight
into this matter might be valuable, as it could affect convergence and computing time.
An important subject of future research is the effectiveness of GA over other meta-
heuristics. A comparison study by Elbeltagi, Hegazy and Grierson (2005) have shown
that GA underperformed in the two tested continuous problems as well as a discrete
optimization problem [11]. Although the effectiveness of a metaheuristic depends
heavily on the problem, there is a possibility that improvements regarding this prob-
lem can be made by utilizing other metaheuristic techniques.
61
62
Appendix A
List of Figures
Figure A.1: Pile group designed by GA - 33 piles.
63
Figure A.2: Pile group designed by GA - 33 piles.
64
Figure A.3: Manually designed pile group - 33 piles.
65
Figure A.4: Pile group designed by GA - 70 piles.
66
Figure A.5: Pile group designed by GA - 70 piles.
67
Figure A.6: Manually designed pile group - 70 piles.
68
Figure A.7: Pile group designed by GA - 32 piles.
69
Figure A.8: Pile group designed by GA - 32 piles.
70
Figure A.9: Manually designed pile group - 32 piles.
71
Figure A.10: Pile group designed by GA - 10 piles.
72
Figure A.11: Pile group designed by GA - 10 piles.
73
Figure A.12: Manually designed pile group - 10 piles.
74
Figure A.13: Pile group 1 in Table 6.6 designed by GA - 22 piles.
75
Figure A.14: Pile group 1 in Table 6.6 designed by GA - 22 piles.
76
Figure A.15: Manually designed pile group - 22 piles.
77
Figure A.16: Fitness function convergence for different mutation rates - 10 piles(n=10).
78
Figure A.17: Fitness function convergence for different mutation rates - 22 piles(n=22).
79
Figure A.18: Fitness function convergence for different mutation rates - 32 piles(n=32).
80
Figure A.19: Fitness function convergence for different mutation rates - 33 piles(n=33).
81
Figure A.20: Fitness function convergence for different mutation rates - 70 piles(n=70).
82
Appendix B
Division of labor
A precise description of how the two authors divided the thesis work is presented here.
B.0.1 Mathematical model
The calculation of forces and the mathematical model describing a pile group is im-
plemented using the books [9] and [24] as well as the help of Mahir Ulker-Kaustell
(Personal communication, January 14, 2018). Both authors read through the sources
to understand and be able to formulate the problem formulation, and develop a plan
to solve it.
B.0.2 Genetic Algorithm
In order to understand the basics of Genetic Algorithm, both authors read through
articles and literature on GA. The authors combined their understanding and rea-
soning about Genetic Algorithm to further develop a plan for solving the problem.
It was decided that the authors will develop a GA software in MATLAB that will be
optimized for the purpose of designing a pile group.
The code that calls on different functions was created by both authors.
The code that creates an initial population for GA was written by Abedin.
The code instrumental for calculating fitness function was written by both authors.
In that code, Abedin wrote the pile head distance and the underground pile collision
distance.
The function that displays the output values for GA was written by Ligai.
The function that created new individuals by the process of crossovers was written
by Abedin.
83
The function that randomly changed values for individuals as a mutation was written
by Ligai.
Although elite clones were initially set not to mutate, the code that was later imple-
mented to allow beneficial elite clone mutations was written by Ligai.
The function that occasionally turned off the crossover function as well as reduce the
population size temporarily was written by Abedin.
The code that created 2-dimensional plots of the pile groups was written by Ligai.
The code that produced 3-dimensional plots of the pile groups was written by Abedin.
Throughout the development of the basic GA code, some changes were made. These
include implementation of the grid discretization that required changes in the crossover,
the mutation, and the pile head distance functions as well as defining the grid system.
These changes were discussed and developed jointly by both authors.
B.0.3 Development and evaluation of the software
The Monte Carlo method error simulation was created with historic data provided
by Mahir Ulker-Kaustell (Personal communication, Mars 12, 2018). The error simu-
lation software was written jointly by both authors. The central error simulation file
was written by Ligai, while the constraint calculations for the errors were written by
Abedin. It had to be written separately from the normal constraint functions because
it was not compatible with the regular GA fitness and constraint code.
GA versions improvements were discussed and developed jointly by both authors. Er-
rors and weaknesses in each versions were identified and discussed, and new functions
and improvements were added into the new GA versions by both authors.
B.0.4 Results
The presentation of results in this thesis was a joint effort by both authors. Production
and documentation were performed by Ligai, while implementation into the thesis
report was done by Abedin. The code created to test different mutation rates was
developed by Ligai. The code that compared the original crossovers to the adaptive
ones was developed by Abedin. The corresponding plots were produced by both
authors respectively.
84
B.0.5 Discussion, conslusion and future research
The presentation of discussion in this thesis was jointly reviewed and revised by both
authors. The discussion part was written mostly by Ligai and the conclusion part as
well as future research was mainly written by Abedin.
85
Bibliography
[1] Hercules Grundlaggning AB. Betongpalar fran hercules
grundlaggning. anvisningar for projektering, design och kontroll.
https://hercules.se/grundlaggning/palning/betongpalar/, 2018. Accessed:
2018-05.
[2] Mohd. Ahmed, Javed Mallick, and Mohd. Abul Hasan. A study of factors affect-
ing the flexural tensile strength of concrete. Journal of King Saud University -
Engineering Sciences, 28:147–156, 2014.
[3] Bengtlars Ann and Valjamets Erik. Optimization of pile groups: A practical
study using genetic algorithm and direct search with four different objective
functions. Master’s thesis, Royal Institute of Technology, 2014.
[4] Hayward Baker. Deep foundation. https://www.haywardbaker.com/solutions/deep-
foundations, 2018.
[5] Christian Blum. Ant colony optimization: Introduction and recent trends.
Physics of Life Reviews, 2(4):353 – 373, 2005.
[6] Christian Blum and Andrea Roli. Metaheuristics in combinatorial optimiza-
tion: Overview and conceptual comparison. ACM Comput. Surv., 35(3):268–308,
September 2003.
[7] C. M. Chan, L. M. Zhang, and Jenny T. M. Optimization of pile groups us-
ing hybrid genetic algorithms. Journal of Geotechnical and Geoenvironmental
Engineering, 135(4):497–505, 2008.
[8] Y. K. Chow and V. Thevendran. Optimisation of pile groups. Computers and
Geotechnics, 4:43–58, 1987.
[9] Olsson Connie and Holm Goran. Palgrundlaggning. AB Svensk Byggtjanst, 1993.
86
[10] Robert D. Cook, David S. Malkus, and Michael E. Plesha. Concepts and Appli-
cations of Finite Element Analysis. John Wiley and Sons Inc, 2001-10.
[11] Emad Elbeltagi, Tarek Hegazy, and Donald Grierson. Comparison among five
evolutionary-based optimization algorithms. Advanced Engineering Informatics,
19(1):43 – 53, 2005.
[12] F.W. Glover and G.A. Kochenberger. Handbook of Metaheuristics. International
Series in Operations Research & Management Science. Springer US, 2003.
[13] David E. Goldberg. Genetic Algorithms in Search, Optimization and Machine
Learning. Addison-Wesley, 1988.
[14] R.N. Greenwell, J.E. Angus, and M. Finck. Optimal mutation probability for
genetic algorithms. Mathematical and Computer Modelling, 21(8):1 – 11, 1995.
[15] Frederick Hillier and Gerald Lieberman. Introduction to Operations Research.
McGraw-Hill Higher Education, 2015.
[16] Oliver Kramer. Genetic Algorithm Essentials. Studies in Computational Intelli-
gence. Springer International Publishing, 2017.
[17] Xiaofeng Liu, Gengdong Cheng, Bo Wang, and Shuzhi Lin. Optimum design of
pile foundation by automatic grouping genetic algorithms. ISRN Civil Engineer-
ing, 2012, 2012.
[18] David G. Luenberger and Yinyu Ye. Linear and Nonlinear Programming.
Springer US, 2016.
[19] Melanie Mitchell. An Introduction to Genetic Algorithms. MIT Press, Cam-
bridge, MA, USA, 1998.
[20] neos Guide. Types of optimization problems. https://neos-
guide.org/optimization-tree, 2018. Accessed: 2018-05.
[21] Franz Rothlauf. Design of Modern Heuristics: Principles and Application.
Springer Publishing Company, Incorporated, 1st edition, 2011.
[22] Andrzej Ruszczynski and Alexander Shapiro. Stochastic programming models.
In Stochastic Programming, volume 10 of Handbooks in Operations Research and
Management Science, pages 1 – 64. Elsevier, 2003.
87
[23] Martın Safe, Jessica Carballido, and Nelida Ponzoni, Ignacioand Brignole. On
stopping criteria for genetic algorithms. In Ana L. C. Bazzan and Sofiane Labidi,
editors, Advances in Artificial Intelligence – SBIA 2004, pages 405–413, Berlin,
Heidelberg, 2004. Springer Berlin Heidelberg.
[24] Dahlberg Tore. Teknisk hallfasthetslara. Studentlitteratur AB, 2001.
[25] Trafiverket. Trafikverket atb - bro 2004. https://www.trafikverket.se/for-dig-
i-branschen/teknik/Tekniska-dokument/Bro-och-tunnel/Allmanna-tekniska-
beskrivningar/ATB—Bro-2004/, 2018. Accessed: 2018-04.
[26] A.J. Umbarkar and P.D. Sheth. Crossover operators in genetic algorithms: A
review. ICTACT Journal on Soft Computing, 6(1), 2015.
[27] Dmitrij Sesok, Jonas Mockus, Rimantas Belevicius, and Arnas Kaceniauskas.
Global optimization of grillages using simulated annealing and high performance
computing. Journal of Civil Engineering and Management, 16:95–101, 2010.
88
TRITA -SCI-GRU 2018:259
www.kth.se