From 1252a153cc209d210cd6278111d5f503432bb936 Mon Sep 17 00:00:00 2001 From: Cizz22 Date: Mon, 13 Oct 2025 15:39:18 +0700 Subject: [PATCH] fix --- src/calculation_target_reliability/schema.py | 1 + src/calculation_target_reliability/service.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calculation_target_reliability/schema.py b/src/calculation_target_reliability/schema.py index 4b614d9..9320713 100644 --- a/src/calculation_target_reliability/schema.py +++ b/src/calculation_target_reliability/schema.py @@ -57,6 +57,7 @@ class OptimizationResult(OverhaulBase): possible_plant_eaf:float eaf_gap: float eaf_improvement_text:str + recommended_reduced_outage:float warning_message:Optional[str] asset_contributions: List[dict] optimization_success: bool = False diff --git a/src/calculation_target_reliability/service.py b/src/calculation_target_reliability/service.py index a39ce85..8b1ca24 100644 --- a/src/calculation_target_reliability/service.py +++ b/src/calculation_target_reliability/service.py @@ -289,6 +289,7 @@ async def identify_worst_eaf_contributors( possible_eaf_plant = min(possible_eaf_plant, max_eaf_possible) selected_eq.sort(key=lambda x: x.birbaum, reverse=True) + required_cut_hours = 0 # --- 2. Optimization feasible but cannot reach target (underperformance case) --- if possible_eaf_plant < target_eaf: @@ -332,7 +333,8 @@ async def identify_worst_eaf_contributors( possible_plant_eaf=possible_eaf_plant, eaf_gap=eaf_gap, warning_message=warning_message, # numeric - eaf_improvement_text=improvement_text, # human-readable text + eaf_improvement_text=improvement_text, + recommended_reduced_outage=required_cut_hours, asset_contributions=[ { "node": asset.node,