Professional Documents
Culture Documents
discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/273257999
CITATIONS READS
0 570
1 author:
Mwiya Songolo
The Copperbelt University
1 PUBLICATION 0 CITATIONS
SEE PROFILE
All content following this page was uploaded by Mwiya Songolo on 08 March 2015.
Mwiya W Songolo
BEng., Dip. (Mining)
Declaration
I declare that this thesis is my own work and has not been previously submitted in
whole or in part for any academic credit at Curtin University or elsewhere. To the best
of my knowledge and belief, the thesis contains no material previously published by
any other person except where due acknowledgement has been made.
ABSTRACT
In mine optimisation, research work has mainly taken root in open pit optimisation
particularly the determination of ultimate pit limit. Once the ultimate pit limit has been
determined what follows is production scheduling. Production scheduling is based on
the underlying pushback mine sequencing which is widely used for long-term
production planning. Pushbacks thus play a very important role in mine design and
optimisation. However, it will be appreciated that many pushback design algorithms
that have evolved since the 1960s employ parameters like the commodity price (metal
price), mining cost and processing cost with the metal price in this case being the major
economic parameter. Some of the algorithms developed have endeavored to design
pushbacks based on minimum stripping ratio criteria to be used in conjunction with
traditionally designed pushbacks so that the resulting production schedules may give a
higher net present value possible. On the other hand, grade uncertainty has also been
recognized as the major parameter that should be incorporated into the pushback design
process. This is all in a quest to generate a series of nested pits that conforms not only
to the minimum required pushback width but provide the highest dollar value for a
particular optimum pit size.
The design of pushbacks for ease sequencing and scheduling should be governed by
optimised pushbacks which yield schedules with the highest net present value possible.
This requires a development of a tool that can guarantee the achievability of an
optimised pushback. The tool is however, farfetched with the current algorithms
available. Nevertheless, an endeavour to develop a genetic model for pushback design
with capacity constraint has been proposed in this project research thesis as the solution
for optimised pits. The solution for the genetic model has the capability of handling
multiple scenarios of capacity constrained pushbacks. In view of this, the objective of
the research was therefore, intended to expand the current genetic optimiser by
proposing a genetic model for pushback design with capacity constraint with a goal to
achieve an optimised pit that would yield pushbacks which are ease to sequence and
schedule.
The scope of the study was limited to the generation of pushbacks with capacity
constraint using Genetic Algorithms (GA) and the genetic code was written using
Python programming language. The pushback design with capacity constraint using
genetic algorithm in this research was applicable to a hypothetical two dimensional
(2D) deposit. From the findings of the study, it has been shown that generation of pits
with increasing price was possible using the Genetic Open Pit Optimiser. Of
significance is the conclusion that the objective of the research was achieved by
generating pushbacks with capacity constraint subject to a penalizing constraint. It is
envisaged that future research work for pushback design with capacity constraint should
be extended further to include sequencing and scheduling of pushbacks and then the
model can be applied to a three dimensional (3D) real life deposit.
Dedications
First and foremost, this thesis is dedicated to my Lord and God, Jesus Christ who by His divine
power paved the way for me to undertake a master’s degree in mining.
Secondly, I dedicate this thesis to my lovely family which I so very much cherish: my dear wife
Shilla, my lovely daughter Makazo and my dear son Mwiya.
To you my dear and beautiful wife, Shilla, thank you for your unwavering support and
endurance to suffer pain of my absence. You are so close to my heart and this thesis is
dedicated to you.
Makazo, my lovely daughter, I stretched the bond between you and us by sending you away to
stay with your granny prior to the commencement of my studies. As if that was not enough, at a
tender age, you never denied the great responsibility I placed on you to take care of your little
brother Mwiya as my wife and I pursued our studies. This work is for you to cherish.
My dear son Mwiya, a little baby as you were, you had to miss the fatherly love. You had no
option but to learn to be independent and mature. This was done for you and by the enablement
of His Mighty, I am proud that through this volume, you have a sense of belonging.
Acknowledgements
My profound acknowledgement goes to the following:
Contents
Declaration .................................................................................................................................... ii
ABSTRACT ................................................................................................................................ iii
Dedications.................................................................................................................................... v
Acknowledgements ...................................................................................................................... vi
List of Figures .............................................................................................................................. ix
List of Tables ............................................................................................................................... xi
1.0 INTRODUCTION................................................................................................................ 2
1.1 Research Background............................................................................................................. 2
1.2 Problem Statement and Research Objective .......................................................................... 4
1.3 Scope of the Study ................................................................................................................. 4
1.4 Design Tools .......................................................................................................................... 5
1.4.1 Genetic algorithms ....................................................................................................... 5
1.4.2 Python programming language .................................................................................... 5
2.0 LITERATURE REVIEW.................................................................................................... 8
2.1 Introduction ............................................................................................................................ 8
2.2 Open Pit Optimisation ............................................................................................................ 8
2.3 Production Planning ............................................................................................................. 10
2.4 Production Sequencing and Scheduling ............................................................................... 11
2.5 Attributes of Pushbacks ....................................................................................................... 16
2.5.1 Factors affecting pushback width............................................................................... 17
2.5.2 Selection of the mining width .................................................................................... 20
2.6 Pushback Design Techniques............................................................................................... 20
2.6.1 Manual design of pushbacks ...................................................................................... 21
2.6.2 The Lerchs-Grossmann algorithm.............................................................................. 25
2.6.3 Pushback design using the Lerchs-Grossmann’s Whittle Optimiser ......................... 28
3.0 GENETIC ALGORITHM METHODOLOGY............................................................... 35
3.1 Background of Genetic Algorithms ..................................................................................... 35
3.2 Genetic Algorithm Structure ................................................................................................ 36
3.3 Fundamental Genetic Algorithm Operators ......................................................................... 38
3.3.1 Selection ..................................................................................................................... 39
3.3.2 Crossover ................................................................................................................... 40
3.3.3 Mutation ..................................................................................................................... 40
3.4 Variations of Genetic Algorithm.......................................................................................... 41
List of Figures
Figure 1. A production plan scheduled by pushbacks ................................................................................ 13
Figure 2. An illustration of an Ultimate Pit Limit ...................................................................................... 16
Figure 3. Pushbacks or nested pits ............................................................................................................. 17
Figure 4. Pushback schematic in plan and section views ........................................................................... 23
Figure 5. The Phase I pit with haulage road .............................................................................................. 24
Figure 6. An arc ......................................................................................................................................... 26
Figure 7. Chaining of arcs.......................................................................................................................... 26
Figure 8. Start of the search by a 3-D Algorithm ....................................................................................... 27
Figure 9. Final stage of the search by the 3-D Lerchs-Grossman algorithm .............................................. 27
Figure 10. A simplified view of pit shells or pushbacks ............................................................................ 30
Figure 11. Whittle 4X pit by pit graph with modified revenue factors ...................................................... 31
Figure 12. Initial selection of pushbacks designed using Whittle 4X ........................................................ 32
Figure 13. Whittle 4X specified case after initial pushback selection ....................................................... 33
Figure 14. Simple Genetic Algorithm ........................................................................................................ 43
Figure 15. Steady-State Genetic Algorithm ............................................................................................... 44
Figure 16. The Struggle Genetic Algorithm .............................................................................................. 45
Figure 17. Circular reasoning in pit design ................................................................................................ 47
Figure 18. Differences between classical and proposed open pit planning ................................................ 54
Figure 19. Chromosome representation ..................................................................................................... 55
Figure 20. Reparation mechanism for crossover........................................................................................ 57
Figure 21. Pushback design process .......................................................................................................... 57
Figure 22. Ore grade representation for the 2D hypothetical orebody ....................................................... 58
Figure 23. The Genetic Open Pit Optimiser (GOPO) ................................................................................ 59
Figure 24. Calculation of the Areas, A1 and A2 for the waste required to be stripped. ............................ 61
Figure 25. Initial Pushback i ...................................................................................................................... 62
Figure 26. Pushback i + 1 .......................................................................................................................... 62
Figure 27. An illustration of how the capacity penalizing function works ................................................ 64
Figure 28. Check-Chromosome: Propagation from random position ........................................................ 66
Figure 29. Hypothetical orebody model .................................................................................................... 67
Figure 30. Best value graph for a price of $10........................................................................................... 68
Figure 31. Optimum pit with a price of $10 .............................................................................................. 69
Figure 32. Best value graph for a price of $20........................................................................................... 70
Figure 33. Optimum pit with a price of $20 .............................................................................................. 70
Figure 34. Best value graph for a price of $30........................................................................................... 71
Figure 35. Optimum pit obtained with a price of $30 ................................................................................ 71
Figure 36. Best value graph for a price of $40........................................................................................... 72
Figure 37. Optimum pit obtained with a price of $40 ................................................................................ 73
Figure 38. Best value graph for a price of $50........................................................................................... 73
Figure 39. Optimum pit obtained with a price of $50 ................................................................................ 74
Figure 40. Best value graph for a price of $60........................................................................................... 74
Figure 41. Optimum pit obtained with a price of $60 ................................................................................ 75
Figure 42. Best value graph for a price of $70........................................................................................... 75
Figure 43. Optimum pit obtained with a price of $70 ................................................................................ 76
Figure 44. Best value graph for a price of $80........................................................................................... 77
Figure 45. Optimum pit obtained with a price of $80 ................................................................................ 77
Figure 46. Best value graph for a price of $90........................................................................................... 78
Figure 47. Optimum pit obtained with a price of $90 ................................................................................ 78
Figure 48. Best value graph for a price of $100......................................................................................... 79
Figure 49. Optimum pit obtained with a price of $100 .............................................................................. 80
Figure 50. Effect of price on best value ..................................................................................................... 80
List of Tables
Table 1. Best value for a price of $10 ........................................................................................................ 68
Table 2. Best value for a price of $20 ........................................................................................................ 69
Table 3. Best value for a price of $30 ........................................................................................................ 71
Table 4. Best value for a price of $40 ........................................................................................................ 72
Table 5. Best value for a price of $50 ........................................................................................................ 73
Table 6. Best value for a price of $60 ........................................................................................................ 74
Table 7. Best value for a price of $70 ........................................................................................................ 75
Table 8. Best value for a price of $80 ........................................................................................................ 76
Table 9. Best value for a price of $90 ........................................................................................................ 78
Table 10. Best value for a price of $100 .................................................................................................... 79
Table 11. Results for Pushback 1 ............................................................................................................... 81
Table 12. Results for Pushback 2 ............................................................................................................... 83
Table 13. Results for Pushback 3 ............................................................................................................... 84
Table 14. Results for Pushback 4 ............................................................................................................... 85
Table 15. Results for Pushback 5 ............................................................................................................... 87
Table 16. Results for Pushback 6 ............................................................................................................... 88
Table 17. Data file for validation purposes ................................................................................................ 99
Table 18. Data file for final testing of the genetic model .......................................................................... 99
Table 19. Results for variation of best value with price........................................................................... 100
Table 20. Results for variation of best value with capacity ..................................................................... 100
Table 21. Results for variation of best value with capacity penalising function ...................................... 101
Table 22. Best value and number of generations ..................................................................................... 101
INTRODUCTION
INTRODUCTION
Pushbacks are nothing more than a sequence of pit limits based on alternative
economic scenarios. Simply put, pushbacks describe how a pit will expand as the value
of the recovered mineral increases. The progression of pushbacks or nested pit shells
roughly corresponds to the optimal evolution of the mine over time. The underlying
factor in the design of pushbacks is to generate a series of nested pits that conforms to
not only the minimum required pushback width but provide the highest dollar value for
a particular pit size. Pushbacks thus play a very important role in mine design and
optimisation.
Of the many algorithms that have evolved since 1965, the Lerchs-Grossmann (1965)
which is a graph maximisation algorithm has found greater application. The algorithm
is the core of Whittle (1999) optimisation package which is most widely used in the
mining industry. The generation of pushbacks that should produce schedules with
possible highest net present value (NPV) is however, limited by the selection of
pushbacks which yields an unconstrained size of pushbacks. The ability to achieve the
highest NPV resulting from production schedules is to a greater degree dependent on
the extent to which pushbacks with capacity constraint can be designed.
In recognition of the many techniques that have evolved since the 1960s, the Lerchs-
Grossmann stands out as a classic algorithm that the mining industry has reliably used
in open pit optimisation and generation of pushbacks. As far as this study is concerned,
genetic algorithm (Holland, 1975) has been chosen as the underlying heuristic
optimisation concept that may be able to enhance the Lerchs-Grossmann algorithm
particularly the design of pushback with capacity constraint. It has thus been
endeavoured in this study to demonstrate the Whittle optimiser using the genetic model
for pushback design with capacity constraint. The Genetic Model for Pushback Design
with Capacity Constraint is a computerised search and optimization method that work
very similar to the principles of natural evolution. The intelligent search procedure of
genetic algorithm finds the best and fittest design solutions based on Darwin’s survival-
of-the fittest principles. These best and fittest design solutions may otherwise be
difficult to find using other techniques.
The project research is thus divided into five chapters. In this chapter, the background
of the research is given highlighting the problem statement, research objective, the
scope of the study and introduces the pushback design tools.
Literature review has been discussed in the second chapter focussing on a range of
issues that are vital to mining and are dependent on the design of pushbacks. Among
these issues, open pit optimisation, production planning, and production sequencing and
scheduling have been cited. It is through these aspects that the significant role played by
a pushback is brought out. The chapter then provides a definition or description of
pushbacks recognising the attributes of nested pits and goes further to look at some of
the pushback design techniques with the classical Lerchs-Grossmann taking the centre
stage of discussion.
In Chapter Three, the concept of Genetic Algorithm (GA) is dealt with in two lenses.
The first akin to the traditional biological view, takes the biological environment as
neutral in the sense that the concepts can be taken advantage of in other spheres like
mining. The second lens focuses on the broader range of applications of genetic
algorithm to the mining industry. It will be appreciated, though, that a list of the
applications of Genetic Algorithm to mining given in the third chapter may not be
exhaustive. There are some other areas in mining where genetic algorithm has found
application but have not been cited in this manuscript.
Chapter four is the core of the research project. It details the concept of the Genetic
Model for Pushback Design with Capacity Constraint. The analysis of results and
findings given in this chapter also alludes to how the Whittle Optimiser has been
emulated for an enhanced optimum pit. The last chapter provides the conclusion and
recommendations of the study as drawn from the findings in Chapter four.
As genetic algorithms are a way of solving problems by mimicking the same processes
that Mother Nature uses, they use the same combination of selection, recombination and
mutation to evolve a solution to a problem.
Genetic algorithms are attractive in engineering design and applications because they
are easy to use and they are likely to find the globally best design or solution, which is
superior to any other design or solution. The intelligent search procedure of genetic
algorithm finds the best and fittest design solutions based on Darwin’s survival-of-the
fittest principles. These best and fittest design solutions may otherwise be difficult to
find using other techniques.
Python (Guido & Fred, 2009) is an easy to learn, powerful programming language
which has efficient high-level data structures and a simple but effective approach to
object-oriented programming. Python is an interpreted interactive object-oriented
programming language suitable (amongst other uses) for distributed application
development, scripting, numeric computing and system testing.
Because Python’s elegant syntax and dynamic typing, together with its interpreted
nature, makes it an ideal language for scripting and rapid application development in
many areas on most platforms, it was felt that it would easy the enormous work
required to actualize the programming of a pushback design with capacity constraint
using genetic algorithm.
According to Guido and Fred (2009), the language is named after the British
Broadcasting Corporation (BBC) show “Monty Python’s Flying Circus” and has
nothing to do with reptiles. Making reference to Monty Python skits in documentation
is not only allowed, it is encouraged!
Chapter Two
LITERATURE REVIEW
LITERATURE REVIEW
2.1 Introduction
There are several stages in which open pit design can be conducted. The most economic
final pit design often depends on factors that are largely outside the mining engineer’s
control, such as the geometric outline of the orebody, the distribution of ore within the
orebody, topography, maximum allowable slope angles, etc. The economics of the
mining program, however, depends upon the choice of mining ratio, production rates,
and equipment, all of which are determined by the mining engineer (Hartman, 1992).
Before the aspect of the design of a pushback using genetic algorithm can be dealt with,
the question that requires to be answered is “how does a pushback with capacity
constraint fit in the process of pit design?” In this regard, an effort has been made to
point out the significance of pushbacks in mine design and why a pushback design
using genetic algorithm could be the solution to open pit optimisation.
The principal common applications (MEA, 2008) of optimisation in open pit mine
planning include:
It is not the intention of this study to exhaust the outlined optimisation applications. Of
interest, however, among these applications is pit optimisation and generation of
pushbacks. Pushbacks are generated within the ultimate pit.
Open pit planning itself is dependent upon the interaction of contributing factors that
lead to maximising the NPV. However, mine planners who must recommend mine plant
size, equipment selection, and long-range scheduling are usually faced with the problem
of how to optimise an ore deposit not only in terms of mechanical efficiency but also in
project life (Hartman, 1992).
The limits of the pit must be set as an initial step in long or short-range mine planning
so that the ultimate pit limit will represent the maximum boundary of all material within
the pit. The limits thus define the amount of ore mineable, the metal content, and the
associated amount of waste to be moved during the life of the operation (Kennedy,
1990). The mineable material becomes that lying within the pit boundaries. The
economic factors and design/production constraints determine the shape and size of the
pit. The pit would increase in size if there is an increase in metal price. This is assuming
that all the other factors are kept constant. On the other hand a reduction in price would
result in a reduced pit size. In the final analysis the optimal pit outline is defined as the
one with the highest dollar value. When used properly, pit optimisation is a tool that can
greatly speed and ease the process of pit design. It can increase the value of a pit and
can also be used to reduce the corporate risk involved in mining.
There are several methods that are available to optimise the design of a pit. The ultimate
pit limit design techniques evolve around the hand/manual methods, computer methods
and computer assisted handy methods. The available optimisation methods attempt to
find the optimal pit outline in terms of a block model. These methods try to find a list of
blocks which has the maximum total value while still obeying the slope constraints
(Kennedy, 1990). Drawing our attention to computer methods, we find the industry’s
acclaimed optimisation software, Whittle 4X (1999) using a graphical method. Whittle
4X is an implementation of the Lerchs-Grossmann (1965) algorithm. Pit optimisation
using Whittle 4X is an example of the broad scope of understanding that is required
when implementing open pit optimisation.
When optimising using Whittle 4X, the pit shells or nested pits are defined using
revenue factors. Once a series of pit shells has been defined, it is possible to choose
which pit shells are to be used as pushbacks and this is achieved with the aid of a pit by
pit graph. In calculating the dollar value, the mining sequence must be decided upon
and then conceptually mine out the pit, progressively accumulating the revenues and
costs along the way (Kennedy, 1990)
The impact of the following must however, be considered when optimising using
Whittle 4X:
Although Whittle 4X is the mining industry’s main open pit optimisation software
package, it should be realised that the Lerchs-Grossmann (1965) algorithm produces
non-optimal pits as the selection process of pit shells to be used as pushbacks does not
guarantee the optimality. To this end, it has been endeavoured in this research to define
or design pushbacks with capacity constraint using genetic algorithm in the quest to
enhance the optimality of pits.
cutoff grade and without the ore reserves, the final pit limits cannot be established.
Similarly, without any knowledge of the overall tonnages, the production schedule
cannot be selected; and without the required capacity-generated capital and operating
costs, the cut-off grade and total ore reserves cannot be derived (Hartman, 1992).
As cited by Hustrulid and Kuchta (2006), Couzens (1979) gives two kinds of
production planning which correspond to different time spans:
The above two kinds of planning show that planning is an ongoing activity throughout
the life of a mine. In the long-range production planning for an open pit, the mine life is
dependent upon the determination of production rate, pushback design and sequencing.
Well designed and sequenced pushbacks will ensure deferred waste stripping
requirements are met and at the same time provide smooth equipment and manpower
build-up. The orebody can also be mined in a way that minimises the cost per unit of
metal to be produced. So critical to the economic success of a pit is also the need to
counter the possibility of miss-estimation of the ore tonnages and grades in the reserve
model (Hustrulid & Kuchta, 2006). Unless a robust pushback is designed, an insured
incorporation of sufficient exposed ore to counter this possibility which is particularly
true in the early years of a pit cannot be guaranteed.
scheduling. It is scheduling that determines the mine life and, therefore, the subsequent
cash flows including capital requirements, operational costs, and revenues.
The purpose of scheduling is to determine how the production of the sealable mineral
product will be achieved over time, including the necessary pre-production
development. The process of scheduling is complex involving tabulation of quantities,
grades and other values over a time frame. Typical mine schedules may include:
To underscore the point, the objective of production scheduling is to maximise the net
present value and return on investment that can be derived from the extraction,
concentration, and sale of some commodity from an ore deposit (Kennedy, 1990).
Kennedy doesn’t just end up with an objective of production scheduling, he further
stresses that the procedure used to establish the optimal mining schedule can be divided
into three stages. The first stage defines the extraction order or mining sequence. The
second defines a cut-off grade strategy that varies through time and will be optimal for
a given set of production parameters while the third defines which combination of
production rates of the mine, mill, and refinery will be optimal within the limits placed
by logistical, financial, marketing, and other constraints.
While all reasonable steps should be made to follow the optimal pit outline, the
sequencing of pushbacks takes precedence. In order to develop an optimum production
schedule, a sequence or extraction order inside of the so-called ultimate pit must first be
determined.
The extraction sequence depends on two subsets of parameters. The first deals with the
strip ratio associated with recovering the ore, the grade of that ore, and the physical
location of that ore in respect to availability through time. The second subset of
parameters consists of costs associated with starting and maintaining the whole
operation (Kennedy, 1990). Direct operating costs can be used to define a breakeven
cut-off grade and strip ratio, but the objective of mine planning is to devise a strategy
that will optimise the total investment and the centre stage of this strategy is nothing
else but a capacity constrained pushback designed within the optimal pit outline.
Hartman (1992) has categorised the following parameters to provide guidelines for
production scheduling of operations:
Tentatively, mining sequences are established and then analysed to set the most logical
development program. The mine sequencing then assures a predictable mill feed
(Hartman, 1992).
When a pit is scheduled, the sequence in which various parts of the pit will be mined
and the time interval in which each nested pit is to be mined is planned. This affects the
value of the mine because it determines when various items of revenue and expenditure
will occur. This is important because today’s dollar is more valuable than the dollar that
is going to be received or spend in a year's time.
There are various reasons for this:
• Delayed revenue may increase the need to borrow funds and pay interest, thus
reducing the effective revenue;
• Delayed revenue may not eventuate-one of the risk factors;
Pushback Design using Genetic Algorithms Western Australian School of Mines
15
• Delayed expenditure may reduce the need to borrow funds and pay interest, thus
reducing the effective expenditure;
• Something unexpected may go wrong with the operation-another risk factor; etc.
There are two limiting schedules between which lies an optimal production schedule.
These schedules are the Best Case and the Worst Case (Kennedy, 1990). The best case
scheduling involves mining with many small pushbacks or cutbacks. This sequence
occurs when each of the pit shells is mined one after the other basing on the assumption
that the highest valued ore is first accessed in the initial pit. Each pit shell is mined
before starting the next one, from inside to out implying that the most valuable ore
would be recovered as early as possible in the mine life thus maximising cash flow as
waste stripping is deferred.
The best case sequence obeys the Increasing Stripping Ratio Method (Hartman, 1992)
where stripping is performed as needed to uncover the ore with the working slopes of
the waste faces maintained parallel to the overall pit slope angle. It greatly reduces the
investment risk in waste removal for ore to be mined at a future date. The drawback is
that it is impractical for equipment manoeuvrability as the production benches tend to
be narrow with depth thereby resulting in failure to meet production needs. It is also
unlikely that a balanced production of ore and waste can be achieved given a schedule
which is entirely focussed on early ore production and waste deferment. This schedule
is thus in no sense a practical schedule, but it indicates the highest possible NPV that
can be achieved in an ideal situation.
As for the worst case sequence, it involves mining the final pit, bench by bench from
top to bottom. It mines waste earlier than necessary and delays ore production. This
sequence relates to the Declining Stripping Ratio Method (Hartman, 1992). The
advantages include the operating working space availability, the accessibility of the ore
on the subsequent bench, all equipment working on the same level, no contamination
from waste blasting above the ore, and equipment requirements are a minimum towards
the end of the mine life. The primary disadvantage of this method, however, is that the
overall operating costs are a maximum during the initial years of operation when
maximum profits are required to handle interest and repayment of capital (Hartman,
1992) and the result is lower NPV as compared to the best case scenario. This sequence
is usually practical, but produces the lowest possible NPV.
The starting point for the design of a pushback is the calculation of a minimum mining
width. This calculation is based on the loader or shovel turning radius, bank angle, truck
width, safety berms and some maneuvering area. One must provide adequate operating
room for maneuverability and mining flexibility in ore/waste segregation requirements
(Hartman, 1992).
Usually the incremental mining from the smallest pit to larger pit is referred to as
pushback mining and there are cases where production is scheduled from more than one
pushback simultaneously. Once the nested pits are generated and smoothed, haul roads
are added, and they are used as pushbacks underlying practical plans from which yearly
schedules are generated (Dagdelen, 2001).
feeds. Depending on the spatial distribution of the ore types, narrow working faces
may improve opportunities for the blending of ores.
• Slope stability
Slope stability is a consideration as well, since narrower pushbacks typically create
shallower overall pit slopes with less vertical extent between pushback. Wider
pushbacks will have a greater vertical extent between pushbacks, and steeper slopes
can be excavated. Wider pushbacks are often developed at the ultimate slope design
limits, and failures may be more likely to occur. Wider pushbacks may be used to
test the ultimate slopes early in the project life.
However, erratic deposits can pose problems in that there is a possibility that the ore
zone may not quite be where it was estimated to occur. As a result, narrow
pushbacks may mean that there is a risk that the ore is not completely exposed by
the stripping. The local predictability of the deposit can be inferred from the
variograms used in the resource model development. The detail of how this can be
achieved is however, outside the scope of this research.
Following the analytical work, the more subjective factors must be addressed. While the
flexibility and operating cost effects are difficult to enumerate, their effects are real and
must be considered in selecting the appropriate width for pushbacks. Ultimately, the
judgment of the planner, the grade-control staff, and the use of the available analytical
tools are the best means of reconciling the various trade-offs in the selection of the
mining width.
Due to mining parametric uncertainty, pit optimisation and pushback design still poses
a challenge to the mining industry. All available methods attempt to find the optimal
outline in terms of a block model that consists of a regular matrix of blocks in three
dimensions. The different methods try to find the list of blocks which has the maximum
possible total value, while still obeying the slope constraints. The design of the mining
phases can be accomplished by rough manual approximation after review of the bench
plans and cross sections, or analytically by computer techniques. Computer designed
phases can be determined by feeding the data developed and stored in a computer block
model into a set of programs that can be used to calculate an economic phase limit. The
objective is to develop three dimensional equal profit potential surfaces throughout the
mineral deposit. Each surface has to be sufficiently spaced apart to allow adequate room
for mining the slices between the surfaces. Since the distance between equal profit
potential surfaces will vary, some manual adjustments will be required, as well as the
addition of haul roads out of a phase and if required, access left for the next phase
(Kennedy, 1990).
Although manual planning methods are essentially trial and error approaches, it will be
a great disservice to go un-discussed in this thesis. This is because the many efficient
computerised techniques have been developed from heuristic algorithms that were
conceived and birthed as a result of the need to improve on the manual way of design.
The following manual steps as outlined by Hustrulid and Kuchta (2006) are a series of
steps in manual pushback design as provided by Crawford (1989a).
1. Start with the ultimate pit design: Develop a detailed data of ore grade and stripping
distributions for various cutoff grades in zones around the designed pit
circumference and in pit shell progression between the beginning surface
topography (or pit surface) and the design pit limit. The data should include
locations of ore zones (these vary with cutoff) and the impact of the difference
between operating and ultimate pit slopes. Of particular interest should be locating
high ore grade and low stripping zones on level plan maps and cross sections.
2. Planning goals typically comprise one of the following: (a) maximum NPV
economics; (b) provision of stable cash flow patterns; (c) uniform ore grade, grade
decline curve, or high grading. Frequently high grading is used during the initial
investment payback period. The level(s) of ore grade will be related to the cutoff
criteria; (d) uniform stripping ratio or classic stripping ratio curve; (e) uniform total
tonnage rate (ore + waste); (e) uniform or variable rate of product output.
3. Operating design criteria for pushback design: These include operating and
remnant bench widths, slope between operating benches and roads, overall
operating slope, road width and grades, and bench height. It is usually not
uncommon to have typical values as follows: remnant bench width equal to bench
height; pushback widths normally 60-150 m depending on size of pit and orebody
characteristics; minimum pushback widths (single cut phases) about 24 m for small
equipment and 40-45 m for 22-27 m (25-30 yd) shovels and 147-190 tonne (150-
200 ton) trucks; road width 15-24 m depending on width of equipment. Maximum
road grade 8-12 percent.
4. Laying out of one to several pushbacks: Evaluating whether they satisfy the goals,
individually and collectively, is a more or less cut and try process. Normally a
pushback is laid out according to the operating criteria in plan and cross-section
views (see figure 4). A useful tool is to make a scaled bench crest and toe pattern
including operating bench and road widths.
5. The pushbacks are shown on plan view maps as a progression of bench level toes
and crests from initial topography to ultimate pit limit (Figure 4). New levels are
created as the pushback progresses at the pit rim and at the bottom. New bottom
levels are established on the basis of minimum level size and ore grades. Normally,
new bottom levels are encouraged by the need to hold stripping at reasonable levels.
In addition to pit geometry, ore/waste interface lines for the selected cutoff must be
plotted.
6. Calculations of volumes of ore and waste are done using a planimeter to measure
areas, and the average grades within pushbacks are determined. The volumes of
material to be removed from each bench are based on the average of the areas
encompassed by the movements of the bench crest and toe from initial to new
position by pushback, and the average bench height for the zone covered. Ore and
waste volumes are calculated separately. The average ore grade is determined by
averaging the block values within ore zones. In multiple pushbacks, a pushback
serves as the initial location for a subsequent pushback. The calculated values are
evaluated against the various goals for acceptability of the individual pushback or
series of pushbacks.
Figure 4. Pushback schematic in plan and section views (Crawford, 1989a) – an extract from Open Pit
Mine Planning and Design (Hustrulid & Kuchta, 2006)
7. For plan view calculations, the planimeter is used to determine the areas of crest
and the toe movements; commonly called crest to crest and toe to toe calculations.
If the pit geometry is sufficiently regular, only the toe to toe calculations may be
necessary. To achieve accurate results, the calculation of volumes for new levels at
the pit rim or at the bottom, along irregular pit rim elevations, for roads, at the
ultimate pit intercept and for irregular bench heights require special planimeter
techniques. The key is to divide up the volumes to be calculated into rectangular,
parallelogram type solids with flat tops and bottoms and reliable average heights.
The areas to be calculated must be closed polygons. The geometric layout prior to
calculation is critical for accurate results. All the benches and roads must be
described in the form of crests, toe, and average heights. Each bench and its related
parts are calculated separately.
The manual construction procedure involved in designing a pushback together with the
layout of the main haulage road has been described in detail with the aid of an example
as highlighted by Hustrulid and Kuchta (2006). Figure 5 is an illustration of the initial
stage in pushback design.
Figure 5. The Phase I pit with haulage road (Mathieson, 1982) - an extract from Open Pit Mine Planning
and Design (Hustrulid & Kuchta, 2006)
In order to accelerate the success of pit optimisation and pushback design, the mining
industry can no longer afford to be limited to just any feasible solution usually obtained
by trial-and error methods. An optimal solution that incorporates all the factors such as
the metal price, cost, grade uncertainty, minimum width, safety in terms of slope angle,
etc is required. Thus, as far as this study is concerned, genetic algorithm (Holland,
1975) has been chosen as the underlying heuristic optimisation concept.
Pushback Design using Genetic Algorithms Western Australian School of Mines
25
In their (Lerchs & Grossmann, 1965) publication, it has been assumed that the
concentration of ores and impurities is known at each point while the problem is to
decide what the ultimate contour of the pit will be and in what stages this contour is to
be reached. The objective then is to design the contour of a pit so as to maximise the
difference between the total mine value of ore extracted and the total extraction cost of
ore and waste. With this objective, they recognized the sole restrictions posed by the
geometry of the pit; the wall slope of the pit must not exceed certain given angles that
may vary with depth of the pit or with the material.
The method works with only two types of information i.e. the block values and “arcs”
(Lerchs & Grossmann, 1965). An arc is a relationship between two blocks. As shown in
Figure 6, an arc from block A to block B indicates that, if A is to be mined, then B must
be mined to expose A and the reverse is not true. If block B is to be mined, block A
may or may not be mined.
In most optimisation packages, all the slope requirements are translated into a (large)
number of block relationships in the form of arcs. Because arcs can chain, there is no
need to have so many arcs. An arc from A to B and that from B to C ensures that C is
mined if A is to be mined despite there being no arc from A to C (Figure 7).
block that is to be mined and these flags can be turned on and off many times. A block
is flagged to be mined if it currently belongs to a linked group of blocks that have a
total value that is positive. As an illustration of the three-dimensional Lerchs-
Grossmann algorithm, a two-dimensional block model shown in Figure 8 has been used
to show the “start” of the search procedure and the “final” stage is given in Figure 9.
The detailed knowledge of the mathematics that is involved in the algorithm itself has
been outlined by Whittle (1999).
Figure 8. Start of the search by a 3-D Algorithm (Whittle, 1999) – an MEA (2009) extract
Figure 9. Final Stage of the search by the 3-D Lerchs-Grossman algorithm (Whittle, 1999) – an MEA
(2009) extract
The Lerchs-Grossmann method has been programmed by about four different groups.
Although the programs produced by these groups differ in their ability to handle slope
constraints as well as the machines on which they can run, the underlying principle of
the algorithm is the same. As regards the design of pushbacks using the Lerchs-
Grossmann algorithm, the issue at hand is discussed with reference to Whittle 4X which
provides the fundamental graphical implementation approach that has found
appreciable commercial use for pit optimisation in the mining industry.
……….. (1)
Where
The above variables affect both the value of the blocks and the shape of the pit. It, thus,
sufficed for Whittle to reduce the number of economic variables in the Block Economic
Value equation to obtain two factors, one major and the other minor. This was done by
dividing Equation (1) by the cost of mining and removing a tonne of waste (Mc).
Hence,
……….. (2)
is the amount of product that should be sold to pay for the mining of a tonne of
material. This is the only significant (major) variable, because is not expected to
change significantly (thus minor) unless there is a significant change in one of the cost
components, or a new mining or processing method is introduced (Whittle, 1999).
……….. (3)
V being the dollar value per block, pushbacks are generated by changing λ in each step
while implementing the Lerchs-Grossmann algorithm on each converted block model.
When optimising using Whittle 4X, the pit shells or nested pits are defined using
revenue factors. The revenue factors are used to calculate different pit shells by varying
the prices of the product but keeping the costs the same. The aim is to determine the
logical progression of economically defined pits between the optimal point of initiating
the mine and the ultimate pit. Whittle 4X works out the cash flow that would result in
mining a block whether positive (for ore) or negative (for waste) using a scheduling
algorithm. So, for smaller revenue factors, the price is low and a block may not be
worth mining because of the cost of removing all the waste to get at it. As the revenue
factor gets higher, the price goes up while the costs stay the same and there will
eventually be a point where a block is worth mining because the revenue will be greater
than the cost.
Pushback Design using Genetic Algorithms Western Australian School of Mines
30
The reason Whittle 4X does this is to create a series of pit shells from the small inner
shells to the large outer shells that must be mined in sequence from inside to out and top
down, making it easier to calculate a schedule (Whittle, cited in MEA, 2008; 2009). As
shown Figure 10, eight pit shells have been defined. It can be seen that there are many
different sequences, such as a- b- c- d- e- f- g or a- f- b- g- k- c- h, that can be applied to
mining the benches. The sequence which is used will determine the cash flow from the
project.
While the basic unit is the individual block, Whittle 4X simplifies the sequencing and
scheduling of pits by grouping all blocks on a bench and within the limits of a pit
expansion into a panel, designated as ‘a’ through ‘t’ as indicated in Figure 10.
Figure 10. A simplified view of pit shells or pushbacks (Whittle, 1999) – an MEA (2009) extract
Whittle 4X applies various scheduling heuristics to these panels to give some indication
of the relative value of including a pit as a pushback in the scheduling process. Pits that
account for a significant increase in volume may not have a significant influence on
cash flow. Once a series of pit shells has been defined, it is possible to choose which pit
shells are to be used as pushbacks and this is achieved with the aid of a pit by pit graph
(see Figure 11).
Figure 11. Whittle 4X Pit by pit graph with modified revenue factors (Whittle, 1999)
Since each pushback represents a major stage in planning the pit, a relatively small
number of pushbacks from among the pits should be selected. The goal is to keep the
number of pushbacks as low as possible without losing the resolution necessary to
maximise cash flow during the production scheduling process.
Whittle 4X includes three different sequencing options that can be used as an aid in
selecting pushbacks: the best case, the worst case and a specified case. All of these
options use a set of user defined pushbacks. The best case sequence occurs when each
of the pit shells is mined one after the other, as in the sequence a-f-b-g-k in Figure 10.
Given the assumption that the initial pit accesses the highest valued ore first, this
sequence should maximise cash flow by mining ore as early as possible while deferring
waste stripping. The worst case sequence of mining occurs when the final pit is mined
bench by bench regardless of pit as in the sequence a-b-c-d-e-f. This sequence mines
waste earlier than necessary and delays ore production. Figure 12 is an illustration of
pushbacks selected in the initial stage in Whittle 4X.
Figure 12. Initial selection of pushbacks designed using Whittle 4X (Whittle, 1999)
Between the two extremes (i.e. the best case and worst case), a specified case (see
Figure 13) can be applied which varies the number of panels mined within each
pushback before proceeding to mine from the next pushback. The specified case will
always have a discounted value somewhere between the best case and the worst case. In
the final analysis, the set of pushbacks chosen should result in a discounted value as
close to the best case as possible.
Figure 13. Whittle 4X Specified case after initial pushback selection (Whittle, 1999)
Although ultimate pit limit determination can be performed using the many different
mining software packages available, there is a similarity in the underlying principle of
analysis governed by these packages. The procedure followed to generate nested pits is
by changing the commodity price, costs or cut-off grades gradually from a low value to
a high value. By changing the commodity price, for example, from a low value to a
high value, one can generate a number of pits in increasing size and decreasing average
value per tonne of ore contained in the pit. Since the smallest size pit contains the
highest valued ore, the production is scheduled by mining the smallest pit first followed
by the production in larger pits (Dagdelen, 2001).
Chapter Three
GENETIC ALGORITHMS
METHODOLOGY
Genetic Algorithms (GAs) are search methods that employ processes found in
biological evolution (Townsend, 2003). Simply put, genetic algorithm can be defined as
a search technique used in computing to find exact or approximate solutions to
optimisation and search problems (Wales, 2001). These algorithms search or operate on
a given population of potential solutions to find those that approach some specification
or criteria. To find better and better approximations, the algorithm applies the principle
of survival of the fittest using techniques inspired by evolutionary biology such as
inheritance, selection, mutation, and crossover.
It has been acknowledged (Scott, 2004) that genetic algorithms are particularly useful
for problems where it is extremely difficult or impossible to get an exact solution or for
difficult problems where an exact solution may not be required. Scott (2004) stresses
that genetic algorithms offer an interesting alternative to the typical algorithmic solution
methods, and are thus highly customizable. This view coupled with the capability of the
algorithms to evolve populations that are better suited to their environment than the
individuals they were created from, just as in natural adaptation is the underlying factor
for this research to explore the behaviour of capacity constrained pushback using
genetic algorithms. It is envisaged that the diversity of genetic algorithms would be able
to yield results that are well comparable to the Lerchs-Grossmann (1965) algorithm.
As stochastic heuristic search method, genetic algorithms operate on more than one
solution at once making the algorithm good at both the exploration and exploitation of
the search space. Whereas a comprehensive description of the basic principles at work
in genetic algorithms was provided by Goldberg (1989), many of the implementation
details for using genetic algorithms with various data types was described by
Michalewicz (1994).
1. Work with a coded form of the function values (parameter), rather than with the
actual parameters themselves. For example if the minimum of the objective
function is to be found, the genetic algorithm would not
deal directly with or values. Instead it would work with strings that
encode these values. In this case strings representing the binary values would be
used. Traditionally, solutions are represented in binary as strings of 0s and 1s,
but other encodings are also possible.
2. Use a set or population of points spread over the search space to conduct a
search, not just a single point on the space. This provides genetic algorithms
with the power to search spaces that contain many local optimum points without
being locked into any one of them, in the belief that it is the global optimum
point.
3. The only information a genetic algorithm requires is the objective function and
the corresponding fitness levels to influence the directions of the search. Once
the genetic algorithm knows the current measure of goodness about a point, it
can use this to continue searching for the optimum.
4. Use probabilistic transition rules, not deterministic ones.
5. Are generally more straightforward to apply.
6. Can provide a number of potential solutions to a given problem.
7. Are inherently parallel. This is one of the most powerful features of genetic
algorithms, allowing them to deal with a large number of points (strings)
simultaneously.
A genetic algorithm has the ability to create an initial population of feasible solutions
(or number of individuals). It starts with the generation of a random population of
individuals (chromosomes) which are randomly initialised at the beginning of a
computation. This initial population is then compared against the specifications or
criteria (i.e. the fitness) and the individuals that are closest to the criteria, that is, those
with the highest fitness factor, are then recombined in a way that guides the search to
only the most promising areas of the state or search space. Thus the first or initial
generation is produced. Each feasible solution is encoded as a chromosome (string) also
called a genotype and each chromosome is given a measure of fitness (fitness factor)
via a fitness (evaluation or objective) function. The fitness of the chromosome
determines its ability to survive and produce offspring.
If the optimisation criteria are not met, the creation of a new generation starts.
Individuals are selected (parents) according to their fitness for the reproduction of the
offspring. Parent chromosomes are combined to produce superior offspring
chromosomes (crossover) at some crossover point (locus). All offspring will be mutated
with a certain probability. The fitness of the offspring is then computed. The offspring
are then inserted into the population replacing the parents, producing a new generation.
This cycle is performed until the optimisation criteria are reached. In some cases, where
the parent already has a high fitness factor, it is better not to allow this parent to be
discarded when forming a new generation, but to be carried over. Mutation ensures the
entire state-space will be searched (given enough time) and is an effective way of
leading the population out of a local minima trap.
In summary, the first thing in GA is to create a new population by repeating the steps
for selection, crossover and mutation until the new population is complete as is outlined
below.
• Selection: select two parent chromosomes from the current population according
to their fitness. The chance of being selected is proportional to the
chromosome’s fitness (i.e. the better the fitness, the better chance to be
selected). Selection can be done with replacement meaning that the same
chromosome can be selected more than once to become a parent.
• Crossover: with a crossover probability, crossover the parents at a randomly
chosen point to form two new offspring (children). If no crossover is performed,
an offspring is the exact copy of the parent.
• Mutation: with a mutation probability, mutate two new offspring at each locus
(position) in the chromosome.
Replace: before the old generation can be replaced with the new generated population
for a further run of the algorithm, it is important to accept and place new offspring in
the new population.
Test: if the end condition is satisfied, stop and return the best solution in the current
population. The loop is formed by going back to step 2 (selection) if the end condition
is not met.
The operations of genetic algorithms are used to modify the chosen solutions and select
the most appropriate offspring to pass on to the succeeding generations. These
operations include selection, crossover and mutation.
3.3.1 Selection
Selection (Townsend, 2003) is the determining process by which variants are able to
persist and therefore also which parts of the space of possible variations will be
explored. It determines which individuals are chosen for breeding (recombination) and
how many offspring each selected individual produces. Natural selection is based on the
fitness of each individual. Reproductive fitness is a measure of how many surviving
offspring an organism can produce. The organism’s inherited characteristics are
represented into a code. The better adapted the organism is to its environment, the more
successful offspring it will create. Because of competition for limited resources, only
organisms with high fitness survive. Those organisms less adapted to their environment
than competing organisms will simply die out. The fitness of an organism is typically
defined as the probability that an organism will live to reproduce or as a function of the
number of offspring the organism has (fertility). The fitness function drives the
population toward better solutions and is the most important part of the algorithm.
3.3.2 Crossover
Crossover typically consists of exchanging genetic material between two single
chromosome parents. It is the chance that two chromosomes will swap their bits. The
concept roughly imitates biological recombination between two single chromosomes
where subparts of two chromosomes are swapped. For example, given two parent
chromosomes (Townsend, 2003) as:
Parent A: 10001001110010010
Parent B: 01010001001000011
The crossover operator randomly chooses a locus (i.e. a bit position) along the length of
the chromosomes. If position 9 has randomly been chosen, the above strings could be
crossed over after the ninth locus in each to produce the two offspring:
Offspring A: 10001001101000011
Offspring B: 01010001010010010
Parent X: X1 X2 X3 X4 X5 X6
Parent Y: Y1 Y2 Y3 Y4 Y5 Y6
The swapping of genetic material between the two parents on either side of the selected
crossover point, say fourth locus, produces the following offspring:
Offspring X: X1 X2 X3 X4 Y5 Y6
Offspring Y: Y1 Y2 Y3 Y4 X5 X6
3.3.3 Mutation
Mutation (Townsend, 2003) is the chance that a bit within the chromosomes will be
flipped (0 becomes 1, 1 becomes 0). It consists of flipping the bit at a randomly chosen
locus (or for larger alphabets, replacing the symbol at a randomly chosen locus with a
randomly chosen new symbol). Mutation can occur at each bit position in a string with
some probability and this value is usually very small, say 0.001 for binary encoded
genes. The mutation operator randomly flips or alters one or more bit values at
randomly selected locations in a chromosome. Consider the two offspring (individuals
or children) from each crossover operation being subjected to the mutation operator in
the final step to forming the new generation. For example, the string
10001001101000011 could be mutated in its third position to yield
10101001101000011. If 100% mutation was to take place, then all of the bits in the
chromosome would be inverted.
It should be noted that a sufficient level of genetic variety in the population is required
for the entire solution space to be used in the search for the best solution and without
the mutation operator enhancing the ability of the genetic algorithm to find a near
optimal solution to a given problem, the maintenance of this sufficient level cannot be
guaranteed.
It has been pointed by Matthew (1996) that in traditional optimisation methods, the
search algorithm is tightly coupled to the optimisation generator. These methods
operate in the problem space; they require information about the optimisation in order
to search for better optimisations. Genetic algorithms operate in the representation
space. They care only about the structure of a solution, not about what that structure
represents. The performance of each solution is the only information the genetic
algorithm needs to guide its search.
The research work on genetic algorithms has shown that a key issue in GAs is the
convergence of the algorithm. A fast convergence of the population would stagnate the
search to local optima whereas slower convergence would require a considerably longer
time towards sub-optimal solutions (Fatos et al, 2006). The convergence of GAs is
achieved by means of selection and replacement strategies and it is, therefore, very
important to carefully tune these strategies.
It has been shown by Gruninger (1996) that in order for the genetic algorithm to be able
to avoid both local minima/maxima in the global search and find small improvements in
the local search, the genetic operators must effectively balance exploration and
exploitation. In order to maintain clusters of similar solutions, some genetic algorithms
introduce another operator to measure similarity between solutions. By maintaining
diversity in the population, the algorithms have a better chance of exploring the search
space and avoid a common problem of genetic algorithms, premature convergence. All
of the individuals typically end up with the same genetic composition after a population
has evolved. Thus, the individuals have converged to the same structure. If the optimum
has not been found, then the convergence is, by definition, premature. It is very unlikely
once the population has converged in most cases to achieve further improvement.
Many hybrid genetic algorithms which combine hill-climbing, repair and other
techniques which link the search to a specific problem space exist. However, the three
variations of genetic algorithms discussed in this research are an outline by Matthew
(1996). These include simple genetic algorithm, stead-state genetic algorithm and
struggle genetic algorithm.
Since the algorithm only replaces a portion of the population of each generation, the
best individuals are more likely to be selected and the population quickly converges to a
single individual. As a result, the steady-state algorithm often converges prematurely to
a suboptimal solution. Once again, the crossover and mutation operators are key to the
algorithm performance; a crossover operator that generates children unlike their parents
and/or a high mutation rate can delay the convergence.
is that, instead of replacing the worst individual, a new individual replaces the
individual most similar to it. In other words, this only takes place if the new individual
has a score better than that of the one to which it is most similar. This requires the
definition of a measure of similarity (often referred to as a distance function). The
similarity measure indicates how different two individuals are, either in terms of their
actual structure (the genotype) or of their characteristics in the problem-space (the
phenotype). Unlike the steady-state algorithm which uses a replace worst strategy for
inserting new individuals into the population, Figure 16 gives an illustration of the
struggle genetic algorithm using a form of replace most similar.
In his analysis of the previously discussed variations, Matthew (1996) argues that if
allowed to evolve long enough, both the simple and the steady-state algorithms
converge to a single solution; eventually the population consists of many copies of the
same individual. Once the population converges in this manner, mutation is the only
source of additional change. Conversely, a population evolving with a struggle
algorithm maintains different solutions (as defined by the similarity measure) long after
a simple or steady-state algorithm would have converged. As cited by Matthew (1996),
the struggle algorithm unlike other niching methods such as sharing or crowding
(Goldberg & Richardson, 1987; Mahfoud, 1995), requires no niching radius or other
parameters to tune the speciation performance. The struggle algorithm is similar to
deterministic crowding and shares some characteristics of restricted tournament
selection.
If the similarity function is properly defined, the struggle algorithm maintains diversity
extremely well. However, like the other genetic algorithms, performance is tightly
coupled to the genetic operators. For example, if the crossover operator has a very low
probability of generating good individuals when mating between or across the species
defined by the similarity measure, the algorithm will fail. If the mutation rate is too
high, the algorithm will perform only as well as a random search.
Since pit optimisation entails defining the ultimate pit limit for a particular deposit
while taking into consideration the mining and economic constraints, all of the
constraints involved need to be harnessed into a system that does not detach production
scheduling from the ultimate pit determination. This is because there is a circularity
reasoning (Schofield & Denby, 1993) that leads to the most efficient optimisers
producing sub-optimal pits as this aspect is usually ignored. Just like in the case of the
human physiology where it is difficult to separate between bone and marrow, Figure 17
illustrates the strong relationship between optimum pit limit determination and
production scheduling.
Figure 17. Circular reasoning in Pit Design (Schofield & Denby, 1993)
It will be realised that practical application of the envisaged system to meet these
objectives was achieved through the use of genetic algorithms. Hence the development
of “Generally Optimised Pit (GO-PIT)” by Schofield and Denby (1993).
In the research, a set of possible pits that saw the production of future generations (pits)
was the initial step of the genetic algorithm. A relatively large population of random
schedules which also included a small number of highly constrained schedules was used
as a strategy that successfully examined the importance of the initial population. It
suffices to consider the size of the population because of its significant effect on the
performance of the algorithm.
Also, particular attention in the use of the algorithm was given to the pit fitness function
which is the measure of the efficiency of a particular schedule. In this case the fitness
function carries out a discounted cash flow calculation for the simulated pit on the basis
of a set of user definable functions that linked a number of factors such as grade, cut-off
grade, recovery factors, extraction timing, mining and processing costs, discount factors
and mineral market values. The good schedules that usually survive, prospering into
future generations has high fitness values. Noticeably, the fitness function is totally
independent of the genetic algorithm operators, which is one of the key advantages of
the genetic algorithm approach. Thus there is a possibility of having either simple cost
or revenue functions or highly complex fitness functions without modifying the basic
optimising system and on this basis, the research saw the GO-PIT system having the
potential to easily be customised for different situations.
In terms of reproduction from one generation to the next, it is pointed out in GO-PIT
that there is an intrinsic link between the chances of reproduction and the fitness value
of chromosome. It has also been found (Schofield & Denby, 1993) that the scheduling
constraints get violated in the system, for example production tonnages during a
scheduling period become greater than feasible or block precedence relationships being
broken. This being a major difficulty that arises when pits are produced or modified by
one of the genetic operators, reproduction in GO-PIT is based on a linear normalization
technique. This ensures that the pits are ranked in order of fitness and their probability
of reproduction is mapped onto a linearly decreasing scale from high to low probability.
Thus, it is less likely in this way to have a good schedule that dominates the population
quickly and reduce the chance of the system from converging quickly to a false
optimum.
As regards risk incorporation, Schofield and Denby (1993) stresses that the fitness
function is decoupled from the optimising mechanism making it one of the highly
promising features of a genetically based optimising system for pit design and
scheduling. All what this entails is that the measure of the fitness function can be
modified extensively without the principal parts of the genetic algorithm requiring any
alteration.
With the recognition that the two fundamental problems facing the mining engineer are
the determination of the pit limit and extraction scheduling, investigation of Open-Pit
Design and Scheduling by Use of Genetic Algorithms (Denby & Schofield, 1993) has
demonstrated that it is possible to combine pit limit and extraction scheduling
simultaneously in order to maximise NPV. Unlike a number of techniques and
algorithms that separately concentrate on either the ultimate pit limit determination or
extraction scheduling; the approach by genetic algorithm is a highly efficient heuristic
technique. It offers the potential to transcend the circular reasoning difficulties of
separate pit limit and extraction scheduling systems (Denby & Schofield, 1993).
fitness in GO-SCHED (Denby & Schofield, 1995) but it is usually defined as the NPV
for long-term scheduling. Thus for each schedule the “fitness” is calculated.
However, design and analysis of airflow requirements for individual work places is
usually a complex issue which requires an optimal solution. Because of its complexity,
research in this area has been an ongoing thing. In the quest to find optimal solutions
for large mines, application of genetic algorithms to ventilation systems is so far
proving to meet this objective. This is evidenced by the findings by Yang et al, (1998)
in their research on “Application of genetic algorithms to the optimisation of large mine
ventilation networks”. In this piece of work, the three researchers point out to the fact
that genetic algorithm determines the minimum airpower consumption of a given mine
network by the selection of the best: (i) main fan pressure; (ii) underground booster fan
pressure; and (iii) booster fan location in the network. They underline the point that
genetic algorithm method has the ability to identify optimal solutions as they apply the
successive operations of reproduction, crossover, and mutation. The optimal solutions
that are found by GA are better than those obtained by the use of deterministic methods.
In a nut shell, the versatility of genetic algorithms in mining can be attested to the
discussed investigations carried out by a number of researchers. In particular, genetic
algorithms have proved to be a good alternative for solving a wide variety of hard
combinatorial optimisation problems. It is envisaged that as research work continues to
investigate the capability of genetic algorithms in mining, optimal solutions found will
be able to reduce the uncertainty surrounding this industry.
Chapter Four
GENETIC MODEL
CAPACITY CONSTRAINT
4.1 Introduction
Genetic algorithms are stochastic, parallel search algorithms based on the theory of
natural selection and process of evolution (Zhang, 2006). These algorithms are
implemented as a computer simulation in which a set of possible solutions randomly
selected in the solution space as a population evolves towards better solutions. Each
possible solution is represented as a chromosome and evaluated for its fitness calculated
using the objective function. The evolution which usually starts from a population of
randomly selected individuals happens in generations. In each generation, the fitness of
every individual in the population is evaluated, multiple individuals are stochastically
selected from the current population (based on their fitness), and modified (recombined
and possibly mutated) to form a new population. The new population is then used in the
next iteration of the algorithm until an optimal solution is obtained.
when column (i, j) and (l, m) are neighbours and xi, j (t) denoting the length of the
column extracted by time t.
The problem however, consists of determining the final height of each column. The
only problem with this formation is that the resulting problem is non linear; as the
benefit obtained from the column depends on the amount of the ore extracted from the
column. It suffices that each column has its own characteristic grade curve. Figure 18
shows appreciable differences between the actual models in use and the proposed.
Figure 18. Differences between classical and proposed open pit planning (Saavedra, 2009)
It is noted that the proposed alternative provides more flexibility for the planning
process. It does not depend on a definition of a block size which is the main problem of
the classical models (Saavedra, 2009).
10% extraction
0% extraction
and
then it is natural to choose a random value for those columns uniformly distributed in
the interval .
The next step in the generation of values is to adjust the neighbours of and .
This propagation effect will spread through the chromosome. If the neighbouring
component does not have a value then the previous procedure is repeated; if the
neighbouring component already has a value, then there are two possibilities:
• The existent value is valid for the constraints, in which case it does not require
to be changed.
• The existent value lies outside the constraint range. In this case, the existing
value should be increased or decreased until it lies in the range of validity and
propagate the change to the neighbours and subsequently the neighbours of the
neighbours, etc.
After the changes are propagated, it is required to proceed to visit a different component
at random and execute the same process again until all the unassigned components have
been visited.
The next step is to exchange genetic material between the parents as usual. Then a
repairing mechanism is required to preserve the feasibility of the individuals. For that
purpose it is noted that any inconsistencies that exist will happen just at the interface or
crossover point. It will then be required to increase or reduce all the values of the
component at the interface and then propagate this change on the remaining part of the
chromosome. For a graphical example see Figure 20.
If for this example in Figure 20, the first child is consistent then this does not require
modifications whereas the second is not. The second children will have to be modified
only at the interface and it is noted that no further change is required to have
consistency.
Figure 21. Pushback design process – synonymous to Go-Pit flowchart (Denby & Schofield, 1993)
An understanding of how the Genetic Open Pit Optimiser (GOPO) works for the design
of pushbacks can be drawn from the determination of the fitness function.
As earlier mention, this study has been conducted on a two dimensional (2D) orebody
which is 100m by 100m in depth and width as shown in Figure 22. The orebody width
(W) has been subdivided into 10 equal columns of 10m width (w). Each column has
different grades at every depth (also refer to the data files used in appendix A). Initial
testing was conducted in this geometry to validate the algorithm. A different
geometrical configuration in Figure 29 (see data files used in Appendix A) was
however, used later for the final experiment.
In terms of the Fitness function, the equation for the block economic value equates to,
……….. (4)
Where G is the optimum pit’s total average grade; R is the recovery and P the
commodity price. On the revenue side, A3 is the area defining the total amount of ore
for the optimum pit while on the cost side, A3 is the area associated with the cost of
mining the ore. A1 and A2 are the areas representing the cost of stripping the
corresponding waste to uncover the ore in A3 subject to the pit slope angle, θ (for
example, 1 in 1 slope angle or 45o).
The first thing in GA is the creation of random individuals. Once this is done
chromosomes are assigned. It suffices to mention that the depth of the orebody is
divided into step size of a tenth (0.1). The size is the number of columns. When the
random chromosome is initialised, it transforms into an individual chromosome of 10
columns:
……….. (5)
This means that the percentage depth of ore extraction for Column 1 is
or of the total orebody depth . Column 2 would be
extracted or . The rest of the columns will follow a similar pattern.
For example, if the initialised chromosome is
Column1 area equals 25m x w which is 25m x 10m. The sum total area of the 10
columns must equate to A3.
In the case of A1 and A2, the area of each triangle is calculated with respect to the 45o
slope angle.
Figure 24. Calculation of the Areas, A1 and A2 for the waste required to be stripped.
xi.D is the percentage depth extracted depending on the particular triangle with D being
the 100m orebody depth.
Thus
……….. (6)
……….. (7)
By increasing the commodity price in the fitness function, the optimum pit will become
bigger and bigger replicating or emulating the Whittle Optimiser as developed by
Lerchs-Grossmann (1965).
Taking the Genetic Open Pit Optimiser and modifying the fitness function, the pit shell
transforms from the shape shown in Figure 25 to the shape in Figure 26.
From Figure 25, S0 is the starting point or the surface profile. Pushback i (Pi) is the initial
profile or topography for the first pushback. The initial “pushback i” is more or less like
the pit for the Genetic Open Pit Optimiser and the fitness function is equal to
……….. (8)
Thus, the new fitness function for the pushback with capacity constraint is:
….. (9)
For the implementation of the new fitness function, the random creation of individuals
is also modified since the chromosome has to take a starting seed (refer to Figure 27
and section 4.4.2).
……….. (10)
where is a factor.
this works is that the new profile of Pi+2 can wander about in either direction (Figure 27)
as much as it wants up to a certain extent but must respect the original pushback profile.
Figure 27. An illustration of how the Capacity Penalizing Function (Pc) works
4.4.2 Seed
As earlier alluded to, the chromosome has to take a starting seed as a parameter. The
seed (Figure 27) in this case is the preceding profile or topography of the previous
pushback. Bearing in mind that we cannot go back in time for we are constrained by
pushback i if we fix a deficient chromosome, crossover and mutation are modified.
Where Si is the percentage of the column and when initialised the random chromosome
yields
5 Columns
Col1: 20% extracted
Col2: 45% extracted
Col3: 50% extracted
Col4: 35% extracted
Col5: 30% extracted
Based on , a new pushback (P1, P2,..., Pn) has to satisfy the condition:
It is hence imperative to also modify crossover and mutation. The crossover operation
in this case will help to reproduce good offspring from two fit parents as a better
offspring shall have more opportunities to reproduce even better offspring. Bearing in
mind that we cannot go back in time for we are constrained by pushback i if we fix a
deficient chromosome, the crossover is performed by randomly choosing a position at
random and then propagating to both the left and right exchanging the genes of two
parents at selected position (Figure 28).
for and
Mutation is performed by randomly choosing a gene and re-encoding the same gene.
This operation is aimed to introduce new material into the existing individual. It adds
diversity to the genetic characteristics of the population.
The tables and figures that follow show the testing results of increasing price from $10
to $100.
As can be seen from Figure 31, there is hardly any pit obtained with a price of $10.
From the graph in Figure 50, we can determine the breakeven price as approximately
$72 and then decide on the price for the ore that can yield profit when the pit is mined.
Suffice to mention that the portion below the breakeven point indicates that the cost of
mining is more than the revenue from the investment. Strangely, however, in the figure
shown is the shape of the graph below the horizontal axis. The behaviour of the genetic
model as portrayed by the graph requires further investigation.
Pushback 1
For pushback 1, the initial seed (SEED 0) was the surface topography which is the
starting point. When the test was done the best fit chromosome obtained was SEED 1
(Table 11). The difference between seed 0 and seed 1 gives the percentage pushback
depth extracted (approximate pushback target size). In this case (i.e. Pushback 1) the
percentage pushback depth extracted is the same as the profile of the first pushback. It
is noticed in Figure 51 that the initial pit identifies the optimal point at which to open up
the deposit.
Pushback 2
For the second pushback, the difference between seed 2 and seed 1 gave the percentage
pushback depth extracted as in Table 12. In this case, seed 2 is now the profile for the
new pushback (Pushback 2). Figure 53 shows the generated pushback 2 and the profile
for mined out pushback 1.
Pushback 3
To generate pushback 3, seed 2 which is the profile for pushback 2 was subtracted from
seed 3 (profile for pushback 3) and the results have been shown in Table 13. It has been
observed that the best value for pushback 3 indicates no payback yet just as is the case
for pushback 1 and pushback 2 (see best value graphs for pushbacks 1, 2 and 3). This
kind of scenario signifies that in the early stages of mining there is large capital of
investment required before any profit can be realised. These successive pushbacks
identify the optimal directions in which to expand the pit. As can be seen from Figure
55, the profile is that for pushback 2 when it has been mined out.
Pushback 4
Like for the first three pushbacks, pushback 4 was generated in the similar manner and
the results have been shown in Table 14. Worth noting for this pushback is that the
profit is now being realised as shown by the best value graph for pushback 4. The best
value for pushback 4 is $18,428 (Figure 58). Pushback 4 has been shown in Figure 57.
Pushback 5
Table 15 shows the results for pushback 5 which has been generated in a similar
manner as the preceding pushbacks. Interesting is that the best value is steadily
increasing. Figure 59 shows the generated pushback 5 and the corresponding best value
graph in Figure 60.
Pushback 6
The generation of pushbacks is a repetitive procedure regardless of the number of
pushbacks. During testing of the genetic model, the last pushback is generated when
there is convergence of the profile (i.e. best chromosome) towards the optimal solution.
In this case the optimal solution was found to be $41,599 for pushback 6. Figure 61
shows the generated pushback 6 as well as the profile for pushback 5 once mined out.
In Figure 63 is the optimised pit with 6 (six) generated pushbacks. On mining this
optimum pit, the final profile would look like that shown in Figure 64.
Figure 66. Variation of best value with capacity penalizing factor (Pc)
Figure 67. Variation of Best value with the corresponding number of Generations
In the scatter graph shown, it is observed that although the maximum number of
generations was set at 100 when running the program, the minimum number of
generations ranges between 10 and 30. It can be observed though that in some cases,
there are some outliers.
Chapter Five
CONCLUSION
AND RECOMMENDATIONS
5.1 Conclusion
Pushbacks play a very important role in open pit mine design and optimisation. It has
been endeavoured in this study to develop a genetic model that provides pushbacks with
capacity constraint which results in an optimum pit. From the findings of the study, the
genetic model as a solution tool was capable of emulating the Whittle Optimiser by
generating pits with increasing prices. Of significance was that the objective of the
research was achieved by generating pushbacks with capacity constraint subject to a
penalizing constraint. The study further showed that an optimum capacity constraint
can also be determined. This is however, dependent on the commodity price and the
capacity penalizing factor at play. An analysis of the findings also indicated that the
best value for an optimum pit decreases as the capacity penalizing factor increases.
With the incorporation of the Genetic Whittle Optimiser in the model, the breakeven
price can be determined to help guide on the decision for the price to work with during
the generation of pushbacks with capacity constraint.
In view of the findings of this research, it has been concluded that the genetic model has
the capability to generate pushbacks with capacity constraint. As a solution tool the
genetic model has the capability of handling multiple scenarios of capacity constrained
pushbacks. This may be an ideal solution tool to enhance the envisaged ease sequencing
and scheduling of pushbacks without the subsequent compromise on the highest NPV
possible.
5.2 Recommendations
Although the outcomes of the research have positive indicators with the genetic model
having the capability of handling multiple scenarios, the research was however, limited
to pushback design with capacity constraint. It is therefore recommended that:
REFERENCES
Cardu, M., Ciccu, R., Lovera, E., & Michelottl, E. (2006). Mine Planning and Equipment
Selection. The Fifth International Symposium on Mine Planning and Equipment Selection, (pp.
1234-1239). Torino.
Couzens, T. R. (1979). Aspects of production planning: Operating layout and phase plans. Open
Pit Mine Planning and Design. (J.T. Crawford and W.A. Hustrulid, editors):. SME-AIME, (pp.
219-231). New York.
Crawford, G. D. (2001). Pincock Perspectives, Issue No. 17. Retrieved November 26, 2009,
from Pincock Allen & Holt: http://www.pincock.com
Dagdelen, K. (2001). Open Pit Optimisation - Strategies for Improving Economics of Mining
Projects through Mine Planning. International Mining Congress and Exhibition of Turkey-
IMCET.
Denby, B., & Schofield, D. (1996). Genetic algorithms for open pit scheduling-Extension into
3-dimensions. Mine Planning and Equipment Selection, (pp. 177-186). San Paulo, Brazil.
Denby, B., & Schofield, D. (1993). Open Pit Design and Scheduling by use of Genetic
Algorithms. Symposium on Artificial Intelligence in the Minerals Sector. Nottingham.
Denby, B., & Schofield, D. (1995). The Use of Genetic Algorithms in Underground Mine
Scheduling. APCOM XXV. Brisbane: AusIMM.
Fatos, X., Bernat, D., Ajith, A., & Keshav, D. (2006). Tuning Struggle Strategy in Genetic
Algorithms for Scheduling in Computational Grids. ICS AS CR.
Goldberg, D. E., & Richardson, J. (1987). Genetic Algorithms with sharing for multimodal
function optimization. The Second International Conference on Genetic Algorithms. Lawrence
Erlbaum Associates, Hillsdale, NJ.
Goodwin, G., Seron, M., Middleton, R., Zhang, M., Hennessy, B., Stone, P., et al. (2006).
Receding horizon control applied to optimal mine planning. Automatica, 42:1337 - 1342.
Guido, v. R., & Fred, L. D. (2009, December 7). Python xy. Retrieved 2009, from Python:
http://www.python.org
Hartman, H. L. (1992). SME Mining Engineering Handbook. Littleton, Colorado: Society for
Mining, Metallurgy, and Exploration, Inc.
Hustrulid, W., & Kuchta, M. (2006). Open Pit Mine Planning & Design: Fundamentals.
Balkema: Taylor & Francis plc.
Kennedy, B. A. (1990). Surface Mining. Littleton, Colorado: Society for Mining, Metallurgy,
and Exploration, Inc.
Lerchs, H., & Grossmann, I. F. (1965). Optimum Design of Open Pit Mines. Joint CORS and
ORSA Conference (pp. 17-24). Montreal: Transactions, CIM.
Mahfoud, S. W. (1995). Niching Methods for Genetic Algorithms. Illinois: University of Illinois
at Urbana-Champaign, IlliGAL Report 95001.
Mathieson, G. A. (1982). Open pit sequencing and scheduling. Presented at the First
International SME-AIME Fall Meeting. Honolulu, Hawai, Sept. 4-9 1982: Preprint No. 82-368.
MEA. (2009). Mine Planning Module Learning Guide. Mining Education Australia.
Renaud, C., Daniel, E., Marcos, G., Eduardo, M., & Enrique, R. (2009). A new algorithm for
the open-pit mine scheduling problem.
Schofield, D., & Denby, B. (1993). Genetic Algorithms: A New Approach to Pit Optimisation.
Symposium on Application of Computers & Operations Research in Mineral Industry (pp. 126-
133). Montreal: CIMM.
Whittle, J. (1999). A decade of open pit mine planning and optimisation-The craft of turning
algorithms into packages. Proceedings of the 28th Application of Computers and Operations in
the Mineral Industry, (pp. 15-23).
Yang, Z. Y., Lowndes, I. S., & Denby, B. (1998). Application of genetic algorithms o the
optimisation of ventilation networks. School of Chemical, Environmental and Mining
Engineering, University of Nottingham. Nottingham.
Zhang, M. (2006). Combining genetic algorithms and topological sort to optimise open pit
plans. Mine Mplanning and Equipment Selection, MPES . Torino, Italy.
APPENDICES
Depth Column
(m) 1 2 3 4 5 6 7 8 9 10
10 0.61 0.21 0.167 0.499 1.121 0.713 1.211 1.34 1.472 2.421
20 0.742 0.472 0.239 0.271 0.851 0.963 1.012 1.008 0.128 1.881
30 0.224 1.864 0.244 1.057 0.879 0.531 0.51 1.797 0.311 0.713
40 1.056 1.287 1.609 2.644 0.437 0.502 0.15 1.693 0.566 0.447
50 0.423 2.708 0.884 0.267 0.612 0.449 1.042 1.13 0.495 1.527
60 0.639 0.379 0.09 1.019 0.978 0.823 1.694 0.546 2.73 1.841
70 1.597 1.132 0.794 0.909 0.252 1.45 0.635 0.102 0.465 0.828
80 0.199 0.187 0.076 0.634 0.447 0.442 0.534 0.294 2.754 0.414
90 0.356 2.316 0.183 1.993 0.384 0.88 0.336 0.323 0.537 1.184
100 0.833 0.159 0.835 0.812 0.608 0.522 0.951 0.455 1.429 1.09
Table 18. Data file for final testing of the genetic model
Depth Column
(m) 1 2 3 4 5 6 7 8 9 10
10 0 0 0 0 0 0 0 0 0 0
20 0.8 0.83 0.751 0.86 0.8 0.83 0.951 0.86 0.8 0.83
30 0 0 0 0 0 0 0 0 0 0
40 0.5 0.86 0.635 0.853 0.5 0.86 0.635 0.853 0.8 0.86
50 0 0 0 0 0 0 0 0 0 0
60 0.8 0.89 0.87 0.835 0.8 0.89 0.87 0.835 0.8 0.89
70 0 0 0 0 0 0 0 0 0 0
80 0.6 0.56 0.88 0.665 0.6 0.56 0.88 0.835 0.8 0.86
90 0 0 0 0 0 0 0 0 0 0
100 0.8 0.82 0.69 0.815 0.8 0.62 0.69 0.815 0.8 0.82
110 0 0 0 0 0 0 0 0 0 0
120 0.8 0.884 0.82 0.869 0.8 0.884 0.82 0.869 0.8 0.884
Table 21. Results for variation of best value with capacity penalising function
Pc BEST VALUE
0 41654
5 39729
10 33604
15 28239
20 23119
25 17999
30 11648
35 9228
40 6808
45 4928
50 2928
55 928
60 -1072
65 -3037
70 -4842
75 -6647
80 -8452
85 -10257
90 -11567
95 -12847
100 -14127
import random
import copy
import math
import numpy as np
import xx2
STEP = 0.1
STEPS = list(np.arange(0,1+1e-6,STEP))
#capacity measured in steps
CAPACITY = 5
class Individual(object):
def __init__(self,size_individual,seed,eps=0.1):
self.eps = eps
self.size = size_individual
self.columns_list = xx2.data_sort() #columns_list
self.fitness_value = 0.0
self.chromosome =self.random_chromosome(self.size+2,seed)
#seed argument needs to be compatible with the STEP number. seed is a list of STEPS
def random_chromosome(self,size,seed):
temp = []
lenth_steps = len(STEPS)
#This code add up to size columns, initial value will be zero
for i in range(size):
temp.append(0)
for i in range(1,size-1):
rand_steps_index = random.randint(int(seed[i]/STEP),lenth_steps-1)
temp[i]=STEPS[rand_steps_index]
temp = self.check_chromosome(temp,seed)
return copy.deepcopy(temp)
def mutate(self,seed):
temp_chrom = copy.deepcopy(self.chromosome)
random_position = random.choice(range(1,self.size+1))
if random_position == 1 :
a = max(temp_chrom[random_position+1]-self.eps,0)
b = min(temp_chrom[random_position+1]+self.eps,1)
diff = random.choice(filter(lambda x:a<=x<=b,STEPS))
temp_chrom[random_position] = diff
elif random_position == self.size :
a = max(temp_chrom[random_position-1]-self.eps,0)
b = min(temp_chrom[random_position-1]+self.eps,1)
diff = random.choice(filter(lambda x:a<=x<=b,STEPS))
temp_chrom[random_position] = diff
else :
a = min(temp_chrom[random_position-1],temp_chrom[random_position+1])
b = max(temp_chrom[random_position-1],temp_chrom[random_position+1])
if b-a>2*self.eps :
temp = self.propagate(temp_chrom, random_position, 1,seed)
temp = self.propagate(temp_chrom, random_position, -1,seed)
temp_chrom = copy.deepcopy(temp)
else :
down = max(b-self.eps,seed[random_position])
up = a+self.eps
if down == up :
temp_chrom[random_position] = up
elif up-down <= STEP :
temp_chrom[random_position] = up
else :
temp_chrom[random_position] = random.choice(filter(lambda x: down <= x <= up,STEPS))
temp_chrom = self.propagate2(temp_chrom,random_position,1,seed)
temp_chrom = self.propagate2(temp_chrom,random_position,-1,seed)
self.chromosome = copy.deepcopy(temp_chrom)
def check_chromosome(self,chromosome,seed):
temp_chrom = copy.deepcopy(chromosome)
#we choose a position at random to start propagation
random_index = random.choice(range(1,self.size+1))
# to left
index = random_index
while index-1>0 :
if temp_chrom[index-1]- temp_chrom[index] + self.eps < 0.0 :
temp_chrom[index-1] = max(temp_chrom[index]-self.eps,seed[index-1])
elif temp_chrom[index-1] - temp_chrom[index] > self.eps :
temp_chrom[index-1] = min(temp_chrom[index]+self.eps,1)
index = index - 1
# to right
index = random_index
while index+1 < self.size+1:
if temp_chrom[index+1]- temp_chrom[index] + self.eps < 0.0 :
temp_chrom[index+1] = max(temp_chrom[index]-self.eps,seed[index+1])
elif temp_chrom[index+1] - temp_chrom[index] > self.eps :
temp_chrom[index+1] = min(temp_chrom[index]+self.eps,1)
index = index + 1
chromosome = copy.deepcopy(temp_chrom)
return chromosome
def fitness(self,seed,pressure):
value = []
DEPTH=100
WIDTH=10
price = 90
cost = 20.0
recovery = 1.0
theta = math.pi/4
# area1, area2 and area3 are used to compute the cost
area1 = float(math.cos(theta)* (DEPTH**2) * (self.chromosome[self.size]**2) / (math.sin(theta)*2))
area2 = float(math.cos(theta)* (DEPTH**2) * (self.chromosome[1]**2) / (math.sin(theta)*2))
area3 = float(WIDTH * DEPTH * sum(self.chromosome))
cave_detph = []
for c in self.chromosome :
cave_detph.append(c*DEPTH)
difference = 0
for i in range(0,len(self.chromosome)-1):
#chromosome is always bigger than profile by definition
difference += self.chromosome[i]-seed[i]
def sum_up_caved_column_grade(self,key,depth):
depths_raw = self.columns_list[key][0]
depths_raw.sort()
depths_sorted = depths_raw
depths = self.columns_list[key][0]
grades = self.columns_list[key][1]
sum_value = 0.0
for i in range(1,len(depths)):
if depth > depths_sorted[i] :
sum_value += grades[depths.index(depths_sorted[i])]*(10)
else :
sum_value += grades[depths.index(depths_sorted[i])]*(depth-depths_sorted[i-1])
break
return sum_value
# def check(self):
# for chrom in self.c
class Population(object):
def __init__(self,size_population,size_individual,seed,mutation_rate=0.01,crossover_rate=0.8,eps=0.2):
self.size = size_population
self.size_individual = size_individual
self.eps = eps
self.individuals = []
self.child_individuals = None
self.mutation_rate = mutation_rate
self.crossover_rate = crossover_rate
self.seed = seed
self.select_times = None
self.selected_individuals = None
self.best_score = []
self.best_individual = []
self.total_score = None
self.pressure = 0.0
for i in range(self.size):
self.individuals.append(Individual(self.size_individual,self.seed,self.eps))
self.fitness(seed,self.pressure)
def two_individuals_crossover(self,individual1,individual2,seed):
chromosome1 = copy.deepcopy(individual1)
chromosome2 = copy.deepcopy(individual2)
random_position = random.randint(1,self.size_individual-1)
for i in range(random_position+1,self.size_individual):
chromosome1.chromosome[i] = individual2.chromosome[i]
chromosome2.chromosome[i] = individual1.chromosome[i]
chromosome1.chromosome = individual1.check_chromosome(chromosome1.chromosome,seed)
chromosome2.chromosome = individual2.check_chromosome(chromosome2.chromosome,seed)
return chromosome1,chromosome2
def select(self):
smallest_score = 0.0
self.total_score = 0.0
generation_best_score = -1000000000000000.0
temp = None
individual_scores=[]
for individual in self.individuals :
individual_scores.append(individual.fitness_value-smallest_score+0.01)
# if individual.fitness < 0.0 :
# continue
# self.total_score += individual.fitness_value
self.best_score.append(generation_best_score)
self.best_individual.append(temp)
self.select_times = []
sum_scores = sum(individual_scores)
for s in individual_scores :
self.select_times.append(int(s/sum_scores*self.size))
for i in range(self.size):
if (self.select_times[i] < 0) :
self.select_times=0
total_select_times = sum(self.select_times)
while total_select_times < self.size :
rand = random.randint(0,self.size-1)
self.select_times[rand] += 1
total_select_times = sum(self.select_times)
self.selected_individuals = []
temp = []
for i in range(len(self.selected_individuals)):
random_index = random.randint(0,len(self.selected_individuals)-1)
temp.append(self.selected_individuals[random_index])
del self.selected_individuals[random_index]
if len(temp)==self.size :
self.individuals = copy.deepcopy(temp)
else :
raise RuntimeError('desc')
def mutate(self,seed):
rand = random.random()
if rand <= self.mutation_rate :
for individual in self.individuals:
individual.mutate(seed)
individual.chromosome = individual.check_chromosome(individual.chromosome,seed)
def crossover(self,seed):
rand = random.random()
if rand <= self.crossover_rate and self.size%2==0 :
for i in range(0,self.size,2):
temp1 = copy.deepcopy(self.individuals[i])
temp2 = copy.deepcopy(self.individuals[i+1])
value1 = temp1.fitness_value
value2 = temp2.fitness_value
self.individuals[i], self.individuals[i+1] = self.two_individuals_crossover(self.individuals[i],
self.individuals[i+1],seed)
self.individuals[i].mutate(seed)
self.individuals[i+1].mutate(seed)
value3 = self.individuals[i].fitness_value
value4 = self.individuals[i+1].fitness_value
if ((value3 < value1) or (value3 < value2)):
if (value3 < value1):
self.individuals[i] = copy.deepcopy(temp1)
if (value3 < value2):
self.individuals[i] = copy.deepcopy(temp2)
if ((value4 < value1) or (value4 < value2)):
if (value4 < value1):
self.individuals[i+1] = copy.deepcopy(temp1)
if (value4 < value2):
self.individuals[i+1] = copy.deepcopy(temp2)
def check(self):
for individual in self.individuals:
individual.check()
def fitness(self,seed, pressure):
for individual in self.individuals:
individual.fitness(seed,pressure)
def get_best_individual(self):
return self.best_individual
if __name__ == "__main__" :
size_population = 200
size_individual = 10
mutation_rate = 0.1
crossover_rate = 0.8
#seed has to be specified as percentages compatible with the step size
seed = [0.0,0.3,0.4,0.5,0.5,0.5,0.5,0.5,0.5,0.4,0.3]
my_population = Population(size_population,size_individual,seed,eps=0.1)
my_population.mutation_rate = mutation_rate
my_population.crossover_rate = crossover_rate
MAXGENERATIONS = 100
generations = 0
my_population.pressure = 500
generations = generations + 1
#my_population.pressure = generations
best_score = my_population.best_score
print best_score
print max(best_score)
#print my_population.get_best()
best_individual = my_population.best_individual[-1]
#if best_score[-1]>0:
for caved_percentage in best_individual.chromosome:
print caved_percentage
x = np.arange(0,len(best_score))