From ac7e1d967aee0477872d309c09d1b875c44cc125 Mon Sep 17 00:00:00 2001 From: Cizz22 Date: Tue, 2 Sep 2025 12:49:22 +0700 Subject: [PATCH] change formumla contribution eaf --- src/calculation_target_reliability/service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calculation_target_reliability/service.py b/src/calculation_target_reliability/service.py index 47734b0..471fd88 100644 --- a/src/calculation_target_reliability/service.py +++ b/src/calculation_target_reliability/service.py @@ -108,13 +108,13 @@ def calculate_asset_eaf_contributions(plant_result, eq_results, plot_result): Calculate each asset's negative contribution to plant EAF Higher contribution = more impact on reducing plant EAF """ - plant_ideal_production = plant_result.get('ideal_production', 0) + plant_production = plant_result.get('production', 0) results = [] for asset in eq_results: # Weight based on production capacity - capacity_weight = asset.get('ideal_production', 0) / plant_ideal_production if plant_ideal_production > 0 else 0 + capacity_weight = asset.get('production', 0) / plant_production if plant_productions > 0 else 0 plot_data = next((item for item in plot_result if item['aeros_node']['node_name'] == asset['aeros_node']['node_name']), None) # Get asset EAF and downtime