Skip to content
Snippets Groups Projects
Commit 8dd38fbf authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Fix handling of auxiliary variables in endval block

(cherry picked from commit a7e29af8)
parent 6cba6091
Branches
No related tags found
No related merge requests found
......@@ -619,7 +619,8 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool no_log, b
{
(*it)->writeOutput(mOutputFile, basename);
// Special treatment for initval block: insert initial values for the auxiliary variables
/* Special treatment for initval block: insert initial values for the
auxiliary variables and initialize exo det */
InitValStatement *ivs = dynamic_cast<InitValStatement *>(*it);
if (ivs != NULL)
{
......@@ -627,6 +628,11 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool no_log, b
ivs->writeOutputPostInit(mOutputFile);
}
// Special treatment for endval block: insert initial values for the auxiliary variables
EndValStatement *evs = dynamic_cast<EndValStatement *>(*it);
if (evs != NULL)
static_model.writeAuxVarInitval(mOutputFile, oMatlabOutsideModel);
// Special treatment for load params and steady state statement: insert initial values for the auxiliary variables
LoadParamsAndSteadyStateStatement *lpass = dynamic_cast<LoadParamsAndSteadyStateStatement *>(*it);
if (lpass && !no_static)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment