Testsuite: remove the simul/ folder, and move its files under {deterministic,stochastic}_simulations/

With the exception of ramst2.mod which was not run by the testsuite and has
thus been deleted.
remove-submodule
Sébastien Villemot 2023-06-12 14:08:55 +02:00
parent 4459f9a488
commit c0294bb343
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
19 changed files with 25 additions and 75 deletions

View File

@ -97,10 +97,6 @@ MODFILES = \
gsa/ls2003.mod \
gsa/cod_ML_morris/cod_ML_morris.mod \
gsa/morris/nk_est.mod \
simul/ramst.mod \
simul/ramst_a.mod \
simul/ramst_mshocks.mod \
simul/ramst_mshocks_vec.mod \
on-the-fly/ex1.mod \
on-the-fly/ex2.mod \
on-the-fly/ex3.mod \
@ -110,6 +106,7 @@ MODFILES = \
equation_tags/example1_with_tags.mod \
equation_tags/ramst_static_tag.mod \
equation_tags/ramst_static_tag_block.mod \
stochastic_simulations/example1.mod \
stochastic_simulations/example1_irf_shocks.mod \
stochastic_simulations/example1long.mod \
stochastic_simulations/example2long.mod \
@ -164,8 +161,6 @@ MODFILES = \
stat_functions/ramst_normcdf_and_friends_use_dll.mod \
stat_functions/ramst_normcdf_and_friends_bytecode.mod \
stat_functions/example1_abs_sign.mod \
simul/predetermined_variables.mod \
simul/histval_det.mod \
preprocessor_checks/comments.mod \
preprocessor_checks/example1_mlv.mod \
preprocessor_checks/ramst_model_edit.mod \
@ -269,13 +264,6 @@ MODFILES = \
identification/forward_looking/forward_looking_empty_ghx.mod \
identification/forward_looking/forward_looking_varobs_x.mod \
model_diagnostics/example2_block_model_diag.mod \
simul/example1.mod \
simul/ramst_vec.mod \
simul/Solow_no_varexo.mod \
simul/simul_ZLB_purely_forward.mod \
simul/simul_ZLB_purely_forward_no_solution.mod \
simul/Irreversible_investment.mod \
simul/linear_state_space_arma.mod \
perfect_foresight/initval_endval_blocks/initval_endval_test.mod \
perfect_foresight/initval_endval_blocks/histval_initval_test.mod \
conditional_forecasts/1/fs2000_cal.mod \
@ -361,6 +349,18 @@ MODFILES = \
stochastic-backward-models/solow_cd.mod \
stochastic-backward-models/solow_ces.mod \
stochastic-backward-models/solow_cd_with_steadystate.mod \
deterministic_simulations/ramst.mod \
deterministic_simulations/ramst_a.mod \
deterministic_simulations/ramst_mshocks.mod \
deterministic_simulations/ramst_mshocks_vec.mod \
deterministic_simulations/predetermined_variables.mod \
deterministic_simulations/histval_det.mod \
deterministic_simulations/ramst_vec.mod \
deterministic_simulations/Solow_no_varexo.mod \
deterministic_simulations/simul_ZLB_purely_forward.mod \
deterministic_simulations/simul_ZLB_purely_forward_no_solution.mod \
deterministic_simulations/Irreversible_investment.mod \
deterministic_simulations/linear_state_space_arma.mod \
deterministic_simulations/purely_forward/ar1.mod \
deterministic_simulations/purely_forward/nk.mod \
deterministic_simulations/purely_backward/ar1.mod \
@ -874,8 +874,8 @@ deterministic_simulations/multiple_lead_lags/sim_lead_lag_aux_vars.o.trs: determ
deterministic_simulations/multiple_lead_lags/sim_lead_lag.m.trs: deterministic_simulations/multiple_lead_lags/sim_base.m.trs deterministic_simulations/multiple_lead_lags/sim_lead_lag_aux_vars.m.trs
deterministic_simulations/multiple_lead_lags/sim_lead_lag.o.trs: deterministic_simulations/multiple_lead_lags/sim_base.o.trs deterministic_simulations/multiple_lead_lags/sim_lead_lag_aux_vars.o.trs
deterministic_simulations/multiple_lead_lags/ramst_augmented_histval.m.trs: simul/ramst.m.trs
deterministic_simulations/multiple_lead_lags/ramst_augmented_histval.o.trs: simul/ramst.o.trs
deterministic_simulations/multiple_lead_lags/ramst_augmented_histval.m.trs: deterministic_simulations/ramst.m.trs
deterministic_simulations/multiple_lead_lags/ramst_augmented_histval.o.trs: deterministic_simulations/ramst.o.trs
loglinear/example4_loglinear.m.trs: loglinear/example4_exp.m.trs
loglinear/example4_loglinear.o.trs: loglinear/example4_exp.o.trs
@ -989,11 +989,11 @@ particle/local_it_k_test_parallel.o.trs: particle/first_spec.o.trs
pruning/AS_pruned_state_space_red_shock.m.trs: pruning/AnSchorfheide_pruned_state_space.m.trs
pruning/AS_pruned_state_space_red_shock.o.trs: pruning/AnSchorfheide_pruned_state_space.o.trs
preprocessor_checks/ramst_model_edit.m.trs: simul/ramst.m.trs
preprocessor_checks/ramst_model_edit.o.trs: simul/ramst.o.trs
preprocessor_checks/ramst_model_edit.m.trs: deterministic_simulations/ramst.m.trs
preprocessor_checks/ramst_model_edit.o.trs: deterministic_simulations/ramst.o.trs
log_transform/ramst.m.trs: simul/ramst.m.trs
log_transform/ramst.o.trs: simul/ramst.o.trs
log_transform/ramst.m.trs: deterministic_simulations/ramst.m.trs
log_transform/ramst.o.trs: deterministic_simulations/ramst.o.trs
model-inversion/nk-1/invert.m.trs: model-inversion/nk-1/simulate.m.trs
model-inversion/nk-1/invert.o.trs: model-inversion/nk-1/simulate.o.trs
@ -1030,8 +1030,8 @@ solve_algo_12_14/purely_forward_14.o.trs: solve_algo_12_14/purely_forward_refere
estimation/conditional-likelihood/1/fs2000_estimation_conditional.m.trs: estimation/conditional-likelihood/1/fs2000_estimation_exact.m.trs
estimation/conditional-likelihood/1/fs2000_estimation_conditional.o.trs: estimation/conditional-likelihood/1/fs2000_estimation_exact.o.trs
deprecated/ramst.m.trs: simul/ramst.m.trs
deprecated/ramst.o.trs: simul/ramst.o.trs
deprecated/ramst.m.trs: deterministic_simulations/ramst.m.trs
deprecated/ramst.o.trs: deterministic_simulations/ramst.o.trs
observation_trends_and_prefiltering/MCMC: m/observation_trends_and_prefiltering/MCMC o/observation_trends_and_prefiltering/MCMC
@ -1126,10 +1126,6 @@ deterministic_simulations: m/deterministic_simulations o/deterministic_simulatio
m/deterministic_simulations: $(patsubst %.mod, %.m.trs, $(filter deterministic_simulations/%.mod, $(MODFILES)))
o/deterministic_simulations: $(patsubst %.mod, %.o.trs, $(filter deterministic_simulations/%.mod, $(MODFILES)))
simul: m/simul o/simul
m/simul: $(patsubst %.mod, %.m.trs, $(filter simul/%.mod, $(MODFILES)))
o/simul: $(patsubst %.mod, %.o.trs, $(filter simul/%.mod, $(MODFILES)))
ep: m/ep o/ep
m/ep: $(patsubst %.mod, %.m.trs, $(filter ep/%.mod, $(MODFILES)))
o/ep: $(patsubst %.mod, %.o.trs, $(filter ep/%.mod, $(MODFILES)))

View File

@ -34,7 +34,7 @@ end;
simul(periods=200);
benchmark = load('../simul/ramst/Output/ramst_results.mat');
benchmark = load('../deterministic_simulations/ramst/Output/ramst_results.mat');
if max(abs(benchmark.oo_.endo_simul-oo_.endo_simul)) > 1e5
error('The results of simul are inconsistent with perfect_foresight_setup+perfect_foresight_solver');

View File

@ -71,7 +71,7 @@ if max(abs(junk(M_.maximum_lag+1:end)-oo_.endo_simul(strmatch('y_backward',M_.en
error('Solution of purely backwards model not correct')
end
ramst_results=load('../../simul/ramst/Output/ramst_results.mat');
ramst_results=load('../../deterministic_simulations/ramst/Output/ramst_results.mat');
if max(abs(ramst_results.oo_.endo_simul(strmatch('k',ramst_results.M_.endo_names,'exact'),1:end-M_.maximum_lead)-oo_.endo_simul(strmatch('k',M_.endo_names,'exact'),1:end-M_.maximum_lead)))>1e-10
error('Solution of forward part of the model not correct')
end

View File

@ -45,7 +45,7 @@ if max(abs(oo_.endo_simul(idx_log_c, :) - log(oo_.endo_simul(idx_c, :)))) > 1e-7
error('Transformation not correctly performed')
end
S = load('../simul/ramst/Output/ramst_results.mat');
S = load('../deterministic_simulations/ramst/Output/ramst_results.mat');
if max(abs(oo_.endo_simul(idx_c, :) - S.oo_.endo_simul(idx_c, :))) > 1e-7
error('Result differs from non-transformed model')
end

View File

@ -56,7 +56,7 @@ end;
perfect_foresight_setup(periods=200);
perfect_foresight_solver;
S = load('../simul/ramst/Output/ramst_results.mat');
S = load('../deterministic_simulations/ramst/Output/ramst_results.mat');
if any(size(oo_.endo_simul) ~= size(S.oo_.endo_simul)) || any(any(abs(oo_.endo_simul - S.oo_.endo_simul) > 1e-10))
error('Model editing failure')
end

View File

@ -1,46 +0,0 @@
var c k dc s;
varexo x;
parameters alph gam delt bet aa;
alph=0.5;
gam=0.5;
delt=0.02;
bet=0.05;
aa=0.5;
model;
c + k - aa*x*k(-1)^alph - (1-delt)*k(-1);
c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam);
dc = c - c(-1);
s = (dc>=0)-(dc<0);
end;
initval;
x = 1;
k = ((delt+bet)/(1.0*aa*alph))^(1/(alph-1));
c = aa*k^alph-delt*k;
dc = 0;
s = 1;
end;
steady;
check;
shocks;
var x;
periods 1;
values 1.2;
end;
perfect_foresight_setup(periods=200);
perfect_foresight_solver;
dynasave('myfile') c x k;
dynatype('myfile1.txt') c x k;
rplot c;
rplot k;
rplot dc;
rplot s;