Skip to content

Commit

Permalink
Fix #3187 (well, not really)
Browse files Browse the repository at this point in the history
- re-added support for array equations of the form: der(x_arr) = fcall() * x_arr; in SimCodeUtil.createSingleArrayEqnCode (r24947 changes removed that)
- added test testsuite/simulation/modelica/arrays/Breaker_total.mos
- minor change in Compiler/Template/DAEDumpTpl.tpl


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24961 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Mar 6, 2015
1 parent 9be3b1c commit 314bdd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Compiler/SimCode/SimCodeUtil.mo
Expand Up @@ -6287,9 +6287,10 @@ algorithm
eqSystlst = SimCode.SES_ARRAY_CALL_ASSIGN(uniqueEqIndex, lhse, e2_1, source)::eqSystlst;
then (eqSystlst, eqSystlst, uniqueEqIndex+1, tempvars);

case (_, (BackendDAE.ARRAY_EQUATION(left=lhse as DAE.CREF(cr_1,_), right=e2, source=source))::_, BackendDAE.VAR(varName = cr)::_, _, _, _) equation
case (_, (BackendDAE.ARRAY_EQUATION(left=e1, right=e2, source=source))::_, BackendDAE.VAR(varName = cr)::_, _, _, _) equation
// We need to strip subs from the name since they are removed in cr.
e1 = Expression.replaceDerOpInExp(lhse);
cr_1 = ComponentReference.crefStripLastSubs(cr);
e1 = Expression.replaceDerOpInExp(e1);
e2 = Expression.replaceDerOpInExp(e2);
(e1, _) = BackendDAEUtil.collateArrExp(e1, NONE());
(e2, _) = BackendDAEUtil.collateArrExp(e2, NONE());
Expand Down
2 changes: 1 addition & 1 deletion Compiler/Template/DAEDumpTpl.tpl
Expand Up @@ -234,7 +234,7 @@ match lst
let cmt_str = dumpCommentOpt(comment)
let ann_str = dumpCompAnnotation(comment)
let binding_str = if bindingExp then ' = <%bindingExp%>'
/* uncomment this and use the source_str if you want to print the typeLst inside the source (we should maybe put it on a flag or something
/* uncomment this and use the source_str if you want to print the typeLst inside the source (we should maybe put it on a flag or something)
let source_str = match source case SOURCE(__) then (typeLst |> tp => AbsynDumpTpl.dumpPath(tp) ;separator=", ") else ''
*/
<<
Expand Down

0 comments on commit 314bdd8

Please sign in to comment.