Changeset 13819


Ignore:
Timestamp:
Oct 23, 2019 12:59:25 PM (4 weeks ago)
Author:
randersson
Message:

#5819 Updated relative tolerance in test from 1e-7 (default) to 1e-6 due to updates in both python and assimulo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-5819/Python/src/tests_jmodelica/test_ukf.py

    r13775 r13819  
    280280       
    281281        #Assert predicted mean and measurement
    282         N.testing.assert_allclose(xp, [[1.00988634], [0.0172094]])
    283         N.testing.assert_allclose(yp, N.array([[1.00988634]]))
     282        N.testing.assert_allclose(xp, [[1.00988634], [0.0172094]], rtol=1e-6)
     283        N.testing.assert_allclose(yp, N.array([[1.00988634]]), rtol=1e-6)
    284284       
    285285        #Assert covariance and gain
    286         N.testing.assert_allclose(K, [[0.99995099], [0.00497003]])
     286        N.testing.assert_allclose(K, [[0.99995099], [0.00497003]], rtol=1e-6)
    287287        N.testing.assert_allclose(P, [[1.00099995e-01, 4.97003235e-07],
    288                               [4.97003235e-07, 1.00115269e+00]])
     288                              [4.97003235e-07, 1.00115269e+00]], rtol=1e-6)
    289289   
    290290    def test_predict_public(self):
     
    295295        self.ukf.predict(u, known_values)
    296296        #Assert predicted mean and measurement
    297         N.testing.assert_allclose(self.ukf.xp, [[1.00988634], [0.0172094]])
    298         N.testing.assert_allclose(self.ukf.yp, [[1.00988634]])
     297        N.testing.assert_allclose(self.ukf.xp, [[1.00988634], [0.0172094]], rtol=1e-6)
     298        N.testing.assert_allclose(self.ukf.yp, [[1.00988634]], rtol=1e-6)
    299299       
    300300        #Assert covariance and gain
    301         N.testing.assert_allclose(self.ukf.K, [[0.99995099], [0.00497003]])
     301        N.testing.assert_allclose(self.ukf.K, [[0.99995099], [0.00497003]], rtol=1e-6)
    302302        N.testing.assert_allclose(self.ukf.P, [[1.00099995e-01, 4.97003235e-07],
    303                                        [4.97003235e-07, 1.00115269e+00]])
     303                                       [4.97003235e-07, 1.00115269e+00]], rtol=1e-6)
Note: See TracChangeset for help on using the changeset viewer.