# Earthwork Balancing AI Agent Connect

> Optimize cut and fill volumes using mass haul analysis.

## Overview
- **Category:** construction
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_SoveIp1BYjWS5VEhgTHvfg8TofRpZk20nMw8zSPT/ai-agent-connect
- **Tags:** earthwork, mass-haul, civil-engineering, cut-and-fill, logistics

## Description

This MCP server provides advanced earthwork optimization tools. It allows AI agents to calculate material surpluses and deficits, analyze mass haul profiles, and minimize transport costs. Use `calculate_volume_balance` to determine total borrow or waste, `analyze_mass_haul` for station-by-station profiles, `optimize_haulage` to find the most efficient movement plan, and `locate_borrow_pit` to identify the best external source location.

## Tools

### analyze_mass_haul
Provides a detailed breakdown of the earthwork profile to identify specific areas of surplus and deficit

### calculate_volume_balance
Determines the fundamental surplus or deficit of material across the entire project

### locate_borrow_pit
Finds the ideal external source location to minimize the cost of bringing in required material

### optimize_haulage
Identifies the most cost-effective movement of material to minimize total transport work

## Prompt Examples

**Prompt:** 
```
Calculate the total borrow and waste for a project with cut volumes [100, 200, 50] and fill volumes [150, 100, 50] with a 0.1 shrinkage factor.
```

**Response:** 
```
The project requires a borrow volume of 35 m³ and has a waste volume of 0 m³.
```

**Prompt:** 
```
Where should I place a borrow pit for these volumes: cut [50, 50], fill [100, 100], shrinkage 0.1, at coordinates [0, 100]?
```

**Response:** 
```
The optimal borrow pit location is at coordinate 50.0 m, with an estimated import cost of 11000.0 m³·m.
```

**Prompt:** 
```
Show me the mass haul profile for cut [200, 0] and fill [0, 150] with 0.1 shrinkage.
```

**Response:** 
```
The station profiles show a surplus of 200 m³ at station 0 and a deficit of 165 m³ at station 1.
```

## Frequently Asked Questions

**How does the shrinkage factor affect calculations?**
The shrinkage factor accounts for the volume reduction that occurs when soil is compacted in a fill area. The tool adjusts fill requirements upward to ensure the final compacted volume meets design specifications.

**Can I find the best location for a borrow pit?**
Yes, by using the `locate_borrow_pit` tool, you can identify the optimal linear coordinate to minimize the mass-distance work required to satisfy material deficits.

**What is included in the haulage optimization?**
The `optimize_haulage` tool provides a complete haul plan, including specific moves from surplus stations to deficit stations and the total minimized haul work.
