Material Costing Logic¶
Material costing is the first and often most significant component of the total cost buildup in CostEngine. It handles everything from raw material rates to complex scrap recovery.
Overview¶
Material cost calculation depends on three main pillars: 1. Material Specification: Grade, form, and weight. 2. Rate Management: Master rates vs. quote-specific overrides. 3. Yield & Scrap: How much material is actually needed vs. how much stays in the part.
Data Model¶
| Field | Data Type | Required | Description | Source |
|---|---|---|---|---|
material_grade |
String | Yes | E.g., SAE4140, EN8, SS304 | Excel |
material_form |
Enum | Yes | Bar, Plate, Sheet, Casting, Forging | Excel |
gross_weight |
Decimal (kg) | Yes | Weight of raw material input | Excel |
net_weight |
Decimal (kg) | Yes | Weight of the finished part | Excel |
rm_rate |
Decimal (₹/kg) | Yes | Rate of raw material | Master/Excel |
scrap_recovery_rate |
Decimal (₹/kg) | No | Credit for sold scrap/shavings | Master |
Cost Calculation Formula¶
Standard Material Cost¶
Where:
Net Material Cost (with Scrap Recovery)¶
For high-value materials (Titanium, Copper), the shavings/scrap can be sold back.
RM Rate Lookup Strategy¶
CostEngine follows a strict hierarchy for material rates:
- Quote Override: The estimator manually entered a rate for this specific quote.
- Customer Price List: A specific rate is contracted for this customer.
- Material Master: The global "standard" rate updated by the Admin.
- Fallback: If none of the above exist, the system flags a "Missing Critical Data" error.
Tooling & Consumable Costs¶
Material costing also captures Direct Tooling required for the specific part.
Durable Tooling¶
Amortized over the expected life of the tool. - Example: A specialized gauge costs ₹50,000 and lasts for 25,000 pieces. - Piece Cost: ₹50,000 / 25,000 = ₹2.00/pc
Consumable Tooling¶
Replaced frequently during production. - Example: Cutting inserts replaced every 50 pieces. - Piece Cost: ₹500 (insert cost) / 50 = ₹10.00/pc
Explainability example¶
A drill-down into a Material Cost line might show:
Material: SAE4140 (Bar Stock) - ₹263.95
Source Data:
✓ Gross Weight: 2.304 kg (from Excel B10)
✓ Net Weight: 2.000 kg (from Excel B11)
✓ RM Rate: ₹99.50/kg (from Master Data)
Derived Metrics:
• Yield: 86.8%
• Weight Loss: 0.304 kg (13.2%)
Calculation:
(2.304 kg × ₹99.50/kg) / 0.868 = ₹263.95
[Override RM Rate] [Override Weights]
Validation & Edge Cases¶
Common Validations¶
- Net > Gross: Blocked (Logic error).
- Yield < 50%: Warning (Unusually high material loss).
- Zero Weight: Error (Cannot calculate cost).
Edge Case: Customer Supplied Material (CSM)¶
In some contracts, the customer provides the raw material.
- Handling: Set rm_rate to ₹0. The system still tracks weights for logistics and scrap management but results in ₹0 material cost.
Related Documentation¶
- Scrap & Yield → - Cascading impact of process scrap
- Operations & Routing → - How material moves through processes
- Explainability → - How material costs are defended