Commit f6f218f8 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

extended_path: new order and hybrid options (ref #152)

Also add stub in the doc for the new options
parent 037ec55d
......@@ -3600,6 +3600,12 @@ default value, mandatory option.
The number of periods used to compute the approximate solution
at every iteration of the algorithm. Default: @code{200}.
@item order = @var{INTEGER}
... Default: @code{0}.
@item hybrid
...
@end table
@end deffn
......
......@@ -2440,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
......
......@@ -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); };
......
......@@ -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);
......
Supports Markdown
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