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
+25 -1
View File
@@ -4,7 +4,11 @@ from __future__ import annotations
from typing import Any
from machine_constraints import check_production_feasibility, get_machine
from machine_constraints import (
calculate_machine_max_product_length,
check_production_feasibility,
get_machine,
)
from roll_calculation import (
ArticleRepository,
calculate_material_weight,
@@ -56,6 +60,26 @@ def check_production_feasibility_result(
})
def calculate_machine_max_product_length_result(
*,
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]:
"""Delegate machine-aware maximum product length to the shared domain."""
return calculate_machine_max_product_length(
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,
)
def calculate_material_weight_result(
*,
roll_length_m: float,