From 8719bbff32387cdad098fba0e127aa727c83deaa Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Thu, 9 Apr 2015 16:29:52 +0200 Subject: [PATCH] preprocessor: take care of extra exos in ramsey_model instruments option --- ComputingTasks.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ComputingTasks.cc b/ComputingTasks.cc index abf45b23..01a7205f 100644 --- a/ComputingTasks.cc +++ b/ComputingTasks.cc @@ -296,7 +296,8 @@ RamseyModelStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsol Statement * RamseyModelStatement::cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table) { - SymbolList new_symbol_list; + SymbolList new_symbol_list, new_options_symbol_list; + OptionsList new_options_list = options_list; try { SymbolTable *new_symbol_table = dynamic_datatree.getSymbolTable(); @@ -306,6 +307,19 @@ RamseyModelStatement::cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolT new_symbol_table->getID(*it); new_symbol_list.addSymbol(*it); } + + OptionsList::symbol_list_options_t::const_iterator it = options_list.symbol_list_options.find("instruments"); + if (it != options_list.symbol_list_options.end()) + { + symbols = it->second.get_symbols(); + for (vector::const_iterator it1 = symbols.begin(); it1 != symbols.end(); it1++) + { + new_symbol_table->getID(*it1); + new_options_symbol_list.addSymbol(*it1); + } + new_options_list.symbol_list_options["irf_shocks"] = new_options_symbol_list; + } + } catch (...) {