From 32415973ea13c33d638630fb922100101b924b13 Mon Sep 17 00:00:00 2001 From: j-atkins <106238905+j-atkins@users.noreply.github.com> Date: Wed, 4 Mar 2026 10:15:59 +0100 Subject: [PATCH] handle msging for for in port problems --- src/virtualship/models/checkpoint.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/virtualship/models/checkpoint.py b/src/virtualship/models/checkpoint.py index 700c714f..ce620af1 100644 --- a/src/virtualship/models/checkpoint.py +++ b/src/virtualship/models/checkpoint.py @@ -167,7 +167,11 @@ def verify(self, expedition: Expedition, problems_dir: Path) -> None: if problem["problem_waypoint_i"] is not None else new_schedule.waypoints[0].time ) - current_time = problem_waypoint.time + time_elapsed + current_time = ( + problem_waypoint.time + time_elapsed + if problem["problem_waypoint_i"] is not None + else self.past_schedule.waypoints[0].time + time_elapsed + ) raise CheckpointError( f"The problem encountered in previous simulation has not been resolved in the schedule! Please adjust the schedule to account for delays caused by the problem (by using `virtualship plan` or directly editing the {EXPEDITION} file).\n\n"