Skip to content
Snippets Groups Projects
Commit 551db4a4 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Workaround for ticket #157

parent e95defd1
Branches
Tags
No related merge requests found
...@@ -135,6 +135,15 @@ StochSimulStatement::checkPass(ModFileStructure &mod_file_struct) ...@@ -135,6 +135,15 @@ StochSimulStatement::checkPass(ModFileStructure &mod_file_struct)
cerr << "ERROR: in 'stoch_simul', you cannot use option 'pruning' with 'k_order_solver' option or with 3rd order approximation" << endl; cerr << "ERROR: in 'stoch_simul', you cannot use option 'pruning' with 'k_order_solver' option or with 3rd order approximation" << endl;
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
// Workaround for ticket #157
it = options_list.num_options.find("periods");
if (it != options_list.num_options.end() && atoi(it->second.c_str()) > 0
&& mod_file_struct.histval_present)
{
cerr << "ERROR: the 'periods' option of 'stoch_simul' is not compatible with a 'histval' block" << endl;
exit(EXIT_FAILURE);
}
} }
void void
......
...@@ -177,6 +177,12 @@ HistValStatement::HistValStatement(const hist_values_t &hist_values_arg, ...@@ -177,6 +177,12 @@ HistValStatement::HistValStatement(const hist_values_t &hist_values_arg,
{ {
} }
void
HistValStatement::checkPass(ModFileStructure &mod_file_struct)
{
mod_file_struct.histval_present = true;
}
void void
HistValStatement::writeOutput(ostream &output, const string &basename) const HistValStatement::writeOutput(ostream &output, const string &basename) const
{ {
......
/* /*
* Copyright (C) 2003-2010 Dynare Team * Copyright (C) 2003-2011 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -100,6 +100,8 @@ private: ...@@ -100,6 +100,8 @@ private:
public: public:
HistValStatement(const hist_values_t &hist_values_arg, HistValStatement(const hist_values_t &hist_values_arg,
const SymbolTable &symbol_table_arg); const SymbolTable &symbol_table_arg);
//! Workaround for trac ticket #157
virtual void checkPass(ModFileStructure &mod_file_struct);
virtual void writeOutput(ostream &output, const string &basename) const; virtual void writeOutput(ostream &output, const string &basename) const;
}; };
......
/* /*
* Copyright (C) 2006-2010 Dynare Team * Copyright (C) 2006-2011 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -33,6 +33,7 @@ ModFileStructure::ModFileStructure() : ...@@ -33,6 +33,7 @@ ModFileStructure::ModFileStructure() :
identification_present(false), identification_present(false),
partial_information(false), partial_information(false),
shocks_present(false), shocks_present(false),
histval_present(false),
k_order_solver(false), k_order_solver(false),
calibrated_measurement_errors(false), calibrated_measurement_errors(false),
dsge_prior_weight_in_estimated_params(false), dsge_prior_weight_in_estimated_params(false),
......
/* /*
* Copyright (C) 2006-2010 Dynare Team * Copyright (C) 2006-2011 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -61,6 +61,9 @@ public: ...@@ -61,6 +61,9 @@ public:
//! Whether a shocks or mshocks block is present //! Whether a shocks or mshocks block is present
/*! Used for the workaround for trac ticket #35 */ /*! Used for the workaround for trac ticket #35 */
bool shocks_present; bool shocks_present;
//! Whether a histval bloc is present
/*! Used for the workaround for trac ticket #157 */
bool histval_present;
//! Whether the "k_order_solver" option is used (explictly, or implicitly if order >= 3) //! Whether the "k_order_solver" option is used (explictly, or implicitly if order >= 3)
bool k_order_solver; bool k_order_solver;
//! Whether there is a calibrated measurement error //! Whether there is a calibrated measurement error
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment