Skip to content

Commit

Permalink
add perfect forecat case to RBLQ
Browse files Browse the repository at this point in the history
  • Loading branch information
szokeb87 committed Oct 21, 2017
1 parent 899358f commit 05cbb3c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions quantecon/robustlq.py
Expand Up @@ -75,10 +75,7 @@ def __init__(self, Q, R, A, B, C, beta, theta):
# == Remaining parameters == #
self.beta, self.theta = beta, theta
# == Check for case of no control (pure forecasting problem) == #
if not Q.any() and not B.any():
self.pure_forecasting = True
else:
self.pure_forecasting = False
self.pure_forecasting = True if not Q.any() and not B.any() else False

def __repr__(self):
return self.__str__()
Expand Down Expand Up @@ -191,6 +188,7 @@ def robust_rule(self):
# == Set up LQ version == #
I = identity(j)
Z = np.zeros((k, j))

if self.pure_forecasting:
lq = LQ(-beta*I*theta, R, A, C, beta=beta)

Expand Down

0 comments on commit 05cbb3c

Please sign in to comment.