fixing Params usage in example_ConsRepAgentModel
"from time import time\n",
"import numpy as np\n",
"from HARK.utilities import plotFuncs\n",
- "import HARK.ConsumptionSaving.ConsumerParameters as Params\n",
+ "from HARK.ConsumptionSaving.ConsIndShockModel import (\n",
+ " init_idiosyncratic_shocks\n",
+ ")\n",
+ "\n",
"from HARK.ConsumptionSaving.ConsRepAgentModel import (\n",
" RepAgentConsumerType,\n",
" RepAgentMarkovConsumerType,\n",
"outputs": [],
"source": [
"# Make a quick example dictionary\n",
- "RA_params = deepcopy(Params.init_idiosyncratic_shocks)\n",
+ "RA_params = deepcopy(init_idiosyncratic_shocks)\n",
"RA_params[\"DeprFac\"] = 0.05\n",
"RA_params[\"CapShare\"] = 0.36\n",
"RA_params[\"UnempPrb\"] = 0.0\n",
"name": "stdout",
"output_type": "stream",
"text": [
- "Solving a representative agent problem took 0.2792696952819824 seconds.\n"
+ "Solving a representative agent problem took 0.13683128356933594 seconds.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
- "Simulating a representative agent for 2000 periods took 9.091149091720581 seconds.\n"
+ "Simulating a representative agent for 2000 periods took 2.0891530513763428 seconds.\n"
]
}
],
"name": "stdout",
"output_type": "stream",
"text": [
- "Solving a two state representative agent problem took 0.7686238288879395 seconds.\n"
+ "Solving a two state representative agent problem took 0.4116179943084717 seconds.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
- "Simulating a two state representative agent for 2000 periods took 9.762195110321045 seconds.\n"
+ "Simulating a two state representative agent for 2000 periods took 2.3863446712493896 seconds.\n"
]
}
],
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.7.5"
+ "version": "3.6.9"
}
},
"nbformat": 4,
