I’m running a code that I had written a few months ago (infinite horizon with entrepreneuers). The setup is very basic: the state space is (a,z1,z2,age), z1 and z2 are two Markov shocks and I use joint grids to avoid solving the model for all combinations of z1,z2 and age.
As far I rember the code was working back then, but now it returns with this error message when I call the toolkit function EvalFnOnAgentDist_ValuesOnGrid_Case1:
Not enough input arguments.
Error in PolicyInd2Val_Case1 (line 71)
if isfield(simoptions,'n_e')
^^^^^^^^^^
Error in EvalFnOnAgentDist_AllStats_Case1 (line 82)
PolicyValues=PolicyInd2Val_Case1(PolicyIndexes,n_d,n_a,n_z,d_grid,a_grid);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in solve_toolkit (line 192)
AllStats=EvalFnOnAgentDist_AllStats_Case1(StationaryDist,Policy,FnsToEvaluate,...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I’m surprised about the error since I am not using any “e” variable
Not enough input arguments.
Error in PolicyInd2Val_Case1 (line 71)
if isfield(simoptions,'n_e')
^^^^^^^^^^
Error in EvalFnOnAgentDist_AllStats_Case1 (line 82)
PolicyValues=PolicyInd2Val_Case1(PolicyIndexes,n_d,n_a,n_z,d_grid,a_grid);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fixed. (is about adding simoptions as input to PolicyInd2Val, as PolicyInd2Val didn’t use to need it but I added features to PolicyInd2Val and now it does need it).
It actually opens a parallel pool without really using it. Not a big problem, but opening a parallel pool the first time slows down the code (with finite horizon it does not happen)