Remove workaround preventing the use of "shocks" before "endval".

It now works correctly since 82b31156.

Closes #35
issue#70
Sébastien Villemot 2014-04-08 17:53:10 +02:00
parent f06da421cd
commit e040e4d0d6
6 changed files with 2 additions and 28 deletions

View File

@ -95,9 +95,6 @@ void
SimulStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings)
{
mod_file_struct.simul_present = true;
// The following is necessary to allow shocks+endval+simul in a loop
mod_file_struct.shocks_present_but_simul_not_yet = false;
}
void

View File

@ -239,12 +239,6 @@ EndValStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidati
if (endogs.size() > 0 || exogs.size() > 0)
exit(EXIT_FAILURE);
if (mod_file_struct.shocks_present_but_simul_not_yet)
{
cerr << "ERROR: Putting a \"shocks\" block before an \"endval\" block is not permitted. Please swap the two blocks. This limitation will be removed in a future release of Dynare." << endl;
exit(EXIT_FAILURE);
}
}
void

View File

@ -200,9 +200,6 @@ ShocksStatement::writeCovarAndCorrShocks(ostream &output) const
void
ShocksStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings)
{
// Workaround for trac ticket #35
mod_file_struct.shocks_present_but_simul_not_yet = true;
/* Error out if variables are not of the right type. This must be done here
and not at parsing time (see #448).
Also Determine if there is a calibrated measurement error */
@ -312,13 +309,6 @@ MShocksStatement::writeOutput(ostream &output, const string &basename) const
writeDetShocks(output);
}
void
MShocksStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings)
{
// Workaround for trac ticket #35
mod_file_struct.shocks_present_but_simul_not_yet = true;
}
ConditionalForecastPathsStatement::ConditionalForecastPathsStatement(const AbstractShocksStatement::det_shocks_t &paths_arg) :
paths(paths_arg),
path_length(-1)

View File

@ -83,7 +83,6 @@ public:
MShocksStatement(const det_shocks_t &det_shocks_arg,
const SymbolTable &symbol_table_arg);
virtual void writeOutput(ostream &output, const string &basename) const;
virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
};
class ConditionalForecastPathsStatement : public Statement

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2006-2013 Dynare Team
* Copyright (C) 2006-2014 Dynare Team
*
* This file is part of Dynare.
*
@ -40,7 +40,6 @@ ModFileStructure::ModFileStructure() :
identification_present(false),
estimation_analytic_derivation(false),
partial_information(false),
shocks_present_but_simul_not_yet(false),
histval_present(false),
k_order_solver(false),
calibrated_measurement_errors(false),

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2006-2013 Dynare Team
* Copyright (C) 2006-2014 Dynare Team
*
* This file is part of Dynare.
*
@ -72,11 +72,6 @@ public:
bool estimation_analytic_derivation;
//! Whether the option partial_information is given to stoch_simul/estimation/osr/ramsey_policy
bool partial_information;
//! Whether a shocks or mshocks block has been parsed and no simul command yet run
/*! Used for the workaround for trac ticket #35. When a simul command is
seen, this flag is cleared in order to allow a sequence
shocks+endval+simul in a loop */
bool shocks_present_but_simul_not_yet;
//! Whether a histval bloc is present
/*! Used for the workaround for trac ticket #157 */
bool histval_present;