econ-ark/HARK

CobbDouglasEconomy can't accept track_vars (and other) parameter override

Closed this issue · 0 comments

Describe the bug
It does not seem possible to override the parameter track_vars, among others, in the CobbDouglasEconomy.
Setting it after initializing would not work because it wouldn't initialize the reap_state correctly, I think. This might be what is creating a lot of issues downstream in the update to cstwMPC.

To Reproduce

In [1]: from HARK.ConsumptionSaving.ConsAggShockModel import CobbDouglasEconomy

In [2]: econ = CobbDouglasEconomy(track_vars=["aNrm"])
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[2], line 1
----> 1 econ = CobbDouglasEconomy(track_vars=["aNrm"])

File ~\GitHub\alanlujan91\HARK\HARK\ConsumptionSaving\ConsAggShockModel.py:1913, in CobbDouglasEconomy.__init__(self, agents, tolerance, act_T, **kwds)
   1902 params["sow_vars"] = [
   1903     "MaggNow",
   1904     "AaggNow",
   (...)
   1909     "KtoLnow",
   1910 ]
   1911 params.update(kwds)
-> 1913 Market.__init__(
   1914     self,
   1915     agents=agents,
   1916     reap_vars=["aLvl", "pLvl"],
   1917     track_vars=["MaggNow", "AaggNow"],
   1918     dyn_vars=["AFunc"],
   1919     tolerance=tolerance,
   1920     act_T=act_T,
   1921     **params
   1922 )
   1923 self.update()
   1925 # Use previously hardcoded values for AFunc updating if not passed
   1926 # as part of initialization dictionary.  This is to prevent a last
   1927 # minute update to HARK before a release from having a breaking change.

TypeError: HARK.core.Market.__init__() got multiple values for keyword argument 'track_vars'