Skip to content
Snippets Groups Projects
Commit 360ff489 authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

updated pyfuga-tests to match new no_hours_pr_year

parent 8677fd97
No related branches found
No related tags found
1 merge request!94Handle disabled mpi
...@@ -65,20 +65,20 @@ class Test(unittest.TestCase): ...@@ -65,20 +65,20 @@ class Test(unittest.TestCase):
def testAEP_one_tb(self): def testAEP_one_tb(self):
if self.lib_missing(): return if self.lib_missing(): return
pyFuga = self.get_fuga([0], [0]) pyFuga = self.get_fuga([0], [0])
np.testing.assert_array_almost_equal(pyFuga.get_aep(np.array([[0], [0]]).T), [7.44121, 7.44121, 0.424962, 1.]) np.testing.assert_array_almost_equal(pyFuga.get_aep(np.array([[0], [0]]).T), [7.450272, 7.450272, 0.424962, 1.])
pyFuga.cleanup() pyFuga.cleanup()
def testAEP(self): def testAEP(self):
if self.lib_missing(): return if self.lib_missing(): return
pyFuga = self.get_fuga() pyFuga = self.get_fuga()
np.testing.assert_array_almost_equal(pyFuga.get_aep(np.array([[0, 200], [0, 0]]).T), [14.848055, 14.882419, 0.423981, 0.997691]) np.testing.assert_array_almost_equal(pyFuga.get_aep(np.array([[0, 200], [0, 0]]).T), [14.866138, 14.900544, 0.423981, 0.997691])
np.testing.assert_array_almost_equal(pyFuga.get_aep_gradients(np.array([[0, 200], [0, 0]]).T), 0) np.testing.assert_array_almost_equal(pyFuga.get_aep_gradients(np.array([[0, 200], [0, 0]]).T), 0)
np.testing.assert_array_almost_equal(pyFuga.get_aep(np.array([[0, 0], [0, 200]]).T), [12.110134, 14.882419, 0.3458, 0.813721]) np.testing.assert_array_almost_equal(pyFuga.get_aep(np.array([[0, 0], [0, 200]]).T), [12.124883, 14.900544, 0.3458, 0.813721])
np.testing.assert_array_almost_equal(pyFuga.get_aep_gradients(np.array([[0, 0], [0, 200]]).T), [[-0.001792, 0.001792], np.testing.assert_array_almost_equal(pyFuga.get_aep_gradients(np.array([[0, 0], [0, 200]]).T), [[-0.001794, 0.001794],
[-0.008116, 0.008116], [-0.008126, 0.008126],
[0., 0.]]) [0., 0.]])
np.testing.assert_array_almost_equal(pyFuga.get_aep(np.array([[0, 200], [0, 200]]).T), [14.846827, 14.882419, 0.423946, 0.997608]) np.testing.assert_array_almost_equal(pyFuga.get_aep(np.array([[0, 200], [0, 200]]).T), [14.864909, 14.900544, 0.423946, 0.997608])
np.testing.assert_array_almost_equal(pyFuga.get_aep_gradients(np.array([[0, 200], [0, 200]]).T), [[-5.165553e-06, 5.165553e-06], np.testing.assert_array_almost_equal(pyFuga.get_aep_gradients(np.array([[0, 200], [0, 200]]).T), [[-5.165553e-06, 5.165553e-06],
[1.599768e-06, -1.599768e-06], [1.599768e-06, -1.599768e-06],
[0.000000e+00, 0.000000e+00]]) [0.000000e+00, 0.000000e+00]])
......
Subproject commit 63d550ac397e2058fc278ecf1488323440a786fc Subproject commit 41cdbf9403170ce0f132f226fa7dab0d4d12b894
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment