New M_.has_external_function field

issue#70
Sébastien Villemot 2019-05-15 15:02:36 +02:00
parent 840b5f4f7f
commit 51beb9c2ef
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 12 additions and 0 deletions

View File

@ -3093,6 +3093,18 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
<< (static_only_equations.size() > 0 ? "true" :"false")
<< ";" << endl;
// Say if model contains an external function call
bool has_external_function = false;
for (size_t eq = 0; eq < equations.size(); eq++)
if (equations[eq]->containsExternalFunction())
{
has_external_function = true;
break;
}
output << modstruct << "has_external_function = "
<< (has_external_function ? "true" : "false")
<< ';' << endl;
vector<int> state_var;
for (int endoID = 0; endoID < symbol_table.endo_nbr(); endoID++)
// Loop on periods