Missing argument in a function for Panel simulation

Hi! I was trying to run Model13 and came around this error:

Not enough input arguments.

Error in KronPolicyIndexes_FHorz_Case1 (line 29)
PolicyKron(:,:,:,jj)=KronPolicyIndexes_Case1(Policy(:,:,:,jj), n_d, n_a, n_z, simoptions);
^^^^^^^^^^
Error in SimPanelValues_FHorz_Case1 (line 221)
PolicyIndexesKron=KronPolicyIndexes_FHorz_Case1(Policy, n_d, n_a, n_z, N_j); % Create it here as want it both here and inside SimPanelIndexes_FHorz_Case1 (which will recognise that it is already in this form)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in LifeCycleModel13 (line 182)
SimPanelValues=SimPanelValues_FHorz_Case1(InitialDist,Policy,FnsToEvaluate,Params,,n_d,n_a,n_z,N_j,d_grid,a_grid,z_grid,pi_z,simoptions);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

So, seems like the empty “simoptions” argument should be there in the calling functions inside SimPanelValues_FHorz_Case1 (lines 208,2014,221), but for some reason there is not. Should I just add last arguments, or they should not be there for a reason?

Exactly the same problem for model16, model22.

1 Like

Hi Alex, thanks for letting me know. Fixed now. Just update to latest github.

(As part of implementing grid interpolation layer I have had to add simoptions/vfoptions to be a required input for the internal command KronPolicyIndexes_FHorz_Case1(), when previously it was not, and had missed updating this instance. Made a few other changes while I was in there, but they are just about making the internals easier to read.)

PS. Realized that SimPanelValues does not yet work with grid interpolation layer. I need to go implement this as it would be useful.

1 Like