Skip to content

Commit

Permalink
update some cases for createResidualExp2
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23583 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Vitalij Ruge committed Nov 27, 2014
1 parent 55eb47a commit 8dd40f9
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Compiler/FrontEnd/Expression.mo
Expand Up @@ -11578,37 +11578,38 @@ while con and ii < 15 loop
(e1,_) = ExpressionSimplify.simplify1(e1);
(e2,_) = ExpressionSimplify.simplify1(e2);
then (e1 ,e2, true);
else (oExp1, oExp2, false);
end matchcontinue;

(oExp1, oExp2, con1) := matchcontinue(oExp1, oExp2)
local DAE.Exp e, e1, e2;
case(_,_)
equation
true = isZero(oExp1);
(e1,e2) = makeFraction(oExp2);
false = isOne(e2);
then (e1 ,oExp1, true);
then (e1 ,oExp1, not isOne(e2));

case(_,_)
equation
true = isZero(oExp2);
(e1,e2) = makeFraction(oExp1);
false = isOne(e2);
then (e1 ,oExp2, true);
then (e1 ,oExp2, not isOne(e2));

case(_,_)
equation
true = isOne(oExp1);
(e1,e2) = makeFraction(oExp2);
false = isOne(e2);
then (e1, e2, true);
then (e1 ,e2, not isOne(e2));

case(_,_)
equation
true = isOne(oExp2);
(e1,e2) = makeFraction(oExp1);
false = isOne(e2);
then (e1, e2, true);
then (e1 ,e2, not isOne(e2));

else (oExp1, oExp2, false);
end matchcontinue;
con := con or con1;

ii := ii + 1;
if not con then
Expand Down

0 comments on commit 8dd40f9

Please sign in to comment.