preprocessor: take care of extra exos in planner_objective
parent
5fb6667f86
commit
c22d5f6b2b
|
@ -1534,6 +1534,22 @@ PlannerObjectiveStatement::checkPass(ModFileStructure &mod_file_struct, WarningC
|
||||||
mod_file_struct.planner_objective_present = true;
|
mod_file_struct.planner_objective_present = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Statement *
|
||||||
|
PlannerObjectiveStatement::cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
model_tree->reindex(orig_symbol_table);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
cerr << "ERROR: A variable in the planner_objective 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 PlannerObjectiveStatement(model_tree);
|
||||||
|
}
|
||||||
|
|
||||||
StaticModel *
|
StaticModel *
|
||||||
PlannerObjectiveStatement::getPlannerObjective() const
|
PlannerObjectiveStatement::getPlannerObjective() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -390,6 +390,7 @@ public:
|
||||||
virtual void writeOutput(ostream &output, const string &basename) const;
|
virtual void writeOutput(ostream &output, const string &basename) const;
|
||||||
//! Return the Planner Objective
|
//! Return the Planner Objective
|
||||||
StaticModel *getPlannerObjective() const;
|
StaticModel *getPlannerObjective() const;
|
||||||
|
virtual Statement *cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table);
|
||||||
};
|
};
|
||||||
|
|
||||||
class BVARDensityStatement : public Statement
|
class BVARDensityStatement : public Statement
|
||||||
|
|
Loading…
Reference in New Issue