Costing Process Deep Dive¶
Detailed breakdown of how CostEngine calculates manufacturing costs.
Cost Component Architecture¶
graph TD
A[Total Product Cost] --> B[Material Cost]
A --> C[Manufacturing Cost]
A --> D[Overheads]
B --> B1[Raw Material]
B --> B2[Scrap Allowance]
C --> C1[Internal Operations]
C --> C2[Outside Processes]
C1 --> C1a[Setup Cost]
C1 --> C1b[Cycle Cost]
C1 --> C1c[Tooling Cost]
D --> D1[Factory Overhead]
D --> D2[Admin Overhead]
style A fill:#fce4ec,stroke:#e91e63,stroke-width:3px
style B fill:#fff3e0
style C fill:#e3f2fd
style D fill:#f3e5f5
Material Cost Calculation¶
Process Flow¶
flowchart TD
Start[Start Material Costing] --> A[Get Part Specification]
A --> B[Material Grade]
A --> C[Gross Weight]
A --> D[Net Weight]
B --> E{Material in<br/>Database?}
E -->|Yes| F[Fetch Current Rate]
E -->|No| G[Manual Entry Required]
G --> H[Add to Material Master]
H --> F
C --> I[Calculate Yield %]
D --> I
I --> J[Yield = Net/Gross × 100]
F --> K[Apply Formula]
J --> K
C --> K
K --> L{Override<br/>Required?}
L -->|Yes| M[Apply Override]
M --> N[Log Reason]
L -->|No| O[Use Calculated]
N --> P[Final Material Cost]
O --> P
style Start fill:#e3f2fd
style P fill:#c8e6c9
style M fill:#fff9c4
Formula Breakdown¶
Standard Calculation:
Example:
- Gross Weight: 2.5 kg
- Net Weight: 2.0 kg
- RM Rate: ₹180/kg
- Yield: 80% (2.0 / 2.5)
Internal Operations Costing¶
Routing Structure¶
graph LR
RM[Raw Material] --> OP1[Op 1: Cutting]
OP1 --> OP2[Op 2: Turning]
OP2 --> OP3[Op 3: Milling]
OP3 --> OP4[Op 4: Drilling]
OP4 --> OP5[Op 5: Deburring]
OP5 --> FG[Finished Good]
style RM fill:#fff3e0
style FG fill:#c8e6c9
Operation Cost Model¶
flowchart TD
A[Operation Definition] --> B[Setup Time]
A --> C[Cycle Time]
A --> D[Batch Size]
A --> E[Machine Hour Rate]
A --> F[Tooling Cost]
B --> G[Setup Cost per Piece]
D --> G
E --> G
C --> H[Cycle Cost per Piece]
E --> H
F --> I[Tooling Cost per Piece]
D --> I
G --> J[Total Operation Cost]
H --> J
I --> J
style A fill:#e3f2fd
style J fill:#c8e6c9
Cost Formulas¶
Setup Cost per Piece:
Cycle Cost per Piece:
Tooling Cost per Piece:
Total Operation Cost:
Example Calculation: Turning Operation¶
Inputs: - Setup Time: 0.5 hours - Cycle Time: 0.05 hours (3 minutes per piece) - Batch Size: 500 pieces - Machine Hour Rate: ₹600/hr - Tool Cost: ₹2,000 - Tool Life: 1,000 pieces
Calculation:
Outside Process Costing¶
flowchart TD
A[Outside Process Required] --> B{Pricing Model?}
B -->|Per Piece| C[Unit Rate × Quantity]
B -->|Per Kg| D[Rate × Weight]
B -->|Per Batch| E[Fixed Batch Rate]
C --> F{Minimum Charge?}
D --> F
E --> F
F -->|Yes| G["max(Calculated, Minimum)"]
F -->|No| H[Use Calculated]
G --> I[Final Outside Cost]
H --> I
style A fill:#e3f2fd
style I fill:#c8e6c9
Common Outside Processes: - Heat treatment - Surface coating (plating, anodizing, powder coating) - Laser marking - Special testing/inspection - Packaging
Scrap & Yield Handling¶
Cascading Scrap Model¶
graph TD
A[100 pcs Required] --> B[Material Scrap: 5%]
B --> C[Need 105 pcs from material]
C --> D[Operation 1 Scrap: 3%]
D --> E[Need 108.15 pcs input]
E --> F[Operation 2 Scrap: 2%]
F --> G[Need 110.35 pcs input]
G --> H[Final: Start with 111 pcs]
style A fill:#e3f2fd
style H fill:#fce4ec
Scrap Adjustment Formula:
For each stage with scrap percentage \(s\):
Example: - Required output: 1000 pieces - Material scrap: 5% - Op 1 scrap: 3% - Op 2 scrap: 2%
Overhead Allocation¶
Overhead Models¶
graph TD
A{Overhead Model} --> B[Embedded in MHR]
A --> C[Percentage Add-on]
B --> B1[Factory OH in MHR]
B --> B2[Admin OH separate %]
C --> C1[Manufacturing Cost]
C --> C2[Add Factory %]
C2 --> C3[Add Admin %]
B2 --> D[Total Cost]
C3 --> D
style A fill:#fff3e0
style D fill:#c8e6c9
Option 1: Embedded MHR
Machine Hour Rate already includes factory overhead (utilities, rent, depreciation)
Option 2: Percentage Add-on
Complete Cost Assembly¶
flowchart TD
A[Part] --> B[Material Cost]
A --> C[Operation 1]
A --> D[Operation 2]
A --> E[Operation N]
A --> F[Outside Processes]
B --> G[Sum: Direct Costs]
C --> G
D --> G
E --> G
F --> G
G --> H[Apply Scrap Adjustment]
H --> I[Apply Overheads]
I --> J[Total Manufacturing Cost]
J --> K{Overrides?}
K -->|Yes| L[Apply Overrides]
K -->|No| M[Use Calculated]
L --> N[Final Cost per Piece]
M --> N
style A fill:#e3f2fd
style J fill:#fff3e0
style N fill:#c8e6c9,stroke:#4caf50,stroke-width:3px
Final Cost Summary Table¶
| Component | Value (₹) | % of Total |
|---|---|---|
| Material | 562.50 | 45% |
| Operation 1: Cutting | 15.00 | 1.2% |
| Operation 2: Turning | 32.60 | 2.6% |
| Operation 3: Milling | 85.00 | 6.8% |
| Operation 4: Drilling | 25.00 | 2.0% |
| Operation 5: Deburring | 12.00 | 1.0% |
| Outside: Heat Treatment | 75.00 | 6.0% |
| Subtotal (Direct) | 807.10 | 64.6% |
| Factory Overhead (15%) | 121.07 | 9.7% |
| Admin Overhead (10%) | 92.82 | 7.4% |
| Scrap Allowance (5%) | 40.36 | 3.2% |
| Total Cost per Piece | ₹1,061.35 | 100% |
Real-Time Recalculation¶
sequenceDiagram
participant U as User
participant UI as UI Layer
participant CE as Cost Engine
participant DB as Database
U->>UI: Change material rate
UI->>CE: Trigger recalculation
CE->>DB: Fetch all dependencies
DB-->>CE: Return data
CE->>CE: Recalculate material cost
CE->>CE: Recalculate scrap impact
CE->>CE: Recalculate total cost
CE-->>UI: Updated cost breakdown
UI-->>U: Display new totals
Note over U,UI: Update time: <100ms
Validation & Checks¶
Automated Validations¶
| Check | Rule | Action if Failed |
|---|---|---|
| Yield Sensibility | 50% < Yield < 100% | Warning Warning |
| MHR Range | ₹200 < MHR < ₹2000 | Warning Warning |
| Cycle Time Logic | Cycle < 24 hours | Warning Warning |
| Batch Size | Batch ≥ 1 | No Error |
| Missing Operations | At least 1 operation | No Error |
| Material Grade | Must exist in master | No Error |