Skip to content

Commit

Permalink
- checking const tsubs for derivations
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@19104 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Vitalij Ruge committed Feb 13, 2014
1 parent f4bcb63 commit a4c0882
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Compiler/BackEnd/Differentiate.mo
Expand Up @@ -790,8 +790,9 @@ algorithm
failure(BackendDAE.DIFFERENTATION_TIME() = inDiffType);

(res1, functionTree) = differentiateExp(e, inDiffwrtCref, inInputData, inDiffType, inFunctionTree);

res = DAE.TSUB(res1, i, tp);

b = Expression.isConstValue(res1);
res = Util.if_(b,DAE.TSUB(res1, i, tp),res1);
(res,_) = ExpressionSimplify.simplify(res);

//se1 = ExpressionDump.printExpStr(res);
Expand Down

0 comments on commit a4c0882

Please sign in to comment.