🐛 Extend incompatibility with deterministic exogenous to ramsey_model command

The check was only done with ramsey_policy.
master
Sébastien Villemot 2023-03-29 15:33:15 +02:00
parent d0bc8128c7
commit 419c684929
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 3 additions and 2 deletions

View File

@ -575,9 +575,10 @@ ModFile::transformPass(bool nostrict, bool stochastic, bool compute_xrefs, bool
exit(EXIT_FAILURE);
}
if (mod_file_struct.ramsey_policy_present && symbol_table.exo_det_nbr() > 0)
if ((mod_file_struct.ramsey_model_present || mod_file_struct.ramsey_policy_present)
&& symbol_table.exo_det_nbr() > 0)
{
cerr << "ERROR: ramsey_policy is incompatible with deterministic exogenous variables" << endl;
cerr << "ERROR: ramsey_model and ramsey_policy are incompatible with deterministic exogenous variables" << endl;
exit(EXIT_FAILURE);
}