preprocessor: add bandpass_filter option to stoch_simul. #1011
parent
8af8ee193e
commit
5b4e94149c
|
@ -167,6 +167,12 @@ StochSimulStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsoli
|
|||
|| mod_file_struct.order_option >= 3)
|
||||
mod_file_struct.k_order_solver = true;
|
||||
|
||||
if (options_list.num_options.find("hp_filter") != options_list.num_options.end() &&
|
||||
options_list.num_options.find("bandpass.indicator") != options_list.num_options.end())
|
||||
{
|
||||
cerr << "ERROR: stoch_simul: can only use one of hp and bandpass filters" << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -127,7 +127,7 @@ class ParsingDriver;
|
|||
%token UNIFORM_PDF UNIT_ROOT_VARS USE_DLL USEAUTOCORR GSA_SAMPLE_FILE USE_UNIVARIATE_FILTERS_IF_SINGULARITY_IS_DETECTED
|
||||
%token VALUES VAR VAREXO VAREXO_DET VAROBS PREDETERMINED_VARIABLES
|
||||
%token WRITE_LATEX_DYNAMIC_MODEL WRITE_LATEX_STATIC_MODEL WRITE_LATEX_ORIGINAL_MODEL
|
||||
%token XLS_SHEET XLS_RANGE LONG_NAME LMMCP OCCBIN
|
||||
%token XLS_SHEET XLS_RANGE LONG_NAME LMMCP OCCBIN BANDPASS_FILTER
|
||||
%left COMMA
|
||||
%left EQUAL_EQUAL EXCLAMATION_EQUAL
|
||||
%left LESS GREATER LESS_EQUAL GREATER_EQUAL
|
||||
|
@ -1106,6 +1106,7 @@ stoch_simul_options : stoch_simul_primary_options
|
|||
| o_loglinear
|
||||
| o_nodecomposition
|
||||
| o_spectral_density
|
||||
| o_bandpass_filter
|
||||
;
|
||||
|
||||
symbol_list : symbol_list symbol
|
||||
|
@ -2578,6 +2579,13 @@ o_extended_path_order : ORDER EQUAL INT_NUMBER { driver.option_num("ep.stochasti
|
|||
o_hybrid : HYBRID { driver.option_num("ep.stochastic.hybrid_order", "2"); };
|
||||
o_steady_maxit : MAXIT EQUAL INT_NUMBER { driver.option_num("steady.maxit", $3); };
|
||||
o_simul_maxit : MAXIT EQUAL INT_NUMBER { driver.option_num("simul.maxit", $3); };
|
||||
o_bandpass_filter : BANDPASS_FILTER { driver.option_num("bandpass.indicator", "1"); }
|
||||
| BANDPASS_FILTER EQUAL vec_int
|
||||
{
|
||||
driver.option_num("bandpass.indicator", "1");
|
||||
driver.option_vec_int("bandpass.passband", $3);
|
||||
}
|
||||
;
|
||||
o_dp_maxit : MAXIT EQUAL INT_NUMBER { driver.option_num("dp.maxit", $3); };
|
||||
o_osr_maxit : MAXIT EQUAL INT_NUMBER { driver.option_num("osr.maxit", $3); };
|
||||
o_osr_tolf : TOLF EQUAL non_negative_number { driver.option_num("osr.tolf", $3); };
|
||||
|
|
|
@ -637,6 +637,7 @@ DATE -?[0-9]+([YyAa]|[Mm]([1-9]|1[0-2])|[Qq][1-4]|[Ww]([1-9]{1}|[1-4][0-9]|5[0-2
|
|||
<DYNARE_STATEMENT>irf {return token::IRF;}
|
||||
<DYNARE_STATEMENT>irf_shocks {return token::IRF_SHOCKS;}
|
||||
<DYNARE_STATEMENT>hp_filter {return token::HP_FILTER;}
|
||||
<DYNARE_STATEMENT>bandpass_filter {return token::BANDPASS_FILTER;}
|
||||
<DYNARE_STATEMENT>hp_ngrid {return token::HP_NGRID;}
|
||||
<DYNARE_STATEMENT>simul_seed {return token::SIMUL_SEED;}
|
||||
<DYNARE_STATEMENT>qz_criterium {return token::QZ_CRITERIUM;}
|
||||
|
|
Loading…
Reference in New Issue