Skip to content

Commit

Permalink
- continue with derivatives of functions: noDerivative bugfix
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5501 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed May 10, 2010
1 parent f575064 commit 28fd481
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Compiler/Derive.mo
Expand Up @@ -732,7 +732,6 @@ algorithm
bl = checkDerFunctionConds(bl1,crlst,expl,inVarsandFuncs);
then bl;
// noDerivative
/* Frenkel TUD: TODO: test this case*/
case(inblst,(i,DAE.NO_DERIVATIVE(binding=DAE.CALL(path=p1)))::crlst,expl,inVarsandFuncs)
equation
i_1 = i-1;
Expand All @@ -746,6 +745,20 @@ algorithm
bl1 = arrayList(ba);
bl = checkDerFunctionConds(bl1,crlst,expl,inVarsandFuncs);
then bl;
// noDerivative
case(inblst,(i,DAE.NO_DERIVATIVE(binding=DAE.ICONST(_)))::crlst,expl,inVarsandFuncs)
equation
// remove input from list
ba = listArray(inblst);
ba = arrayUpdate(ba,i,false);
bl1 = arrayList(ba);
bl = checkDerFunctionConds(bl1,crlst,expl,inVarsandFuncs);
then bl;
case (_,_,_,_)
equation
Debug.fprintln("failtrace", "-Derive.checkDerFunctionConds failed\n");
then
fail();
end matchcontinue;
end checkDerFunctionConds;

Expand Down

0 comments on commit 28fd481

Please sign in to comment.