When looking for unused endos/exos, also search in equations marked [static]
(cherry picked from commit fe974c4c31
)
5.x
parent
cac24dad7e
commit
f257b96060
|
@ -4923,6 +4923,8 @@ DynamicModel::findUnusedEndogenous()
|
|||
set<int> usedEndo, unusedEndo;
|
||||
for (auto &equation : equations)
|
||||
equation->collectVariables(SymbolType::endogenous, usedEndo);
|
||||
for (auto &equation : static_only_equations)
|
||||
equation->collectVariables(SymbolType::endogenous, usedEndo);
|
||||
set<int> allEndo = symbol_table.getEndogenous();
|
||||
set_difference(allEndo.begin(), allEndo.end(),
|
||||
usedEndo.begin(), usedEndo.end(),
|
||||
|
@ -4936,6 +4938,8 @@ DynamicModel::findUnusedExogenous()
|
|||
set<int> usedExo, unusedExo, unobservedExo;
|
||||
for (auto &equation : equations)
|
||||
equation->collectVariables(SymbolType::exogenous, usedExo);
|
||||
for (auto &equation : static_only_equations)
|
||||
equation->collectVariables(SymbolType::exogenous, usedExo);
|
||||
set<int> observedExo = symbol_table.getObservedExogenous();
|
||||
set<int> allExo = symbol_table.getExogenous();
|
||||
set_difference(allExo.begin(), allExo.end(),
|
||||
|
|
Loading…
Reference in New Issue