change k for exp risk cost

main
Cizz22 3 months ago
parent b5a601ebbe
commit 7bbec54477

@ -825,11 +825,11 @@ async def get_calculation_result(db_session: DbSession, calculation_id: str, tok
# doing. It could be used to store monthly metrics for a plant, calculate metrics, or perform
# some other operation related to plant data.
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)
total_simulation_period = int((plant_monthly_metrics['total_downtime'] + plant_monthly_metrics['total_uptime'])/720)
loss_production_per_month = np.arange(0, scope_calculation.max_interval)
k = 4
loss_exp = (plant_monthly_metrics['total_downtime'] * 660 * 500_000) * (np.exp(k * (loss_production_per_month / scope_calculation.max_interval)) - 1) / (np.exp(k) - 1)
loss_production_per_month = np.arange(0, total_simulation_period)
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)
# REFERENCE_CAPACITY = 630 # or 550
# COST_PER_MWH = 1_000_000 # rupiah

Loading…
Cancel
Save