2.1. Machine-Learning
Machine-learning is a subfield of computer and data science that is concerned with designing and building algorithms that are capable of ‘learning’ (i.e., improving its parameters) from a collection of examples of some observable phenomenon [
7].
Figure 2 shows a commonly-applied classification scheme for different machine-learning models that, based on the data that are used to train the model, could be categorized as supervised, unsupervised, and reinforcement learning.
Table 1 expands upon the structure of
Figure 2 to include specific machine-learning models, some of which can be adapted for more than one of the categories of
Figure 2. Moreover, the general models that are listed in
Table 1 can be customized or adapted into particular models that are not explicitly mentioned in the table. Each of the models and approaches that are described in
Table 1 have extensive literature, which can be overwhelming to practitioners within the mining industry. These techniques are recognized as having contributed to optimal resource allocation and process optimization in numerous industries, but it is usually unclear how these techniques may be combined to enhance specific mining operations. The current paper presents an approach to experiment with adaptations of these algorithms within a virtual representation (simulation) of a mine, prior to actual implementation. The divisions within
Figure 2 and
Table 1 are further explained below, prior to focussing on one particular machine-learning model, random forests.
In supervised learning, the dataset is a collection of labeled examples, i.e., the dataset is organized to distinguish between attributes that are inputs and those that are outputs; in this case, the machine-learning algorithms are used to create a map that relates the inputs to the outputs. On the other hand, unsupervised learning uses a collection of unlabeled examples from which the algorithm aims to discover the underlying patterns in the data; this may involve partitioning the data into well-characterized clusters [
7], noting that
Table 1 lists four such clustering techniques. Thirdly, reinforcement learning describes a dynamic process, which may or may not benefit from an initially available set of data but is instead concerned with interacting with a system to progressively enhance its learnt understanding (parametrization) of the system.
As shown in
Figure 2, supervised learning algorithms can be further subdivided into regression and classification models, which are regarded separately within
Table 1. Whereas regression involves the generation of continuous target values, classification is focused on determining discrete outputs (classes). Both of these model types are trained based on a set of predictor input variables and corresponding output values. Certain approaches are routinely adapted for both purposes, although not all adaptations are included in
Table 1, e.g., multilinear regression can be adapted for categorization, for example if the output variable is postprocessed to give a 0–1 indicator variable; however, this task is more properly accomplished through logistic regression. The sample computations that are presented later in the paper (
Section 3) focus on random forest classifiers, due to their relative simplicity and wide acceptance. Indeed, a random forest algorithm will be incorporated into a discrete event simulation (DES), to demonstrate the role of DES in the development of machine-learning-enabled digital twins.
However, the flexibility of the current framework would allow for the integration of other machine-learning techniques, depending on the specific application. Machine-learning and artificial intelligence are now at the forefront of modern automation technology, influencing almost every industry. As such, the utilization of such tools in the mining space are beginning to accelerate. Recent work covers mineral exploration, planning, operation, and mineral processing [
8,
9,
10], although these works do not present the connection to digital twin control strategies. A number of recent reviews that are specific to mineral processing highlight the current state-of-the-art and research trends, and outline key areas of interest as a pathway forward in the mining industry. Ali and Frimpong [
8] emphasize that future work should focus on generalizable models that can be applied to different settings or target commodities. McCoy and Auret [
9] point out that machine-learning techniques are frequently applied as soft sensors for the prediction of difficult or infrequently measured variables but are often not integrated with quantitative frameworks that could be fed with those measurements. Finally, Cisternas et al. [
10] stressed the importance of integrating detailed optimization models, e.g., at the molecular level, into higher level models to improve overall system performance. Our work is well-placed within the current literature by presenting a holistic and flexible framework for mine production control that lowers the entry barriers for industrial-scale design and implementation.
The remainder of this section focusses on random forests, in anticipation of their usage within
Section 3. A random forest is an ensemble-supervised machine-learning model that is used for classification and regression tasks by combining multiple decision trees [
11]. These decision trees depend on the values of a random vector that is sampled independently from the set of features and with the same distribution for every tree in a method that is known as bootstrap aggregating (a.k.a. bagging) [
12]. Within each tree, splits are generated to maximize the decrease of impurity that is introduced by a split [
13]; the so-called “impurity” refers to the likelihood of incorrectly classifying a randomly chosen element in the dataset if it were given a random label based on the class distribution.
The random forest algorithm is resistant to problems of overfitting, and, therefore, performs comparatively in the presence of noisy data [
13]. Moreover, its simplicity and relatively easy implementation makes it a popular algorithm that has been widely used in several fields for classification and regression problems [
14].
In a classification model, decisions are made by averaging the class assignment probabilities that are produced by every tree. Prediction of a new datapoint is produced by evaluating every decision tree in the forest, with each casting a class membership vote, as illustrated in
Figure 3. The final membership class is decided by plurality vote.
Normally, the main parameters that are set to implement the algorithm are the number of trees and the number of features that are used in each. The number of trees (each with low bias and high variance) determines the size of the forest [
11], and the number of features determines the number of variables to select and test for the best split in each new tree instance. The value that is used for the number of trees could be in the range of 100–500 [
15]; too far beyond this number of trees typically results in diminishing returns [
16]. The number of variables is generally equal to the square root of the number of inputs [
17].
Due to the difficulty in interpreting the forest of trees that are generated, variable importance and selection methods are used to understand the interactions of the input variables on the output results. In particular, Gini importance, also known as impurity importance, is calculated for each variable as the sum of all decreases in the impurity measure at all nodes in the forest at which a split on the selected variable has occurred [
13].
To evaluate model performance, the two most frequently used metrics are precision and recall. Precision is defined as the ratio of correct positive predictions to the overall number of positive predictions, meanwhile recall is defined as the ratio of correct positive predictions to the overall number of positive examples in the test set [
7]. To complement the results, additional receiver operating characteristics (ROC) curves can be plotted to evaluate the classification model and visualize its performance by depicting the relative trade-offs between benefits and costs [
18].
2.2. Discrete Event Simulation
Discrete event simulation (DES) is a computational paradigm to develop dynamic models that include the interaction of critical variables and processes of discrete event systems. These systems are characterized by a discrete state space in which its state evolution depends on asynchronous discrete events over time [
19]. In this discrete space, objects (a.k.a., entities) are represented individually and can be tracked through the system. Specific attributes are assigned to each individual object and determine what happens to them throughout the simulation. Many of the earliest applications of DES that were related to queuing networks, such as in job shops and other manufacturing contexts, in which the attributes describe the objects (entities) and the processes that transform these objects. Due to its discrete nature, state changes occur at discrete points in time. In recent years, its use and capabilities have been enhanced with the appearance of fast and inexpensive computing capacity [
20].
Computer-based DES is a powerful design and testing tool to support decision-making within industrial systems by simulating thousands of operational days to evaluate the impact, bottlenecks, risks, and other deficiencies of operational policies. DES frameworks can then be used to develop digital twins to design and test operational policies at all stages of the mining life cycle [
21], especially within multiphase engineering projects and continuous improvement initiatives [
22].
One of the key differences between mining and other industrial systems is that mining operations are subject to geological uncertainty. In other words, due to the natural variability of orebodies and host geological environments, there is uncertainty as to whether actual ore feed characteristics will vary from the expected composition. Each deposit may have a minimum grade (i.e., the ore cut-off grade), and other criteria that would determine whether sections of it can be profitably excavated and processed. As DES offers the flexibility to incorporate random distributions, the geological uncertainty (and its economic implications) can be modelled and mitigated by the implementation of operational buffers, such as flexible blending strategies, stockpiles, pre-treatment processes, and alternative operational modes.
In the mining industry, DES is used to conduct “what-if” analysis by supporting mining engineers and management in decision-making [
23], particularly in the analysis of operational buffers. Indeed, DES frameworks have been applied to material management, equipment selection, transportation, and continuous mine system simulation. Other studies have explored DES applications for mine–mill modelling [
24]; these include the use of DES to quantify the impact of ore-type spectral imagery, the use of solar power on semi-autogenous grinding (SAG) mills, and stochastically predicted ore production based on a truck haulage system [
25]. More recently, work by Navarra et al. [
26] opened a new research area regarding mineral processing and simulation through mass balance and mathematical programming by proposing the use of alternate operational modes. This approach combined with DES has been applied in several areas of the mining industry, such as concentrator and smelter dynamics [
27,
28,
29], heap leach processes [
30], chromite beneficiation modeling [
22], reagent consumption in gold processing [
31], oil sands processing [
21], and tailing retreatment applications [
24].
Currently, areas such as manufacturing [
32] and healthcare [
33] have been adopting new strategies to integrate ML models into DES frameworks to produce better results and more realistic representations. More precise representations of the process variability and the consequences of operational decisions can help develop better control strategies [
31,
33]. Greasley [
34] reviews several different architectures that implement commercial off-the-shelf (COTS) DES and machine-learning models, which are summarized in
Figure 4. In the offline category (
Figure 4a), the interaction between DES and ML occurs via data files that contain the output of one of the models, which later serves as the input for the other. Conversely, the online category (
Figure 4b) integrates both models through a data interface that does not require human intervention; communication can occur directly between software programs, or via servers and/or the internet.
Based on these architectures and their interactions, ML strategies can serve to model input data for a DES framework, or outright give the instructions to build the DES model, providing a digital reality [
35]. This digital reality that is generated through data-driven methods enables reconfigurations of the simulation model to reflect the actual state of the system as digital twins. Similarly, DES can serve to model input data and serve as an experimentation and analysis tool for subsequent ML modeling [
35]. This study develops an offline model with an architecture that develops a DES through a ML-assisted ore classification.
2.3. Digital Twin Development
To model complex situations, such as geological uncertainty in mining systems, operational models must be able to represent and respond to the most impactful aspects of the operational variability. Recent work by Navarra et al. [
28] developed a DES framework to provide a representation of feed stockpiles via mass balancing to assess operational risk caused by unexpected changes in ore feed attributes. The risk of stockout is then mitigated by the alternation of operational modes with different blending strategies.
This version of the model is fed with sampled data derived from theoretical distributions based on the expected behaviour and incorporating a controlled level of uncertainty (e.g., standard deviation) through random number generation. Though this Monte Carlo approach allows for a good estimation in the design stages of a processing plant, later stages could benefit from increased geometallurgical and operational data by incorporating other methods such as geostatistical modeling [
24] or predictive ML models [
21] to develop the input data.
In this context, DES models can be expanded and consolidated to develop so-called digital twins. A digital twin can be defined as an integrated simulation of a system that uses the best available data models, updates, and history to mirror the behaviour of the corresponding physical system [
35]. However, there are a variety of different types of digital twins depending on the specific application and related classification scheme [
36]. For instance, a digital twin can be classified based on its level of integration. Whereas offline twins (a.k.a., digital models or shadows) depend on manual data exchanges between the physical and digital systems, full online implementations rely on sensors and other control systems to maintain automatic bidirectional data flow [
36].
The concept of the digital twin is often credited to Grieves’ 2002 work that is related to product lifecycle management (then coined ‘Mirrored Spaces Model’) [
37], with the now widely used term ‘digital twin’ used by NASA in 2010 [
38]. However, the general approach was actually pioneered by NASA’s aerospace program in the 1960s [
39]. Regardless, research interest in digital twins and their use in industrial settings have accelerated over the last two decades. In fact, some estimates indicate the digital twin market could be worth as much as nearly US
$50 billion by 2026 [
40]. Despite this, the use of digital twins in the mining industry remains fairly limited to date, although interest and work in this area are rapidly gaining interest.
While certain offline digital twin solutions have been offered by service providers for several years, real-time online digital twins in the mining space have only begun to emerge in the last three to five years, and mostly remain under development. Early examples include the creation of digital twins by Andritz Automation for the cyclone feed line and underflow/overflow processes at OceanaGold’s Haile mine in South Carolina (2017) [
41], and by Petra Data Science for monitoring the effects of blasting parameters (e.g., blasthole spacing) on mill throughput at PanAust Ltd.’s Ban Houayxai mine in Laos (2018) [
42]. Nonetheless, research and development of digital twin applications within the mining industry remain very much ongoing, particularly for mineral processing and related mine-to-mill integration.
To this end, a combined framework implementing machine-learning and discrete event simulation could be a powerful tool to stabilize mineral processing plant performance in response to predicted geological uncertainty earlier in the value chain. The architectures that were described by Greasley [
34] (
Figure 4) provide some insight into digital twin development. Traditionally, the inputs are generated by sampling data from rules and theoretical distributions that are derived from domain knowledge, as was already mentioned. As an extension, this study proposes a machine-learning model that is based on random forest classification to generate data that is subsequently consumed by the DES framework model of Navarra et al. [
28]. A similar approach was used by Wilson et al. [
21] to create a digital twin which integrated partial least squares regression modelling into DES to model oil sands processing.
The high-level structure of the proposed methodology for digital twin development is represented in
Figure 5, wherein real sampled data are passed into a predictive classification model to generate the proper inputs into the DES framework. The final output of the DES framework, which considers the geological variability that is inherent to mineralized systems, could then assist with the decision-making process in the design stages of production planning. In this form, the digital twin is initially intended for offline use; however, as plant development progresses and operational data accumulates, the framework can eventually be incorporated into the control system of the mine, to provide real-time feedback. It is important this transition occurs gradually, beginning with one-way automatic data transfer from the physical system to the digital twin, to ensure the appropriate functioning of the virtual framework. At this step, data flowing from the physical system (e.g., assay, mineralogical, or sensor data) goes directly to the data collection process of the digital twin. With sufficient validation and proof-of-concept, the digital twin can then be brought fully online to support a two-way automatic data exchange; such a real-time feedback loop has the advantage of simultaneously performing forward predictions and backward reconciliations to optimize the system parameters. DES can thus be an important avenue to develop digital twins for a variety of applications within dynamic mining systems.
The current approach proposes data flows between the physical system and the digital twin, via their respective control systems (
Figure 5) that are initially offline, i.e., utilizing data files (
Figure 4a). This data informs the adjustments of the real and virtual control systems. In subsequent development, the transmission of data and instructions can be brought online through the development of data interfaces (
Figure 4b). The following section provides sample calculations in the context of a vein-hosted gold deposit. The comprehension of the real mining system (
Figure 5, left side) requires inflows of the most critical data, which is site-specific; in some cases, for instance, the ore dilution at the stage of transportation (lauding and hauling) might be critical, in which case this data should be incorporated into the control system.
It should be noted, however, that the control strategies are constrained by the underlying technological infrastructure. This is especially true for underground autonomous mining equipment, which can intermittently lose communication with the overarching control system [
43]; indeed, early adopters of automated hauling systems (AHS) such as Codelco, Rio Tinto, and others, reported that unreliable data transmission and the resulting operational issues were a main reason preventing their wider adoption at more of their sites [
44]. Following these earlier efforts, there have been advances in cellular technology, including high-performance protocols such as 5G, which will have increasing importance within mine control strategies. The communication framework is effectively the technological infrastructure for digital twin development. In the context of a development project, an offline simulation (
Figure 4a) may be extended or adapted to actively inform the online control system (
Figure 4b), but may be limited by the communications infrastructure, including routers, load balancers, cloud computing resources [
45], etc. that are becoming increasingly prevalent in industrial control systems. The implementation of an online digital twin may, therefore, be part of a larger project, which includes the simultaneous upgrading of the infrastructure and the control strategies; a similar discussion has been described in the context of smelter operations [
27] and has a broader relevance throughout the minerals industry.
Figure 5, in relation to
Figure 4, is illustrative of our general approach to digital twin development. It is a general guide to first develop an offline simulation that incorporates control mechanisms explicitly within the simulation; DES models that follow this approach can then be extended/adapted into the real-time control system of a functional mine, but this may require a simultaneous upgrade of the of the underlying infrastructure [
27,
45]. This is distinguished from other applications of DES that do not explicitly simulate the control mechanism and are, therefore, not directly related to digital twin development. Moreover, the approach of
Figure 5 allows the testing and refinement of machine-learning-enabled control strategies, prior to their deployment in an actual mine. It should be noted, however, that
Figure 5 is intentionally general and its application requires context, e.g., the following section adapts our general approach for gold production using real industrial data from the Alhué district to parameterize machine-learning-enabled control strategies.