Skip to content

Commit 9818ae7

Browse files
committed
add missing time costs associated with argo float and drifter deployments
1 parent b9d53c9 commit 9818ae7

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/virtualship/expedition/simulate_schedule.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@ def _make_measurements(self, waypoint: Waypoint) -> timedelta:
280280
drift_days=self._expedition.instruments_config.argo_float_config.drift_days,
281281
)
282282
)
283+
# TODO: would be good to avoid having to twice make sure that stationkeeping time is factored in; i.e. in schedule validity checks and here (and for CTDs and Drifters)
284+
# TODO: makes it easy to forget to update both...
285+
# TODO: this is likely to fall under refactoring simulate_schedule.py (i.e. #236)
286+
time_costs.append(
287+
self._expedition.instruments_config.argo_float_config.stationkeeping_time
288+
)
283289

284290
elif instrument is InstrumentType.CTD:
285291
self._measurements_to_simulate.ctds.append(
@@ -314,6 +320,10 @@ def _make_measurements(self, waypoint: Waypoint) -> timedelta:
314320
lifetime=self._expedition.instruments_config.drifter_config.lifetime,
315321
)
316322
)
323+
time_costs.append(
324+
self._expedition.instruments_config.drifter_config.stationkeeping_time
325+
)
326+
317327
elif instrument is InstrumentType.XBT:
318328
self._measurements_to_simulate.xbts.append(
319329
XBT(
@@ -327,5 +337,7 @@ def _make_measurements(self, waypoint: Waypoint) -> timedelta:
327337
else:
328338
raise NotImplementedError("Instrument type not supported.")
329339

330-
# measurements are done in parallel, so return time of longest one
340+
# measurements are done simultaneously onboard, so return time of longest one
341+
# TODO: docs suggest that add individual instrument stationkeeping times are cumulative, which is at odds with measurements being done simultaneously onboard here
342+
# TODO: update one or the other?
331343
return max(time_costs)

0 commit comments

Comments
 (0)