Correction of a bug related to the previous commit (the initialization of the path is given by the solution of the first order approximation of the model iff there is no deterministic shocks).
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1704 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
48f23191fb
commit
1c1221681f
|
@ -31,17 +31,19 @@ function make_y_
|
|||
oo_.endo_simul = [ys0_*ones(1,M_.maximum_lag) oo_.steady_state*ones(1,options_.periods+M_.maximum_lead)];
|
||||
end
|
||||
elseif size(oo_.endo_simul,2) < M_.maximum_lag+M_.maximum_lead+options_.periods
|
||||
%% A linear approximation is used to initiate the solution.
|
||||
oldopt = options_;
|
||||
options_.order = 1;
|
||||
dr = oo_.dr;
|
||||
dr.ys = oo_.steady_state;
|
||||
[dr,info]=dr1(dr,0);
|
||||
|
||||
|
||||
|
||||
exogenous_variables = zeros(M_.maximum_lag+options_.periods+M_.maximum_lead-size(oo_.endo_simul,2)+1,0);
|
||||
y0 = oo_.endo_simul(:,1:M_.maximum_lag);
|
||||
oo_.endo_simul=simult_(y0,dr,exogenous_variables,1);
|
||||
options_ = oldopt;
|
||||
if size(oo_.exo_simul)
|
||||
oo_.endo_simul = [oo_.endo_simul ...
|
||||
oo_.steady_state*ones(1,M_.maximum_lag+options_.periods+M_.maximum_lead-size(oo_.endo_simul,2),1)];
|
||||
else
|
||||
%% A linear approximation is used to initiate the solution.
|
||||
oldopt = options_;
|
||||
options_.order = 1;
|
||||
dr = oo_.dr;
|
||||
dr.ys = oo_.steady_state;
|
||||
[dr,info]=dr1(dr,0);
|
||||
exogenous_variables = zeros(M_.maximum_lag+options_.periods+M_.maximum_lead-size(oo_.endo_simul,2)+1,0);
|
||||
y0 = oo_.endo_simul(:,1:M_.maximum_lag);
|
||||
oo_.endo_simul=simult_(y0,dr,exogenous_variables,1);
|
||||
options_ = oldopt;
|
||||
end
|
||||
end
|
|
@ -44,8 +44,8 @@ ct_=0;
|
|||
|
||||
if options_.simul_algo == 0
|
||||
if ~ options_.initval_file
|
||||
make_y_;
|
||||
make_ex_;
|
||||
make_ex_;
|
||||
make_y_;
|
||||
end
|
||||
|
||||
if isempty(options_.scalv) | options_.scalv == 0
|
||||
|
|
Loading…
Reference in New Issue