DynareJulia - “LoadError: InexactError: Int64(NaN)”

Hi! I was computing the transition path in the perfect foresight Solow growth model from a given initial capital stock, and keep getting “LoadError: InexactError: Int64(NaN)” when I tried to run the .mod file in Julia. I can’t figure out what went wrong given that the code is so simple (please see below). Can someone help me out here? Many many thanks!


var k;

parameters alpha, delta, s;

alpha = 1/3;
delta = 0.05;
s = 0.1;

model;
k = (1-s)*k(-1)^alpha + (1-delta)*k(-1);
end;

steady_state_model;
k = (delta/(1-s))^(1/(alpha-1));
end;

histval;
k(0) = 1.0;
end;

perfect_foresight_setup(periods = 300);
perfect_foresight_solver;

@MichelJuillard may be able to help.

Please, see the answer here: Dynare - "LoadError: InexactError: Int64(NaN)" for the simplest model - #6 by MichelJuillard - Finance and Economics - JuliaLang

Many thanks!