Skip to content

Commit 88b81f3

Browse files
author
Björn Zachrisson
committed
Fixed "bug" from #4760, #4760.
Connect.mo; statement: "source := Util.listReduce(Util.listMap(cs, Util.tuple33), DAEUtil.mergeSources);" caused the kernel to run out of memory in large models. git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4786 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent e20b362 commit 88b81f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Compiler/Connect.mo

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,9 +751,12 @@ protected function flowEquations "function: flowEquations
751751
output list<DAE.Element> outDAEElementLst;
752752
DAE.Exp sum;
753753
DAE.ElementSource source;
754+
list<DAE.ElementSource> lde;
755+
DAE.ElementSource ed;
754756
algorithm
755757
sum := flowSum(cs);
756-
source := Util.listReduce(Util.listMap(cs, Util.tuple33), DAEUtil.mergeSources);
758+
(ed::lde) := Util.listMap(cs, Util.tuple33);
759+
source := Util.listFold(lde, DAEUtil.mergeSources,ed);
757760
outDAEElementLst := {DAE.EQUATION(sum, DAE.RCONST(0.0), source)};
758761
end flowEquations;
759762

0 commit comments

Comments
 (0)