Development of a Smart Computational Tool for the Evaluation of Co- and By-Products in Mining Projects Using Chovdar Gold Ore Deposit in Azerbaijan as a Case Study

: Despite their signiﬁcance in numerous applications, many critical minerals and metals are still considered minor. Since most of them are not found alone in mineral deposits, their co-or by-production depends on the production of base metals and other major commodities. In many cases, the concentration of the minor metals is low enough not to be considered part of the production. Hence, their supply is not always secured, their availability decreases, and their criticality increases. Many researchers have addressed this issue, but no one has set actual impact factors other than economic ones that should determine the production of these minor commodities. This study identiﬁed several parameters, the number and diversity of which gave birth to developing a computational tool using a multi-criteria-decision analysis model based on the Analytical Hierarchical Process (AHP) and Python. This unprecedented methodology was applied to evaluate the production status of different commodities in a polymetallic deposit located in Chovdar, Azerbaijan. The evaluation outcomes indicated in quantiﬁable terms the production potentials for several commodities in the deposit and justiﬁed the great perspectives of this tool to evaluate all kinds of polymetallic deposits concerning the co- and by-production of several minor critical raw materials.


Introduction
From the Ages of Antiquity to the present day, humanity has exploited minerals and metals found on the Earth's crust. Prehistoric man is known to have used only a handful of metals including copper, iron, gold, silver, tin, and lead. Thousands of years later, the Industrial Revolution heralded an unprecedented age of rapid industrial and economic growth that was substantially driven by the exploitation of many more minerals and metals. Undoubtedly, the evolution of the modern world has played a significant role in the constantly increasing production of many more minerals and metals used to perform specialized functions or have found applicability in several new applications [1,2].
However, only few metals such as copper, tin, lead, and iron can be found in relatively high concentrations worldwide and are produced in relatively high volumes [3]. From a geological point of view, these metals can either be found alone or mostly as hosts in polymetallic geological formations. Unlike these "major" metals, there are "minor" metals occurring in polymetallic deposits in concentrations sometimes low enough not to be considered feasibly exploitable on their own [2,4]. These metals are deeply embedded in our high-tech products and despite their increasing demand, they are produced in relatively low volumes. In fact, several of these critical metals are recovered only as by-products from a limited number of geographically concentrated ore deposits, thus making their markets dependent on geopolitical strategies and raising concerns regarding their supply [2].
Several researchers have investigated this matter in detail. In 1979, Skinner [4] was one of the first to talk about the sustainable supply of minor metals and referred to possible resource limitations in the future. A few years later, Campbell [5] presented short-run supply curves for primary and secondary metals, indicating the individual behavior and the interconnection between primary, co-, and by-products in terms of their connected supply and the impact this has on their prices. Wellmer et al. [6] justified Campbell's theory and mentioned that many metals are produced exclusively as by-products of other minerals and metals, meaning that their production is strictly limited by the production of the "host" materials to which they are associated.
In recent years, research has intensified, given that new uses and applications for many more minerals and metals have been developed. Verhoef et al. [7] introduced a system of linked cycles in the form of a metals' wheel, showing metal linkages in natural resource processing while illustrating the capacity of available metallurgical processes dealing with impurities in their primary or secondary feed. Reuter et al. [8] introduced a different metal wheel showing the complex interactions between different metals and the economic and thermodynamic recoverability of (co-)elements. Buchert et al. [9] introduced a group of "green minor metals", emphasizing their significant applicability in renewable energy resourcing, and how some minor critical metals are dependent on the mining development of major metals. Willis et al. [10] conducted research on critical by-products of copper, lead, zinc, and nickel with relatively small volumes of production.
Wellmer and Hagelüken [11] published their work related to the security of supply of secondary resources under conditions of economic viability and environmental sustainability. They introduced a feedback control cycle of mineral supply. Their "metal wheel" summarizes the standard technologies for the metallurgical treatment of metal associations involving major and minor metals. The concentric rings of the wheel demonstrate the interconnectivity between the main metals as carrier metals and the co-and by-product metals. Inspired by Reuter et al. [8], Nassar et al. [2] introduced a periodic table of companionability and their metal wheel version (Figure 1). In this wheel, the principal host metals form the inner circle, while companion elements appear on the outer circle at distances proportional to the percentage of their primary production. relatively low volumes. In fact, several of these critical metals are recovered only as by-products from a limited number of geographically concentrated ore deposits, thus making their markets dependent on geopolitical strategies and raising concerns regarding their supply [2].
Several researchers have investigated this matter in detail. In 1979, Skinner [4] was one of the first to talk about the sustainable supply of minor metals and referred to possible resource limitations in the future. A few years later, Campbell [5] presented short-run supply curves for primary and secondary metals, indicating the individual behavior and the interconnection between primary, co-, and by-products in terms of their connected supply and the impact this has on their prices. Wellmer et al. [6] justified Campbell's theory and mentioned that many metals are produced exclusively as by-products of other minerals and metals, meaning that their production is strictly limited by the production of the "host" materials to which they are associated.
In recent years, research has intensified, given that new uses and applications for many more minerals and metals have been developed. Verhoef et al. [7] introduced a system of linked cycles in the form of a metals' wheel, showing metal linkages in natural resource processing while illustrating the capacity of available metallurgical processes dealing with impurities in their primary or secondary feed. Reuter et al. [8] introduced a different metal wheel showing the complex interactions between different metals and the economic and thermodynamic recoverability of (co-)elements. Buchert et al. [9] introduced a group of "green minor metals", emphasizing their significant applicability in renewable energy resourcing, and how some minor critical metals are dependent on the mining development of major metals. Willis et al. [10] conducted research on critical by-products of copper, lead, zinc, and nickel with relatively small volumes of production.
Wellmer and Hagelüken [11] published their work related to the security of supply of secondary resources under conditions of economic viability and environmental sustainability. They introduced a feedback control cycle of mineral supply. Their "metal wheel" summarizes the standard technologies for the metallurgical treatment of metal associations involving major and minor metals. The concentric rings of the wheel demonstrate the interconnectivity between the main metals as carrier metals and the coand by-product metals. Inspired by Reuter et al. [8], Nassar et al. [2] introduced a periodic table of companionability and their metal wheel version (Figure 1). In this wheel, the principal host metals form the inner circle, while companion elements appear on the outer circle at distances proportional to the percentage of their primary production.  Efforts have also been made to quantify the recoverable sources of by-product metals, in the case of cobalt [12] or the case of gallium, germanium, and indium [13,14]. It is worth mentioning that a Minor Metals Trade Association was founded in 1973, when by-product metals were starting to be used in growing mass applications. The Association was formed to guide those involved in the nascent minor metals industry and currently comprises companies from across the globe engaged in all aspects of minor metals activity.
The interconnection of major and minor metals is undeniable, but so is the criticality of several minor metals. However, the concerns about the sustainable supply of critical metals are rarely considered. The selling prices, the additional product extraction costs, and the primary commodity market conditions determine the policies regarding co-and byproducts in mining projects. Van Schaik and Reuter [15] tried to associate the sustainability of companion products by linking three core domains: the resource cycle (materials and energy), the natural cycle (society and environment), and the technology cycle (engineering and science). Although this work is mainly related to the recyclability of materials, it is the first effort made to connect the metal wheel with the other cycles. To quantify the recoverable resources of by-product metals, and specifically cobalt, Mudd et al. [12] mentioned a few key parameters to make a realistic estimate of anticipated companion metal availability. The authors focused not only on the economic aspects but also discussed the recovery efficiencies for the minor metals and the benefits of companion metal recovery. Frenzel et al. [13,14] also mentioned the impact of new processing technologies on the byproduct production of gallium, germanium, and indium. In other studies, the development of technology has been mentioned to increase by-product recovery efficiency or even reuse waste tailings to recover metals such as rare earth elements [16][17][18].
Valero et al. [19] adopted the concept presented by Mudd et al. [12] and mentioned that even a single metal may be treated differently within a mining project based on differing grades and quantities. However, their focus was mainly on factors such as the tonnage and commercial prices of commodities. Finally, Renner and Wellmer [20] discussed the impact of volatility drivers on the metal market of both major and minor metals across the globe. According to this study, volatility can result from the fluctuation of commodity prices and political instability, market speculation, and policy responses. Hitch et al. [21] mentioned that the treatment of wastes is not only a matter of new technologies for the feasible recovery of metals but also because of their reactivity characteristics that raise environmental concerns. Thus, waste may turn into a valuable by-product or material for alternative use, while, at the same time, environmental pollution can be prevented.
A series of global supply and demand changes lie at the heart of current developments. Research has shown that the supply of by-product elements is potentially riskier than that of primary elements because the economic health of their associated primary commodity market depends on their recovery [2,22,23]. These changes have led to increased calls for policy responses during the co-and by-production of such products, particularly the most critical ones. For instance, the use of several methods in waste management and the extraction of metals from waste has been expanded in the concept of the circular economy and zero waste production [24,25].
Several mining projects are discussed hereinafter in this study, in which the status of co-and by-products changed during mining operations and production due to several factors. Hence, in addition to costs and revenues, other parameters can also impact the co-and by-production decision before, during, or even after mining operations. However, there is no existing literature that deals directly with this issue. Hence, this work intends to cover this research gap by identifying all possible parameters that can impact the decisions regarding co-and by-product production. In addition to identifying, for the first time, all the impact factors, another objective was to evaluate them in an unprecedented quantitative way overall. This is because the conditions in any mining project vary, and so does the significance of the different parameters. For this reason, a multi-criteria decision analysis technique (MCDA), namely the Analytical Hierarchical Process (AHP) [26], was implemented in the developed methodology, to evaluate all the criteria simultaneously.
Initially, the AHP calculations were undertaken using Microsoft Excel. Nevertheless, the vast number of identified factors and the complexity of the co-and by-production assessment stimulated the development of a new computational tool using Python. The computational power makes this novel tool easier and faster to use while increasing its flexibility by allowing the user to adjust the number of evaluation parameters according to the conditions of any mining project. The final objective of this work was to apply these parameters and their evaluation to a mining case study in Chovdar, Azerbaijan, where a polymetallic deposit based on gold production is exploited. The justification of the methodology through the specific case study denotes the significance of this work.
The purpose of this paper is to present an innovative easy-to-use computational tool that can be applied to any polymetallic project, assist stakeholders to make proper decisions regarding co-and by-production, and thus contribute toward a more secure supply of several critical minor metals and a more sustainable mining industry.

Literature Review
A thorough literature review was conducted, regarding the status of primary and companion products, including of waste and tailings in many mining projects that had changed due to various reasons other than economic ones, thus impacting mining plans and production strategies.

Scandium Production from Red Mud
When the limited availability of a metal is combined with a sudden increase in demand and market volatility, there are several new reasons to proceed with production. This is the case with rare earth elements (REEs) and the extensive publicity they received after the REE crisis of 2011 when fears of supply disruption drove prices up nearly tenfold [27]. The crisis was short-lived, and the prices declined rapidly, but the criticality of REEs remained and, thus, new REE deposits were explored around the world. Parallel to this, several ongoing mining projects, in which rare earths already existed but in small concentrations and were characterized as waste, started investigating their possible production as co-or by-products, including from the waste rock and tailings. For example, rare earth elements, particularly scandium, are occasionally found in bauxite residues, also known as red mud [28,29]. The concentration of rare earths in bauxite residue may vary between 500 and 1700 mg/kg [30]. The increasing importance and the newest developments in processing technology made some mining companies rethink producing REE from waste. For example, a pilot plant is under construction in Greece to investigate the efficiency of leaching and ion exchange on an acid basis to recover scandium from red mud [31,32]. Similar research is being conducted in China [33].

Borates and Lithium Mining
Similarly, the demand for lithium has increased since its application in batteries has proved highly efficient [34][35][36]. The exploration boom for battery raw materials included investigations of tailings. Rio Tinto has mined borates in California, US, since 1927 and has recently commenced the production of battery-grade lithium from waste rock at a lithium demonstration plant, being the first top diversified miner to add lithium output to its portfolio, and enhancing the idea of re-evaluating waste rock and tailings [37]. Given the dynamic market of several minor metals, the advanced developments in processing technologies and the need for less waste production, even more producers are reconsidering the possibility of treasures hiding in their tailings. Even tailings from mines having seized operations could also be exploited to recover precious metals, treat the tailings, and mitigate further environmental pollution caused by acid mine drainage. Projects are working toward this direction, such as the Penouta mining project in which tailings are being investigated to recover tantalum and niobium [38], or the Tiouit gold-silver-copper mine in Morocco, where the desulfurization of the old tailings has been investigated [39].

Mercury Extraction
In modern mining, preserving the environment is considered a top priority. Thus, in addition to the treatment of tailings, dangerous elements such as naturally occurring radioactive materials (NORMs) and toxic elements also receive special treatment. Some of these, such as uranium, thorium, and mercury, are extracted from the waste and treated as by-products even in low non-profitable concentrations. In 1997, Garcia-Guinea and Harffy published a paper in the journal Nature with a questioning title about whether mercury mining is undertaken at a profit or a loss [40]. The paper argued how mercury prices have dropped since the 1960s due to many environmental and health problems caused not only by its mining but also by the metal itself. Several publications about mercury pollution [41][42][43] have built a legacy about how dangerous this element is. Mercury is found mainly in China, Spain, and California, US. The mining district in Almaden, Spain, used to be responsible for 25% of the world's production until operations stopped in 2001 due to the prohibition of mercury mining in Europe [43]. By-product mercury production is expected to continue from large-scale gold-silver mining and processing. There are also reports of small-scale, artisanal mining of mercury in China, Russia (Siberia), Outer Mongolia, Peru, and Mexico [44].

Marble Quarrying
Primary, co-, and by-products can also be produced from the same commodity but with different quality standards, and different selling prices for different applications. A typical example is steel slag, a by-product of steel making produced during the separation of the molten steel from impurities in steel-making furnaces. Generally, this may not be the case for many metals, but it can be a significant parameter for several industrial minerals, and construction materials in different shapes, sizes, textures, and weights.
Marble, for example, is a dimension stone that is either sold as a whole block or cut into tablets. The size of the block or tablet and the purity of marble are quality standards that affect the price of the final product. Blocks that do not meet the quality standards are crushed, milled, and roasted to become dry pulverized products in different grain sizes. These marble dust and calcium carbonate powders (fillers) are sold for different industrial applications. Dionyssomarble in Attica, Greece, has a long history of exploiting white marble deposits [45]. However, not all products were produced from the beginning. Since 1975, the company has expanded its processing facilities and produced exceptionally clean, aggregate crystalline calcium carbonate powder filler in controlled granular sizes.

Salt and Potash Rotating Production
Production of some metals such as iron, and some industrial minerals such as salt and potash, can be determined by local demand and supply conditions. Layers of salt and potash follow in geological formations such as bedding planes [46] and can be mined either together or successively. Their co-production flourished in Germany during the 1950s, in the aftermath of World War II, when the reconstruction of the country was at a peak. The German car industry was booming, and the national road network increasingly comprised paved roads. However, the newly paved roads were icy during winter, making driving dangerous. Authorities applied an effective de-icing procedure using salt to clean the roads [47,48].
Production of salt and potash in Germany has focused either on the one commodity or the other, depending on a series of factors that can alter their priority and, in turn, the classification of the two commodities as primary, co-, or by-products. In Sondershausen, Germany, potash production (KCl) started in 1893 and stopped in 1991 (Table 1) due to economic and political reasons (German reunion). However, salt production for de-icing started in the mine in 2004 and continues today [49]. At the Sigmundshall mine, potash production started in 1898, and after 2001, additional production of "Special" potash (MgSO 4 ) took place and expanded the life of the mine (Table 1). The recoverable reserves were depleted in 2018 and the mine finally closed [50]. Furthermore, the Bernburg mine started producing potash in the 1900s and, from 1939, started also producing rock salt. In 1973, the mine stopped producing potash and focused only on salt because a neighboring mine in Zielitz had started potash production in 1969 [51].

Production History of a Silver-Based Polymetallic Deposit
Moving to the eastern part of Germany, we discuss the exploitation of the polymetallic deposit in Freiberg and how different parameters have affected the change in co-and by-products through time. The lead-zinc deposit in Freiberg was discovered in 1168, and it initially attracted interest for its mineralization-bearing silver. Silver was the only mining product until the 18th century. In 1710, the General Melting Administration was founded. Since then, the revenues have also been based on the content of copper and lead [52]. The latter, and the further development of the metallurgical technology, resulted in commencement of the production of lead officially as a by-product in approximately 1820 ( Figure 2).

Production History of a Silver-Based Polymetallic Deposit
Moving to the eastern part of Germany, we discuss the exploitation of the polymetallic deposit in Freiberg and how different parameters have affected the change in co-and by-products through time. The lead-zinc deposit in Freiberg was discovered in 1168, and it initially attracted interest for its mineralization-bearing silver. Silver was the only mining product until the 18th century. In 1710, the General Melting Administration was founded. Since then, the revenues have also been based on the content of copper and lead [52]. The latter, and the further development of the metallurgical technology, resulted in commencement of the production of lead officially as a by-product in approximately 1820 ( Figure 2).
The decline of Freiberg's silver mining began with the introduction of gold currency (Goldmark) in the German Empire by law in 1873. The price of silver decreased by half from 1880 to 1898 due to silver deliveries from South America. The prices of by-products lead and zinc decreased massively due to overproduction worldwide. Hence, from 1903-1913 it was decided to shut down all mines [53]. However, due to the preparations in Germany for World War II, there was an increased demand for non-ferrous metals from 1933 onwards. Therefore, from 1935, Freiberg mining resumed. Lead and zinc became the primary commodities for geostrategic reasons, while silver was mined as a by-product. After the end of the war, the mining and metallurgical plants were nationalized in 1961 and closed for economic reasons in 1969 [53].  The decline of Freiberg's silver mining began with the introduction of gold currency (Goldmark) in the German Empire by law in 1873. The price of silver decreased by half from 1880 to 1898 due to silver deliveries from South America. The prices of byproducts lead and zinc decreased massively due to overproduction worldwide. Hence, from 1903-1913 it was decided to shut down all mines [53]. However, due to the preparations in Germany for World War II, there was an increased demand for non-ferrous metals from 1933 onwards. Therefore, from 1935, Freiberg mining resumed. Lead and zinc became the primary commodities for geostrategic reasons, while silver was mined as a by-product. After the end of the war, the mining and metallurgical plants were nationalized in 1961 and closed for economic reasons in 1969 [53].

Coal and Uranium Rotating Production
Not far from Freiberg, in the Döhlen Basin, coal (initially) and uranium (afterwards) were produced from the same mine site. Mining for hard coal in the area is known to have taken place since the 15th century with rural extraction [54]. Until 1930, small mining companies exploited the area for coal. In 1947, however, SAG/SDAG Wismut started mining uranium bound to hard coal for nuclear armament purposes of the former Soviet Union. Mine ownership alternated between Wismut and the local hard coal mining companies several times. The mining of hard coal for energy purposes stopped in 1967. In 1968 the mine was transferred for one last time to SDAG Wismut. From that time on, until 1989, coal was only mined for its uranium content [54].

Materials and Methods
The research methodology developed in this work was initially based on collecting and analyzing information and data from a substantial quantity of literature sources and actual mining projects, some of which have been discussed in the previous sections. What is specific about these mining projects is that, through the years of mining operations and production, the status of their co-and by-products changed due to several factors. These data sets were then used to identify and classify all possible factors that can impact the determination of primary, co-, and by-products in a mining project.
The substantial number and diversity of criteria led to using a multi-criteria-decisionanalysis (MCDA) process such as the Analytical Hierarchical Process (AHP) to simultaneously evaluate all the parameters. This MCDA technique has been used in making decisions based on multiple criteria in numerous case studies from a wide range of disciplines.
Depending on the different conditions of any given mining project, these parameters have different levels of importance each time. Therefore, AHP compares the factors and applies weights to them. Accordingly, the multiple final options for each product can also exist. Thus, AHP was further applied to prioritize the final decisions, calculate percentages, and indicate which are preferable on every occasion. As a result, an MCDA tool was developed that can be applied in the evaluation of any polymetallic mining project to determine the main, co-, and by-products. The developed algorithm was computed with the help of Python to create a smart computational tool that will help run the calculations faster and more efficiently.
Data and information from a polymetallic mining project were implemented in the newly developed MCDA tool to test its efficiency. The case study is a gold mining project in Chovdar, Azerbaijan, where gold is the main product, and silver and mercury are produced as by-products. Azergold is the mining company that runs the Chovdar open-pit mining project. The ongoing exploration has revealed additional resources that extend to a substantial depth. For this reason, the company is investigating the possibility of soon transiting to underground mining. Interestingly, in the additional discovered resources, there are a series of other minerals and metals in lower concentrations than those of gold and silver. Accordingly, the developed computational tool was used to determine whether these minerals and metals can be defined as co-or by-products.

Setting the Evaluation Parameters
Based on the existing literature, the ore grade and the prices, costs, and reserves determine the revenues of a commodity in a mining project. In some mining projects, when additional resources are found, and the concentrations of some minor elements are significantly increased, this indicates that such elements' status may change from waste to by-product or from by-product to co-product. Parameters other than the price that can interact with the ore grade are the recovery rate during the processing of the ore and the environmental effects if the commodity with the high ore grade happens to be a toxic or radioactive element.
Hence, market, technological, environmental, and socio-political factors were identified, in addition to the apparent economic parameters. The availability of a commodity is an important parameter directly associated with the supply of the commodity in the market, especially for minor metals, and depends on the mining production and processing of the primary commodities. The imbalances between metal supply and demand, actual or anticipated, have inspired the concept of metal criticality [55]. However, the criticality of a commodity is not only dependent on this one parameter. A detailed criticality evaluation includes data from widely varying fields and sources of information, including geology, mineability, technology, the environment, human behavior, the assessment of experts, and many more. Thus, environmental implications, lack of efficient processing techniques and capacity, vulnerability to supply restrictions, and geopolitical issues are some of the most critical factors affecting certain commodities' criticality.
Like the two parameters mentioned above, the market volatility of a commodity is another equally significant factor that can determine the production status of metals. When the limited availability of a commodity is combined with market volatility and a sudden increase in demand, then it seems that there are several new reasons to produce this metal. Finally, another market parameter that needs to be considered is the local demand for commodities and how this can affect their production status.
The local demand is not a factor that applies to most metals traded worldwide. However, it would undoubtedly affect minor minerals and metals that could be produced as by-products, contribute to the revenues, lower the waste production and disposal, and finally meet the demands of local societies. The locality of a mining product is directly related to the extraction and logistic costs, prices, and socio-political factors.
Through technology, the mining industry has overcome many obstacles. New options for increasing productivity are being generated by the evolving technology of the mining industry [56]. A significant technological factor regards the quality standards that a product shall meet to be determined as a primary, co-, or by-product, or waste. It may seem this parameter does not apply to many metals but only to some industrial minerals and dimension stones, as shown in the literature review. However, even regarding the processing and refinement of metal alloys, if the end products do not meet the quality standards of the market or a specific customer, then their value is depreciated, and their feasible production may well be at risk. Low production efficiency can affect extraction costs, not to mention the quality standards. High production efficiency can boost the feasible production of minor and low concentration elements in a deposit and determine them as potential by-products. Most importantly, increased production efficiency offsets declining ore grades and mining cost inflation that threaten the mining industry. In addition, the metal recovery rate, also known as the mineral recovery percentage, indicates the percentage at which valuable metals are expected to be available for sale after the refining process has taken place.
Mining will always impact people and the environment, either positively or negatively. The presence and content of NORMs and other toxic compounds can entail high environmental risks and may require particular attention and close monitoring [57]. Such metals require special treatment either as products or waste, and, even though they are usually found in small concentrations, it is often cheaper to process them as by-products rather than treat them as waste. Another group of potential contaminators is that of the greenhouse gases responsible for the greenhouse effect primarily associated with coal mining [58,59]. An additional factor interconnecting with the presence of NORMs and toxic compounds from the extraction of minerals and metals regards the treatment and disposal of wastes and tailings [60].
Evaluation is also needed of the "mining friendliness" of the commodities produced in a mine. Not all commodities are easy and environmentally friendly to extract. Some elements have gained a reputation for being extremely hazardous when mined. Even when the actual risk of contamination is low due to insignificant concentrations or when the actual contamination is minimized due to sufficient safety measures, opposition to mining-specific commodities can be substantial. In fact, the mining industry considers the Social License to Operate as the most important business risk to be revoked by local communities if unsatisfactory conditions occur [61,62].
Therefore, the social acceptance of extracting specific commodities in a mine is an essential factor. It is also significant to evaluate the legislation status that governs the mining industry in a country and the specific legislation acts that may support or prohibit the production of specific commodities. Finally, the strategic importance of specific commodities is an important factor that should never be neglected. The classification of a metal as strategic and critical not only for economic but also for political and strategic reasons may influence its production status from waste to a by-product or even co-product. The strategic importance of a commodity can affect the criticality, availability, and volatility of its market, not to mention its price. It can also affect the social acceptance and amendment of legislation related to its production.
Accordingly, 18 qualitative and quantitative parameters were determined and classified into five categories according to the relevance of the criteria in the respective categories ( Figure 3). Many of these parameters have never been considered before, and no similar classification has been introduced in the literature. Some of the parameters may overlap with others. At the same time, factors can be attributed to more than one of the main categories in which they are classified in their simultaneous evaluation. The clustered criteria are structured in such a way that, in each category, they do not exceed the number of 7 ± 2 because of the general limitations of the human mind, which is capable of handling only so many conceptual objects and discrete figures at a time [63,64]. Hence, criteria belonging to the same category can be easily evaluated and compared on a pair-wise basis.
the production of specific commodities. Finally, the strategic importance of specific commodities is an important factor that should never be neglected. The classification of a metal as strategic and critical not only for economic but also for political and strategic reasons may influence its production status from waste to a by-product or even co-product. The strategic importance of a commodity can affect the criticality, availability, and volatility of its market, not to mention its price. It can also affect the social acceptance and amendment of legislation related to its production.
Accordingly, 18 qualitative and quantitative parameters were determined and classified into five categories according to the relevance of the criteria in the respective categories ( Figure 3). Many of these parameters have never been considered before, and no similar classification has been introduced in the literature. Some of the parameters may overlap with others. At the same time, factors can be attributed to more than one of the main categories in which they are classified in their simultaneous evaluation. The clustered criteria are structured in such a way that, in each category, they do not exceed the number of 7 ± 2 because of the general limitations of the human mind, which is capable of handling only so many conceptual objects and discrete figures at a time [63,64]. Hence, criteria belonging to the same category can be easily evaluated and compared on a pair-wise basis. The overall classification is hierarchical so that all criteria are rightfully prioritized. Nevertheless, depending on the deposit properties and the conditions of the examined mining project, not all criteria need to be evaluated in every case study. When a specific parameter is neutral or does not affect the product status determination, it can be excluded from the evaluation. The overall classification is hierarchical so that all criteria are rightfully prioritized. Nevertheless, depending on the deposit properties and the conditions of the examined mining project, not all criteria need to be evaluated in every case study. When a specific parameter is neutral or does not affect the product status determination, it can be excluded from the evaluation.

Development of the Decision Tool
Whether a mining product is characterized as primary, secondary, or waste based on so many factors is a sophisticated process. Such a complicated problem needs to be decomposed into simple assessments without neglecting that some elements have a more significant impact on the decision making than others.
Decision making, in general, is explained as a selection process in which the best alternative is chosen from alternative sets to reach an aim or multiple aims. The process alone is not concerned with defining the objectives, designing specific alternatives, or evaluating consequences; decision making offers simple techniques and procedures to reveal preferences and choices in multivariable problems. Such techniques are described as multi-criteria decision analysis (MCDA) or multiple-attribute decision making (MADM). These techniques solve problems in which discrete alternatives can be selected from a finite set [65,66]. Existing MCDA methods include value measurement models, such as the Analytical Hierarchical Process (AHP) and Multiple-Attribute-Utility Technique (MAUT); goal-, aspiration-, or reference-level models, such as the Technique for Order Preference by Similarity to Ideal Solution (TOPSIS); and outranking models, such as the Elimination and Choice Translating the Reality (ELECTRE) and Preference Ranking Organization Method for Enrichment Evaluation (PROMETHEE) methods [65]. Each method has its strengths and weaknesses in different areas, and it is difficult to say one is better than another; ultimately, it depends on the specific problem that needs to be solved.
Considering the nature of the decision-making problem in this work, AHP was selected over the other MCDA methods. This technique is preferred for its ability to rank alternatives in order of their effectiveness when conflicting objectives or criteria must be satisfied [67,68]. Furthermore, AHP can detect inconsistent judgements and estimate their degree of inconsistency [67]. Moreover, the parameters determined in the previous section are classified into separate categories, making AHP the ideal decision-making method to decompose the problem and build hierarchies of the individual criteria. Finally, the AHP preferences and pair comparisons can be easily computed.
Initially, the algorithm was developed in Microsoft Excel and later in the form of a Python computational tool to make the calculations faster and more efficient. The following sections discuss the development of the algorithm and the computational tool.

Development of the Product Decision Tool
The decision-making algorithm is mapped into a generic AHP hierarchy (Figure 4), in the order of the five categories, the 18 criteria, and the three product options. To facilitate easier data manipulation in the evaluation process, the categories, criteria, and options were coded (Tables 2-4).      Table 3. Criteria names and codes.

Codes Criteria
C 1 Commodity price C 2 Ore grade C 3 Extraction costs C 4 Logistic costs C 5 Availability C 6 Criticality C 7 Volatility C 8 Locality C 9 Quality standards C 10 Production efficiency C 11 Recovery rate C 12 NORMs C 13 Toxic compounds C 14 Greenhouse gasses C 15 Waste production C 16 Social acceptance C 17 Legislation C 18 Strategic importance Table 4. Codes for the product options.

PRPRO Primary product BYPRO
By-product WASTE Waste The purpose of AHP is to assist decision makers in organizing their judgements to make more effective product decisions by bringing the evaluation to the level of pairwise comparisons of components with respect to attributes and alternatives. The AHP method uses both qualitative and quantitative variables, and it is not only useful for making decisions, but also for prioritizing tangible and intangible criteria by setting weight factors on them. To make these comparisons, a fundamental scale introduced by Saaty [26] is used to indicate how many times more important one element is over another ( Table 5). The result of the pairwise comparisons over n criteria is summarized in a n × n reciprocal matrix (Table 6), where elements represent the pair-wise comparisons. Each entry of the matrix represents the importance of one criterion relative to the other. The next step is to compute the vector of weights based on the theory of eigenvector procedure in two steps. First, the matrix is normalized, and the criteria weight vector is then built. The sum of all elements in the weight vector is equal to 1 and shows the relative weights among the compared criteria. Since the comparison is based on subjective evaluations, the consistency of the comparisons is checked using a consistency index. If the degree of inconsistency in judgements is acceptable, the efficiencies of all alternatives on a criterion are normalized to eliminate the effect of different units of measure. The matrix of the normalized efficiency outcomes is finally multiplied by the eigenvector to obtain the aggregated AHP priority score. The decision is then made based on the logic that the higher the AHP priority score for an alternative, the more preferable this alternative.  [26].

1
Of equal value Two elements are of equal value 3 Slightly more value Experience slightly favors one element over another 5 Essential or strong value Experience strongly favors one element over another 7 Very strong value An element is strongly favored, and its dominance is demonstrated in practice 9 Extreme value The evidence favoring one over another of the highest order of affirmation 2, 4, 6, 8 Intermediate values When compromise is needed To ease the assessment process, pair-wise comparisons of the criteria are separately undertaken for each category. A pair-wise comparison of the categories is also undertaken to show their respective relevant importance. Hence, six matrices are generated but, for the sake of space, only the pair-wise comparison of the categories is illustrated in Table 6. This process applies weight factors to all categories and criteria.
Like probabilities, weights are absolute dimensionless numbers between zero and one. Depending on the problem, "weight" can refer to importance, preference, and likelihood, or the decision makers can consider another relevant parameter. Weights are distributed in a hierarchy according to their architecture, and their values depend on the information entered by users of the process [26]. The criteria weights and options are intimately related but need to be considered separately. The priority of the goal and the alternatives always add up to 1 (or 100%). This can become complicated with multiple criteria levels but, if there is only one level, their priorities also add to 1.
Two additional concepts apply when a hierarchy has more than one level of elements, like in this case where we have the categories and the involved parameters: local and global priorities. The local weights here (w i ) represent the relative weights of the nodes within each closed group of siblings (criteria) concerning their parent (category). These local priorities of each group of criteria add up to 1.000 or 100% (Equations (1) and (2)). The global weights (gw i ) are then obtained by multiplying the local weights of the siblings (criteria) by their parent's (category) global priority (Equation (3)). Hence, the global weights for all parameters in the level add up to 1 or 100% (Equation (4)).
w eco + w mar + w tec + w env + w soc = 1 (1) w i + w i+1 + . . . + w n = 1 (2) gw i + gw i+1 + . . . + gw t = 1 where: n is the number of parameters in each category; zzz represents each of the five categories (ECO, MAR, TEC, ENV, and SOC); t is the total number of criteria (in this case t = 18).
The next step is to compare all three options (primary or co-product, by-product, and waste) per criterion. This process will generate 18 3 × 3 matrices, the general version of which is illustrated in Table 7. The priorities (w yCi ) for the (y = 3) options are calculated with the same procedure as for the categories and criteria. Consequently, the weights in each matrix calculation add to 1. Each weight (w yCi ) is multiplied by the global weight (gw i ) of the respective criterion and summed to the score for each option (Equation (5)).
The outcome for all preferences indicates which product option is the most suitable. The sum of all options is equal to 1 or 100%. The stronger an option, the more apparent the decision that needs to be made. However, when two options are close to each other, more detailed evaluations may need to be made.
The procedure is separately conducted for each mineral or metal. It needs to be individually repeated for all minerals and metals, indicating whether each should be considered a primary product, co-product, or by-product, or be treated as waste. The criteria and the options are evaluated (comparing pairs) without neglecting the priority and importance of any categories or parameters. The classification is done according to the relevance of the criteria in the respective categories, even though some parameters could be included in other categories, and several criteria are interconnected. Depending on the properties of the element under evaluation and the conditions of the examined mining project, not all criteria need to be evaluated. When a specific parameter is neutral or does not affect the product selection, it can be excluded from the evaluation.
This was an issue during the initial development of the algorithm in Microsoft Excel. Changing the tool's structure by adding or excluding criteria to meet the conditions of each element or project under examination required time and effort. This problem was solved with the development of the Python computational tool, which will be discussed in the following sections. Another solution was to modify Saaty's fundamental scale (Table 4). While keeping the general structure of the scale the same, the assigned relative densities of unusable parameters can be rearranged to acquire the lowest possible weights. The same adjustments can be made during the evaluation of the options. The consistency of the calculations can be checked again after the rearrangements.

Development of the Computational Tool
The next step was to convert the developed algorithm to Python Code and use Tkinter, which is the standard graphical user interface (GUI) library for Python, to build an easyto-use and fast-calculating computational tool. The developed tool uses three types of input data: general input data, data based on the number of categories and criteria, and data based on the number of options. The categories and options numbers are the primary input values ( Figure 5); other input variables, including the names of categories, number of criteria, and names of options, are dependent on the primary input values (Figure 6a,b). Next is the comparison of the categories and criteria in pairs in the generated n × n matrices. The reciprocity of the matrices allows for the automatic generation of half the inputs. In addition, the user can insert fractions when the comparisons favor the second parameter over the first (Figure 7). In AHP, pairwise comparisons can be made by more than one decision maker, and a geometric mean can be used to consider all the options. values (Figure 6a,b). Next is the comparison of the categories and criteria in pairs in the generated n × n matrices. The reciprocity of the matrices allows for the automatic generation of half the inputs. In addition, the user can insert fractions when the comparisons favor the second parameter over the first (Figure 7). In AHP, pairwise comparisons can be made by more than one decision maker, and a geometric mean can be used to consider all the options.   The tool generates the local and global weights for all criteria (Figure 8) and checks the consistency of the comparisons. Separate calculations are made to evaluate the three  The tool generates the local and global weights for all criteria (Figure 8) and checks the consistency of the comparisons. Separate calculations are made to evaluate the three options for each weighted criterion. The overall process output is given in percentages of preference for each of the three options ( Figure 9). Hence, the user can identify the preferences for the mineral or metal under investigation as a potential primary, co-product, The tool generates the local and global weights for all criteria (Figure 8) and checks the consistency of the comparisons. Separate calculations are made to evaluate the three options for each weighted criterion. The overall process output is given in percentages of preference for each of the three options ( Figure 9). Hence, the user can identify the preferences for the mineral or metal under investigation as a potential primary, co-product, or by-product, or if it shall be treated as waste.  The computation of an AHP algorithm in Python is a sophisticated process carried out under various functions' directions ( Figure 10a). Several lists and dictionaries were required to overcome the calculations' complexity, considering that local and global weights had to be generated and consistency had to be checked (Figure 10b).   The computation of an AHP algorithm in Python is a sophisticated process ca out under various functions' directions ( Figure 10a). Several lists and dictionaries required to overcome the calculations' complexity, considering that local and g weights had to be generated and consistency had to be checked (Figure 10b). The computation of an AHP algorithm in Python is a sophisticated process carried out under various functions' directions ( Figure 10a). Several lists and dictionaries were required to overcome the calculations' complexity, considering that local and global weights had to be generated and consistency had to be checked (Figure 10b). The outcomes of all calculations can be exported in CSV files and further processed in Microsoft Excel. The next step toward optimizing the developed tool is to allow the user to insert data from CSV or ASCII files.

Results and Discussion
Following the theoretical development of the AHP decision tool, the assessment of one case study is described in this work. The Chovdar gold mining project in Azerbaijan was selected for the application of the computational tool. Gold is the main product of this mine, and silver is a by-product. However, detailed exploration activities have revealed the presence of other minerals and metals in smaller concentrations.
The exploitation is scheduled in two phases; the first phase has already started, and surface mining is applied, while a feasibility study is also being prepared for the second phase, in which exploitation will transition to underground mining operations. The concentrations of all metals other than gold and silver are insignificant during the first phase. However, in the second phase, the resources to be mined include higher concentrations of metals such as copper, iron, and bauxite. It has not been clarified whether the mining company-Azergold-will exploit these additional elements as co-or by-products. Hence, applying the developed tool in this case study may significantly contribute to the actual decision making.
All authors' calculations and assessments were made together and are based on publicly available data and information provided by the managers, engineers, and personnel of Azergold during a three-month internship (September-November 2019) of the The outcomes of all calculations can be exported in CSV files and further processed in Microsoft Excel. The next step toward optimizing the developed tool is to allow the user to insert data from CSV or ASCII files.

Results and Discussion
Following the theoretical development of the AHP decision tool, the assessment of one case study is described in this work. The Chovdar gold mining project in Azerbaijan was selected for the application of the computational tool. Gold is the main product of this mine, and silver is a by-product. However, detailed exploration activities have revealed the presence of other minerals and metals in smaller concentrations.
The exploitation is scheduled in two phases; the first phase has already started, and surface mining is applied, while a feasibility study is also being prepared for the second phase, in which exploitation will transition to underground mining operations. The concentrations of all metals other than gold and silver are insignificant during the first phase. However, in the second phase, the resources to be mined include higher concentrations of metals such as copper, iron, and bauxite. It has not been clarified whether the mining company-Azergold-will exploit these additional elements as co-or by-products. Hence, applying the developed tool in this case study may significantly contribute to the actual decision making.
All authors' calculations and assessments were made together and are based on publicly available data and information provided by the managers, engineers, and personnel of Azergold during a three-month internship (September-November 2019) of the first author at the mine site in Chovdar, Azerbaijan. Feasibility Study and Environmental Impact Assessment reports for the deposit are pending and, thus, not enough technical and economic data are available for a more precise assessment of the potential products. Nevertheless, existing data can yield a first good estimation for all commodities.

The Chovdar Polymetallic Deposit in Azerbaijan
Chovdar is known as a sizeable gold-sulfide deposit discovered relatively recently (in 1998) and run by Azergold in an area known for its several gold-silver-copper-lowsulfide occurrences and mineralization points. It is in western Azerbaijan's northern part, approximately 45 km west of Ganja and 370 km west of Baku [69]. The main exploration activities lasted until 2011, and mining operations commenced in 2012.
Two natural types of ores have been established in the Chovdar gold ore deposit: oxidized and primary sulfides distinguished by mixed semi-oxidized ores ( Figure 11). The oxide mineralization constitutes the upper section of the breccia deposit and varies in thickness from 60 to 80 m. Below the weathered material, the thickness of the primary sulfide mineralization ranges from 100 to 200 m, and extends to about 250 m below the surface.
Mining 2022, 2, FOR PEER REVIEW 18 first author at the mine site in Chovdar, Azerbaijan. Feasibility Study and Environmental Impact Assessment reports for the deposit are pending and, thus, not enough technical and economic data are available for a more precise assessment of the potential products. Nevertheless, existing data can yield a first good estimation for all commodities.

The Chovdar Polymetallic Deposit in Azerbaijan
Chovdar is known as a sizeable gold-sulfide deposit discovered relatively recently (in 1998) and run by Azergold in an area known for its several gold-silver-copper-low-sulfide occurrences and mineralization points. It is in western Azerbaijan's northern part, approximately 45 km west of Ganja and 370 km west of Baku [69]. The main exploration activities lasted until 2011, and mining operations commenced in 2012.
Two natural types of ores have been established in the Chovdar gold ore deposit: oxidized and primary sulfides distinguished by mixed semi-oxidized ores ( Figure 11). The oxide mineralization constitutes the upper section of the breccia deposit and varies in thickness from 60 to 80 m. Below the weathered material, the thickness of the primary sulfide mineralization ranges from 100 to 200 m, and extends to about 250 m below the surface. Figure 11. Scheme of oxidized primary sulfide and mixed ores' location of Chovdar field [70].
The indicated and inferred mineral resources for the oxidized part of the deposit are estimated at 4.4 Mt. For the sulfide phase of the deposit, the resource estimate is 13.7 Mt [69,70]. The cut-off-grade for the mineral resource reporting is set at 0.5 gr/tonne of gold. The exploration results resulted in exploiting the mineralization in two phases. Phase One is to exploit the oxidized mineral reserves from an optimized open pit, and Phase Two is to develop an underground mine to subsequently exploit the remaining oxidized mineralization and sulfide mineralization [69].
The Chovdar process plant is located approximately one kilometer south of the open pit. It comprises the entire treatment process from ore size reduction, beneficiation, heap leaching, carbon processing, electro-winning, refining, cyanide recovery, copper recovery, and, finally, cyanide destruction before tailings discharge [69]. The end-product is in the form of gold-silver alloys, shipped to Switzerland for further processing [71]. Although present in low concentrations, mercury cannot be disposed of as waste on-site; thus, it is also shipped off-site. Further mercury data are unavailable due to confidentiality restrictions of the company. The indicated and inferred mineral resources for the oxidized part of the deposit are estimated at 4.4 Mt. For the sulfide phase of the deposit, the resource estimate is 13.7 Mt [69,70]. The cut-off-grade for the mineral resource reporting is set at 0.5 gr/tonne of gold. The exploration results resulted in exploiting the mineralization in two phases. Phase One is to exploit the oxidized mineral reserves from an optimized open pit, and Phase Two is to develop an underground mine to subsequently exploit the remaining oxidized mineralization and sulfide mineralization [69].
The Chovdar process plant is located approximately one kilometer south of the open pit. It comprises the entire treatment process from ore size reduction, beneficiation, heap leaching, carbon processing, electro-winning, refining, cyanide recovery, copper recovery, and, finally, cyanide destruction before tailings discharge [69]. The end-product is in the form of gold-silver alloys, shipped to Switzerland for further processing [71]. Although present in low concentrations, mercury cannot be disposed of as waste on-site; thus, it is also shipped off-site. Further mercury data are unavailable due to confidentiality restrictions of the company.
Exploration continues through the strategic phases of thorough assessment and evaluation during the life of a mine. Azergold has started geophysical and drilling operations to increase the reserves on the near and far flanks of the deposit. An interesting piece of information to note while transitioning from the oxide to the sulfide phase is the changing of concentration percentages in several metals found in the mineralization of Chovdar. Gold is the main product, silver is mined as a by-product, and mercury is extracted as waste. Various metals such as copper, iron, zinc, and aluminum, among others, are found in relatively low and uneconomic concentrations [69,71].
However, in the sulfide phase, the concentration of some minor metals is increasing to be significant enough, and should attract the attention of the project managers and make them reconsider their production. A detailed analysis was carried out for the chemical composition of the elements based on samples. The gold content ranges from 0.65 to 3.85 ppm, and is the leading commercially valuable component in all considered samples. Silver, having content ranging from 2.5 to 23.2 ppm, is particularly interesting for the following extraction. Moreover, a relatively high content of copper (0.825%) has been revealed in some samples. This suggests the possibility of the subsequent efficient extraction of the metal from the primary-sulfide ore types of the deposit [70]. Similarly, increased grades of iron and aluminum indicate that further techno-economic analysis should be undertaken for the potential production of these elements. Raising iron and aluminum ore grades may not be as economically attractive as for copper, but it certainly should attract the interest of the project managers.
The transition from the oxide to sulfide phase will probably require a significant change in the processing method. Gold particles in the sulfide phase are mostly encapsulated in pyrite and, thus, are not amenable to cyanidation. Pre-oxidation of the pyrite was necessary to liberate gold particles or provide a path for cyanide to contact the gold. This will probably require the process plant to be modified before sulfide exploitation.

Evaluation of Products in the Chovdar Mining Project
Six potential products were individually evaluated: gold, silver, copper, iron, aluminum, and mercury. Based on the history of production during the oxidized phase, gold was the first commodity to be evaluated, followed by silver. Assessments of copper, iron, aluminum, and mercury were then conducted. Once each metal was evaluated, the results were also considered for the following commodities' assessment.
In each evaluation, the first action is to prioritize the categories between them and then separately make cross-comparisons of the criteria in each category. Hence the global weights are generated for all parameters. Then, the three options for each commodity (primary product, by-product, waste) are evaluated for suitability to the respective metal concerning every parameter. Finally, options preferences (in %) are calculated for each commodity. Table 8 discusses the global weights calculated for all potential products.
The evaluation of gold indicates that the economic parameters are considered with the highest priority, and the market and sociopolitical factors follow in percentages. The environmental criteria are relatively less important, and the technological parameters are ranked last. The price and grade of gold in the deposit are the most significant factors, followed by its criticality and strategic importance. The toxic compounds used in the processing (cyanide) also seem to have a remarkable impact on the evaluation. These results seem logical since the ore grade of gold in Chovdar (2.39 gr/tonne) can be characterized as high for an open-pit mining operation and the average grade for an underground mining operation. The criticality of gold is prioritized to be high enough; its value as a metal makes it always a critical commodity of great strategic importance. It is interesting to note that the technological parameters are low. This can be explained by the fact that the recovery rate is already high enough, and the metallurgical tests and evaluations for the extended processing plant show excellent results.
Data and information derived from the evaluation of gold were also considered for the assessment of silver. This kind of information includes the facts that gold will most probably remain the main product at Chovdar, all costs will be covered by gold production, and silver will continue being shipped together with gold for refinement to Switzerland. Like gold, silver's price and ore grade are essential parameters to its criticality. The latter is higher than that of gold because of silver's by-production dependence on gold. Nevertheless, the grade is high enough to make silver production efficient and is combined with the commodity's importance. Silver may not be as powerful as gold, but it is also considered a strategic metal. The existence of toxic compounds during processing is also of notable priority.
Copper was the next metal to be evaluated as a potential product at Chovdar, considering the evaluation results of both gold and silver. Importance is given to the increased concentration of copper in the sulfide phase of the deposit and the fact that there is a high copper zone present in this phase.
In the oxidized phase of production, copper has been characterized as waste, rather than as a product. Hence, the economic parameters seem to be the most important, and the ore grade of the commodity is the most significant parameter by far. The price of copper will also play a role in the evaluation, whereas the extraction costs are mainly covered by the main product (gold) and are of less importance. The technological factors, and particularly the recovery rate, also have a significant weight. This makes sense since the higher the recovery of copper, the greater its chances of creating profit for the company.
Judging by the weights attributed to the parameters, it is evident that copper will be treated differently than gold and silver. Copper has low criticality and high availability as a metal worldwide, and its economic balance is the determining factor when deciding its production. The increase in concentration cannot go unnoticed, and is highlighted in the prioritization of the parameters. The next metal, the concentration of which is increasing in the sulfide phase of the deposit, is iron. In this case, the ore grade elevation may not be as high as it is for copper, and there no high iron zone is identified. Nonetheless, the concentration is also high enough to attract interest and proceed with evaluating this commodity. The same procedure is followed for assessing iron, considering the boundary conditions at Chovdar, the market prices for iron, its importance and availability as a metal, and the potential environmental concerns that its production might raise.
Similarly, the most critical parameters for iron, as for copper, are the economic criteria, followed by the market criteria. The ore grade is the most significant factor, and the price of iron is ranked second. However, the third most crucial parameter is the impact that iron production is expected to have in the local markets.
This result is due to the wide variety and diversity of applications that iron has in daily products and services in local societies. The metallurgical process of iron is well known and can be applied near a mine site; thus, the produced iron could be channeled to the local markets, thus reducing the logistic costs. Nevertheless, the price and ore grade of iron combined with the additional extraction costs will be the main determining factors for its classification as a by-product or waste in this project.
Aluminum was assessed next. The resemblance to the properties of iron both as a commodity in general and as a potential product at Chovdar is remarkable, and so are the evaluation results. The increase in concentration for aluminum seems to be greater than that for iron, yet not significantly different.
Once again, the economic parameters seem to play a significant role when deciding whether to produce aluminum. The market conditions follow in percentage terms, and the remaining three categories (technological, environmental, and socio-political parameters) are of equally lower importance in this case. Following the same pattern, the essential parameters are the ore grade of aluminum and its price in global markets. The locality is also evaluated as a crucial parameter, followed by the additional extraction costs and the recovery rate of aluminum.
Generally, aluminum has a much higher price as a commodity than iron. In addition, the ore grade of aluminum at Chovdar is also higher than that of iron. Consequently, even though the evaluation parameters have the same weights, the evaluation of the options with respect to the parameters led to slightly different preference results.
Mercury was the last of the commodities to be evaluated in this case study using the multi-criteria decision tool. Unlike the previous metals discussed, mercury has a different treatment and production evaluation. The same group of parameters is implemented in the tool, to be evaluated concerning the properties of mercury in the Chovdar mining project, in addition to the general conditions that govern the treatment of this metal globally.
Contrary to the evaluation results in the previous paragraphs, the most important parameters, in this case, are the environmental parameters, followed by the sociopolitical parameters. The technological factors have an observable percentage. More specifically, the most significant parameters overall are the presence of toxic compounds, the production of waste, the legislation status that governs the production and treatment of mercury and, of course, the social acceptance of having it as a product or treating it as a waste.
These results are different from those discussed above regarding the other commodities. For example, the price of mercury and its marketability are not as important. The recovery rate is an essential factor, but not in terms of yielding more profit. In this scenario, the higher the recovery of mercury from the ore and tailings, the less the risk of environmental contamination. As already discussed in this work, mercury must be produced as a by-product to preserve the surrounding ecosystem, follow the rules, and meet the social requirements. In addition, when extracted and shipped off-site, the costs needed to treat mercury as waste in the tailings are eliminated, and thus can be considered an indirect profit.

Comparative Analysis of the Results
Overall, six commodities were evaluated individually but under the same circumstances and considering the same conditions of the Chovdar project. The results are rational and detailed enough, given the difficulties of deriving data when no actual economic assessments have been conducted to date for the second phase of exploitation at Chovdar.
Gold remains the leading product of the mine (Table 9), since no other commodity is classified as a co-product or will cover all the extraction costs. The transition to underground mining operations will increase the operating costs; however, gold production is expected to yield a significant profit for the company. Its strategic importance is essential not only for the relatively remote area, but also for the state of Azerbaijan. Hence, the mining project enjoys the government's trust and the society's acceptance. Silver will be produced again as a by-product and significantly contribute to the project's revenues. Most likely, copper will be the second by-product after silver. Although the by-product option has the highest percentage, it does not have an absolute majority, indicating that a more detailed and careful evaluation must be made to decide whether copper can be feasibly extracted. Contrary to the results for copper, iron is preferably classified as waste. Nevertheless, a more detailed economic analysis is also needed for this commodity and market analysis should be undertaken to investigate the product sales prospects in the local markets. Aluminum is also not classified as a by-product or waste, although there is a slightly higher preference for it being produced as a by-product than iron. Accordingly, detailed economic and market analyses also need to be conducted for this potential product. Finally, mercury is treated differently, and the respective results justify its classification as a by-product, with a far more preferable 52%.
This last result justifies the scope for developing this production decision tool and the attempt to determine all the potential parameters, in addition to the economic parameters, that can affect the production of a commodity. The percentages of 4.9% in the preferences for gold as waste or 8.4% for mercury as a co-product are worth mentioning. These can be attributed to two reasons: the first is the using of all parameters, even the less relevant ones, in this evaluation. In these assessments, the options of co-product, by-product, or waste were equally important. Although these parameters have very low weights, their overall sum yields a higher-than-expected percentage for the option. The second reason is the lack of accurate data and information that would allow decision makers to make more precise cross-comparisons.
Compared to the Excel workbook outcomes, the results derived from the computational tool were very similar, if not identical. The insignificant differences may be attributed to the number of decimal places applied in the calculations. Nevertheless, the similarity of results justifies the efficiency of the computational tool. Python has gained traction over recent years and the quote that "Python is the new Excel" is becoming more frequent.

Conclusions
This work managed a large amount of information and data sets to identify and classify 18 parameters that can impact the determination of co-and by-products in a mining project. This list is not exhaustive; criteria can be added or removed, given the conditions governing each project under examination.
Using Python and a GUI, an evaluation tool was developed based on a multi-criteriadecision analysis model to assess the production perspectives in polymetallic projects. The tool allows for fast and efficient calculations, and the variation in the parameters is not an impediment. An advantage of the developed tool is that it considers more diverse parameters and yields detailed results, not only for the final options, but also for the importance of all parameters and those having the highest impact when evaluating each commodity.
To reduce subjectivity in decision making, a careful assessment needs to be made each time the tool is used concerning the boundary conditions of each project and the precision of the data and information provided for the evaluations.
The tool's efficiency was tested by implementing data from a polymetallic deposit in Chovdar, Azerbaijan. In this project, operations are transitioning from surface to underground, in which the mineralogy is also changing. Hence, a re-evaluation of the perspectives of the included metals aiming at their production feasibility was deemed necessary.
Overall, the evaluation results from the tool justified the production of gold, silver, and mercury that is already taking place in Chovdar, indicating that the tool works efficiently and can be used accordingly for the other commodities. Therefore, the results for the remaining potential products indicate the approach for the company to investigate whether any of these metals can become by-products of the project.
Mining companies, industry consultants, academics, and other stakeholders could use the developed tool in the assessments of several polymetallic projects. In this manner, the tool can be further tested and optimized, and the use of additional parameters can be determined. Consequently, the necessity of producing minor metals will be further highlighted, not only with words but with the demonstration of detailed results and percentages.