From 05cbb3c00fdb9aa08c5a86e7046ad6b21dbc2ea7 Mon Sep 17 00:00:00 2001 From: Balint Date: Sat, 21 Oct 2017 17:23:06 -0400 Subject: [PATCH] add perfect forecat case to RBLQ --- quantecon/robustlq.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/quantecon/robustlq.py b/quantecon/robustlq.py index 119e2aded..e647b18bf 100644 --- a/quantecon/robustlq.py +++ b/quantecon/robustlq.py @@ -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__() @@ -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)