# Tank Farm Optimization AI Agent Connect

> Optimize refinery tank farm operations including tank allocation, blending schedules, and inventory buffers.

## Overview
- **Category:** logistics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_43wmxtHcgAVQdC3BFT0xlSkeeAQCb2Lf7GL19AeA/ai-agent-connect
- **Tags:** refinery, inventory, blending, logistics, supply-chain

## Description

This MCP server provides specialized tools for managing refinery tank farm operations. It enables AI agents to perform precise tank allocation, generate complex blending schedules, and calculate necessary inventory buffers to prevent stockouts. By using `get_inventory_status`, agents can monitor real-time tank volumes and capacities. The `calculate_allocation_plan` tool ensures products are assigned to tanks while strictly adhering to product segregation rules. For quality control, `generate_blending_schedule` plans the sequence of product additions to meet specific target specifications. Finally, `optimize_inventory_buffer` uses shipping schedules and safety factors to determine minimum inventory levels, ensuring operational stability.

## Tools

### calculate_allocation_plan
Generates an optimized plan for assigning products to tanks based on current inventory and upcoming demands

### generate_blending_schedule
Determines the sequence of product additions required to meet specific product quality targets

### get_inventory_status
Provides a real-time snapshot of the current state of all tanks in the farm

### optimize_inventory_buffer
Calculates the necessary minimum inventory levels to prevent stockouts based on shipping schedules and demand

## Prompt Examples

**Prompt:** 
```
What is the current status of the tanks in farm ID 'REF-001'?
```

**Response:** 
```
Tank REF-001-A is active with 5,000m3 of Diesel (Capacity: 10,000m3). Tank REF-001-B is in cleaning status.
```

**Prompt:** 
```
Generate an allocation plan for farm 'REF-001' with a demand for 2000m3 of Gasoline and segregation rules ['Gasoline', 'Diesel'].
```

**Response:** 
```
Allocation plan generated: Tank REF-001-C has been assigned 2000m3 of Gasoline starting 2024-05-20T08:00:00Z.
```

**Prompt:** 
```
Calculate the required inventory buffer for farm 'REF-001' with a safety factor of 1.2 and an upcoming shipment of 5000m3 of Fuel Oil on 2024-06-01.
```

**Response:** 
```
The required minimum inventory for Fuel Oil is 6000m3 to be secured by 2024-06-01.
```

## Frequently Asked Questions

**How does the tool handle product contamination?**
The `calculate_allocation_plan` tool uses provided segregation rules to ensure incompatible products are never assigned to the same tank, preventing contamination.

**Can I check the current status of my tanks?**
Yes, you can use the `get_inventory_status` tool to retrieve real-time data on tank volumes, capacities, and current product types.

**How are safety buffers calculated?**
The `optimize_inventory_buffer` tool calculates minimum levels by analyzing upcoming shipping schedules and applying a user-defined safety factor to account for volatility.
