cwicr-equipment-planner
Plan equipment requirements using CWICR norms. Calculate equipment hours, scheduling, utilization rates, and rental vs purchase analysis.
What this skill does
# 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)
equipment_desc = str(work_item.get('equipment_description',
work_item.get('category', 'General')))
equip_hours = equipment_norm * qty
if equip_hours > 0:
equip_key = equipment_desc
equipment[equip_key]['hours'] += equip_hours
equipment[equip_key]['work_items'].append(code)
equipment[equip_key]['description'] = equipment_desc
equipment[equip_key]['start_day'] = min(
equipment[equip_key]['start_day'], start_day
)
equipment[equip_key]['end_day'] = max(
equipment[equip_key]['end_day'], start_day + duration
)
# Convert to EquipmentItem list
result = []
for equip_key, data in equipment.items():
info = self._get_equipment_info(data['description'])
hours = data['hours']
# Calculate days needed
days_needed = int(np.ceil(hours / 8)) # 8-hour days
# Dates
start_date = project_start + timedelta(days=data.get('start_day', 0))
actual_days = max(days_needed, data.get('end_day', 0) - data.get('start_day', 0))
end_date = start_date + timedelta(days=actual_days)
# Utilization
available_hours = actual_days * 8
utilization = hours / available_hours if available_hours > 0 else 0
# Costs
equipment_cost = actual_days * info['daily_rate']
operator_cost = hours * info['operator_hourly'] if info['operator_hourly'] > 0 else 0
fuel_cost = hours * info['fuel_per_hour'] * self.fuel_price
result.append(EquipmentItem(
equipment_code=equip_key[:20],
description=data['description'],
category=info['category'],
requiRelated in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.