trunk preprocessor: fail if order > 1 given for ramsey_policy

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2236 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
sebastien 2008-11-04 10:52:06 +00:00
parent e0fecf369e
commit 0601e50341
1 changed files with 9 additions and 1 deletions

View File

@ -207,7 +207,15 @@ RamseyPolicyStatement::checkPass(ModFileStructure &mod_file_struct)
approximation, it needs 2nd derivatives), we add 1 to the order declared by user */
OptionsList::num_options_type::const_iterator it = options_list.num_options.find("order");
if (it != options_list.num_options.end())
mod_file_struct.order_option = max(mod_file_struct.order_option,atoi(it->second.c_str()) + 1);
{
int order = atoi(it->second.c_str());
if (order > 1)
{
cerr << "ERROR: ramsey_policy: order > 1 is not yet implemented" << endl;
exit(EXIT_FAILURE);
}
mod_file_struct.order_option = max(mod_file_struct.order_option, order + 1);
}
}
void