preprocessor: allow the omission of model block when sbvar or ms_sbvar statement is used
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3169 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
562961eb96
commit
494668a167
|
@ -901,7 +901,7 @@ BVARDensityStatement::BVARDensityStatement(int maxnlags_arg, const OptionsList &
|
||||||
void
|
void
|
||||||
BVARDensityStatement::checkPass(ModFileStructure &mod_file_struct)
|
BVARDensityStatement::checkPass(ModFileStructure &mod_file_struct)
|
||||||
{
|
{
|
||||||
mod_file_struct.bvar_density_present = true;
|
mod_file_struct.bvar_present = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -920,7 +920,7 @@ BVARForecastStatement::BVARForecastStatement(int nlags_arg, const OptionsList &o
|
||||||
void
|
void
|
||||||
BVARForecastStatement::checkPass(ModFileStructure &mod_file_struct)
|
BVARForecastStatement::checkPass(ModFileStructure &mod_file_struct)
|
||||||
{
|
{
|
||||||
mod_file_struct.bvar_forecast_present = true;
|
mod_file_struct.bvar_present = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -938,7 +938,7 @@ SBVARStatement::SBVARStatement(const OptionsList &options_list_arg) :
|
||||||
void
|
void
|
||||||
SBVARStatement::checkPass(ModFileStructure &mod_file_struct)
|
SBVARStatement::checkPass(ModFileStructure &mod_file_struct)
|
||||||
{
|
{
|
||||||
mod_file_struct.sbvar_present = true;
|
mod_file_struct.bvar_present = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -956,7 +956,7 @@ MS_SBVARStatement::MS_SBVARStatement(const OptionsList &options_list_arg) :
|
||||||
void
|
void
|
||||||
MS_SBVARStatement::checkPass(ModFileStructure &mod_file_struct)
|
MS_SBVARStatement::checkPass(ModFileStructure &mod_file_struct)
|
||||||
{
|
{
|
||||||
mod_file_struct.ms_sbvar_present = true;
|
mod_file_struct.bvar_present = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -161,8 +161,7 @@ ModFile::transformPass()
|
||||||
- a BVAR command is used and there is no equation (standalone BVAR estimation)
|
- a BVAR command is used and there is no equation (standalone BVAR estimation)
|
||||||
*/
|
*/
|
||||||
if (!mod_file_struct.ramsey_policy_present
|
if (!mod_file_struct.ramsey_policy_present
|
||||||
&& !((mod_file_struct.bvar_density_present || mod_file_struct.bvar_forecast_present)
|
&& !(mod_file_struct.bvar_present && dynamic_model.equation_number() == 0)
|
||||||
&& dynamic_model.equation_number() == 0)
|
|
||||||
&& (dynamic_model.equation_number() != symbol_table.endo_nbr()))
|
&& (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;
|
cerr << "ERROR: There are " << dynamic_model.equation_number() << " equations but " << symbol_table.endo_nbr() << " endogenous variables!" << endl;
|
||||||
|
|
|
@ -27,8 +27,7 @@ ModFileStructure::ModFileStructure() :
|
||||||
osr_present(false),
|
osr_present(false),
|
||||||
ramsey_policy_present(false),
|
ramsey_policy_present(false),
|
||||||
order_option(0),
|
order_option(0),
|
||||||
bvar_density_present(false),
|
bvar_present(false),
|
||||||
bvar_forecast_present(false),
|
|
||||||
identification_present(false),
|
identification_present(false),
|
||||||
partial_information(false),
|
partial_information(false),
|
||||||
shocks_present(false)
|
shocks_present(false)
|
||||||
|
|
|
@ -48,14 +48,8 @@ public:
|
||||||
//! Derivation order
|
//! Derivation order
|
||||||
/*! First initialized to zero. If user sets order option somewhere in the MOD file, it will be equal to the maximum of order options. Otherwise will default to 2 */
|
/*! First initialized to zero. If user sets order option somewhere in the MOD file, it will be equal to the maximum of order options. Otherwise will default to 2 */
|
||||||
int order_option;
|
int order_option;
|
||||||
//! Whether a bvar_density statement is present
|
//! Whether a bvar_density, bvar_forecast, sbvar, ms_sbvar statement is present
|
||||||
bool bvar_density_present;
|
bool bvar_present;
|
||||||
//! Whether a bvar_forecast statement is present
|
|
||||||
bool bvar_forecast_present;
|
|
||||||
//! Whether a sbvar statement is present
|
|
||||||
bool sbvar_present;
|
|
||||||
//! Whether a sbvar statement is present
|
|
||||||
bool ms_sbvar_present;
|
|
||||||
//! Whether an identification statement is present or the identification option of dynare_sensitivity statement is equal to one
|
//! Whether an identification statement is present or the identification option of dynare_sensitivity statement is equal to one
|
||||||
bool identification_present;
|
bool identification_present;
|
||||||
//! Whether the option partial_information is given to stoch_simul/estimation/osr/ramsey_policy
|
//! Whether the option partial_information is given to stoch_simul/estimation/osr/ramsey_policy
|
||||||
|
|
Loading…
Reference in New Issue