From 87408680d9df270aa72923e0fb33d398fe5067ed Mon Sep 17 00:00:00 2001 From: Cizz22 Date: Fri, 19 Dec 2025 16:09:34 +0700 Subject: [PATCH] fix handle more than oh --- src/aeros_simulation/router.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/aeros_simulation/router.py b/src/aeros_simulation/router.py index 57869d3..6a8253f 100644 --- a/src/aeros_simulation/router.py +++ b/src/aeros_simulation/router.py @@ -149,6 +149,7 @@ async def run_yearly_simulation( {"sim_start": sim_start.date()} )).mappings().first() + if last_overhaul: last_oh_dt = date_to_utc(last_overhaul["end_date"]) @@ -157,6 +158,13 @@ async def run_yearly_simulation( 0 ) + if offset_hours > 17520: + offset_hours -= 17520 + + + overhaul_interval = 8760 * 2 + overhaul_duration = 1200 + if next_overhaul: next_oh_start = date_to_utc(next_overhaul["start_date"])