def test_WaitingTime_combined_window_strategy_optimise(metocean_synth): test = WaitingTime(metocean_synth) test.set_optimise_delay(True) olc = {'maxHs': 0.5, 'maxTp': 0.5, 'maxWs': 0.5, 'maxCs': 0.5} windows = test.get_weather_windows(olc) start_date = dt.datetime(2000, 1, 1) start_delay, waiting_time = test._combined_window_strategy( windows, start_date, 24) assert np.isclose(start_delay, 6.) assert np.isclose(waiting_time, 732.0) # 30 days, 12 hours
def test_WaitingTime_set_optimise_delay(metocean): test = WaitingTime(metocean) test.set_optimise_delay(True) assert test._optimise_delay