Skip to content

Commit

Permalink
added solver rule
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@21910 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Vitalij Ruge committed Aug 19, 2014
1 parent 9ff5f64 commit 4d64e3f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Compiler/BackEnd/ExpressionSolve.mo
Expand Up @@ -556,6 +556,14 @@ algorithm
lhs = Expression.makeDiff(e2, lhs);
(res,asserts) = solve(lhs,rhs,inExp3);
then(res, asserts);
// -f(a) = b => f(a) = -b
case(DAE.UNARY(DAE.UMINUS(ty=tp), e1),_,DAE.CREF(componentRef = cr),_)
equation
true = Expression.expHasCref(e1, cr);
false = Expression.expHasCref(inExp2, cr);
e2 = DAE.UNARY(DAE.UMINUS(tp),inExp2);
(res,asserts) = solve(e1,e2,inExp3);
then(res, asserts);

// 0 = a*(b-c) solve for b
case (_,_,DAE.CREF(componentRef = _),_)
Expand Down

0 comments on commit 4d64e3f

Please sign in to comment.