|
|
|
@ -783,7 +783,7 @@ async def create_param_and_data(
|
|
|
|
return calculationData
|
|
|
|
return calculationData
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def get_calculation_result(db_session: DbSession, calculation_id: str, token):
|
|
|
|
async def get_calculation_result(db_session: DbSession, calculation_id: str, token, include_risk_cost):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Get calculation results with improved error handling, performance, and sparepart details
|
|
|
|
Get calculation results with improved error handling, performance, and sparepart details
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
@ -850,7 +850,7 @@ async def get_calculation_result(db_session: DbSession, calculation_id: str, tok
|
|
|
|
|
|
|
|
|
|
|
|
loss_production_per_month = np.arange(0, total_simulation_period)
|
|
|
|
loss_production_per_month = np.arange(0, total_simulation_period)
|
|
|
|
k = 5
|
|
|
|
k = 5
|
|
|
|
loss_exp = (plant_monthly_metrics['total_downtime'] * 660 * 500_000) * (np.exp(k * (loss_production_per_month / total_simulation_period)) - 1) / (np.exp(k) - 1)
|
|
|
|
loss_exp = (plant_monthly_metrics['total_downtime'] * 660 * 500_000 * include_risk_cost) * (np.exp(k * (loss_production_per_month / total_simulation_period)) - 1) / (np.exp(k) - 1)
|
|
|
|
|
|
|
|
|
|
|
|
# REFERENCE_CAPACITY = 630 # or 550
|
|
|
|
# REFERENCE_CAPACITY = 630 # or 550
|
|
|
|
# COST_PER_MWH = 1_000_000 # rupiah
|
|
|
|
# COST_PER_MWH = 1_000_000 # rupiah
|
|
|
|
|