Attributes - Defining Constants

To access this screen:

  • Setup ribbon >> Model >> Attributes >> Values tab.

  • Reserves ribbon >> Mining Blocks >> Attributes >> Values tab.

  • Reserves ribbon >> Reserves >> Attributes >> Values tab.

Define reusable variables for attribute value expressions.

Note: The same controls are available using the Model Attributes, Mining Blocks Attributes or Reserves Attributes managed tasks.

Constants represent a fixed expression element that can be re-used over multiple value expressions. Once defined, they can be injected into expressions using the Attribute Value Editor screen. A constant can be anything from a simple numeric or alphanumeric constant to a complex expression involving multiple attribute values and other mathematical constructs. In essence, the Value is simply the syntax that will be transposed to the expression whenever the constant is found.

As such, it is ideal for hosting commonly-used calculations that will remain static in multiple situations. For example, calculating a Gold Equivalent grade as (AU*RECOVERY)/100.

Other examples of constants:

  • A numeric value derived from the numeric attribute MCOST:

    MCOST*0.005

  • A lowercase alphanumeric filename for a reserves table, representing a phase:

    lcase(PIT + "_" + PHASE + ".dm")

  • The sum of multiple named value definitions (as created using the Values tab):

    ([Named Value 1] + [Named Value 2] + [Named Value 3])/3

  • Processing cost adjusted to include a Processing Cost Adjustment Factor:

    PCOST*PCAF

Important: Alphanumeric constants should be wrapped in quotes, unless it is a reference to an alphanumeric field, in which case the full attribute name should be given in quotes.

Once a constant has been defined, it becomes available for any method of attribution (model, mining block or reserves).

Deleting Constants in Use

Deleting a constant will replace all existing value definitions that use it with the value or expression used to define the constant. This action cannot be undone.

You can delete any existing constant, be aware that any existing expression that uses it will be updated to include the verbose constant expression instead.

For example, if a constant "CuEq" is created as:

(CU/RECOV)*100

...and an Attribute value contains a reference to the constant:

[CuEq]*0.96

...deleting the constant forces the Attribute value to become:

((CU/RECOV)*100)*0.96

The additional brackets are added to the Attribute value automatically to ensure that mathematical operator precedence doesn't introduce unexpected results from the modified expression.

To create a new constant:

Note: Constants are described in attribute value expressions in square brackets.

  1. Display the Values screen.

  2. Click New.

  3. Edit the default name to something meaningful.

  4. In the table, enter a constant Value.

To create a reusable, named constant:

  1. Display the Values screen.

  2. Click New.

  3. Edit the default name to something meaningful.

  4. In the table, click into the Value cell.

  5. From the list displayed, select <new named value...>.

  6. In the Attribute Value section below, enter a constant Name.

  7. In the Value field, describe a constant.

  8. Click Test to make sure the constant expression is valid. If not, review and resolve any issues.

    Note: To check the constant, any loaded block model file must be unloaded. You are prompted to do this if one is loaded, before the test can complete.

  9. Dismiss the "The expression is valid" prompt.

    The constant is then added to the Value list in the table above, for selection later.

To delete an existing constant:

See Deleting Constants, above, before you continue.

  1. Display the Values screen.

  2. In the table, click into the Value cell.

  3. Select the constant to be deleted and click Delete.

  4. Confirm your decision.

Related topics and activities: