Skip to content

Commit

Permalink
- resolveloops: the resolved equation has the form 0 = ... in order t…
Browse files Browse the repository at this point in the history
…o simplify the expression on one side

- updated tests

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@18692 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Volker Waurich committed Jan 20, 2014
1 parent a8b6da1 commit 853fb3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Compiler/BackEnd/BackendDAEOptimize.mo
Expand Up @@ -7754,6 +7754,7 @@ algorithm
eqOut := resolveClosedLoop2(eq,loop1,m,mT,eqMapping,varMapping,daeEqsIn,daeVarsIn);
end resolveClosedLoop;


protected function sortLoop "sorts the equations in a loop.
author:Waurich TUD 2014-01"
input list<Integer> loopIn;
Expand Down Expand Up @@ -8062,6 +8063,9 @@ algorithm
exp2 := sumUp2Expressions(sumUp,exp2,exp4);
//print("exp2\n");
//ExpressionDump.dumpExp(exp2);
exp2 := sumUp2Expressions(false,exp2,exp1);
(exp2,_) := ExpressionSimplify.simplify(exp2);
exp1 := DAE.RCONST(0.0);
eqOut := BackendDAE.EQUATION(exp1,exp2,DAE.emptyElementSource,false);
end sumUp2Equations;

Expand Down

0 comments on commit 853fb3e

Please sign in to comment.