From 2753ab9887d3631f75902a44fd8aa1dda09abaa4 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Fri, 17 May 2019 15:06:16 +0200
Subject: [PATCH] pac: collect exogenous variables in growth argument to pass
 exo use test in ModFile.cc

---
 src/ComputingTasks.cc | 7 +++++++
 src/ComputingTasks.hh | 1 +
 2 files changed, 8 insertions(+)

diff --git a/src/ComputingTasks.cc b/src/ComputingTasks.cc
index fa84b3c7..7024d93f 100644
--- a/src/ComputingTasks.cc
+++ b/src/ComputingTasks.cc
@@ -279,6 +279,13 @@ PacModelStatement::PacModelStatement(string name_arg,
 {
 }
 
+void
+PacModelStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings)
+{
+  if (growth)
+    growth->collectVariables(SymbolType::exogenous, mod_file_struct.pac_params);
+}
+
 void
 PacModelStatement::overwriteGrowth(expr_t new_growth)
 {
diff --git a/src/ComputingTasks.hh b/src/ComputingTasks.hh
index d6c19e4e..1568272d 100644
--- a/src/ComputingTasks.hh
+++ b/src/ComputingTasks.hh
@@ -152,6 +152,7 @@ public:
                     double steady_state_growth_rate_number_arg,
                     int steady_state_growth_rate_symb_id_arg,
                     const SymbolTable &symbol_table_arg);
+  void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) override;
   void overwriteGrowth(expr_t new_growth);
   void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override;
   void writeJsonOutput(ostream &output) const override;
-- 
GitLab