class TestRunWindTurbine(unittest.TestCase):
@classmethod
def setUpClass(cls):
pass
def test_run_s_0538_03(self):
# file = "testfiles" + sep + "data" + sep + "ga" + sep + "WindTurbine"+sep+"ga--1362.401-s003-4x3-m005-WT0538-bddf277b0f729cc630efacf91b9f494f.properties"
file = "testfiles" + sep + "WindTurbine"+sep+"ga--1362.401-s003-4x3-m005-WT0538-bddf277b0f729cc630efacf91b9f494f.properties"
timer = Timer()
timer.start()
_, score = PCTHierarchy.run_from_file(file, env_props=None, seed=1, render=False, move=None, min=True, history=False,
hpct_verbose= False, runs=None, plots_dir=None, early_termination=False)
print(f'Score={score:0.3f}')
timer.stop()
print(f'Mean time: {timer.mean()}')
self.assertAlmostEqual(score, -1362.401471117955 )
def test_run_v_0416_01(self):
# file = "testfiles" + sep + "data" + sep + "ga" + sep + "WindTurbine"+sep+ "ga--2629.009-s001-5x5-m002-WT0416-31ecb19201d49e8c6f9dd1e172bd6944.properties"
file = "testfiles" + sep + "WindTurbine"+sep+ "ga--2629.009-s001-5x5-m002-WT0416-31ecb19201d49e8c6f9dd1e172bd6944.properties"
timer = Timer()
timer.start()
_, score = PCTHierarchy.run_from_file(file, env_props=None, seed=1, render=False, move=None, min=True, history=False,
hpct_verbose= False, runs=None, plots_dir=None, early_termination=False)
print(f'Score={score:0.3f}')
timer.stop()
print(f'Mean time: {timer.mean()}')
self.assertAlmostEqual(score, -2629.008509888531 )