Skip to content

Commit 39958d8

Browse files
authored
handle msging for for in port problems (#302)
1 parent f56e5e8 commit 39958d8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/virtualship/models/checkpoint.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ def verify(self, expedition: Expedition, problems_dir: Path) -> None:
167167
if problem["problem_waypoint_i"] is not None
168168
else new_schedule.waypoints[0].time
169169
)
170-
current_time = problem_waypoint.time + time_elapsed
170+
current_time = (
171+
problem_waypoint.time + time_elapsed
172+
if problem["problem_waypoint_i"] is not None
173+
else self.past_schedule.waypoints[0].time + time_elapsed
174+
)
171175

172176
raise CheckpointError(
173177
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"

0 commit comments

Comments
 (0)