Preprocessor and ref. manual: added 'pruning' option (closes #104)

issue#70
Sébastien Villemot 2010-05-31 18:38:49 +02:00
parent 211056f552
commit 743db26cb4
3 changed files with 13 additions and 2 deletions

View File

@ -126,6 +126,15 @@ StochSimulStatement::checkPass(ModFileStructure &mod_file_struct)
if ((it != options_list.num_options.end() && it->second == "1")
|| mod_file_struct.order_option >= 3)
mod_file_struct.k_order_solver = true;
// Check that option "pruning" is not used with k-order
it = options_list.num_options.find("pruning");
if ((it != options_list.num_options.end() && it->second == "1")
&& mod_file_struct.k_order_solver)
{
cerr << "ERROR: in 'stoch_simul', you cannot use option 'pruning' with 'k_order_solver' option or with 3rd order approximation" << endl;
exit(EXIT_FAILURE);
}
}
void

View File

@ -115,7 +115,7 @@ class ParsingDriver;
%token NOGRAPH NOMOMENTS NOPRINT NORMAL_PDF
%token OBSERVATION_TRENDS OPTIM OPTIM_WEIGHTS ORDER OSR OSR_PARAMS
%token PARAMETERS PARAMETER_SET PARTIAL_INFORMATION PERIODS PLANNER_OBJECTIVE PLOT_CONDITIONAL_FORECAST PLOT_PRIORS PREFILTER PRESAMPLE
%token PRINT PRIOR_MC PRIOR_TRUNC PRIOR_MODE PRIOR_MEAN POSTERIOR_MODE POSTERIOR_MEAN POSTERIOR_MEDIAN
%token PRINT PRIOR_MC PRIOR_TRUNC PRIOR_MODE PRIOR_MEAN POSTERIOR_MODE POSTERIOR_MEAN POSTERIOR_MEDIAN PRUNING
%token <string_val> QUOTED_STRING
%token QZ_CRITERIUM FULL
%token RELATIVE_IRF REPLIC RPLOT SAVE_PARAMS_AND_STEADY_STATE
@ -843,6 +843,7 @@ stoch_simul_options : o_dr_algo
| o_partial_information
| o_conditional_variance_decomposition
| o_k_order_solver
| o_pruning
;
symbol_list : symbol_list symbol
@ -1891,6 +1892,7 @@ o_draws_nbr_mean_var_estimate : DRAWS_NBR_MEAN_VAR_ESTIMATE EQUAL INT_NUMBER {dr
o_draws_nbr_modified_harmonic_mean : DRAWS_NBR_MODIFIED_HARMONIC_MEAN EQUAL INT_NUMBER {driver.option_num("ms.draws_nbr_modified_harmonic_mean",$3); };
o_dirichlet_scale : DIRICHLET_SCALE EQUAL INT_NUMBER {driver.option_num("ms.dirichlet_scale",$3); };
o_k_order_solver : K_ORDER_SOLVER {driver.option_num("k_order_solver","1"); };
o_pruning : PRUNING { driver.option_num("pruning", "1"); };
o_chain : CHAIN EQUAL INT_NUMBER { driver.option_num("ms.chain",$3); };
o_state : STATE EQUAL INT_NUMBER { driver.option_num("ms.state",$3); };

View File

@ -351,7 +351,7 @@ int sigma_e = 0;
<DYNARE_STATEMENT>filter_covariance {return token::FILTER_COVARIANCE; }
<DYNARE_STATEMENT>filter_decomposition {return token::FILTER_DECOMPOSITION; }
<DYNARE_STATEMENT>selected_variables_only {return token::SELECTED_VARIABLES_ONLY; }
<DYNARE_STATEMENT>pruning {return token::PRUNING; };
<DYNARE_STATEMENT>[\$][^$]*[\$] {
strtok(yytext+1, "$");