From d1958e453c7e9a126347cdd2fa090f6bc79ed285 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Wed, 30 Jul 2014 17:28:45 +0200
Subject: [PATCH] Forbid use of 'identification' with exogenous deterministic
 variables.

Closes #664
---
 preprocessor/ModFile.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc
index 891612146..766c24046 100644
--- a/preprocessor/ModFile.cc
+++ b/preprocessor/ModFile.cc
@@ -419,6 +419,12 @@ ModFile::transformPass(bool nostrict)
       exit(EXIT_FAILURE);
     }
 
+  if (mod_file_struct.identification_present && symbol_table.exo_det_nbr() > 0)
+    {
+      cerr << "ERROR: identification is incompatible with deterministic exogenous variables" << endl;
+      exit(EXIT_FAILURE);
+    }
+
   if (!mod_file_struct.ramsey_model_present)
     cout << "Found " << dynamic_model.equation_number() << " equation(s)." << endl;
   else
-- 
GitLab