Skip to content

Commit

Permalink
- add error msg for expressions "der(der(DAE.CREF(_))", see Bug [#1551]
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@9245 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Jun 4, 2011
1 parent 779da9d commit e44740f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Compiler/BackEnd/BackendDAECreate.mo
Expand Up @@ -2710,6 +2710,14 @@ algorithm
DAE.FunctionTree funcs;
DAE.Exp e1;
list<DAE.ComponentRef> newStates;
DAE.ComponentRef cr;
String str;
case((DAE.CALL(Absyn.IDENT(name = "der"),{DAE.CALL(Absyn.IDENT(name = "der"),{e1 as DAE.CREF(componentRef=cr)},tuple_ = false,builtin = true)},tuple_ = false,builtin = true),(vars,funcs)))
equation
str = ComponentReference.crefStr(cr);
str = stringAppendList({"The model includes derivatives of order > 1 for: ",str,". That is not supported. Real d", str, " = der(", str, ") *might* result in a solvable model"});
Error.addMessage(Error.INTERNAL_ERROR, {str});
then fail();
case((DAE.CALL(Absyn.IDENT(name = "der"),{e1},tuple_ = false,builtin = true),(vars,funcs)))
equation
e1 = Derive.differentiateExpTime(e1,(vars,funcs));
Expand Down

0 comments on commit e44740f

Please sign in to comment.