Add interface for “static” and “incidence” options of “model_info”

fix-tolerance-parameters
Sébastien Villemot 2022-02-09 12:26:00 +01:00
parent adab6c7f93
commit 7df6781982
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
3 changed files with 12 additions and 5 deletions

View File

@ -113,8 +113,8 @@ ModelInfoStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolid
void
ModelInfoStatement::writeOutput(ostream &output, const string &basename, bool minimal_workspace) const
{
options_list.writeOutput(output);
output << "model_info();" << endl;
options_list.writeOutput(output, "options_model_info_");
output << "model_info(options_model_info_);" << endl;
}
void

View File

@ -1,6 +1,6 @@
// -*- C++ -*-
/*
* Copyright © 2003-2021 Dynare Team
* Copyright © 2003-2022 Dynare Team
*
* This file is part of Dynare.
*
@ -186,7 +186,7 @@ class ParsingDriver;
%token NO_IDENTIFICATION_MINIMAL NO_IDENTIFICATION_SPECTRUM NORMALIZE_JACOBIANS GRID_NBR
%token TOL_RANK TOL_DERIV TOL_SV CHECKS_VIA_SUBSETS MAX_DIM_SUBSETS_GROUPS ZERO_MOMENTS_TOLERANCE
%token MAX_NROWS SQUEEZE_SHOCK_DECOMPOSITION WITH_EPILOGUE MODEL_REMOVE MODEL_REPLACE MODEL_OPTIONS
%token VAR_REMOVE ESTIMATED_PARAMS_REMOVE
%token VAR_REMOVE ESTIMATED_PARAMS_REMOVE STATIC INCIDENCE
%token <vector<string>> SYMBOL_VEC
@ -1483,7 +1483,10 @@ model_info : MODEL_INFO ';'
model_info_options_list : model_info_options_list COMMA model_info_options
| model_info_options
;
model_info_options : %empty
model_info_options : o_static
| o_incidence
;
perfect_foresight_setup : PERFECT_FORESIGHT_SETUP ';'
{ driver.perfect_foresight_setup(); }
@ -4183,6 +4186,8 @@ o_tol_sv : TOL_SV EQUAL non_negative_number { driver.option_num("tol_sv", $3); }
o_checks_via_subsets : CHECKS_VIA_SUBSETS EQUAL INT_NUMBER { driver.option_num("checks_via_subsets", $3); };
o_max_dim_subsets_groups : MAX_DIM_SUBSETS_GROUPS EQUAL INT_NUMBER { driver.option_num("max_dim_subsets_groups", $3); };
o_zero_moments_tolerance : ZERO_MOMENTS_TOLERANCE EQUAL non_negative_number { driver.option_num("zero_moments_tolerance", $3); };
o_static : STATIC { driver.option_num("static","true"); };
o_incidence : INCIDENCE { driver.option_num("incidence","true"); };
// Some options to "evaluate_planner_objective"
o_evaluate_planner_objective_periods : PERIODS EQUAL INT_NUMBER { driver.option_num("ramsey.periods", $3); };

View File

@ -875,6 +875,8 @@ DATE -?[0-9]+([ya]|m([1-9]|1[0-2])|q[1-4])
<DYNARE_STATEMENT>no_homotopy {return token::NO_HOMOTOPY;}
<DYNARE_STATEMENT>particle_filter_options {return token::PARTICLE_FILTER_OPTIONS;}
<DYNARE_STATEMENT>terminal_steady_state_as_guess_value {return token::TERMINAL_STEADY_STATE_AS_GUESS_VALUE;}
<DYNARE_STATEMENT>static { return token::STATIC; }
<DYNARE_STATEMENT>incidence { return token::INCIDENCE; }
<DYNARE_BLOCK>stderr_multiples {return token::STDERR_MULTIPLES;}
<DYNARE_BLOCK>diagonal_only {return token::DIAGONAL_ONLY;}