From e6b03df6429333a2b3fa70d0d6f20e8ace0145e8 Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Tue, 3 Mar 2020 11:45:38 +0100 Subject: [PATCH] gui: added fields to `oo_` to indicate which commands have been run (cherry picked from commit eb6ab0696a3046f3a87f96fa5e8c0b2f8f3ec131) --- matlab/dynare_estimation.m | 4 +++- matlab/evaluate_smoother.m | 3 ++- matlab/global_initialization.m | 7 +++++++ matlab/perfect-foresight-models/perfect_foresight_solver.m | 5 ++++- matlab/realtime_shock_decomposition.m | 3 ++- matlab/shock_decomposition.m | 4 +++- matlab/stoch_simul.m | 2 ++ 7 files changed, 23 insertions(+), 5 deletions(-) diff --git a/matlab/dynare_estimation.m b/matlab/dynare_estimation.m index 571ea4d2ad..9e99531d06 100644 --- a/matlab/dynare_estimation.m +++ b/matlab/dynare_estimation.m @@ -12,7 +12,7 @@ function oo_recursive_=dynare_estimation(var_list,dname) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2003-2018 Dynare Team +% Copyright (C) 2003-2020 Dynare Team % % This file is part of Dynare. % @@ -214,3 +214,5 @@ if nnobs > 1 && horizon > 0 end options_.mode_file = mode_file0; %reset stored mode-file to user defined one (and in case it was only set by the recursive estimation) +oo_.gui.ran_estimation = true; + diff --git a/matlab/evaluate_smoother.m b/matlab/evaluate_smoother.m index c22cc06358..62d5b35312 100644 --- a/matlab/evaluate_smoother.m +++ b/matlab/evaluate_smoother.m @@ -37,7 +37,7 @@ function [oo_,M_,options_,bayestopt_,Smoothed_variables_declaration_order_deviat % [1] This function use persistent variables for the dataset and the description of the missing observations. Consequently, if this function % is called more than once (by changing the value of parameters) the sample *must not* change. -% Copyright (C) 2010-2017 Dynare Team +% Copyright (C) 2010-2020 Dynare Team % % This file is part of Dynare. % @@ -111,3 +111,4 @@ end %reset qz_criterium options_.qz_criterium=qz_criterium_old; +oo_.gui.ran_calib_smoother = true; diff --git a/matlab/global_initialization.m b/matlab/global_initialization.m index 1d9e7f6621..4c9d8c7981 100644 --- a/matlab/global_initialization.m +++ b/matlab/global_initialization.m @@ -93,6 +93,13 @@ oo_.exo_steady_state = []; oo_.exo_det_steady_state = []; oo_.exo_det_simul = []; +oo_.gui.ran_estimation = false; +oo_.gui.ran_stoch_simul = false; +oo_.gui.ran_calib_smoother = false; +oo_.gui.ran_perfect_foresight = false; +oo_.gui.ran_shock_decomposition = false; +oo_.gui.ran_realtime_shock_decomposition = false; + M_.params = []; M_.endo_histval = []; M_.exo_histval = []; diff --git a/matlab/perfect-foresight-models/perfect_foresight_solver.m b/matlab/perfect-foresight-models/perfect_foresight_solver.m index c31a4e5755..c86ccfe95f 100644 --- a/matlab/perfect-foresight-models/perfect_foresight_solver.m +++ b/matlab/perfect-foresight-models/perfect_foresight_solver.m @@ -12,7 +12,7 @@ function perfect_foresight_solver() % SPECIAL REQUIREMENTS % none -% Copyright (C) 1996-2019 Dynare Team +% Copyright (C) 1996-2020 Dynare Team % % This file is part of Dynare. % @@ -226,3 +226,6 @@ end ts = dseries(transpose(oo_.endo_simul), initial_period, M_.endo_names); assignin('base', 'Simulated_time_series', ts); +if oo_.deterministic_simulation.status + oo_.gui.ran_perfect_foresight = true; +end diff --git a/matlab/realtime_shock_decomposition.m b/matlab/realtime_shock_decomposition.m index e003710da0..6686d5c8e0 100644 --- a/matlab/realtime_shock_decomposition.m +++ b/matlab/realtime_shock_decomposition.m @@ -22,7 +22,7 @@ function oo_ = realtime_shock_decomposition(M_,oo_,options_,varlist,bayestopt_,e % SPECIAL REQUIREMENTS % none -% Copyright (C) 2009-2019 Dynare Team +% Copyright (C) 2009-2020 Dynare Team % % This file is part of Dynare. % @@ -357,5 +357,6 @@ oo_.conditional_shock_decomposition.pool = zcond; if forecast_ oo_.realtime_forecast_shock_decomposition.pool = zfrcst; end +oo_.gui.ran_realtime_shock_decomposition = true; skipline() diff --git a/matlab/shock_decomposition.m b/matlab/shock_decomposition.m index 274e593348..3ecd08531d 100644 --- a/matlab/shock_decomposition.m +++ b/matlab/shock_decomposition.m @@ -23,7 +23,7 @@ function [oo_,M_] = shock_decomposition(M_,oo_,options_,varlist,bayestopt_,estim % SPECIAL REQUIREMENTS % none -% Copyright (C) 2009-2019 Dynare Team +% Copyright (C) 2009-2020 Dynare Team % % This file is part of Dynare. % @@ -141,3 +141,5 @@ oo_.shock_decomposition = z; if ~options_.no_graph.shock_decomposition oo_ = plot_shock_decomposition(M_,oo_,options_,varlist); end + +oo_.gui.ran_shock_decomposition = true; diff --git a/matlab/stoch_simul.m b/matlab/stoch_simul.m index ba3765da0b..3418770fd5 100644 --- a/matlab/stoch_simul.m +++ b/matlab/stoch_simul.m @@ -393,3 +393,5 @@ end options_ = options_old; % temporary fix waiting for local options options_.partial_information = 0; + +oo_.gui.ran_stoch_simul = true; -- GitLab