Merge branch 'master' into use-dynSeries and removed a useless loop in dynare_estimation routine.

Conflicts:
	matlab/dynare_estimation.m
issue#70
Stéphane Adjemian (Charybdis) 2013-06-10 14:26:21 +02:00
commit 26ac697484
3 changed files with 17 additions and 6 deletions

View File

@ -358,6 +358,11 @@ EstimationStatement::writeOutput(ostream &output, const string &basename) const
else if (atoi(it->second.c_str()) == 2)
output << "options_.particle.status = 1;" << endl;
// Do not check for the steady state in diffuse filter mode (#400)
it = options_list.num_options.find("diffuse_filter");
if (it != options_list.num_options.end() && it->second == "1")
output << "options_.steadystate.nocheck = 1;" << endl;
symbol_list.writeOutput("var_list_", output);
output << "dynare_estimation(var_list_);\n";
}
@ -2435,9 +2440,10 @@ ExtendedPathStatement::writeOutput(ostream &output, const string &basename) cons
{
// Beware: options do not have the same name in the interface and in the M code...
OptionsList::num_options_t::const_iterator it = options_list.num_options.find("solver_periods");
if (it != options_list.num_options.end())
output << "options_.ep.periods = " << it->second << ";" << endl;
for (OptionsList::num_options_t::const_iterator it = options_list.num_options.begin();
it != options_list.num_options.end(); ++it)
if (it->first != string("periods"))
output << "options_." << it->first << " = " << it->second << ";" << endl;
output << "oo_.endo_simul = [ oo_.steady_state, extended_path([], " << options_list.num_options.find("periods")->second
<< ") ];" << endl

View File

@ -103,7 +103,7 @@ class ParsingDriver;
%token DEFAULT FIXED_POINT
%token FORECAST K_ORDER_SOLVER INSTRUMENTS PRIOR SHIFT MEAN STDEV VARIANCE MODE INTERVAL SHAPE DOMAINN
%token GAMMA_PDF GRAPH GRAPH_FORMAT CONDITIONAL_VARIANCE_DECOMPOSITION NOCHECK STD
%token HISTVAL HOMOTOPY_SETUP HOMOTOPY_MODE HOMOTOPY_STEPS HOMOTOPY_FORCE_CONTINUE HP_FILTER HP_NGRID
%token HISTVAL HOMOTOPY_SETUP HOMOTOPY_MODE HOMOTOPY_STEPS HOMOTOPY_FORCE_CONTINUE HP_FILTER HP_NGRID HYBRID
%token IDENTIFICATION INF_CONSTANT INITVAL INITVAL_FILE BOUNDS JSCALE INIT
%token <string_val> INT_NUMBER
%token <string_val> DATE_NUMBER
@ -2229,6 +2229,8 @@ extended_path_options_list : extended_path_option COMMA extended_path_options_li
extended_path_option : o_periods
| o_solver_periods
| o_extended_path_order
| o_hybrid
;
model_diagnostics : MODEL_DIAGNOSTICS ';'
@ -2262,7 +2264,9 @@ o_irf_shocks : IRF_SHOCKS EQUAL '(' symbol_list ')' { driver.option_symbol_list(
o_hp_filter : HP_FILTER EQUAL non_negative_number { driver.option_num("hp_filter", $3); };
o_hp_ngrid : HP_NGRID EQUAL INT_NUMBER { driver.option_num("hp_ngrid", $3); };
o_periods : PERIODS EQUAL INT_NUMBER { driver.option_num("periods", $3); };
o_solver_periods : SOLVER_PERIODS EQUAL INT_NUMBER { driver.option_num("solver_periods", $3); };
o_solver_periods : SOLVER_PERIODS EQUAL INT_NUMBER { driver.option_num("ep.periods", $3); };
o_extended_path_order : ORDER EQUAL INT_NUMBER { driver.option_num("ep.stochastic.order", $3); };
o_hybrid : HYBRID { driver.option_num("ep.stochastic.hybrid_order", "2"); };
o_maxit : MAXIT EQUAL INT_NUMBER { driver.option_num("maxit_", $3); };
o_solve_maxit : SOLVE_MAXIT EQUAL INT_NUMBER { driver.option_num("solve_maxit", $3); };
o_cutoff : CUTOFF EQUAL non_negative_number { driver.cutoff($3); };

View File

@ -159,6 +159,7 @@ string eofbuff;
/* End of a Dynare statement */
<INITIAL>calib_smoother { BEGIN DYNARE_STATEMENT; return token::CALIB_SMOOTHER; }
<INITIAL>model_diagnostics {BEGIN DYNARE_STATEMENT; return token::MODEL_DIAGNOSTICS;}
<INITIAL>extended_path {BEGIN DYNARE_STATEMENT; return token::EXTENDED_PATH;}
<DYNARE_STATEMENT>; {
if (!sigma_e)
@ -185,7 +186,6 @@ string eofbuff;
<INITIAL>homotopy_setup {BEGIN DYNARE_BLOCK; return token::HOMOTOPY_SETUP;}
<INITIAL>conditional_forecast_paths {BEGIN DYNARE_BLOCK; return token::CONDITIONAL_FORECAST_PATHS;}
<INITIAL>svar_identification {BEGIN DYNARE_BLOCK; return token::SVAR_IDENTIFICATION;}
<INITIAL>extended_path {BEGIN DYNARE_BLOCK; return token::EXTENDED_PATH;}
/* For the semicolon after an "end" keyword */
<INITIAL>; {return Dynare::parser::token_type (yytext[0]);}
@ -310,6 +310,7 @@ string eofbuff;
<DYNARE_STATEMENT>cycle_reduction {return token::CYCLE_REDUCTION;}
<DYNARE_STATEMENT>logarithmic_reduction {return token::LOGARITHMIC_REDUCTION;}
<DYNARE_STATEMENT>use_univariate_filters_if_singularity_is_detected {return token::USE_UNIVARIATE_FILTERS_IF_SINGULARITY_IS_DETECTED;}
<DYNARE_STATEMENT>hybrid {return token::HYBRID;}
<DYNARE_STATEMENT>default {return token::DEFAULT;}
<DYNARE_STATEMENT>alpha {
yylval->string_val = new string(yytext);