From 459c7906aad589b3e4a57f99b38ad7906dda0244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20Berk=20Ba=C5=9Fo=C4=9Flu?= Date: Fri, 23 May 2025 11:30:12 -0400 Subject: [PATCH] Updated the formulas and readme text. --- .idea/vcs.xml | 6 ++++++ Formulas.txt | 29 ++++++++++++++++++----------- Grade_Calculator.py | 2 +- README.md | 6 ++++++ 4 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Formulas.txt b/Formulas.txt index 92262e4..0a36046 100644 --- a/Formulas.txt +++ b/Formulas.txt @@ -1,25 +1,32 @@ -Use Average Weighted Grade to calculate Recovery and Processing cost then use these two to calculate cut off grade using the formula cof(g) = processing cost / ((net price) * recovery). Use inputs from a table. Make graphs in Python for the Cutoff Grade, Recovery, Processing Cost. +# Description + +The process began with utilizing average weighted grade data from a table to determine the recovery rate and processing costs. These values were then applied in the cut-off grade calculation: Cut-Off Grade = Processing Cost / ((Net Price) * Recovery). The average weighted grade and net price were sourced directly from the table. Finally, Python was employed to create graphs illustrating the cut-off grade, recovery rate, and processing cost trends. + +Cut-Off Grade = Processing Cost / ((Net Price) * Recovery) -cof(g) = processing cost / ((net price) * recovery) +Recovery = Rmax​ * (1 − e^(−k*G)) + +Processing Cost = a + b*G -recovery = Rmax​ x (1−e^(−k⋅G)) - -processing cost = C0​ + C1/G​​ +# Processing Cost Formulas 1. Fixed + Grade-Dependent Cost Model processing cost = C0​ + C1/G​​ -2. Tabulated Cost Based on Grade - -Table equivalent for the given grade - -3. Regression from Real Cost Data (Realist) +2. Regression from Real Cost Data (Realist) Linear: C = a + bG -Inverse or logarithmic: C = a + b/G or C = alog⁡(G) + b +Inverse or Logarithmic: C = a + b/G or C = a*log⁡(G) + b + +3. Tabulated Cost Based on Grade + +Table equivalent for the given grade + + +# Recovery Formulas 1. Empirical Linear Model diff --git a/Grade_Calculator.py b/Grade_Calculator.py index 954231a..6e2347b 100644 --- a/Grade_Calculator.py +++ b/Grade_Calculator.py @@ -21,7 +21,7 @@ x_0 = 0.8 # Grade at which recovery rate reaches ~50% of R_max df["Recovery (%)"] = (R_max / (1 + np.exp(-k * (df["Weighted Grade (%)"] - x_0)))) / 100 -# === Processing Cost Estimation (Regression from Real Cost Model) === +# === Processing Cost Estimation (Linear Regression Model) === # Processing Cost ($/t) = A + B * Grade # Reflects increasing cost with higher grade due to more intensive processing A = 12 # Fixed base processing cost ($/t) diff --git a/README.md b/README.md index 3a0d9df..e9f9e01 100755 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ This Python script is designed to calculate the cut-off grade for use in Mining Economics. It begins by calculating the recovery using a logistic model based on the weighted average grade. Next, it estimates the processing cost through a regression model derived from actual cost data. Using the calculated recovery, processing cost, and net price, the script determines the cut-off grade. Finally, all calculations are visualized through a graph for better interpretation. +Cut-Off Grade = Processing Cost / ((Net Price) * Recovery) + +Recovery = Rmax​ * (1 − e^(−k*G)) + +Processing Cost = a + b*G + # Author