|
|
|
@ -108,13 +108,13 @@ def calculate_asset_eaf_contributions(plant_result, eq_results, plot_result):
|
|
|
|
Calculate each asset's negative contribution to plant EAF
|
|
|
|
Calculate each asset's negative contribution to plant EAF
|
|
|
|
Higher contribution = more impact on reducing 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 = []
|
|
|
|
results = []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for asset in eq_results:
|
|
|
|
for asset in eq_results:
|
|
|
|
# Weight based on production capacity
|
|
|
|
# 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)
|
|
|
|
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
|
|
|
|
# Get asset EAF and downtime
|
|
|
|
|