Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions quantecon/_robustlq.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@ def __init__(self, Q, R, A, B, C, beta, theta):
self.beta, self.theta = beta, theta
# == Check for case of no control (pure forecasting problem) == #
self.pure_forecasting = True if not Q.any() and not B.any() else False

def __repr__(self):
return self.__str__()

def __str__(self):

m = """\
Robust linear quadratic control system
- beta (discount parameter) : {b}
Expand All @@ -83,9 +79,15 @@ def __str__(self):
- k (number of control variables) : {k}
- j (number of shocks) : {j}
"""
return dedent(m.format(b=self.beta, n=self.n, k=self.k, j=self.j,
self._str_repr = dedent(m.format(b=self.beta, n=self.n, k=self.k, j=self.j,
th=self.theta))

def __repr__(self):
return self.__str__()

def __str__(self):
return self._str_repr

def d_operator(self, P):
r"""
The D operator, mapping P into
Expand Down