pac: specify type of variables in non optimizing part of equation

issue#70
Houtan Bastani 2019-02-27 15:10:48 +01:00
parent effa40543e
commit ec21208ed7
No known key found for this signature in database
GPG Key ID: 000094FB955BE169
1 changed files with 15 additions and 0 deletions

View File

@ -3708,6 +3708,21 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
<< modstruct << "pac." << substruct << "non_optimizing_behaviour.vars = [";
for (auto & it : non_optim_vars_params_and_constants)
output << symbol_table.getTypeSpecificID(get<0>(it)) + 1 << " ";
output << "];" << endl
<< modstruct << "pac." << substruct << "non_optimizing_behaviour.type = [";
for (auto & it : non_optim_vars_params_and_constants)
switch (symbol_table.getType(get<0>(it)))
{
case SymbolType::endogenous:
output << "1 ";
break;
case SymbolType::exogenous:
output << "0 ";
break;
default:
cerr << "expecting endogenous or exogenous" << endl;
exit(EXIT_FAILURE);
}
output << "];" << endl
<< modstruct << "pac." << substruct << "non_optimizing_behaviour.lags = [";
for (auto & it : non_optim_vars_params_and_constants)