Esempio n. 1
0
 def testLqrSolve(self):
     dim, T = 2, 10
     p = one_step_lqr(dim, T)
     K, k = control.lqr_solve(p)
     K_ = -jnp.stack(T * (jnp.eye(dim), ))
     np.testing.assert_allclose(K, K_, atol=1e-6, rtol=1e-6)
     np.testing.assert_allclose(k, jnp.zeros((T, dim)))
Esempio n. 2
0
 def testLqrSolve(self):
   dim, T = 2, 10
   p = one_step_lqr(dim, T)
   K, k = control.lqr_solve(p)
   K_ = -jnp.stack(T * (jnp.eye(dim),))
   self.assertAllClose(K, K_, check_dtypes=True, atol=1e-6, rtol=1e-6)
   self.assertAllClose(k, jnp.zeros((T, dim)), check_dtypes=True)