Commit 551db4a4 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Workaround for ticket #157

parent e95defd1
......@@ -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;
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
......
......@@ -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
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.
*
......@@ -100,6 +100,8 @@ private:
public:
HistValStatement(const hist_values_t &hist_values_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;
};
......
/*
* Copyright (C) 2006-2010 Dynare Team
* Copyright (C) 2006-2011 Dynare Team
*
* This file is part of Dynare.
*
......@@ -33,6 +33,7 @@ ModFileStructure::ModFileStructure() :
identification_present(false),
partial_information(false),
shocks_present(false),
histval_present(false),
k_order_solver(false),
calibrated_measurement_errors(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.
*
......@@ -61,6 +61,9 @@ public:
//! Whether a shocks or mshocks block is present
/*! Used for the workaround for trac ticket #35 */
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)
bool k_order_solver;
//! Whether there is a calibrated measurement error
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment