Initialization of the deterministic simulation is made optional. Added an option for homotopic solution to deterministic models (not ready).
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1944 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
03a726c9bd
commit
eeb0bee292
|
@ -32,7 +32,7 @@ function global_initialization()
|
|||
options_.solve_tolf = eps^(1/3);
|
||||
options_.solve_tolx = eps^(2/3);
|
||||
options_.solve_maxit = 500;
|
||||
|
||||
options_.deterministic_simulation_initialization = 0;
|
||||
|
||||
% steady state file
|
||||
if exist([M_.fname '_steadystate'])
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
function make_y_
|
||||
% function make_y_
|
||||
% forms oo_.endo_simul as guess values for deterministic simulations
|
||||
|
@ -30,11 +29,11 @@ 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
|
||||
if size(oo_.exo_simul)
|
||||
switch options_.deterministic_simulation_initialization
|
||||
case 0
|
||||
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.
|
||||
oo_.steady_state*ones(1,M_.maximum_lag+options_.periods+M_.maximum_lead-size(oo_.endo_simul,2),1)];
|
||||
case 1% A linear approximation is used to initiate the solution.
|
||||
oldopt = options_;
|
||||
options_.order = 1;
|
||||
dr = oo_.dr;
|
||||
|
@ -44,5 +43,7 @@ function make_y_
|
|||
y0 = oo_.endo_simul(:,1:M_.maximum_lag);
|
||||
oo_.endo_simul=simult_(y0,dr,exogenous_variables,1);
|
||||
options_ = oldopt;
|
||||
case 2% Homotopic mod
|
||||
% Leave endo_simul as it is.
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue