I am working through the Aiyagiri example and it ran fine (if a bit slowly). Now I am trying to extend it by endogenizing labour. The issue here is that the R and Q matrices become too large (I think) and as a result python keeps throwing a memory error after a couple of iterations.
I am using python 64 bit on a 64 bit machine. I have 8 GB of Ram. I am using windows 10.
I have modified the code to be that it iterates through a range of r_values to get the equilibrium level of interest rate and capital stock. I read an issue with the discrete DP quant econ package that for larger problems the fact that we need to specify R and Q before hand could prove to be to be too memory intensive (ref: https://github.com/QuantEcon/QuantEcon.py/issues/185). I am not sure if this was fixed or not.
At this point I am contemplating if coding it all from scratch would prove to be a better option. Something along the lines of this: https://lectures.quantecon.org/py/optgrowth.html
Would slightly complicated to code up but I feel like it won’t be as memory intensive? I am going to try it today, but I was wondering if anyone else had any tips here which may save me some unnecessary effort.
Thank you to anyone who might reply.