Fixed bug.

Preprocessor was not returning an error when some of the exogenous
variables were not used in the model.
issue#70
Stéphane Adjemian(Charybdis) 2018-03-13 09:20:14 +01:00
parent 84c6bf5daf
commit deb77be8f1
1 changed files with 1 additions and 3 deletions

View File

@ -4264,9 +4264,7 @@ DynamicModel::findUnusedExogenous()
set<int> usedExo, unusedExo, unobservedExo;
for (int i = 0; i < (int) equations.size(); i++)
equations[i]->collectVariables(eExogenous, usedExo);
for (int i = 0; i < (int) equations.size(); i++)
equations[i]->collectVariables(eExogenous, usedExo);
set<int> observedExo = symbol_table.getExogenous();
set<int> observedExo = symbol_table.getObservedExogenous();
set<int> allExo = symbol_table.getExogenous();
set_difference(allExo.begin(), allExo.end(),
observedExo.begin(), observedExo.end(),