|
|
|
@ -140,7 +140,7 @@ def calculate_asset_eaf_contributions(plant_result, eq_results, standard_scope,
|
|
|
|
current_availability = asset.get('availability')
|
|
|
|
current_availability = asset.get('availability')
|
|
|
|
|
|
|
|
|
|
|
|
# Calculate required improvement
|
|
|
|
# Calculate required improvement
|
|
|
|
required_impr = eaf_gap_fraction / birnbaum if birnbaum > 0 else 0
|
|
|
|
required_impr = 0.1 * birnbaum
|
|
|
|
|
|
|
|
|
|
|
|
# # CHECK FILTERS - Is this asset worth considering?
|
|
|
|
# # CHECK FILTERS - Is this asset worth considering?
|
|
|
|
# filter_reason = None
|
|
|
|
# filter_reason = None
|
|
|
|
@ -232,15 +232,15 @@ async def identify_worst_eaf_contributors(*, simulation_result, target_eaf: floa
|
|
|
|
|
|
|
|
|
|
|
|
asset_contributions = calculate_asset_eaf_contributions(plant_result, eq_results, standard_scope_location_tags, eaf_gap=eaf_gap)
|
|
|
|
asset_contributions = calculate_asset_eaf_contributions(plant_result, eq_results, standard_scope_location_tags, eaf_gap=eaf_gap)
|
|
|
|
|
|
|
|
|
|
|
|
# project_eaf_improvement = 0.0
|
|
|
|
project_eaf_improvement = 0.0
|
|
|
|
# selected_eq = []
|
|
|
|
selected_eq = []
|
|
|
|
|
|
|
|
|
|
|
|
# for asset in asset_contributions:
|
|
|
|
for asset in asset_contributions:
|
|
|
|
# if (project_eaf_improvement + asset.eaf_impact) <= eaf_gap:
|
|
|
|
if (project_eaf_improvement + asset.required_improvement) <= eaf_gap:
|
|
|
|
# selected_eq.append(asset)
|
|
|
|
selected_eq.append(asset)
|
|
|
|
# project_eaf_improvement += asset.eaf_impact
|
|
|
|
project_eaf_improvement += asset.required_improvement
|
|
|
|
# else:
|
|
|
|
else:
|
|
|
|
# break
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
# optimization_success = current_plant_eaf + project_eaf_improvement >= target_eaf
|
|
|
|
# optimization_success = current_plant_eaf + project_eaf_improvement >= target_eaf
|
|
|
|
|
|
|
|
|
|
|
|
@ -248,7 +248,7 @@ async def identify_worst_eaf_contributors(*, simulation_result, target_eaf: floa
|
|
|
|
current_plant_eaf=current_plant_eaf,
|
|
|
|
current_plant_eaf=current_plant_eaf,
|
|
|
|
target_plant_eaf=target_eaf,
|
|
|
|
target_plant_eaf=target_eaf,
|
|
|
|
eaf_gap=eaf_gap,
|
|
|
|
eaf_gap=eaf_gap,
|
|
|
|
asset_contributions=asset_contributions,
|
|
|
|
asset_contributions=selected_eq,
|
|
|
|
optimization_success=True,
|
|
|
|
optimization_success=True,
|
|
|
|
simulation_id=simulation_id
|
|
|
|
simulation_id=simulation_id
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|