Sunday, 12 October 2025

Experiment: Performing ABC Analysis to Classify Inventory Items by Importance

๐ŸŽฏ Objective:

To classify inventory items into A, B, and C categories based on their annual consumption value, and analyze how focusing control on ‘A’ items can improve inventory efficiency.


๐Ÿงฉ Background Theory:

  • ABC analysis is based on the Pareto principle (80/20 rule):

    • “A” items = ~20% of items contributing ~80% of total value

    • “B” items = ~30% of items contributing ~15% of total value

    • “C” items = ~50% of items contributing ~5% of total value

It helps inventory managers prioritize control, forecasting, and stock review.


๐Ÿงฎ Given Data (for Experiment):

Create a sample dataset of 10–15 inventory items with:

ItemAnnual Demand (units)Unit Cost (USD)
I11,00010
I250050
I3300100
I4100200
I51,2005
I680020
I715080
I860015
I9100300
I1040025

(You can randomize or expand this for larger experiments.)


๐Ÿงญ Experimental Procedure:

  1. Step 1 — Calculate Annual Consumption Value (ACV):

  2. Step 2 — Rank Items by ACV:
    Sort the list in descending order (highest to lowest ACV).

  3. Step 3 — Compute Cumulative % of Total Value and Items:

  4. Step 4 — Classify Items:

    • Class A: Cumulative value up to ~80%

    • Class B: Next ~15%

    • Class C: Remaining ~5%

  5. Step 5 — Plot ABC Curve (optional but powerful):
    Plot:

    • X-axis: Cumulative % of items

    • Y-axis: Cumulative % of value

    → The curve will show steep rise for A items and flat for C items.

  6. Step 6 — Analysis & Decision:

    • How many items fall in A/B/C groups?

    • What % of value does each represent?

    • Suggest control policies:

      • A items: tight control, frequent review, accurate forecasting

      • B items: moderate control

      • C items: simple periodic review, bulk orders


๐Ÿ“ˆ Expected Results:

  • Roughly 2–3 items (20%) in Class A contribute ~80% of total value.

  • 3–4 items (30%) in Class B contribute ~15%.

  • Remaining items (50%) in Class C contribute ~5%.


๐Ÿ” Evaluation / Discussion:

  • Did the results follow the 80/20 rule?

  • What control strategies would reduce total inventory cost?

  • How would misclassification affect stockouts or overstock?


๐Ÿ’ก Extension Ideas (Optional):

  • Repeat using real company data.

  • Combine with XYZ analysis (demand variability).

  • Simulate reordering frequency and service levels by class.








Python Code by Chat GPT

# ๐Ÿงช ABC Analysis Experiment for Inventory Management
import pandas as pd
import matplotlib.pyplot as plt

# --- Step 1: Create Sample Inventory Data ---
data = {
    "Item": ["I1", "I2", "I3", "I4", "I5", "I6", "I7", "I8", "I9", "I10"],
    "Annual_Demand": [1000, 500, 300, 100, 1200, 800, 150, 600, 100, 400],
    "Unit_Cost": [10, 50, 100, 200, 5, 20, 80, 15, 300, 25]
}

df = pd.DataFrame(data)

# --- Step 2: Compute Annual Consumption Value (ACV) ---
df["Annual_Value"] = df["Annual_Demand"] * df["Unit_Cost"]

# --- Step 3: Sort by Annual Value Descending ---
df = df.sort_values(by="Annual_Value", ascending=False).reset_index(drop=True)

# --- Step 4: Compute Cumulative Percentages ---
df["Cumulative_Value"] = df["Annual_Value"].cumsum()
df["Cumulative_Value_Percent"] = 100 * df["Cumulative_Value"] / df["Annual_Value"].sum()
df["Cumulative_Item_Percent"] = 100 * (df.index + 1) / len(df)

# --- Step 5: Classify A, B, C ---
def classify(row):
    if row["Cumulative_Value_Percent"] <= 80:
        return "A"
    elif row["Cumulative_Value_Percent"] <= 95:
        return "B"
    else:
        return "C"

df["Class"] = df.apply(classify, axis=1)

# --- Display the ABC Table ---
print("=== ABC Analysis Results ===")
print(df[["Item", "Annual_Demand", "Unit_Cost", "Annual_Value",
          "Cumulative_Value_Percent", "Class"]])

# --- Step 6: Plot the ABC Curve ---
plt.figure(figsize=(8,5))
plt.plot(df["Cumulative_Item_Percent"], df["Cumulative_Value_Percent"],
         marker='o', linestyle='-', color='blue')

# Add grid and labels
plt.title("ABC Analysis for Graphene Inventory")
plt.xlabel("Cumulative % of Items")
plt.ylabel("Cumulative % of Value")
plt.grid(True)

# Annotate A, B, C zones
plt.axhline(y=80, color='green', linestyle='--', label='A/B boundary (80%)')
plt.axhline(y=95, color='orange', linestyle='--', label='B/C boundary (95%)')
plt.legend()

plt.show()







No comments:

Post a Comment

Machine Learning: Nearest Neighbor (NN) algorithm for stock transfers between warehouses

  ๐Ÿญ Scenario: Nearest Neighbor Algorithm for Warehouse Stock Transfer Background A company, GrapheneTech , distributes graphene sheets a...