# Pit Optimization (Lerchs-Grossmann) AI Agent Connect

> Calculate optimal open-pit mine limits using the Lerchs-Grossmann algorithm.

## Overview
- **Category:** engineering
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_s775OdGuwJcagkgxceOoLIi4PZw9iSMnN2eQmSpf/ai-agent-connect
- **Tags:** mining, lerchs-grossmann, pit-optimization, geotechnical, block-model

## Description

This MCP server provides specialized tools for open-pit mine planning. It uses the Lerchs-Grossmann algorithm to determine the most profitable pit shell by analyzing 3D block models. Users can transform raw data into economic values using `calculate_block_values`, execute the core optimization with `run_lg_optimization`, and aggregate business results via `summarize_pit_metrics`. The server also includes `validate_geotechnical_safety` to ensure pit walls respect required slope constraints.

## Tools

### run_lg_optimization
Executes the Lerchs-Grossmann algorithm to identify the set of blocks that form the most profitable pit shell

### summarize_pit_metrics
Aggregates the results of an optimization into high-level business metrics

### validate_geotechnical_safety
Checks if a proposed set of pit blocks adheres to the safety slope constraints

### calculate_block_values
Transforms raw block model data and economic parameters into net profit/loss values for every individual block

## Prompt Examples

**Prompt:** 
```
Calculate the net values for my block model with a metal price of 1500 and a base mining cost of 50.
```

**Response:** 
```
The block values have been calculated. The net value for block ID 101 is 450.50 and for block ID 102 is -12.30.
```

**Prompt:** 
```
Run the LG optimization for these block values with a 45 degree slope angle.
```

**Response:** 
```
The optimization is complete. The ultimate pit limit contains 450 blocks with a total NPV of 12,450,000.
```

**Prompt:** 
```
What is the total contained metal in the optimized pit?
```

**Response:** 
```
The total contained metal in the optimized pit is 85,200 units.
```

## Frequently Asked Questions

**What is the Lerchs-Grossmann algorithm?**
It is a mathematical method used to find the ultimate pit limit by maximizing total profit while respecting geotechnical slope constraints.

**How does the tool handle mining costs?**
The `calculate_block_values` tool accounts for depth-dependent costs by applying a multiplier to the base mining cost as the z-coordinate decreases.

**Can I verify if my pit design is safe?**
Yes, you can use the `validate_geotechnical_safety` tool to check if your proposed pit blocks adhere to the specified slope angles.
