cwicr-equipment-planner
Plan equipment requirements using CWICR norms. Calculate equipment hours, scheduling, utilization rates, and rental vs purchase analysis.
git clone --depth 1 https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction /tmp/cwicr-equipment-planner && cp -r /tmp/cwicr-equipment-planner/1_DDC_Toolkit/CWICR-Database/cwicr-equipment-planner ~/.claude/skills/cwicr-equipment-plannerSKILL.md
# CWICR Equipment Planner
## Business Case
### Problem Statement
Equipment is a major cost driver:
- What equipment is needed?
- For how long?
- Rent or buy?
- How to optimize utilization?
### Solution
Equipment planning using CWICR equipment norms to calculate requirements, schedule usage, and analyze rental vs purchase decisions.
### Business Value
- **Accurate requirements** - Based on validated norms
- **Optimized utilization** - Reduce idle time
- **Cost analysis** - Rent vs buy decisions
- **Scheduling** - Equipment availability planning
## Technical Implementation
```python
import pandas as pd
import numpy as np
from typing import Dict, Any, List, Optional, Tuple
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from enum import Enum
from collections import defaultdict
class EquipmentCategory(Enum):
"""Equipment categories."""
EARTHMOVING = "earthmoving"
LIFTING = "lifting"
CONCRETE = "concrete"
COMPACTION = "compaction"
TRANSPORT = "transport"
POWER_TOOLS = "power_tools"
SCAFFOLDING = "scaffolding"
PUMPING = "pumping"
PILING = "piling"
OTHER = "other"
class OwnershipType(Enum):
"""Equipment ownership types."""
OWNED = "owned"
RENTED = "rented"
LEASED = "leased"
@dataclass
class EquipmentItem:
"""Equipment item requirement."""
equipment_code: str
description: str
category: EquipmentCategory
required_hours: float
required_days: int
daily_rate: float
hourly_rate: float
monthly_rate: float
total_cost: float
utilization_rate: float
operator_required: bool
operator_cost: float
fuel_cost: float
start_date: datetime
end_date: datetime
work_item_codes: List[str] = field(default_factory=list)
@dataclass
class EquipmentPlan:
"""Complete equipment plan."""
project_name: str
total_equipment_cost: float
total_operator_cost: float
total_fuel_cost: float
total_cost: float
equipment_items: List[EquipmentItem]
by_category: Dict[str, float]
schedule: Dict[str, List[str]]
# Equipment categories and typical rates
EQUIPMENT_DATA = {
'excavator': {
'category': EquipmentCategory.EARTHMOVING,
'daily_rate': 450,
'hourly_rate': 75,
'monthly_rate': 9000,
'fuel_per_hour': 15, # liters
'operator_hourly': 45
},
'crane': {
'category': EquipmentCategory.LIFTING,
'daily_rate': 800,
'hourly_rate': 150,
'monthly_rate': 16000,
'fuel_per_hour': 20,
'operator_hourly': 55
},
'concrete_mixer': {
'category': EquipmentCategory.CONCRETE,
'daily_rate': 150,
'hourly_rate': 25,
'monthly_rate': 3000,
'fuel_per_hour': 8,
'operator_hourly': 35
},
'compactor': {
'category': EquipmentCategory.COMPACTION,
'daily_rate': 200,
'hourly_rate': 35,
'monthly_rate': 4000,
'fuel_per_hour': 10,
'operator_hourly': 40
},
'pump': {
'category': EquipmentCategory.PUMPING,
'daily_rate': 300,
'hourly_rate': 50,
'monthly_rate': 6000,
'fuel_per_hour': 12,
'operator_hourly': 40
},
'scaffold': {
'category': EquipmentCategory.SCAFFOLDING,
'daily_rate': 50,
'hourly_rate': 0,
'monthly_rate': 1000,
'fuel_per_hour': 0,
'operator_hourly': 0
},
'loader': {
'category': EquipmentCategory.EARTHMOVING,
'daily_rate': 350,
'hourly_rate': 60,
'monthly_rate': 7000,
'fuel_per_hour': 12,
'operator_hourly': 40
},
'truck': {
'category': EquipmentCategory.TRANSPORT,
'daily_rate': 250,
'hourly_rate': 40,
'monthly_rate': 5000,
'fuel_per_hour': 15,
'operator_hourly': 35
}
}
class CWICREquipmentPlanner:
"""Plan equipment requirements from CWICR data."""
def __init__(self, cwicr_data: pd.DataFrame,
fuel_price: float = 1.5): # USD per liter
self.work_items = cwicr_data
self.fuel_price = fuel_price
self._index_data()
def _index_data(self):
"""Index work items for fast lookup."""
if 'work_item_code' in self.work_items.columns:
self._work_index = self.work_items.set_index('work_item_code')
else:
self._work_index = None
def _get_equipment_info(self, description: str) -> Dict[str, Any]:
"""Get equipment info from description."""
desc_lower = str(description).lower()
for equip_name, info in EQUIPMENT_DATA.items():
if equip_name in desc_lower:
return info
# Default equipment
return {
'category': EquipmentCategory.OTHER,
'daily_rate': 200,
'hourly_rate': 35,
'monthly_rate': 4000,
'fuel_per_hour': 10,
'operator_hourly': 35
}
def extract_equipment_requirements(self,
items: List[Dict[str, Any]],
project_start: datetime = None) -> List[EquipmentItem]:
"""Extract equipment requirements from work items."""
if project_start is None:
project_start = datetime.now()
equipment = defaultdict(lambda: {
'hours': 0,
'work_items': [],
'start_day': float('inf'),
'end_day': 0
})
for item in items:
code = item.get('work_item_code', item.get('code'))
qty = item.get('quantity', 0)
start_day = item.get('start_day', 0)
duration = item.get('duration_days', 1)
if self._work_index is not None and code in self._work_index.index:
work_item = self._work_index.loc[code]
equipment_norm = float(work_item.get('equipment_norm', 0) or 0)Generate automated daily progress reports from site data. Track work completed, labor hours, equipment usage, and weather conditions.
Analyze labor productivity from site data. Compare planned vs actual, identify trends, benchmark against industry standards.
Create interactive KPI dashboards for construction projects. Track schedule, cost, quality, and safety metrics in real-time.
Detect and analyze geometric clashes in BIM models. Identify MEP, structural, and architectural conflicts before construction.
Classify BIM elements using AI and standard classification systems. Map elements to UniFormat, MasterFormat, OmniClass, and CWICR codes.
Generate comprehensive BIM model validation reports. Check data quality, completeness, and compliance with standards.
Calculate CO2 emissions and carbon footprint from BIM model data. Analyze embodied carbon by material, element, and building system.
Extract quantities from IFC/Revit models for quantity takeoff. Uses DDC converters to get element counts, areas, volumes, lengths with grouping and reporting.