take care of extra exos in estimated_params_init
parent
27a69b8cec
commit
5a60f2d9d7
|
@ -975,6 +975,32 @@ EstimatedParamsInitStatement::checkPass(ModFileStructure &mod_file_struct, Warni
|
|||
mod_file_struct.estim_params_use_calib = true;
|
||||
}
|
||||
|
||||
Statement *
|
||||
EstimatedParamsInitStatement::cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table)
|
||||
{
|
||||
vector<EstimationParams> new_estim_params_list;
|
||||
SymbolTable *new_symbol_table = dynamic_datatree.getSymbolTable();
|
||||
try
|
||||
{
|
||||
for (vector<EstimationParams>::const_iterator it = estim_params_list.begin();
|
||||
it != estim_params_list.end(); it++)
|
||||
if (!it->name2.empty())
|
||||
{
|
||||
new_symbol_table->getID(it->name);
|
||||
new_symbol_table->getID(it->name2);
|
||||
}
|
||||
else
|
||||
new_symbol_table->getID(it->name);
|
||||
}
|
||||
catch (SymbolTable::UnknownSymbolNameException &e)
|
||||
{
|
||||
cerr << "ERROR: A variable in the estimated_params_init statement was not found in the symbol table" << endl
|
||||
<< " This likely means that you have declared a varexo that is not used in the model" << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
return new EstimatedParamsInitStatement(estim_params_list, *new_symbol_table, use_calibration);
|
||||
}
|
||||
|
||||
void
|
||||
EstimatedParamsInitStatement::writeOutput(ostream &output, const string &basename) const
|
||||
{
|
||||
|
|
|
@ -333,6 +333,7 @@ public:
|
|||
const bool use_calibration_arg);
|
||||
virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
|
||||
virtual void writeOutput(ostream &output, const string &basename) const;
|
||||
virtual Statement *cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table);
|
||||
};
|
||||
|
||||
class EstimatedParamsBoundsStatement : public Statement
|
||||
|
|
Loading…
Reference in New Issue