|
|
|
|
@ -927,12 +927,12 @@ async def get_calculation_result(db_session: DbSession, calculation_id: str, tok
|
|
|
|
|
|
|
|
|
|
# Calculate total cost for this month
|
|
|
|
|
month_result["total_cost"] = (month_result["corrective_cost"] +
|
|
|
|
|
month_result["overhaul_cost"] +
|
|
|
|
|
month_result["procurement_cost"])
|
|
|
|
|
month_result["overhaul_cost"] )
|
|
|
|
|
|
|
|
|
|
calculation_results.append(CalculationResultsRead(**month_result))
|
|
|
|
|
|
|
|
|
|
optimum_day = np.argmin([month.total_cost for month in calculation_results])
|
|
|
|
|
|
|
|
|
|
scope_calculation.optimum_oh_day = int(optimum_day)
|
|
|
|
|
await db_session.commit()
|
|
|
|
|
|
|
|
|
|
|