Next Article in Journal
Siderite Decomposition Kinetics—Influence of Time, Temperature, and Isomorphous Impurities
Previous Article in Journal
Zircon U-Pb Geochronology and Geochemical Constraints of Tiancang Granites, Southern Beishan Orogenic Belt: Implications for Early Permian Magmatism and Tectonic Evolution
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimization in Mineral Processing: A Novel Matheuristic for a Variant of the Knapsack Problem

1
Departamento de Ingeniería Metalúrgica y Minas, Universidad Católica del Norte, 0610 Angamos, Antofagasta 1270709, Chile
2
Departamento de Ingeniería Industrial, Universidad Católica del Norte, 0610 Angamos, Antofagasta 1270709, Chile
3
Departamento de Ingeniería de Sistemas y Computación, Universidad Católica del Norte, 0610 Angamos, Antofagasta 1270709, Chile
4
Department of Mining and Materials Engineering, Faculty of Engineering, McGill University, 3610 University Street, Montreal, QC H3A 0C5, Canada
*
Author to whom correspondence should be addressed.
Minerals 2025, 15(4), 427; https://doi.org/10.3390/min15040427
Submission received: 3 March 2025 / Revised: 8 April 2025 / Accepted: 17 April 2025 / Published: 19 April 2025
(This article belongs to the Section Mineral Processing and Extractive Metallurgy)

Abstract

:
This study introduces a novel heuristic approach to optimize mineral processing in metallurgical plants, framed as a variant of the fractional knapsack problem. The optimization framework integrates plant operational modes, blending requirements, and processing constraints to maximize the recoverable value of mineral blocks while adhering to plant capacity and feed limitations. Building on a previously established mixed-integer linear programming formulation, this study develops a heuristic algorithm employing a greedy strategy. This alternative approach significantly reduces computational time while achieving near-optimal solutions, making it suitable for practical implementation. Validation through a case study demonstrates the algorithm’s effectiveness in managing complex constraints and delivering actionable insights for real-world operations. These findings highlight the potential of this methodology to streamline the mineral processing stage of broader mine planning frameworks, complementing the initial optimization of block extraction with faster and more reliable processing calculations.

1. Introduction

Metallurgical plants are central to the mineral value chain, significantly affecting a mine’s operating costs and revenue. A critical example is the comminution process—encompassing crushing and grinding—which liberates valuable minerals for subsequent flotation or leaching. This stage alone often consumes over 30% of a mine’s total energy usage, and as much as 50% of a mine’s electrical energy [1,2,3] and is influenced by ore characteristics such as hardness and liberation size [4]. Consequently, optimizing comminution is crucial for increasing metal recovery while reducing both energy consumption and operational costs [5].
Beyond comminution, additional factors limit the full recovery of valuable metals. For instance, the presence of cyanide-consuming elements—like gold and silver—necessitates higher reagent dosages, driving up operating costs [6]. Inevitably, some fraction of the valuable minerals is lost to tailings [7]. Striking an optimal balance between the final product sold and the material sent to tailings thus becomes essential. This ratio depends on the natural variability of the incoming feed and the extent to which the plant can adapt to these fluctuations, directly impacting both costs and revenues.
Adapting to feed variability often involves reconfiguring the plant to ensure efficient processing. For example, switching from a coarse to a fine grind may require emptying the semi-autogenous grinding (SAG) mill and substituting the existing steel ball load—a procedure that can force the plant to halt or operate below capacity. While such changes can improve recovery, frequent reconfigurations are impractical. Instead, metallurgical plants typically operate within predefined operational modes—sets of parameters (e.g., blending proportions, feed rates, and grinding conditions) specifically suited to certain ore characteristics or production targets [8]. These modes help maintain efficiency and throughput during substantial or prolonged changes in the feed. Additionally, introducing new equipment or sensors may prompt the creation of further operational modes [9,10].
Importantly, these operational decisions also carry significant long-term financial consequences. Choices around reconfiguration, energy consumption, metal recovery, and maintenance can accumulate over the life of a mine, making it essential to capture their effects in strategic mine-planning frameworks. However, despite the importance of operational modes, relatively few models integrate them at a detailed level within long-term mine planning. For instance, Ref. [7] extended stochastic mine-planning algorithms to evaluate net present value (NPV) by incorporating alternative operational modes under geological uncertainty. Lamghari’s variable neighborhood descent (VND) approach [10] provided a statistical foundation to compare plant designs and justify expansions. Ref. [11] observed that, while current long-term mine-planning methods often handle geological uncertainty effectively, they frequently lack robust representations of alternate processing modes. They responded by proposing a computational framework that integrates geometallurgical models, enabling the evaluation of multiple operational modes more accurately.
Production control for mineral processing has been addressed by developing a digital twin framework that combines discrete event simulation (DES) with a customized machine learning (ML) model [12]. The work identifies trigger points for switching operational modes, improving short- and long-term outcomes. However, because this framework relies on simulation rather than a formal optimization model, it does not guarantee a mathematically optimal solution. In contrast, Ref. [8] focused on enhancing stochastic mine-planning algorithms to implement mode changes in greater detail, proposing a two-stage optimization model. In the second stage—representing the metallurgical plant—they introduced a Dantzig–Wolfe decomposition [13] with a linear programming formulation, nested within the stochastic mine-planning algorithm. Ref. [14] then built on that work by applying the ultimate pit limit (UPL) to reduce the number of blocks and parallelizing the VND algorithm. Although these improvements lowered execution times to around 41 min for a case with 13,000 blocks, 2 rock types, and 2 operational modes, such a runtime remains impractical for real open-pit mines containing millions of blocks. Because the Dantzig–Wolfe decomposition is iterated thousands of times within the optimization, even modest per-iteration improvements can significantly reduce the overall runtime. Consequently, further improving this computationally intensive step remains a priority.
Against this backdrop, the present study introduces a matheuristic that balances two objectives: maximizing mineral-processing performance and minimizing deviation from the exact optimal solution. By matheuristics, we refer to heuristic algorithms that integrate metaheuristic and mathematical programming techniques [15]. The proposed approach combines a greedy algorithm with a continuous knapsack subproblem to address efficiently the unique challenges of multi-mode mineral processing, where variations in ore grade and textural characteristics demand adaptive strategies. While the underlying computational framework is essential, our method is grounded in metallurgical principles captured by the operational modes, ensuring that decisions related to ore blending, comminution, and flotation process are informed by the geological and mineralogical properties of the deposit.
This paper begins by reviewing the knapsack problem and its main variants, then discusses how the unique constraints of multi-mode mineral processing depart from standard formulations. Next, we describe the metaheuristic aspects of our approach, underscoring the elements essential for flexible mode selection. We then illustrate the potential of this method through a detailed case study, showcasing its efficacy in maintaining near-optimal solutions within reduced computational times. Finally, we draw conclusions regarding the broader implications of incorporating multiple operational modes into strategic mine planning and suggest possible avenues for future research.

2. Knapsack Problem

The knapsack problem is a well-known combinatorial optimization model that seeks to maximize value while respecting a capacity constraint [16]. Two common variants are as follows:
  • 0–1 Knapsack: Each item i I can be selected entirely (xi = 1) or not at all (xi = 0). Mathematically, we have the following:
max i I v i x i
s.t.
i I w i x i K ,
x i 0,1 , i I ,
where vi is the value of item i, wi is its weight, and K is the knapsack capacity.
  • Fractional knapsack: Items can be partially selected, allowing xi  [0, 1]. Its formulation replaces the binary constraints (3) with the following:
0 x i 1 , i I ,
This enables a fraction of each item i to be included. In the standard fractional knapsack, a simple greedy algorithm that sorts items by their value-to-weight ratio solves the problem optimally in O ( n log n ) time.

2.1. From Knapsack to Mineral Processing

Mineral processing can be conceptually framed as a fractional knapsack problem, especially when an orebody is divided into discrete blocks that can be partially processed. If we draw an analogy, we have the following:
  • Items Blocks of ore b  B , each with a specific mas, mb.
  • Value vi  Potential revenue vb from extracting minerals in block b.
  • Weight wi  Mass mb, which contributes to a plant’s capacity usage.
  • Capacity K  A limit on how much the plant can process over a given scheduling period.
Therefore, in the simplest case, a metallurgical plant has a fixed capacity K, and each block can be processed either fully or partially, depending on whether it is beneficial to do so. However, real-world mineral-processing scenarios seldom adhere strictly to the basic 0–1 knapsack or fractional assumptions. In practice, operational modes enter the picture. Each operational mode may be viewed as a specific plant configuration or setting, designed to process different blends of the varying rock types, at varying rates. Consequently, multiple constraints arise as follows:
  • Multiple rock types: Blocks can belong to distinct rock types, each with unique metallurgical properties.
  • Blending requirements: Certain modes may demand specific ratios of rock types to ensure stable metallurgical performance.
  • Partial processing across modes: A single block may be partially processed under one mode and partially under another, if this yields higher overall returns and meets blending constraints.
  • Time-based capacity: Instead of a simple tonnage limit, the capacity may be measured in hours of plant operation, which must be allocated efficiently among modes and blocks.

2.2. Mathematical Formulation

The mathematical formulation that incorporates the aforementioned aspects is a mixed-integer linear program (MILP) presented in [8]. Table 1 summarizes the notation used throughout.
The objective function and constraints are as follows:
max b B o O v b o m b x b o
s.t.
b B o O 1 r o x b o q ,
o O x b o m b , b B ,
b B p 1 x b o = w o p 1 w o p 2 b B p 2 x b o , o O , p 1 , p 2 P ,
x b o 0 , b B , o O .
This formulation maximizes the total recoverable value across all blocks and modes using vbo/mb to represent the value per unit mass (Equation (5)). Constraint 6 ensures that the cumulative processing time does not exceed the available hours q. Since (1/ro) xbo denotes the time required to process mass xbo of block b under mode o, the sum of these terms must be less than or equal to q. Constraint 7 limits the total processed mass of each block b to at most mb. Constraint 8 enforces the blending ratios for rock types within each mode o. Because wop1 and wop2 represent the fractional requirements for rock types p1 and p2, respectively, their processed masses must reflect the specified ratio. Finally, Constraint 9 ensures the non-negativity of the decision variables.
As mentioned previously, this formulation was implemented in [8] and further refined in [14]. However, the runtime reaches almost 41 min for 13,000 blocks, 2 operational modes, and 2 rock types. Although the Dantzig–Wolfe implementation in these works is highly efficient, the fact that this part of the code is executed thousands of times means that even a minor improvement in the implementation could significantly reduce the overall execution time, especially when scaling to scenarios involving millions of blocks.

3. Matheuristic

We proposed a matheuristic to solve the MILP formulation efficiently to determine the amount of mass of each block b  B to be processed under a specific operational mode, o  O , which maximizes the recoverable value vbo of the set of blocks B .
The matheuristic consists of the following two phases: the benefit calculation phase and the fraction assignment phase. The benefit calculation phase computes the potential benefit of processing blocks for each operational mode. Once the operational mode with the highest benefit is selected, the fraction assignment phase determines the percentage of the blocks to be processed.
The main algorithm and its two phases are described in the following subsections. Additionally, Appendix A presents a supplementary numerical example that further illustrates how the algorithm operates.

3.1. Main Algorithm

Algorithm 1 describes the main procedure of the matheuristic. It begins with a set of blocks, B ; a set of rock types, P ; a set of operational modes, O , of the plant; parameters related to the available time of the plant, q; the mass mb of each block b  B ; the tonnage processing rate ro by mode o  O ; the value, vbo, of each block b  B processed by mode o  O ; and the proportion requirement, wop, for each block of rock type p processed by mode o. Then, the best benefit, σ, is initialized as zero, and lists related to the problem information for each iteration of the algorithm— L o p v , L o p t , L o p w , L o p O R , L o p F A , and L o p F A —are initialized.
Algorithm 1 Main Algorithm
1:Inputs:  B , P , O , q, mb, ro, vbo, wop
2:Output: Processed blocks and their assigned fraction ( L o p F A )
3:
4:Initialization:
5:σ 0◊ best benefit
6: L o p v , L o p t , L o p w , L o p O R , L o p F A , L o p F A
7:
8:Sort all lists L o p O R according to non-increasing order of their OR.
9:while  B , q > 0, σ ≥ 0 do
10:  Call o*, σ BENEFIT_CALCULATION( O , P , L o p w , L o p O R )
11:  if σ ≥ 0 then
12:    Call FRACTION_ASSIGNMENT( O , P , L o p w , L o p O R , L o p F A , L o p F A , m b , q , o * )
13:   end if
14:end while
L o p v , L o p t , and L o p w remain unchanged at every iteration of the algorithm and are only updated with a new instance of the problem. L o p v stores the recoverable value of each block classified by rock type. It is initialized with the recoverable value, vbo, of each block b of rock type p when it is processed by mode o. L o p t stores the processing time information for each block classified by rock type p when a specific operational mode, o, is selected. It is initialized with the quotient between the mass, mb, of the block and the processing ratio, ro, for each mode o. L o p w saves the proportion requirement information to ensure the correct mix of rock types for each processing mode. It is initialized with the proportion requirement wop for each rock type p when it is processed by mode o.
L o p O R , L o p F A , and L o p F A are updated at every iteration of the algorithm and allow us to determine a decision path to process blocks in the best operational mode with the correct tonnage quantity, respectively.
  • L o p O R stores the order ratios (ORs) of the blocks to determine which are potentially more attractive to process, considering different operational modes. These ratios are calculated using the quotient of the values of L o p v and L o p t for each block b of rock type p when processed by mode o. The list is computed once at the algorithm’s beginning and sorted in a non-increasing order. In every iteration, when a block is completely processed, it is eliminated.
  • L o p F A stores the feasible fractions assigned (FAs) for each block b of rock type p that is processed under different operational modes, o (xbo/mb). At each iteration, the FA value for each block is updated to ensure a feasible mix of rock types for each processing mode. The list is initialized with a fraction assignment of zero for each block.
  • L o p F A stores 1 − L o p F A to track the remaining portion of each block b that has not yet been processed. Unlike L o p F A , this list is initialized with a value of 1.
After initialization, the list of blocks L o p O R is sorted in non-increasing order based on their ORs. Then the benefit calculation phase and the fraction assignment phase are called until some of the following stop criteria are met: (i) there are no remaining unprocessed blocks, (ii) the processing capacity is fully occupied, or (iii) the best potential benefit offered by a next iteration is negative.
The algorithm concludes by returning a list of processed blocks of rock type p in mode o, along with their assigned fractions L o p F A . The total value of ore processing is calculated as the product of each block’s value and its corresponding FA. The following subsections, the benefit calculation phase and the fraction assignment phase, are described in detail.

3.2. Benefit Calculation

Algorithm 2 describes the benefit calculation phase, which computes the best potential benefit of processing blocks considering different operational modes. It begins with a set of operational modes, O , of the plant, a set of rock types, P , the proportion requirement, L o p w , and the order ratios, L o p O R . The function outputs the best operational mode o* and the best benefit σ generated by the block of rock type p processed by the best operational mode o*.
Algorithm 2 Benefit Calculation Function
1:function BENEFIT_CALCULATION( O , P , L o p w , L o p O R )
2:   Initialization:
3:  o  none◊ best operational mode
4:  σ −∞◊ best benefit in mode o*
5:   total_benefit[o]    0 ,   o   O
6:
7:  for all o  O  do
8:      Determine rock type p* with the maximum value wop, p P
9:      total_benefit[o]  p P ( L o p O R × L o p w / L o p * w )
10:      if total_benefit[o] > σ then
11:        σ total_benefit[o]
12:         o o◊ Update best operational mode
13:       end if
14:   end for
15:
16:  return o*, σ
17:end function
First, we initialize the best mode as none, the best benefit as −∞, and the total benefit at each mode as 0. Then, for each mode, o  O , we determine the rock type p* with the maximum wop in L o p w to compute the relation factor concerning all the other blocks of rock type p P in order to determine the total benefit in mode o  O , considering only feasible rock type mixes.
In the final evaluation of all operational modes, we obtain the best operational mode o* and the best benefit σ.

3.3. Fraction Assignment

Once the best operational mode o* with the highest benefit σ is selected, the fraction assignment phase determines the proportion of the rock type block that must be processed in the selected mode. This procedure is described in Algorithm 3.
Algorithm 3 Fraction Assignment Function
1:function FRACTION_ASSIGNMENT( O , P , L o p w , L o p O R , L o p F A , L o p F A , mb, q, o*)
2:  TP  ◊ Total tonnage to be processed
3:  for all p P  do
4:     Get block b of rock type p with the highest value in L o * p O R
5:     ATp   mb × ( L o p F A L o * p F A )/ L o * p w ◊ Available tonnage to be processed
6:     if TP > ATp then min(TP, ATp)
7:      pmin    p
8:      TP    ATp
9:      end if
10:   end for
11:
12:  for all p P  do
13:     TRTp  L o * p w / L o * p m i n w × TP◊ Tonnage of each rock type to be processed
14:      L o * p F A L o * p F A + TRTp/mb◊ Update FA for each block
15:     for all o  O \ {o*} do
16:        L o p F A   1 − L o * p F A ◊ Update FA for the same blocks in other modes
17:      end for
18:     q    qTRTp/ ro*◊ Update available plant capacity
19:   end for
20:end function
The fraction assignment phase begins with a set of operational modes O of the plant, a set of rock types, P ; the order ratios, L o p O R ; the fraction assignments, L o p F A ; the mass of each block, mb; the proportion requirement, L o p w ; the available time of the plant, q; and the best mode, o*. At the end, this procedure updates the fraction assignments, L o p F A , to be processed for the following iterations.
First, for all rock type p P , we determine the available tonnage (ATp) to be processed in the best mode o*, and we set up the total tonnage to be processed, TP, as the min (TP, ATp), for all p P . Then, we compute the tonnage of each rock type to be processed (TRTp) in order to determine their respective fraction assignment, updating L o * p F A . In this process, we ensure that the required fractions of each rock type p must be processed according to the proportion requirement L o p w . Also, we update the fraction assignment for each block in the other operational modes for the following iterations L o p F A . Finally, we update the available plant capacity.

3.4. Advantages of the Matheuristic Approach

The matheuristic approach described in this section is particularly advantageous for complex problems where multiple constraints must be satisfied, such as maintaining specific proportions of rock types in different modes while considering plant capacity limitations. By modularizing the key phases of the algorithm, the approach remains flexible and can be adapted to a wide variety of real-world scenarios. The use of separate functions for benefit calculation, fraction assignment, and termination checking ensures that the algorithm remains computationally efficient, even as the number of rock types and operational modes increases.

4. Sample Calculations

4.1. Case Study

This case study builds upon the same fictional Au-Cu porphyry deposit of the Maricunga region in Chile described in [14], which is closely related to the case presented in [9]. Briefly, this deposit is set within the Maricunga belt—a high-Andean region renowned for its numerous gold, silver, and copper prospects and deposits [14]. The belt is characterized by predominantly porphyry–epithermal systems, along with notable vein and distal contact metasomatic deposits. In addition to its mineral processing potential, the deposit exhibits distinct mineralogical and petrographic features. As detailed in [9], gold-rich porphyry deposits such as this are formed by a combination of magmatic, sedimentary, and hydrothermal processes within volcanic–plutonic arcs, typically emplaced at shallow crustal levels. These deposits not only display significant variations in mineral composition and textural characteristics—which influence both mineralization and processing behavior—but are also associated with a range of lithological variations and structural features that underscore their complex geological evolution. The integration of these mineralogical and petrographic aspects offers a more comprehensive perspective on both the genesis of the deposit and the subsequent challenges and opportunities for optimizing mineral processing.
This study develops a conceptual model with a distinct focus on processing minerals, rather than designing a mine plan, as presented in [14], by assuming that the entire orebody is extracted in a single period. The conceptual model centers on an Au-rich porphyry system, incorporating geological elements such as (1) diorite porphyry hosting mineralized veinlets and (2) silicified intrusive breccias. Figure 1 provides a schematic representation of the geological model. The case considers two operational modes in the metallurgical plant, consistent with the parameters presented in [14], to ensure clarity in the analysis and facilitate understanding of the proposed approach. Further details are provided in Table 2.
Unlike the previous study, which analyzed multiple scenarios, this case study evaluates a single scenario, considering that its primary objective is to validate the performance of a matheuristic algorithm for optimizing mineral processing. Consequently, multithreading techniques were not employed. Three dataset sizes—5000, 10,000, and 13,932 blocks—were tested to assess the algorithm’s scalability and robustness. The first two sizes were arbitrarily chosen with increments of 5000 blocks each, while the last size represents the maximum number of available blocks.
The algorithm was implemented in C++ and executed on a laptop computer equipped with a 12th Gen Intel(R) Core(TM) i7-1255U processor running at 1.70 GHz.

4.2. Results

Table 3, Table 4 and Table 5 present the results for processing 5000, 10,000, and 13,392 blocks. The results of the matheuristic are compared to the optimum calculated using the Gurobi solver. As shown, the processed ore represents the sum of the tons processed under Mode A and Mode B. Each mode maintains specific rock type proportions, that is, 65% diorite porphyry and 35% silicified intrusive breccia in Mode A, and 45% diorite porphyry and 55% silicified intrusive breccia in Mode B.
In all three instances, the matheuristic shows a preference for processing under Mode A. This indicates that the available quantity of diorite rock was sufficient to maintain the required blending ratio and achieve a processing rate of 250 tons/hr. Mode A also incurs a lower processing cost (USD 21.4/ton) compared to Mode B (USD 24.9/ton), which operates at a lower rate of 200 tons/hr due to the presence of silicified rock.
However, the optimal solution obtained using Gurobi involves a slightly greater utilization of Mode B. Despite this difference in feed tonnages, which affects the extracted Au (Table 6), the total value difference between the matheuristic and the optimum solution is less than 0.1% (Table 7). This aligns with Appendix A, where, for a different dataset, the deviation is slightly higher but still minimal (0.16%). Furthermore, processing 13,392 blocks takes only 4 ms with the matheuristic, compared to 80 ms with the Gurobi solver implementation (Figure 2).
The minimal deviation from the optimum value (Table 7) and the high computational efficiency (Figure 2) demonstrate the advantages of this matheuristic compared to other implementations or solvers like Gurobi. These features make the matheuristic particularly suitable for embedding in optimization frameworks as those in mine planning, where it can be repeatedly utilized to analyze the cumulative impact of aggregated deviations.

5. Conclusions

This study introduced a novel matheuristic approach to optimize mineral processing in metallurgical plants, formulated as a variant of the fractional knapsack problem. The proposed method integrates plant operational modes, blending constraints, and capacity limitations to maximize the recoverable value of mineral blocks. By leveraging a greedy strategy within a heuristic framework, the algorithm significantly reduces computational time while maintaining near-optimal solutions. Validation through a case study demonstrated its ability to effectively manage complex constraints, reinforcing its practical applicability in real-world mining operations.
Despite minor deviations from the optimal solution in the case study—less than 0.1% in total value—the proposed algorithm drastically reduces computation time, highlighting its superior efficiency in comparison to exact methods implemented in the Gurobi solver. Additionally, in the case study, the matheuristic successfully maintains blending requirements and operational constraints, ensuring feasible and efficient processing strategies. The preference for operational Mode A over Mode B in the results suggests an inherent flexibility in adapting to different mineralogical compositions and plant configurations, consistent with previous studies that consider multiple processing modes [6,7,8,9,11,12,14].
Given that the current implementation achieves near-optimal results, future research will focus on analyzing whether fine-tuning specific algorithmic components can further enhance performance. In addition, we plan to explore the integration of additional elements—such as accounting for variations in valuable component content across the block and addressing challenges related to geological sampling—to improve the reliability of our forecasting approach. Moreover, while cyanide consumption is currently incorporated indirectly within the processing cost and recovery parameters, future work will investigate modeling the direct costs and usage of reagents like cyanide, further refining the representation of processing economics. On the other hand, this matheuristic is intended to replace the existing Dantzig–Wolfe decomposition-based implementation described by [14], providing a more computationally efficient alternative implementation for the second stage of a formulation relating to a stochastic long-term open-pit mine planning optimization.
Finally, further investigations will explore strategies to ensure that the matheuristic consistently achieves optimal solutions. This includes integrating additional heuristics or hybrid optimization techniques to enhance solution precision while maintaining computational efficiency. The findings of this study pave the way for broader applications of heuristic-based optimization in the mining industry, offering a balance between accuracy and scalability in decision-support frameworks.

Author Contributions

Conceptualization, C.L., H.L. and A.Q.; methodology, C.L. and H.L.; software, A.Q.; validation, C.L., A.Q. and A.N.; investigation, C.L. and H.L.; resources, C.L. and H.L.; data curation, A.Q.; writing—original draft preparation, C.L., H.L. and A.Q.; writing—review and editing, H.L., A.Q. and A.N.; supervision, A.Q. and A.N. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data presented in this study are available upon request from the corresponding author. The data are not publicly available due to privacy concerns of anonymous industrial partners.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Supplementary Numerical Example

For a better understanding of the algorithm presented in this article, an example illustrating the step-by-step application of this algorithm from the parameters presented in Table A1 and Table A2 is developed in this section.
Table A1. Parameters of the example.
Table A1. Parameters of the example.
ParametersValues
Block weight (ton)—m10,000
Number   of   blocks | B | 20
Processing availability (h)—q450
Rock   Types P I
II
Operational Mode A
Processing rate (ton/h)—rA250
I (%)—wAI20
II (%)—wAII80
Operational Mode B
Processing rate (ton/h)—rB200
I (%)—wBI85
II (%)—wBII15

Appendix A.1. Heuristic Approach

Initialization: Four lists of grouped rocks were created, corresponding to two rock types and two operational modes. Each rock was assigned a monetary value, as shown in Table A2.
Table A2. Monetary value of each block by rock type and operational mode.
Table A2. Monetary value of each block by rock type and operational mode.
Rock Type I—Mode A  ( L A I v ) Rock Type I—Mode B  ( L B I v )
Block IDValueBlock IDValue
1USD 1,000,0001USD 1,150,000
2USD 600,0002USD 2,350,000
3USD 1,400,0003USD 2,500,000
4USD 1,200,0004USD 1,200,000
5USD 1,500,0005USD 850,000
6USD 1,100,0006−USD 350,000
7USD 400,0007−USD 950,000
8−USD 400,0008−USD 550,000
9−USD 800,0009−USD 350,000
10−USD 1,400,00010USD 2,500,000
Rock Type II—Mode A ( L A I I v )Rock Type II—Mode B ( L B I I v )
Block IDValueBlock IDValue
11USD 1,800,00011USD 1,500,000
12USD 900,00012USD 1,300,000
13−USD 300,00013USD 400,000
14USD 100,00014USD 500,000
15USD 1,500,00015−USD 1,700,000
16USD 1,000,00016−USD 2,300,000
17USD 1,900,00017−USD 500,000
18USD 3,300,00018−USD 1,400,000
19USD 2,700,00019USD 700,000
20USD 1,700,00020−USD 1,100,000
Processing time: The processing time was determined by dividing the mass of each block by the processing ratio for its respective mode ( L o p t ). Since both the mass and processing ratios were constant, the processing times were as follows:
  • Processing time for Mode A: 40 h
  • Processing time for Mode B: 50 h
Order ratio calculation: The order ratio (OR) was computed as the value of each block divided by its processing time ( L o p O R ). The blocks were then sorted in descending order based on their OR values. The sorted lists are presented in Table A3.
Table A3. Sorted lists of blocks by order ratio (OR).
Table A3. Sorted lists of blocks by order ratio (OR).
Rock Type I—Mode A  ( L A I O R ) Rock Type I—Mode B  ( L B I O R )
Block IDOrder RatioBlock IDOrder Ratio
5USD 37,5003USD 50,000
3USD 35,00010USD 50,000
4USD 30,0002USD 47,000
6USD 27,5004USD 24,000
1USD 25,0001USD 23,000
2USD 15,0005USD 17,000
7USD 10,0006−USD 7000
8−USD 10,0009−USD 7000
9−USD 20,0007−USD 19,000
10−USD 35,0008−USD 31,000
Rock Type II—Mode A ( L A I I O R )Rock Type II—Mode B ( L B I I O R )
Block IDOrder RatioBlock IDOrder Ratio
18USD 82,50011USD 30,000
19USD 67,50012USD 26,000
17USD 47,50019USD 14,000
11USD 45,00014USD 10,000
20USD 42,50013USD 8000
15USD 37,50017−USD 10,000
16USD 25,00020−USD 22,000
12USD 22,50018−USD 28,000
14USD 250015−USD 34,000
13−USD 750016−USD 46,000
Benefit calculation: The benefit for each mode was computed using the benefit calculation function (Algorithm 2). In the first iteration, Mode A was selected, as it provided the highest total benefit (Table A4).
Table A4. Benefit calculation for the first iteration.
Table A4. Benefit calculation for the first iteration.
Rock TypeMode AMode B
IUSD 9375 × (20%/80%)USD 50,000 × (80%/80%)
IIUSD 82,500 × (85%/85%)USD 5294 × (15%/85%)
Total benefitUSD 84,843.75USD 50,934.24
Fraction assignment: The fraction assignment (FA) of each block was updated iteratively based on the selected mode, as described in Algorithm 3. Initially, the blocks with the highest OR values in Mode A were selected, and their corresponding FA values were updated while ensuring compliance with the proportion requirements in Table A5.
Table A5. Fraction assignment after the first iteration.
Table A5. Fraction assignment after the first iteration.
Rock Type I—Mode A  ( L A I F A ) Rock Type I—Mode B  ( L B I F A )
Block IDFABlock IDFA
50.253
3 10
4 2
6 4
1 1
2 5
7 6
8 9
9 7
10 8
Rock Type II—Mode A ( L A I I F A )Rock Type II—Mode B ( L B I I F A )
Block IDFABlock IDFA
18111
19 12
17 19
11 14
20 13
15 17
16 20
12 180
14 15
13 16
Verification and iteration: The process continued iteratively, with each step selecting the mode that provided the highest benefit and updating the fraction assignments for the blocks in that mode. The FA values were adjusted until all blocks were fully processed or the plant capacity was exhausted. The algorithm accounted for special cases, such as switching modes based on benefits. For instance, in the fourth iteration, Mode B was selected due to its higher total benefit Table A6. Based on the indicator steps in Algorithm 3, the FA values were assigned to the blocks with the highest OR in Mode B, as shown in Table A7.
Table A6. Switch to Mode B in the fourth iteration.
Table A6. Switch to Mode B in the fourth iteration.
Rock TypeMode AMode B
IUSD 9375 × (20%/80%)USD 50,000 × (80%/80%)
IIUSD 45,000 × (85%/85%)USD 5294 × (15%/85%)
Total benefitUSD 47,343.75USD 50,934.24
Table A7. Fraction assignment after the fourth iteration.
Table A7. Fraction assignment after the fourth iteration.
Rock Type I—Mode A  ( L A I F A ) Rock Type I—Mode B  ( L B I F A )
Block IDFABlock IDFA
50.7531
3010
4 2
6 4
1 1
2 5
7 6
8 9
9 7
10 8
Rock Type II—Mode A ( L A I I F A )Rock Type II—Mode B ( L B I I F A )
Block IDFABlock IDFA
181110.18
19112
17119
11 14
20 13
15 17
16 20
12 180
14 15
13 16

Appendix A.2. Special Cases

Throughout the iterations, several special cases were addressed. In each scenario, the algorithm ensured that processing proportions remained consistent with the specified requirements.
To illustrate these cases, the following examples are provided:
Blocks processed in multiple modes: In the sixth iteration, the algorithm revisited Mode A with Block 11, which had already been processed in Mode B. In this case, the sum of the FA values for Block 11 across Modes A and B had to equal 1. This adjustment is detailed in Table A8.
Table A8. Fraction assignment after the sixth iteration.
Table A8. Fraction assignment after the sixth iteration.
Rock Type I—Mode A  ( L A I F A ) Rock Type I—Mode B  ( L B I F A )
Block IDFABlock IDFA
50.9131
30101
4 21
6 4
1 1
205
7 6
8 9
9 7
1008
Rock Type II—Mode A ( L A I I F A )Rock Type II—Mode B ( L B I I F A )
Block IDFABlock IDFA
181110.35
19112
171190
110.6514
20 13
15 170
16 20
12 180
14 15
13 16
Change of the minimum value of TP: In the seventh iteration, the process was executed in Mode A. Due to the almost complete use of block number 5, this block was selected in this iteration to define the TP of the process, adjusting to rock type II.
The FA values of the blocks cannot exceed 1. Therefore, in this iteration, a value of 1 was assigned to the secondary block, and the FA value of the principal block was adjusted accordingly (Table A9).
Table A9. Adjustment of FA values to comply with mixture proportions.
Table A9. Adjustment of FA values to comply with mixture proportions.
Rock Type I—Mode A  ( L A I F A ) Rock Type I—Mode B  ( L B I F A )
Block IDFABlock IDFA
5131
30101
4 21
6 4
1 1
2050
7 6
8 9
9 7
1008
Rock Type II—Mode A ( L A I I F A )Rock Type II—Mode B ( L B I I F A )
Block IDFABlock IDFA
181110.35
19112
171190
110.6514
200.3513
15 170
16 20
12 180
14 15
13 16

Appendix A.3. Result

The final result is presented in Table A10, which also includes the optimal solution calculated using the Gurobi solver. The process was terminated due to the capacity constraint (q = 450 h). If the FA values were multiplied by the corresponding block values, the difference between both solutions, in terms of the monetary value of processing the blocks, would be 0.16%.
Table A10. End of the iterations due to the plant capacity constraint.
Table A10. End of the iterations due to the plant capacity constraint.
Rock Type I—Mode ARock Type I—Mode B
Block IDFA—MatheuristicFA—GurobiBlock IDFA—MatheuristicFA—Gurobi
511311
3001011
40.370.37211
6 4
1 1
200500
7 6
8 9
9 7
10008
Rock Type II—Mode ARock Type II—Mode B
Block IDFA—MatheuristicFA—GurobiBlock IDFA—MatheuristicFA—Gurobi
1811110.350
1911120.180.53
17111900
110.65114
201113
150.820.471700
16 20 0
12 1800
14 15
13 16

References

  1. Napier-Munn, T. Is progress in energy-efficient comminution doomed? Miner. Eng. 2015, 73, 1–6. [Google Scholar] [CrossRef]
  2. Wang, C.; Nadolski, S.; Mejia, O.; Drozdiak, J.; Klein, B. Energy and Cost Comparisons of HPGR Based Circuits with the SABC Circuit Installed at the Huckleberry Mine. In Proceedings of the 45th Annual Canadian Mineral Processors Operators Conference, Ottawa, ON, Canada, 22–24 January 2013. [Google Scholar]
  3. Lois-Morales, P.; Evans, C.; Weatherley, D. Analysis of the size-dependency of relevant mineralogical and textural characteristics to particles strength. Miner. Eng. 2022, 184, 107572. [Google Scholar] [CrossRef]
  4. Bueno, M.; Foggiatto, B.; Lane, G. Geometallurgy Applied in Comminution to Minimize Design Risks. In Proceedings of the 6th International Conference on Autogenous Semi-Autogenous Grinding and High-Pressure Grinding Roll Technology, Vancouver, BC, Canada, 25–28 September 2015; pp. 1–19. [Google Scholar]
  5. Both, C.; Dimitrakopoulos, R. Integrating geometallurgical ball mill throughput predictions into short-term stochastic production scheduling in mining complexes. Int. J. Min. Sci. Technol. 2023, 33, 185–199. [Google Scholar] [CrossRef]
  6. Maganga, S.P.; Wikedzi, A.; Budeba, M.D.; Manyele , S.V. Overview of the Challenges and Opportunities in Processing Complex Gold-Copper Ores. Min. Metall. Explor. 2023, 40, 2463–2475. [Google Scholar] [CrossRef]
  7. Navarra, A.; Menzies, A.; Jordens, A.; Waters, K. Strategic evaluation of concentrator operational modes under geological uncertainty. Int. J. Miner. 2017, 164, 45–55. [Google Scholar] [CrossRef]
  8. Quelopana, A.; Ordenes, J.; Araya, R.; Navarra, A. Geometallurgical Detailing of Plant Operation within Open-Pit Strategic Mine Planning. Processes 2023, 11, 381. [Google Scholar] [CrossRef]
  9. Quelopana, A.; Órdenes, J.; Wilson, R.; Navarra, A. Technology upgrade assessment for open-pit mines through mine plan optimization and discrete event simulation. Minerals 2023, 13, 642. [Google Scholar] [CrossRef]
  10. Lamghari, A.; Dimitrakopoulos, R.; Ferland, J. A variable neighborhood descend algorithm for an open-pit mine production scheduling problem with metal uncertainty. J. Oper. Res. Soc. 2014, 65, 1305–1314. [Google Scholar] [CrossRef]
  11. Navarra, A.; Grammatikopoulos, T.; Waters, K. Incorporation of geometallurgical modelling into long-term production planning. Miner. Eng. 2018, 120, 118–126. [Google Scholar] [CrossRef]
  12. Peña-Graf, F.; Ordenes, J.; Wilson, R.; Navarra, A. Discrete Event Simulation for Machine-Learning Enabled Mine Production Control with Application to Gold Processing. Metals 2022, 12, 225. [Google Scholar] [CrossRef]
  13. Dantzig, G.; Wolfe, P. Decomposition Principle for Linear Programs. Oper. Res. 1960, 8, 101–111. [Google Scholar] [CrossRef]
  14. Quelopana, A.; Navarra, A. Incorporating Operational Modes into Long-Term Open-Pit Mine Planning Under Geological Uncertainty: An Optimization Combining Variable Neighborhood Descent with Linear Programming. Min. Metall. Explor. 2024, 41, 2769–2782. [Google Scholar] [CrossRef]
  15. Boschetti, M.A.; Maniezzo, V.; Roffilli, M.; Bolufé Röhler, A. Matheuristics: Optimization, simulation and control. In Proceedings of the 6th International Workshop, Udine, Italy, 16–17 October 2009; Springer: Heidelberg, Germany, 2009; pp. 171–177. [Google Scholar]
  16. Kellerer, H.; Pferschy, U.; Pisinger, D. Knapsack Problems; Springer: Berlin/Heidelberg, Germany, 2004. [Google Scholar]
Figure 1. Schematic view of the orebody (XZ-plane cross-section at Y = 18), highlighting the diorite porphyry (light blue) and the silicified intrusive breccias (blue) (self-produced from [14]).
Figure 1. Schematic view of the orebody (XZ-plane cross-section at Y = 18), highlighting the diorite porphyry (light blue) and the silicified intrusive breccias (blue) (self-produced from [14]).
Minerals 15 00427 g001
Figure 2. Computation time for each set of blocks compared between the matheuristic and the Gurobi solver implementation.
Figure 2. Computation time for each set of blocks compared between the matheuristic and the Gurobi solver implementation.
Minerals 15 00427 g002
Table 1. Summary of notation.
Table 1. Summary of notation.
Sets
P Set of rock types.
B p Set   of   blocks   of   rock   type   p P .
B Set   of   all   blocks ,   B = p P B p .
O Set of operational modes.
Parameters
mb Mass   of   the   block   b B .
vbo Total   monetary   value   of   block   b B   processed   in   mode   o O .
roTonnage processing rate (ton/h) under mode o.
qTotal available processing time (hours) of the plant.
wopRequired fraction of rock type p in the plant feed under mode o.
Variables
xboMass of block b processed under mode o.
Table 2. Parameters of the case study.
Table 2. Parameters of the case study.
ParametersValues
Block weight (ton)15,375
Number of blocks13,392
Block dimension (m)20 × 20 × 15
Block density (ton/m3)2.56
Metal price Au (USD/oz)1190
Processing availability (h/period)Infinite
Rock typesDiorite porphyry
Silicified intrusive breccia
Operational Mode A
Processing rate (ton/h)250
Processing cost (USD/ton)21.4
Recovery Au (%)83
Diorite rock (%)65
Silicified rock (%)35
Operational Mode B
Processing rate (ton/h)200
Processing cost (USD/ton)24.9
Recovery Au (%)83
Diorite rock (%)45
Silicified rock (%)55
Table 3. Comparison of processed ore for 5000 blocks between the matheuristic and the optimal solution (Gurobi).
Table 3. Comparison of processed ore for 5000 blocks between the matheuristic and the optimal solution (Gurobi).
Processed Ore (ton)5000
MatheuristicGurobiDifference%
Under Mode A3,198,1643,075,000−123,164−4.01
Diorite Porphyry2,078,8071,998,750−80,057
Silicified Intrusive Breccia1,119,3571,076,250−43,107
Under Mode B1,710,7141,845,000134,2867.28
Diorite Porphyry769,821830,25060,429
Silicified Intrusive Breccia940,8931,014,75073,857
Total4,908,8784,920,00011,1220.23
Notes: The bold line represents the sum of Diorite and Silicified Breccia for mode A.
Table 4. Comparison of processed ore for 10,000 blocks between the matheuristic and the optimal solution (Gurobi).
Table 4. Comparison of processed ore for 10,000 blocks between the matheuristic and the optimal solution (Gurobi).
Processed Ore (ton)10,000
MatheuristicGurobiDifference%
Under Mode A12,305,07311,838,751−466,322−3.94
Diorite porphyry7,998,2977,695,188−303,109
Silicified intrusive breccia4,306,7764,143,563−163,213
Under Mode B6,279,3406,918,749639,4099.24
Diorite porphyry2,825,7033,113,437287,734
Silicified intrusive breccia3,453,6373,805,312351,675
Total18,584,41318,757,500173,0870.92
Table 5. Comparison of processed ore for 13,392 blocks between the matheuristic and the optimal solution (Gurobi).
Table 5. Comparison of processed ore for 13,392 blocks between the matheuristic and the optimal solution (Gurobi).
Processed Ore (ton)13,392
MatheuristicGurobiDifference%
Under Mode A12,784,36711,704,220−1,080,147−9.23
Diorite porphyry8,309,8387,607,743−702,095
Silicified intrusive breccia4,474,5294,096,477−378,052
Under Mode B9,895,17411,281,4041,386,23012.29
Diorite porphyry4,452,8285,076,632623,804
Silicified intrusive breccia5,442,3466,204,772762,426
Total22,679,54122,985,624306,0831.33
Table 6. Comparison of gold (Au) tonnage obtained from ore processing between the matheuristic and the optimal solution.
Table 6. Comparison of gold (Au) tonnage obtained from ore processing between the matheuristic and the optimal solution.
BlocksMatheuristicOptimumDeviation
5000911,652921,1441.03%
10,0003,678,2173,692,6040.39%
13,3924,516,7924,536,6290.44%
Table 7. Comparison of the total value of ore processing (USD) between the matheuristic and the optimal solution.
Table 7. Comparison of the total value of ore processing (USD) between the matheuristic and the optimal solution.
BlocksMatheuristicOptimumDeviation
5000789,402,044789,849,6230.06%
10,0003,213,290,9273,214,442,7660.04%
13,3923,914,260,9033,944,600,9570.08%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Leiva, C.; Lespay, H.; Quelopana, A.; Navarra, A. Optimization in Mineral Processing: A Novel Matheuristic for a Variant of the Knapsack Problem. Minerals 2025, 15, 427. https://doi.org/10.3390/min15040427

AMA Style

Leiva C, Lespay H, Quelopana A, Navarra A. Optimization in Mineral Processing: A Novel Matheuristic for a Variant of the Knapsack Problem. Minerals. 2025; 15(4):427. https://doi.org/10.3390/min15040427

Chicago/Turabian Style

Leiva, Carlos, Hernán Lespay, Aldo Quelopana, and Alessandro Navarra. 2025. "Optimization in Mineral Processing: A Novel Matheuristic for a Variant of the Knapsack Problem" Minerals 15, no. 4: 427. https://doi.org/10.3390/min15040427

APA Style

Leiva, C., Lespay, H., Quelopana, A., & Navarra, A. (2025). Optimization in Mineral Processing: A Novel Matheuristic for a Variant of the Knapsack Problem. Minerals, 15(4), 427. https://doi.org/10.3390/min15040427

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop