Skip to content

Commit

Permalink
[BE] fixes for inStream
Browse files Browse the repository at this point in the history
  • Loading branch information
vruge authored and OpenModelica-Hudson committed Sep 2, 2018
1 parent 67189f3 commit 33b800d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Compiler/BackEnd/BackendDAEOptimize.mo
Expand Up @@ -140,6 +140,14 @@ protected function simplifyInStreamWork
output list<BackendDAE.Variables> outVars = inVars;
algorithm
outExp := Expression.traverseExpBottomUp(inExp, simplifyInStreamWork2, outVars);

// with #5104 we remove max(x, eps)
// so in case max(x,eps)*y/max(x,eps) => x*y/x
// now x can be equal 0, so we need simplify x*y/x = y
// it's seem no other models silplyfied it
if not Expression.expEqual(outExp, inExp) then
outExp := ExpressionSimplify.simplify(outExp);
end if;
end simplifyInStreamWork;

protected function simplifyInStreamWork2
Expand Down

0 comments on commit 33b800d

Please sign in to comment.