|
|
|
|
@ -20,12 +20,19 @@ async def get_model_data(*, db_session: DbSession, simulation_id: Optional[UUID]
|
|
|
|
|
simulation = await get_simulation_by_id(
|
|
|
|
|
db_session=db_session, simulation_id=simulation_id, is_completed=True
|
|
|
|
|
)
|
|
|
|
|
main_node = await get_simulation_node_by(db_session=db_session, node_name="Boiler")
|
|
|
|
|
main_node = await get_simulation_node_by(db_session=db_session, node_name="- BTG_PC -")
|
|
|
|
|
|
|
|
|
|
if not simulation and not main_node:
|
|
|
|
|
raise HTTPException(
|
|
|
|
|
status_code=status.HTTP_404_NOT_FOUND, detail="Simulation not found"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
main_calc_data = await get_calc_result_by(
|
|
|
|
|
db_session=db_session, simulation_id=simulation.id, aeros_node_id=main_node.id
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Total time period
|
|
|
|
|
total_time = main_calc_data.total_uptime + main_calc_data.total_downtime
|
|
|
|
|
|
|
|
|
|
|