|
|
|
@ -216,8 +216,12 @@ async def get_custom_parameters_controller(db_session: DbSession):
|
|
|
|
"status": "success",
|
|
|
|
"status": "success",
|
|
|
|
"message": "Simulation result retrieved successfully",
|
|
|
|
"message": "Simulation result retrieved successfully",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@router.post("/calculate_eaf_contribution", response_model=StandardResponse[dict])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
airflow_router = APIRouter()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@airflow_router.post("/calculate_eaf_contribution", response_model=StandardResponse[dict])
|
|
|
|
async def calculate_contribution(
|
|
|
|
async def calculate_contribution(
|
|
|
|
db_session: DbSession,
|
|
|
|
db_session: DbSession,
|
|
|
|
simulation_in: SimulationInput,
|
|
|
|
simulation_in: SimulationInput,
|
|
|
|
@ -239,8 +243,18 @@ async def calculate_contribution(
|
|
|
|
start_index = batch_num * batch_size
|
|
|
|
start_index = batch_num * batch_size
|
|
|
|
end_index = start_index + batch_size
|
|
|
|
end_index = start_index + batch_size
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if start_index >= len(eqs):
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
"data": contribution_results,
|
|
|
|
|
|
|
|
"status": "success",
|
|
|
|
|
|
|
|
"message": "No more equipment to process",
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if end_index > len(eqs):
|
|
|
|
if end_index > len(eqs):
|
|
|
|
end_index = len(eqs)
|
|
|
|
end_index = len(eqs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
eqs = eqs[start_index:end_index]
|
|
|
|
eqs = eqs[start_index:end_index]
|
|
|
|
for eq in eqs:
|
|
|
|
for eq in eqs:
|
|
|
|
|