use front inserter instead of back inserter for unary/diff auxiliary equations
(cherry picked from commit 6a95831147d942c23fbc3a0a0b1506650eb49b7d)issue#70
parent
2c3d96a6ca
commit
15f5f4f1be
|
@ -5425,7 +5425,7 @@ DynamicModel::substituteUnaryOps(StaticModel &static_model, vector<int> &eqnumbe
|
||||||
for (auto & neweq : neweqs)
|
for (auto & neweq : neweqs)
|
||||||
addEquation(neweq, -1);
|
addEquation(neweq, -1);
|
||||||
|
|
||||||
copy(neweqs.begin(), neweqs.end(), back_inserter(diff_aux_equations));
|
copy(neweqs.begin(), neweqs.end(), front_inserter(diff_aux_equations));
|
||||||
|
|
||||||
if (subst_table.size() > 0)
|
if (subst_table.size() > 0)
|
||||||
cout << "Substitution of Unary Ops: added " << neweqs.size() << " auxiliary variables and equations." << endl;
|
cout << "Substitution of Unary Ops: added " << neweqs.size() << " auxiliary variables and equations." << endl;
|
||||||
|
@ -5465,7 +5465,7 @@ DynamicModel::substituteDiff(StaticModel &static_model, ExprNode::subst_table_t
|
||||||
for (auto & neweq : neweqs)
|
for (auto & neweq : neweqs)
|
||||||
addEquation(neweq, -1);
|
addEquation(neweq, -1);
|
||||||
|
|
||||||
copy(neweqs.begin(), neweqs.end(), back_inserter(diff_aux_equations));
|
copy(neweqs.begin(), neweqs.end(), front_inserter(diff_aux_equations));
|
||||||
|
|
||||||
if (diff_subst_table.size() > 0)
|
if (diff_subst_table.size() > 0)
|
||||||
cout << "Substitution of Diff operator: added " << neweqs.size() << " auxiliary variables and equations." << endl;
|
cout << "Substitution of Diff operator: added " << neweqs.size() << " auxiliary variables and equations." << endl;
|
||||||
|
@ -5474,7 +5474,7 @@ DynamicModel::substituteDiff(StaticModel &static_model, ExprNode::subst_table_t
|
||||||
void
|
void
|
||||||
DynamicModel::combineDiffAuxEquations()
|
DynamicModel::combineDiffAuxEquations()
|
||||||
{
|
{
|
||||||
copy(diff_aux_equations.begin(), diff_aux_equations.end(), back_inserter(aux_equations));
|
copy(diff_aux_equations.begin(), diff_aux_equations.end(), front_inserter(aux_equations));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue