v4 preprocessor: fixed bug with "order" option
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1809 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
0c45802387
commit
7eb6fa3ed1
Binary file not shown.
|
@ -49,6 +49,10 @@ ModFile::checkPass()
|
||||||
it != statements.end(); it++)
|
it != statements.end(); it++)
|
||||||
(*it)->checkPass(mod_file_struct);
|
(*it)->checkPass(mod_file_struct);
|
||||||
|
|
||||||
|
// If order option has not been set, default to 2
|
||||||
|
if (!mod_file_struct.order_option)
|
||||||
|
mod_file_struct.order_option = 2;
|
||||||
|
|
||||||
// Allow empty model only when doing a standalone BVAR estimation
|
// Allow empty model only when doing a standalone BVAR estimation
|
||||||
if (model_tree.equation_number() == 0
|
if (model_tree.equation_number() == 0
|
||||||
&& (mod_file_struct.check_present
|
&& (mod_file_struct.check_present
|
||||||
|
|
|
@ -23,7 +23,7 @@ ModFileStructure::ModFileStructure() :
|
||||||
check_present(false),
|
check_present(false),
|
||||||
simul_present(false),
|
simul_present(false),
|
||||||
stoch_simul_or_similar_present(false),
|
stoch_simul_or_similar_present(false),
|
||||||
order_option(2)
|
order_option(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,8 @@ public:
|
||||||
//! Whether a stoch_simul, estimation, osr, ramsey_policy statement is present
|
//! Whether a stoch_simul, estimation, osr, ramsey_policy statement is present
|
||||||
bool stoch_simul_or_similar_present;
|
bool stoch_simul_or_similar_present;
|
||||||
//! The value of the "order" option of stoch_simul, estimation, osr, ramsey_policy
|
//! The value of the "order" option of stoch_simul, estimation, osr, ramsey_policy
|
||||||
/*! Defaults to 2 */
|
//! 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 */
|
||||||
int order_option;
|
int order_option;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue