option occbin allows for more equations than variables

issue#70
Michel Juillard 2015-06-04 14:16:52 +02:00
parent f914837aff
commit 567156aad4
4 changed files with 14 additions and 1 deletions

View File

@ -126,6 +126,10 @@ void
PerfectForesightSolverStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings)
{
mod_file_struct.perfect_foresight_solver_present = true;
// Fill in option_occbin of mod_file_struct
OptionsList::string_options_t::const_iterator it = options_list.num_options.find("occbin");
if (it != options_list.string_options.end())
mod_file_struct.occbin_option = true;
}
void
@ -4221,6 +4225,11 @@ ExtendedPathStatement::checkPass(ModFileStructure &mod_file_struct, WarningConso
cerr << "ERROR: the 'periods' option of 'extended_path' is mandatory" << endl;
exit(EXIT_FAILURE);
}
// Fill in option_occbin of mod_file_struct
OptionsList::string_options_t::const_iterator it = options_list.num_options.find("occbin");
if (it != options_list.string_options.end())
mod_file_struct.occbin_option = true;
}
void

View File

@ -421,6 +421,7 @@ ModFile::transformPass(bool nostrict)
*/
if (!(mod_file_struct.ramsey_model_present || mod_file_struct.discretionary_policy_present)
&& !(mod_file_struct.bvar_present && dynamic_model.equation_number() == 0)
&& !(mod_file_struct.occbin_option)
&& (dynamic_model.equation_number() != symbol_table.endo_nbr()))
{
cerr << "ERROR: There are " << dynamic_model.equation_number() << " equations but " << symbol_table.endo_nbr() << " endogenous variables!" << endl;

View File

@ -50,7 +50,8 @@ ModFileStructure::ModFileStructure() :
estimation_data_statement_present(false),
last_markov_switching_chain(0),
calib_smoother_present(false),
estim_params_use_calib(false)
estim_params_use_calib(false),
occbin_option(false)
{
}

View File

@ -118,6 +118,8 @@ public:
bool corr_options_statement_present;
//! Whether a Markov Switching DSGE is present
bool ms_dsge_present;
//! Whether occbin is present
bool occbin_option;
};
class Statement