|
|
|
|
@ -248,7 +248,7 @@ async def create_calc_result_object(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def calculate_plant_eaf(
|
|
|
|
|
db_session: DbSession, simulation_id: UUID, mo_downtime: int, po_downtime:int, oh_interval:int
|
|
|
|
|
db_session: DbSession, simulation_id: UUID, mo_downtime: int, po_downtime:int, oh_interval:int, offset:int
|
|
|
|
|
):
|
|
|
|
|
"""Calculate overall plant EAF from individual node results."""
|
|
|
|
|
plant_calc_data = await get_plant_calc_result(
|
|
|
|
|
@ -259,7 +259,7 @@ async def calculate_plant_eaf(
|
|
|
|
|
db_session=db_session, simulation_id=simulation_id, node_id="plant"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
is_oh_from_aeros = (plant_calc_data.total_uptime + plant_calc_data.total_downtime) > oh_interval
|
|
|
|
|
is_oh_from_aeros = (plant_calc_data.total_uptime + plant_calc_data.total_downtime + offset) > oh_interval
|
|
|
|
|
|
|
|
|
|
seasonal_outage = (mo_downtime*24 + po_downtime*24) if is_oh_from_aeros else mo_downtime*24
|
|
|
|
|
forced_outage = (plant_calc_data.total_downtime - po_downtime*24) if is_oh_from_aeros else plant_calc_data.total_downtime
|
|
|
|
|
|