You are on page 1of 7

Ultimate Pit Limit Design Using ~icrosoft' Excel

David ~ r e w and
' Ernest ~aafi'

Microsoft Excel based ultimate pit limit (UPL) optimiser has been developed to determine the greatest
economic value of an orebody. UPL manipulates a given geological block model to define an ultimate
pit limit using either the moving cone, method or Korobov algorithm o r Lerchs-Grossman technique.
UPL is designed to be an adjunct to M S Excel; the cells in Excel are excellent analogue to the blocks
in a geological model, providing X-Y dimensions in an easily viewable and editable state. The use of
individual worksheets within an Excel workbook provides the necessary depth to a 3-D block model.

The determination of the ultimate pit limit is vital to all open pit mining operations. The developments
of computer programs to determine pit limits were some of the very first application of computers
within the mining industry, and have remained at the forefront of mine design since its inception.
There are various packages including WHITTLE 4-X and Datamine pit optimizer, which are used to
generate these ultimate pit limits, using a variety of algorithms. UPL was primarily designed as a
teaching tool to meet the needs of undergraduate mining engineering students. UPL is freely available
and easy to use, and can perform both large and small pit optimisations with accuracy (Drew, 2000).
UPL makes use of the moving cone method (Wright, 1990). the Korobov algorithm (Dowd and Onur,
1993), and the Lerchs-Grossman dynamic programming technique (Lerchs and Grossman, 1965).
Undergraduate students at University of Wollongong use UPL to evaluate the strengths and
weaknesses of each of the three algorithms, as well as learn about ultimate pit limit design concepts.
Instead of being a stand-alone program, UPL runs as M S Excel add-in by being loaded temporarily
Into Excel with the functionalities of Excel (Figure 1). UPL uses M S Excel as the basis for the
following reasons:
Ideal data format
Market 'standard'
Powerful file and data UO
Visual Basic capabilities

The cells in a spreadsheet are an excellent analogue to the blocks in a geological block model,
providing X-Y dimensions in an easily viewable and editable state. The use of individual worksheets
within Excel workbook prbvides the necessary depth to a three-dimensional block model. In addition, '

the size of Excel sheets is sufficient for a reasonably size block model to be analysed.

Hoslangs Resource Management, Level 1, I Swan Road., Taringa, Qld 4068, Australia
'Faculty of Engineering, University of Wollongong, Wollongong, NSW 2522. Australia <>

RowHeight = 22. and as an example of an "optimal" heuristic algorithm.Column Width = 4. . Sub ResizeCells() ' This subroutine changes the size of the cells. Since the geological model is in the form of selective mining blocks. and for its readily identifiable errors.VerticalAlignment = xlCenter Next lSheet OPERATION OF UPL UPL is divided up into four sections. they are displayed incorrectly. These are: Pit Limit Generators Data Transformation Sensitivity Analysis Options and User functions The pit limit generators are the moving cone. was used to resize the cells in Excel to the ratio that suits the block sizes.HorizontalAlignment = xlCenter " Rows("I:" & glRows). which always guarantees an optimal pit.Activate Rows("1:" & glRows). the user can edit each block data and make any changes (Figure 2). In a typical regular fixed block model the orebody is divided into mining blocks of equal size. Each of the blocks is assigned a grade determined from sample grades.5 * (gdYDimBlock/ gdXDimBlock) ' Rows("I: & glRows). ResizeCells(). MS Excel cells are typically in a rectangular aspect ratio that is approximately 2 !h : 1. moving cone algorithm was selected for its speed and simplicity. 'The Korobov algorithm was chosen to demonstrate a 'modified' form of the moving cone method.The program U P L requires a geological block model to generate an ultimate pit. IfgdXDimBlock = 0 Then gdXDimBlock = I ' IfgdYDirnBlock = 0 Then gdYDimBlock = I IfgdZDimBlock = 0 Then gdZDimBlock = I For lSheet = I To glSheets Worksheets(lSheet). The LG method is a rigorous algorithm. The following subroutine. Unless the block sizes are in these same ratios. Once the block grade data have been loaded into UPL. Korobov and LG algorithms. UPL shows the data in a similar "cell-block" format.5 * (gdXDimBlock/gdYDimBlock) Rows("1:" & glRows).

Using an algorithm suggested by Walkenbach (1999) the locations of both the last row and last column used in a worksheet can be determined. the data input phase is handled via Excel. When the determination of the ultimate pit limit is performed. Firstly.Cells(3. Figure 2 . Secondly. and other cell data are stored. a data array has to be initialized. U P L does not perform calculations within the spreadsheet itself. A null cell in Excel is a cell that has no data. the sizeof the block model is determined. . and matches only "". The fourth is used to store intermediate results.Typical block model worksheet DATA ENTRY MODULE Because UPL is part of Excel. 'This algorithm is applied over all worksheets in the workbook to determine maximum ranges for all dimensions. especially for students. program's flag and other cell descriptors. and avoids having a data array that is either too large (slowing down calculations) or too small. a block that has a zero value will be mined if circumstances permit. In a block model. All undergraduate mining students are familiar with Excel and this greatly reduces the time needed to learn UPL. The maximum size of the data array is based on the maximum size of the spreadsheet. Excel's ability to read and import files is very extensive. When this null cell is read into a data array.Value The above statement reads the value of the cell in row 3. By default. It extracts data from Excel's interface into its own program memory and'performs all calculations within memory. or use in-cell formulas. this would correspond to lack of data. the following statement is used to read the cell value directly: ExanzpleVariable = Worksheets("Sheet1"). In reading any cell from a spreadsheet. Table 1 summarises the structure of the fourth element of the data array. This concept allows for efficient memory usage. U P L performsthis process in two basic steps. The null flag is to counter a problem that occurs when using data arrays with Excel. or alter a previously created model. the original zero value is retained which is not a desired result. and it can translate a wide variety of formats into its own. column 4 from the worksheet called Sheet 1 into the variable called ExampleVariable: UPL needs to perform this task many times in reading an entire block model. Excel's vast data manipulation abilities can be used to either create a new block model. all values within an array are filled with zero. This makes it more likely that most data formats can be used with UPL.4). when a data array is created. The data array is a four-dimensional array in which the block value. The first three elements of the data array correspond to the block's i-j-k location within the block model.

Cells(y.assigned a highly negative dollar value. it could have any possible range of values.3. When the form is closed.2.3. and the workbook size determined.3) is 129 However.The Fourth Element of Data Array Number I Type I Data Stored I Example Meaning I Number Block Value a(1. TextBoxOne. Table 1. In Visual Basic.1)=56 Block (1.Value Next x Next >J Next z . some block modeling programs output data in an x-y-z grade format a translating algorithms were required to convert the data formats into a form usable by UPL. entry boxes are filled in using the values already stored in the program's memory.y.2)=0 Block was not originally null 3 Boolean Mineable? a(1. Any of the values in the form may be changed be the user. the data array location for that block is.3)= 1 Block forms part of ultimate pit 1 Number I Intermediate Result I a(1.Value Forms were created using Visual Basic forms. From UPL's menu the user can select the algorithm of pit optimiser. To counter this problem.2. This is done through forms shown in Figure 3. the cells can be read into the data array. TRASLATION OF DATA Not all data that is can be read into Excel are in a form of UPL's i-j-k data input format Since. because a null cell has no data. when the results are written back into the spreadsheet. or the user's values read from a file. thus causing an erroneous pit limit model should the block be selected. This is done using three nested for loops: For z = I to M d h e e t s For \I = I to MaxRows For x = I to MaxColumns DataArray(x. if a null cell is encountered. when data entry form is initialised. so that the negative value can be removed. or data entry forms. .z.3)'s value is 56 2 Boolean Is Null?. a( 1.3. reading and storing these values is achieved by the statement: Example Variable= ExampleForm.x). and would mostly likely be negative.4)= 129 1 Intermediate Result for block (1. This null cell is noted in the second of the fourth data array locations.2.2.3.I ) = Worksheets(z). it creates an additional menu in the menu bar. and the null value replaced. UPL reads these values and stores them for immediate or later use in other subroutines. These are either the standard values read during startup.2.By attaching UPL to Excel.2. Once the data array is intialised.

Figure 3 . the user selects the format the input data. To provide additional information to the user. UPL also displays the final pit parameters such as the ultimate pi't value. but also plan views as well. and enters economic or other data as required by UPL. In order to make the ultimate pit distinctive. A typical UPL pit exported to Surfer and Vulcan are shown in Figure 5. For these reasons. which can then be saved using one of Excel's numerous file output formats. its output is done differently. i. and the program will output a block model in the format that the pit-generating algorithm requires. In all the writing operations in Excel. Once this data is entered.Amount of ore * Ore mining cost) - Amount of Rock *Rock Mining Cost UPL OUTPUT Program output is normally achieved by displaying information to the user interface. UPL provides an additional series of orthogonal cross-sections. . a new spreadsheet is created to avoid overwriting other data that the user may wish to keep.y. then UPL writes not only cross-sections of the model.l) If the pit limit has been calculated in three dimensions. UPL writes the final pit shape to a spreadsheet. and by writing to a file. Worksheets(z).z.Value = DataArray(x.Data translation forms In Figure 3. Because UPL uses Excel's capabilities. The output data is then written to a new worksheet by a direct reversal of the reading procedure. Since Excel has extremely weak three-dimensional graphing capabilities. number of blocks within the pit. the user can initiate the data transformation function. In calculating the block value.Cells(y.e. This allows to user to view the output in all major directions. the user may export the pit data into other application programs for further analysis. and the computation time.x). UPL highlights the pit by changing the colour of the cells that define the ultimate pit (Figure 4). UPL makes use of the following formula: Block Value = (Amount of Metal * Recovery * Metal Price .

If it fits within this inequality. Later versions of UPL use this equation for improved usefulness of the program. In order to determine which blocks are within a given cone. then the block lies within the cone. allowing the radius to be determined for given block sizes and pit slope angles.In the positive moving cone and Korobov algorithms. the equation of a circle is used to determine which of the blocks on the current level fit within this cone.UPL generated pit displayed by Surfer and Vulcan Software . Certain blocks (these blocks are selected by a quick heuristic algorithm) on the level are checked against the inequality x2 + y 2 5 r2. The area of the circle is the projection of the cone onto that level. If the equation for an ellipsoid is used. and thence the value of that cone. (b) UPL-generated pit displayed by Vulcan (a) UPL-generated pit displayed by Surfer Figure 5 . then two slope angles may be used. the cones are used to determine the mining area for each positively valued block.

J. Open-Pit Optimisation . Germany. It uses MS Excel as the basis for its data handling. and generate the ultimate pit limit for each of the input parameters. In addit~onto a beginner tutorial. . Australia. I J I I / ( ~ ~ Z I ~ ~ ( UPL is limited to MS Excel's maximum working area size of 256 columns by 65. M&T Books. 1999. ( ~ O I I I . E. 17-24 Walkenbach. Optimization in Mine Design Manual. J 1999. UPL also contains useful routines for translating and manipulating data from geological modeling programs. P A and Onur. Vol. I. vo1. 164pp. University of Wollongong. pp. UPL displays help boxes at regular intervals. 2000. 1965. UPL has been validated to work accurately. A. Transactions of The Institution of Mining and Metallurgy (Section A: Mining Industry). Lerchs. H and Grossman. Drew. When in the beginner mode. F. Whittle. London. creating economic block models using the grade block model and input values. UPL steps through these values. These help boxes make suggestions as to the kind of data required and the subsequent steps. the user inputs high and low values. and Whittle D. Wollongong. pp 61-62 Wright. A H 1993. beginner and advanced. Microsoft Excel 2000 Formulas. 1990. The program UPL has an option to perform sensitivity analysis. pp 615-616. Trans Tech Publications. Optimum Design of Open-pit Mines. and an incremental value. A95-A104. 187pp. BE(Hon) Thesis. For each of the selected parameters. Ultimate Pit Limit Using MS Excel. REFERENCES Dowd. A cube-shaped block model of 256*256*256 (Excel's smallest dimension) contains over 16 million blocks.Part 1: Optimal Open-Pit Design. The Institution of Mining and Metallurgy.a clear and distinct format.102: pp. The current version of UPL and its comprehensive web-based manual can be downloaded freely from the site / I ~ ~ ? : / / M ~ \ V M ~ . LXVII. by over 1000 sheets. UPL outputs results in. ~ ~ ~ N ~ W I J S ~ . Transactions of the Canadian Institute of Mining and Metallurgy. Open Pit Mine Design Models : An Introduction with FORTRAN/77 Programs. and provides consistent results for all block models tested. without altering original data.CONCLUDING REMARKS UPL was designed to implement a wide range of pit limit methods.536 rows. D. UPL has two user modes.