COMPMAX Process

To access this process:

See this process in the Command Table.

Process Overview

COMPMAX creates ore and waste composites from a sorted drillhole sample file. It searches for long ore composites that satisfy configured cutoff and compositing constraints.

This process works on a drillhole-by-drillhole basis, and optionally within zones, using sample order from the input file.

The input drillhole file must be sorted by BHID, FROM, TO.

For each drillhole, COMPMAX assigns each sample to either an ore composite or a waste composite. Adjacent samples with the same assignment are then combined into output composites.

Each input sample is assigned to one, and only one, output composite.

Ore Definition

An ore composite is a continuous interval where the length-weighted average of the selected value field satisfies the configured cutoff.

For example, when using VALUE1 and CUTOFF1, the ore condition is controlled by MINMAX1 (above cutoff or below cutoff).

The primary controls are VALUE1/VALUE2, CUTOFF1/CUTOFF2, MINMAX1/MINMAX2, MINORE, optional MINWASTE, and optional zoning fields.

If MINORE or MINWASTE is set to -1, that constraint is not used.

Simulated Annealing

COMPMAX uses simulated annealing to search for a high-quality ore/waste assignment model per drillhole.

Each model assigns every sample as ore or waste, composites adjacent samples with matching assignment, and scores the outcome using optimisation targets and penalties for constraint violations.

Changes that improve objective score are accepted. Some worse changes can be accepted while temperature is high, helping the search escape local optima. As temperature reduces, acceptance becomes more selective.

The best model found is retained and returned. When a search cycle times out, the process can restart from the current best model with randomised changes to continue exploration.

Because this is an optimisation search, repeated runs can produce slightly different valid outcomes in cases where multiple candidate solutions are similarly scored.

If COMPMAX Does Not Give the Expected Result

COMPMAX evaluates composite intervals, not isolated samples. A low-grade sample may be included in an ore composite when the composite-level criteria are satisfied.

Likewise, a sample above cutoff may be assigned to waste if this yields a better valid global composite arrangement for the hole.

If results are not as expected, review whether constraints are too restrictive, then test by relaxing settings such as MINORE or MINWASTE.

For large or complex drillholes, increasing annealing time/cycle settings can improve search quality.

Hidden Parameters

These parameters are not shown in the process user interface, but can be used to fine tune optimisation behaviour.

Parameter

Default

Description

smitemp

1

Starting temperature for each annealing cycle. Higher values allow broader exploration at the start of each cycle.

smafact

0.995

Temperature reduction factor per iteration. Lower values cool faster (quicker run, higher risk of local optimum). Higher values cool slower (broader search, longer run time).

smacycl

5

Number of annealing cycles. Additional cycles restart the search to reduce the chance of returning a local optimum.

smatime

10

Maximum time, in seconds, allowed for each annealing cycle.

smrfrac

0.5

Fraction of sample assignments randomly changed when starting a new cycle from the best prior solution. Higher values explore more widely; lower values stay closer to the previous best model.

More Information

  • Minimum ore length: MINORE defines the minimum target length for ore composites. A resulting ore composite may still be shorter than MINORE where grade is sufficiently high to satisfy ore criteria over the configured minimum ore length.

  • Waste composites: waste composites are intervals between ore composites. If MINWASTE is specified, waste intervals must satisfy the minimum waste length before separating otherwise mineable ore groups. Ore and waste composites alternate in output.

  • Optional second value and cutoff: COMPMAX supports an optional second value criterion using VALUE2, CUTOFF2 and MINMAX2. This can be used where a second grade or contaminant criterion is required.

  • Outputs: the output table contains generated composites with interval geometry, ore/waste classification, composite length and length-weighted average values. Optional drillhole output can include composite assignment and average values per composite.

Input Files

Name

Description

I/O Status

Required

Type

IN

Input desurveyed sample file, sorted in BHID and FROM order. This must contain the fields BHID, X, Y, Z, FROM, TO and LENGTH.

Input

Yes

Drillhole

Output Files

Name

I/O Status

Required

Type

Description

OUT

Output

Yes

Drillhole

Output file containing the optimised ore and waste composites.

HOLESOUT

Output

No

Drillhole

Optional output drillhole file containing equivalent records to the input file, with optional OWCODE flags and composited VALUE values.

Fields

Name

Description

Source

Required

Type

Default

VALUE1

Numeric value field used to control compositing. This may be a grade or a calculated equivalent value from grades of different metals.

IN

Yes

Numeric

Undefined

VALUE2

Optional second numeric value field used to control compositing.

IN

No

Numeric

Undefined

ZONE

Optional compositing zone field. New composites are created whenever ZONE changes.

IN

No

Undefined

Undefined

ZONE2

Optional second compositing zone field. New composites are created whenever ZONE2 changes.

IN

No

Undefined

Undefined

ZONE3

Optional third compositing zone field. New composites are created whenever ZONE3 changes.

IN

No

Undefined

Undefined

OWCODE

Optional output ore/waste flag field where 0 indicates waste and 1 indicates ore.

Output

No

Undefined

OWCODE

Parameters

Name

Description

Required

Default

Values

Range

CUTOFF1

Minimum or maximum value of VALUE1 considered ore.

Yes

0

Undefined

Undefined

CUTOFF2

Minimum or maximum value of VALUE2 considered ore.

No

0

Undefined

Undefined

MINMAX1

Defines ore interpretation for VALUE1.

=0 : Minimum value above VALUE1.

=1 : Maximum value below VALUE1.

Yes

0

0,1

0,1

MINMAX2

Defines ore interpretation for VALUE2. Required if VALUE2 is set.

=0 : Minimum value above VALUE2.

=1 : Maximum value below VALUE2.

No

0

0,1

0,1

MINORE

Minimum length for ore. Must be greater than zero.

Yes

0.00001

Undefined

Undefined

MAXWASTE

Maximum length for internal waste included in ore (samples with value less than CUTOFF). Must be greater than zero to be considered.

No

-1

Undefined

Undefined

MINWASTE

Minimum length for waste composites. Must be greater than zero to be considered.

No

-1

Undefined

Undefined

Example

!START compmax 

!LOCDBOFF
!COMPMAX  &IN(compse_test),
          &OUT(compmax_minore3),
          &HOLESOUT(compmax_mac),*VALUE1(CR2O3),*OWCODE(OWCODE),
          @CUTOFF1=15.0,@CUTOFF2=0.0,@MINMAX1=0.0,@MINMAX2=0.0,
          @MINORE=3.0,@MAXWASTE=-1.0,@MINWASTE=-1.0

!END

Related topics and activities: