Skip to content

Commit

Permalink
- handle if equations in inline
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12294 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Jul 5, 2012
1 parent 7c4868e commit 0e09cc7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Compiler/FrontEnd/Inline.mo
Expand Up @@ -203,7 +203,9 @@ algorithm
DAE.ElementSource source;
list<Integer> dimSize;
DAE.Algorithm alg;
list<DAE.Statement> stmts,stmts1;
list<DAE.Statement> stmts,stmts1;
list<BackendDAE.Equation> eqns;
list<list<BackendDAE.Equation>> eqnslst;

case(BackendDAE.EQUATION(e1,e2,source),_)
equation
Expand Down Expand Up @@ -250,6 +252,14 @@ algorithm
(e2_1,source) = inlineExp(e2,fns,source);
then
BackendDAE.COMPLEX_EQUATION(size,e1_1,e2_1,source);

case(BackendDAE.IF_EQUATION(explst,eqnslst,eqns,source),_)
equation
(explst,source) = inlineExps(explst,fns,source);
eqnslst = List.map1List(eqnslst,inlineEq,fns);
eqns = List.map1(eqns,inlineEq,fns);
then
BackendDAE.IF_EQUATION(explst,eqnslst,eqns,source);
else
equation
Debug.fprintln(Flags.FAILTRACE,"Inline.inlineEq failed");
Expand Down

0 comments on commit 0e09cc7

Please sign in to comment.