Investigate bug in perfect foresight simulations in unstable
The user at http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=7765 reports the following mod-file
%% CODE TO SIMULATE LOGISTIC MAP
%% DECLARATION OF ENDOGENOUS VARIABLES
var x;
parameters r s;
r=3.8;
s=0;
model;
x = r*x(-1)*(1 - x(-1)) + s*x(+1);
end;
initval;
x = 0.1;
end;
check;
%% DETERMINISTIC SIMULATION
simul(periods = 40, stack_solve_algo=0, maxit=100);
dsample 40;
rplot x;
With the unstable version, it crashes with
Subscripted assignment dimension mismatch.
Error in sim1 (line 108)
iA((1:length(v))+m,:) = [i_rows(r),i_cols_A1(c),v];
When I replace the parameter s in the model by 0, it runs as expected. But when I replace s by 0.1, there again is the same crash.