Skip to content

Commit

Permalink
- partially revert r21426 to fix #2788
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@21963 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
lochel committed Aug 24, 2014
1 parent c0579fb commit 1854729
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Compiler/BackEnd/ExpressionSolve.mo
Expand Up @@ -96,7 +96,7 @@ algorithm
local
DAE.Exp rhs,lhs,res,e1,e2,e3,crexp;
DAE.ComponentRef cr,cr1;
list<DAE.Statement> asserts,asserts1;
list<DAE.Statement> asserts,asserts1,asserts2;
/*
case(_,_,_,_) // FOR DEBBUGING...
equation
Expand All @@ -115,6 +115,24 @@ algorithm
then
(res,asserts);

case (_,DAE.IFEXP(e1,e2,e3),_,_)
equation
(lhs,asserts) = solve_work(inExp1,e2,inExp3,linearExps);
(rhs,asserts1) = solve_work(inExp1,e3,inExp3,linearExps);
(res,_) = ExpressionSimplify.simplify1(DAE.IFEXP(e1,lhs,rhs));
asserts2 = listAppend(asserts,asserts1);
then
(res,asserts2);

case (DAE.IFEXP(e1,e2,e3),_,_,_)
equation
(lhs,asserts) = solve_work(e2,inExp2,inExp3,linearExps);
(rhs,asserts1) = solve_work(e3,inExp2,inExp3,linearExps);
(res,_) = ExpressionSimplify.simplify1(DAE.IFEXP(e1,lhs,rhs));
asserts2 = listAppend(asserts,asserts1);
then
(res,asserts2);

// solving linear equation system using newton iteration ( converges directly )
case (_,_,DAE.CREF(componentRef = _),_)
equation
Expand Down

0 comments on commit 1854729

Please sign in to comment.