ConsMedModel using shocks namespace.
@@ -760,7 +760,7 @@ class MedShockConsumerType(PersistentShockConsumerType):
if N > 0:
MedShkNow[these] = self.MedShkDstn[t].drawDiscrete(N)
MedPriceNow[these] = self.MedPrice[t]
- self.MedShkNow = MedShkNow
+ self.shocks['MedShkNow'] = MedShkNow
self.MedPriceNow = MedPriceNow
def getControls(self):
@@ -780,7 +780,9 @@ class MedShockConsumerType(PersistentShockConsumerType):
MedNow = np.zeros(self.AgentCount) + np.nan
for t in range(self.T_cycle):
these = t == self.t_cycle
- cLvlNow[these], MedNow[these] = self.solution[t].policyFunc(self.mLvlNow[these],self.pLvlNow[these],self.MedShkNow[these])
+ cLvlNow[these], MedNow[these] = self.solution[t].policyFunc(
+ self.mLvlNow[these],self.pLvlNow[these],self.shocks['MedShkNow'][these]
+ )
self.cLvlNow = cLvlNow
self.MedNow = MedNow
return None
