Add machine-aware maximum product length

This commit is contained in:
2026-09-26 12:25:04 +02:00
parent 3e13d24405
commit 90c28fb2f5
11 changed files with 765 additions and 5 deletions
+20
View File
@@ -6,6 +6,7 @@ from typing import Any
from rollcalc_mcp_tools import (
analyze_transport_capacity_result,
calculate_machine_max_product_length_result,
calculate_material_weight_result,
calculate_product_length_result,
calculate_roll_diameter_result,
@@ -62,6 +63,25 @@ def create_server() -> Any:
line_speed_m_per_min=line_speed_m_per_min,
)
@server.tool()
def calculate_machine_max_product_length(
machine: str,
core_diameter_mm: float,
thickness_mm: float,
thickness_stddev_mm: float | None = None,
product_width_m: float | None = None,
area_weight_g_m2: float | None = None,
) -> dict[str, Any]:
"""Calculate deterministic maximum product length for a configured production machine. Use this for maximum roll/product length, how much product fits on a machine roll, or maximum length without a diameter warning. Resolve the article first with search_articles/get_article when needed, then pass its thickness, thickness standard deviation, width, and area weight exactly. Do not supply or invent machine limits, rearrange roll or weight formulas, calculate a weight-limited length, or compare candidate limits yourself: this tool returns nominal and conservative/no-warning production maxima and their governing constraints. Report incompatibility rather than substituting another core or width, and ask for returned missing inputs rather than inventing them."""
return calculate_machine_max_product_length_result(
machine=machine,
core_diameter_mm=core_diameter_mm,
thickness_mm=thickness_mm,
thickness_stddev_mm=thickness_stddev_mm,
product_width_m=product_width_m,
area_weight_g_m2=area_weight_g_m2,
)
@server.tool()
def calculate_material_weight(
roll_length_m: float,