diff --git a/src/calculation_time_constrains/service.py b/src/calculation_time_constrains/service.py index f054328..9b02e55 100644 --- a/src/calculation_time_constrains/service.py +++ b/src/calculation_time_constrains/service.py @@ -809,21 +809,21 @@ async def get_calculation_result(db_session: DbSession, calculation_id: str, tok 'critical_procurement_items': 0 } - plant_monthly_metrics = await plant_simulation_metrics(simulation_id=scope_calculation.rbd_simulation_id, location_tag="plant", use_location_tag=0, token=token, last_oh_date=prev_oh_scope.end_date, max_interval=scope_calculation.max_interval) + # plant_monthly_metrics = await plant_simulation_metrics(simulation_id=scope_calculation.rbd_simulation_id, location_tag="plant", use_location_tag=0, token=token, last_oh_date=prev_oh_scope.end_date, max_interval=scope_calculation.max_interval) - REFERENCE_CAPACITY = 630 # or 550 - COST_PER_MWH = 1_000_000 # rupiah + # REFERENCE_CAPACITY = 630 # or 550 + # COST_PER_MWH = 1_000_000 # rupiah - plant_capacity_loss_money = [metrics['derated_mwh'] * COST_PER_MWH for metrics in plant_monthly_metrics.values()] - # cumulative_loss_money = np.cumsum(plant_capacity_loss_money) + # plant_capacity_loss_money = [metrics['derated_mwh'] * COST_PER_MWH for metrics in plant_monthly_metrics.values()] + # # cumulative_loss_money = np.cumsum(plant_capacity_loss_money) - # raise Exception(plant_monthly_metrics) + # # raise Exception(plant_monthly_metrics) # Process each monthself for month_index in range(data_num): month_result = { "overhaul_cost": 0.0, - "corrective_cost": plant_capacity_loss_money[month_index], + "corrective_cost": 0.0, "procurement_cost": 0.0, "num_failures": 0.0, "day": month_index + 1,