Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

All the key steps for creating and validating a common Reserves Model based on multiple block models, as well as instructions for mapping fields, adding variables and checking results, see below.

Creating new Reserves Model

  1. Click the New button to open the Reservable Models Generator window.

  2. Import your Block Model (for this tutorial start with “pit1a”).

    1. supported formats are:

      1. .csv

      2. .bmf (Vulcan)

      3. .bintab

      4. .dat (MineSight)

      5. .mdl (Surpac)

      6. .dat (Micromine)

3. Select “pit1a.csv” from your training dataset.

4. Import CSV File window will open, where you are prompted to specify where the header is and where the data starts from.

  • Set the green Header Line to match the header text.

  • Set the yellow Data Offset to match the first row of data. Sometimes when adding CSV files exported from Surpac you may have title and few description fields at the top, it’s where the Data Offset feature becomes handy.

  • Press OK if no changes required or adjust header and data offsets when necessary.

When importing Block Model CSV, you’ll see a preview of the first 100 rows of this CSV. It's a good time-saving feature, as your site Block models CSVs can be of a very large size and take a long time to open.

Reservable Model Generator Overview

Once you complete an import, in the Reservable Model Generator window you’ll see:

  1. List of imported Block Models.

  2. All the fields contained in the imported Block Model listed on a right hand side, as well as feature to create and choose Custom Variable, that can be missing, but required for mapping to one of the fields.

  3. Default fields that every single Reserves model needs to have.

  4. Minimum and Maximum columns to clamp numbers by block to be >= Minimum and <= Maximum.

  5. Format selection column.

  6. Mapping fields to be populated.

  7. List of errors without resolving which you will not be able to generate your Reserves model.

  8. Row Parcel Mappings template.

  9. Buttons to Generate Reserves Model or Cancel changes made.

Basic Default Fields Mapping

  • Once the block model has loaded, its header fields are listed in the Variables panel on the right.

  • To map variables to the fields you can:

    • manually type it in,

    • drag and drop,

    • double click.

  • X, Y and Z are blocks coordinates.

  • DX, DY and DX are blocks dimensions.

  • For the Volume field use the formula N("DX")*N("DY")*N("DZ").

    • For the DryTonnes field use the formula N("DX")*N("DY")*N("DZ")*N("SG").

    • For the WetTonnes field use the formula N("DX")*N("DY")*N("DZ")*N("SG")/0.95 or N("DX")*N("DY")*N("DZ")N("SG")(1+N("moi")).

  • Numeric fields use the N(“field”) syntax, and text fields use the T(“field”) syntax.

Generating Reserves Model

To check if the values are correct, generate a preliminary basic Reserves Model by hitting Generate button.

Upon completion Reservable Model Generator window will close and you’ll be directed back to the main Block Model page, where you can see:

  • Reserves model based on a single Block Model.

  • Path to the folder where it is stored.

  • Count of blocks and model extents.

  • Summary with populated fields and materials grouped as “rock” (as specified Parcel).

Editing Reserves Model

Press Edit button to come back to the Reservable Model Generator and input additional information.

Adding Grades

To add new fields use the Add Additive (Sum), Add Weight Averaged (Weighted) and Add Text (Class) Icons located in the top button ribbon. These add new rows into the field list.

  1. Add Additive - Sum fields - summed together, such as volumes, tonnes, and gold ounces.

  2. Add Weight Averaged - Weighted fields - weight-averaged by their parent field, such as iron percent or gold ppm.

  3. Add Text - Class fields - create subtotals of their parent fields, such as tonnes of Indicated / Inferred / Measured.

Since all grades are weight averaged by Dry tonnes, add three weight-averaged fields “Head_Fe”, “Head_Al” and “Head_Si” and map corresponding fields to them.

Creating Ore and Waste parcels using “IF” statement

To make different parcels and define Ore and Waste use the “IF” statement N("<...>") <= 0 ? 0 : N("<...>").

Different formulas and operators that you use to create Block Model fields expressions can be found in the RR. Block Model Formulas section.

  1. Type in a condition or the statement to test, which will be N(“Fe”) greater than (“>”) 60 return (“?”) “ore” otherwise (“:”) call it “waste”.

2. Regenerate Reserves Model (override existing one).

3. Review grades in the Reserves Summary.

4. Use Min/Max toggle to display minimum and maximum values.

Creating Ore and Waste parcels using Custom Variables

Normally Ore and Waste definitions are more complex and multiple grades and types inputs are required. In this case, use Custom Variable functionality to define different properties through the Script Editor. Scripting language is C#.

  1. Return to the Reservable Model Generator by pressing Edit.

  2. Press Custom Variables button at the top right corner to open Script Editor window.

There are multiple different types of variables you can create, mains are Text and Double. In this example we will practice to create a Text Variable.

3. Delete not applicable rows (in this example, lines from 15 to 31).

4. Define variable you wish to create (Parcel).

5. Create variable called “fe” to reference all the grades within the Block Model. Use semicolon to close the formula. double fe = context.N("Fe");

6. Write a simple IF statement, such as if (fe>60) return "ore"; else return "waste";

7. To check if the statement is correct, press the Compile button.

If you did a mistake, the Compile Error window will pop up, showing row and column of an error with a short description of its type.

8. Press OK to confirm changes.

9. In the list of available variables on the right you will see a new variable CustomT("CustomTextVar") in bold, map it to the Parcel field.

10. Regenerate Reserves Model (override existing one).

11. Review grades in the Reserves Summary.

Creating more detailed on the grade binning variable

Advantage of creating Custom Variable via the Script Editor is that there it’s possible to add more complicated variables.

  1. Update the created variable by adding lines with a breakdown of parcels based on Fe content as shown below, or copy preconfigured formula from the RR. Block Model Custom Variables page.

2. Map this new custom variable to the Parcel field.

3. Regenerate Reserves Model.

4. Review grades in the Reserves Summary. Based on populated values, you should see “hg”, “mg”, “lg1”, “lg2”, “minw” and “w” parcels added.

Adding Multiple Grade Bins

Create more detailed on grade binning custom variable, consisting of two variables: Parcel (as shown above) and OreType, including Al and Si grades.

  1. Use nested “IF” statement, and if it doesn’t satisfy any of set grade bins parcel “waste” will be returned, or

    1. Copy and paste the code below.

using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Alastri.Scripting;
using Alastri.BlockModel.Engine.CustomVariables;
 
public class Parcel : ITextCustomVariable
{
    public string GetText(CustomVariablesContext context)
    {
        double fe = context.N("Fe");
         
        if(fe > 60)        return "hg";
        else if(fe > 58)   return "mg";
        else if(fe > 57.5) return "lg1";
        else if(fe > 56)   return "lg2";
        else if(fe > 50)   return "minw";
        else               return "w";
 
    }
}

public class OreType : ITextCustomVariable
{
    public string GetText(CustomVariablesContext context)
    {
        double fe = context.N("Fe");
        double al = context.N("Al");
        double si = context.N("Si");
         
        if(fe > 58)        
        {
            if     (si <= 6 && al <= 3) return "hg";
            else if(si >  6 && al <= 3) return "hghs";
            else if(si <= 6 && al >  3) return "hgha";
            else                        return "bg";
        }
        else if(fe > 55)   
        {
            return "bg";
        }
        else if(fe > 52) 
        {
            return "lg";
        }
        else if(fe > 50)   return "minw";
        else               return "w";
 
    }
}

2. Use the Compile button to check if the statement is correct. If no errors are indicated, press OK.

3. You should see two new Custom Variables CustomT("Parcel") and CustomT("OreType"). Map in “OreType” to the Parcel field and generate new Reserves model.

4. Review Reserves Summary. You should now see all the different parcel types, since Ore has been split to High Grade, Low Grade, High Grade High Alumina, High Grade High Silica, Min Waste and Waste, etc.

5. Check what grade binning has been applied correctly by toggling Min/Mix values display.

Adding Extra Fields

So far we mapped only default block model fields and fields for Heads Fe, Al and Si. Now we can create and map additional fields for Lumps and Fines.

Add extra fields to map variables available from your Block Model.

  1. Add a Sum (Add Additive icon) field - Fines_Volume - to calculate fines volume use inline formula N("DX")*N("DY")*N("DZ")*N("fines_pct").

  2. Add a Sum (Add Additive icon) field - Fines_Tonnes_Dry - to calculate dry tonnes of fines use inline formula N("DX")*N("DY")*N("DZ")*N("SG")*N("fines_pct").

  3. Add four Weight Averaged fields (Add Weight Averaged icon) - Fines_Fe, Fines_Al, Fines_Si, Fines_Pct - map corresponding numerical fields to them.

  4. Add a Sum (Add Additive icon) field - Fines_Tonnes_Wet- to calculate wet tonnes of fines use inline formula N("DX")*N("DY")*N("DZ")*N("SG")N("fines_pct")(1+N("moi")).

  5. Repeat for Lumps.

    1. You can use Find and Replace functionality.

Use the Import Template button to populate preconfigured fields and mappings (available in your Sample Dataset folder).

  • blockmodelfields.abmf - fields.

  • blockmappings.abms - mappings.

Adding multiple Block Models

Press the blue plus icon to download additional Block Models you wish to combine within one Reserves Model.

  • Import CSV-files pit2a and pit3a from your Sample Dataset folder.

For each of the imported Block Models fields are the same. Within the Reserves Model for each of the Models you are importing in you have to have the same structure (number of fields and fields themselves). If in source models different variables or different names are uses, you can change fields mapping, but not the fields.

Copping Mappings

  1. In “pit1a” Block Model table use <SHIFT> or <CTRL> buttons to select all or multiple fields.

  2. Press the Copy Mappings icon at the top toolbar to copy selected mappings to the clipboard.

Pasting Mappings

  1. Navigate to the imported “pit2a” Block Model and multi select all the empty fields to be mapped with custom variables.

  2. Press Paste Mappings icon at the top toolbar to populate selected fields with the mapping imported.

3. Repeat for “pit3a” Block Model.

To copy and paste fields mappings between multiple Block Models you can also use <CTRL+C> and <CTRL + V> hotkeys.

Exporting Fields and Mappings

You can export created fields and all or the selected parcel mappings using the Export button at the top toolbar. Exported sets will be saved in “.abmf” (for fields) or “.abms”/”.abmm” (all/selected mappings) format.

Combined Reserves Model

Once you are satisfied with added fields and mapping for each Block Model, generate one common Reserves Model, which will combine all of the above.

Before generating Reserves Model make sure that no issues listed in the Errors panel. You cannot generate reserves until all the errors are resolved, if any, refer to the bottom error panel for more details.

Review the Reserves Summary, it will update depending on which one you click on.

If you need to validate built Reserves model against the source one, use the Export buttons to save all or the selected parcels and fields to CSV or Text format.

  • No labels