Skip to content

Commit

Permalink
- reimplement Exp.solve for ifexp because use solvenonlinsys is very …
Browse files Browse the repository at this point in the history
…slow(with solvenonlinsys: 5sec. without 0sec) The testcase IfEquation2 works now because there is no division by zero (a*x/y,y==0 all the time) anymore. It does not fail with solvenonlinsys because solvenonlinsys returns 0 for this special case.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5073 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Mar 3, 2010
1 parent 32450ec commit d73a180
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Compiler/Exp.mo
Expand Up @@ -8868,14 +8868,15 @@ algorithm
res_1 = simplify1(res);
then
res_1;
/*
case (e1,DAE.IFEXP(cond,tb,fb),e2)

case (lhs,DAE.IFEXP(e1,e2,e3),(cr as DAE.CREF(componentRef = _)))
equation
res = solve(e1,tb,e2);
res_1 = solve(e1,fb,e2);
rhs = solve(lhs,e2,cr);
res = solve(lhs,e3,cr);
res_1 = simplify1(DAE.IFEXP(e1,rhs,res));
then
DAE.IFEXP(cond,res,res_1);
*/
res_1;

case (e1,e2,e3)
equation
Debug.fprint("failtrace", "-Exp.solve failed\n");
Expand Down

0 comments on commit d73a180

Please sign in to comment.