Hi friends,
I’m starting my journey with the VFI Toolkit. I tried the BasicRealBusinessCycleModel.m
example and got the following error:
>> BasicRealBusinessCycleModel
No vfoptions given, using defaults
Starting parallel pool (parpool) using the 'Processes' profile ...
Connected to the parallel pool (number of workers: 4).
Analyzing and transferring files to the workers ...done.
Error using BasicRealBusinessCycleModel>@(d_val,aprime_val,a_val,s_val,alpha,delta,theta,tau)BasicRealBusinessCycleModel_ReturnFn(d_val,aprime_val,a_val,s_val,alpha,delta,theta,tau)
An UndefinedFunction error was thrown on the workers for
'BasicRealBusinessCycleModel_ReturnFn'. This might be because the file containing
'BasicRealBusinessCycleModel_ReturnFn' is not accessible on the workers. Use
addAttachedFiles(pool, files) to specify the required files to be attached. For more
information, see the documentation for 'parallel.Pool/addAttachedFiles'.
Error in CreateReturnFnMatrix_Case1_Disc (line 91)
parfor i4=1:N_z
Error in ValueFnIter_Case1_Refine (line 18)
ReturnMatrix=CreateReturnFnMatrix_Case1_Disc(ReturnFn, n_d, n_a, n_z, d_grid, a_grid, z_grid, vfoptions.parallel, ReturnFnParamsVec);
Error in ValueFnIter_Case1 (line 629)
[VKron,Policy]=ValueFnIter_Case1_Refine(V0,n_d,n_a,n_z,d_grid,a_grid,z_grid,pi_z,ReturnFn,ReturnFnParamsVec,DiscountFactorParamsVec,vfoptions);
Error in BasicRealBusinessCycleModel (line 56)
[V,Policy]=ValueFnIter_Case1(n_d,n_a,n_z,d_grid,a_grid,z_grid, pi_z, ReturnFn, Params, DiscountFactorParamNames,[]);
Caused by:
Undefined function 'BasicRealBusinessCycleModel_ReturnFn' for input arguments of type
'double'.
Any ideas on what’s happening?
Cheers!