def __init__(self, cycles=1, time_flow=True, **kwds): ''' Instantiate a new ConsumerType with given data. See ConsumerParameters.init_idiosyncratic_shocks for a dictionary of the keywords that should be passed to the constructor. Parameters ---------- cycles : int Number of times the sequence of periods should be solved. time_flow : boolean Whether time is currently "flowing" forward for this instance. Returns ------- None ''' # Initialize a basic AgentType IndShockConsumerType.__init__(self, cycles=cycles, time_flow=time_flow, **kwds) # Add consumer-type specific objects, copying to create independent versions self.solveOnePeriod = solvePrefLaborShock # idiosyncratic shocks solver self.update() # Make assets grid, income process, terminal solution
def __init__(self,time_flow=True,**kwds): ''' Make a new instance of a representative agent. Parameters ---------- time_flow : boolean Whether time is currently "flowing" forward for this instance. Returns ------- None ''' IndShockConsumerType.__init__(self,cycles=0,time_flow=time_flow,**kwds) self.AgentCount = 1 # Hardcoded, because this is rep agent self.solveOnePeriod = solveConsRepAgent self.delFromTimeInv('Rfree','BoroCnstArt','vFuncBool','CubicBool')
def __init__(self,cycles=1,time_flow=True,**kwds): ''' Instantiate a new ConsumerType with given data, and construct objects to be used during solution (income distribution, assets grid, etc). See ConsumerParameters.init_pref_shock for a dictionary of the keywords that should be passed to the constructor. Parameters ---------- cycles : int Number of times the sequence of periods should be solved. time_flow : boolean Whether time is currently "flowing" forward for this instance. Returns ------- None ''' IndShockConsumerType.__init__(self,**kwds) self.solveOnePeriod = solveConsPrefShock # Choose correct solver
def __init__(self, cycles=1, time_flow=True, **kwds): ''' Instantiate a new ConsumerType with given data, and construct objects to be used during solution (income distribution, assets grid, etc). See ConsumerParameters.init_pref_shock for a dictionary of the keywords that should be passed to the constructor. Parameters ---------- cycles : int Number of times the sequence of periods should be solved. time_flow : boolean Whether time is currently "flowing" forward for this instance. Returns ------- None ''' IndShockConsumerType.__init__(self, **kwds) self.solveOnePeriod = solveConsPrefShock # Choose correct solver
def __init__(self,cycles=1,time_flow=True,**kwds): IndShockConsumerType.__init__(self,cycles=1,time_flow=True,**kwds) self.solveOnePeriod = solveConsMarkov