Commit 4fa7ed9c authored by Selma Malmberg's avatar Selma Malmberg
Browse files

Use of the compute_decision_rules function to factorize code (Ref.#173)

Corrections: put resol back where needed.

Use of the compute_decision_rules function to factorize code (Ref.#1173)
parent de4c06b3
Pipeline #5334 canceled with stages
in 2 minutes and 52 seconds
......@@ -142,7 +142,7 @@ for file = 1:NumberOfDrawsFiles
dr = temp.pdraws{linee,2};
else
M_=set_parameters_locally(M_,temp.pdraws{linee,1});
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_)
end
if first_call
endo_nbr = M_.endo_nbr;
......
......@@ -115,7 +115,7 @@ for file = 1:NumberOfDrawsFiles
dr = temp.pdraws{linee,2};
else
M_=set_parameters_locally(M_,temp.pdraws{linee,1});
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_);
end
if ~options_.pruning
tmp = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
......
......@@ -113,7 +113,7 @@ for file = 1:NumberOfDrawsFiles
dr = temp.pdraws{linee,2};
else
M_=set_parameters_locally(M_,temp.pdraws{linee,1});
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_);
end
if ~options_.pruning
tmp = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
......
......@@ -141,7 +141,7 @@ for file = 1:NumberOfDrawsFiles
dr = temp.pdraws{linee,2};
else
M_=set_parameters_locally(M_,temp.pdraws{linee,1});
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_);
end
if file==1 && linee==1
[tmp, stationary_vars] = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
......
......@@ -133,7 +133,7 @@ no_identification_minimal = options_ident.no_identification_minimal;
no_identification_spectrum = options_ident.no_identification_spectrum;
%Compute linear approximation and fill dr structure
[oo_.dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
[oo_.dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_);
if info(1) == 0 %no errors in solution
% Compute parameter Jacobians for identification analysis
......
......@@ -48,7 +48,7 @@ steady_;
% Compute the first order perturbation reduced form.
old_options_order = options_.order; options_.order = 1;
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_);
oo_.dr = dr;
options_.order = old_options_order;
......
......@@ -142,7 +142,7 @@ if info
pdraws(linee,1) = {x2(SampleAddress(i,4),:)};
if info-1
set_parameters(pdraws{linee,1});
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_);
pdraws(linee,2) = { dr };
end
old_mhfile = mhfile;
......
......@@ -71,7 +71,7 @@ else
logged_steady_state_indicator=0;
end
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_);
oo_.dr=dr;
if info(1)
fprintf('\nsimulated_moment_uncertainty: model could not be solved')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment