Use ModelTree::addAuxEquation() method instead of directly manipulating ModelTree::aux_equations

master
Sébastien Villemot 2023-04-24 15:38:36 +02:00
parent 34edd4e143
commit a53426fc1f
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 4 additions and 4 deletions

View File

@ -2992,7 +2992,7 @@ DynamicModel::substituteLeadLagInternal(AuxVarType type, bool deterministic_mode
for (auto &neweq : neweqs)
{
addEquation(neweq, nullopt);
aux_equations.push_back(neweq);
addAuxEquation(neweq);
}
if (neweqs.size() > 0)
@ -3139,7 +3139,7 @@ DynamicModel::substituteUnaryOps(const set<int> &eqnumbers, VarExpectationModelT
for (auto &neweq : neweqs)
{
addEquation(neweq, nullopt);
aux_equations.push_back(neweq);
addAuxEquation(neweq);
}
if (subst_table.size() > 0)
@ -3194,7 +3194,7 @@ DynamicModel::substituteDiff(VarExpectationModelTable &var_expectation_model_tab
for (auto neweq : neweqs)
{
addEquation(neweq, nullopt);
aux_equations.push_back(neweq);
addAuxEquation(neweq);
}
if (diff_subst_table.size() > 0)
@ -3227,7 +3227,7 @@ DynamicModel::substituteExpectation(bool partial_information_model)
for (auto neweq : neweqs)
{
addEquation(neweq, nullopt);
aux_equations.push_back(neweq);
addAuxEquation(neweq);
}
if (subst_table.size() > 0)