Open
Description
Π = np.array([[0.8, 0.2],
[0.2, 0.8]])
Qs = np.array([[[0.9409]], [[0.870489]]])
Rs = np.array([[[1., 0., 1.],
[0., 0., 0.],
[1., 0., 1.]],
[[1., 0., 1.],
[0., 0., 0.],
[1., 0., 1.]]])
Ns = np.array([[[-0.97, 0., -0.97]],
[[-0.933, 0., -0.933]]])
As = np.array([[[0., 0., 0.],
[0., 1., 0.],
[0., 5., 0.8]],
[[0., 0., 0.],
[0., 1., 0.],
[0., 5., 0.8]]])
B = np.array([[1., 0., 0.]]).T
Bs = [B, B]
C = np.array([[0., 0., 1.]]).T
Cs = [C, C]
lq_markov_mat1 = qe.LQMarkov(Π, Qs, Rs, As, Bs,
Cs=Cs, Ns=Ns, beta=1.)
lq_markov_mat1.stationary_values()
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-15-022c46ef29a8> in <module>
----> 1 lq_markov_mat1.stationary_values()
/usr/local/lib/python3.7/site-packages/quantecon/lqcontrol.py in stationary_values(self)
506
507 # == Solve for P(s) by iterating discrete riccati system== #
--> 508 Ps = solve_discrete_riccati_system(Π, As, Bs, Cs, Qs, Rs, Ns, beta)
509
510 # == calculate F and d == #
/usr/local/lib/python3.7/site-packages/quantecon/matrix_eqn.py in solve_discrete_riccati_system(Π, As, Bs, Cs, Qs, Rs, Ns, beta, tolerance, max_iter)
290
291 if iteration > max_iter:
--> 292 raise ValueError(fail_msg.format(max_iter))
293
294 else:
ValueError: Convergence failed after 1000 iterations.