Opened 4 years ago
Closed 3 years ago
#4992 closed defect (fixed)
Bad scalability of large group member sets in BiPgraph
Reported by: | jsten | Owned by: | jsten |
---|---|---|---|
Priority: | major | Milestone: | 2.0.x |
Component: | Modelica/MiddleEnd | Version: | trunk |
Keywords: | #4991. | Cc: |
Description (last modified by )
The BiPGraph handles big non-scalar equations really bad. Example of such equations are algorithms which assigns big variable vectors. One of the problems is that the group member list isn't the same list for all group members. Instead one list is allocated for each group member, however all the lists for the group members contains the same information. This can be made more efficient!
Example model:
model A constant Integer n = 10000; Real a[n]; algorithm a[1] := time; for i in 2:n loop a[i] := a[i - 1] + 1; end for; end A;
This is a part of #4991.
Attachments (1)
Change History (11)
comment:1 Changed 4 years ago by
Description: | modified (diff) |
---|
Changed 4 years ago by
Attachment: | patch.patch added |
---|
comment:2 Changed 3 years ago by
changeset:9014
Fixed two complexity bugs in BiPGraph:
- Group members did not share the group member list
- Printing of the graph caused printing of the same, large, algorithm n times.
Also added a limit to the number of scalar equations there can be, set it to 1000 for now.
comment:4 Changed 3 years ago by
changeset:9030
Fixed scalability bugs related to handling of algorithms in tarjan and BLT related code.
comment:5 Changed 3 years ago by
r9030 resolves the last issues for the model in the ticket. However this model causes further problems:
model B constant Integer n = 10000; Real a[n]; Real b; algorithm a[1] := b; for i in 2:n loop a[i] := a[i - 1] + 1; end for; equation b * a[n] = time; end B;
comment:6 Changed 3 years ago by
Another model that causes problems:
model C constant Integer n = 10000; Real a[n]; algorithm when sample(0, 1) then a[1] := time; for i in 2:n loop a[i] := a[i - 1] + 1; end for; end when; end C;
comment:7 Changed 3 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
changeset:9034
Improved scalabilty for algorithms with a lot of scalars.
comment:8 Changed 3 years ago by
The following model fails after r9034:
model A Real a,b,c,d,e; equation a = time + d * 2; e = a * 2 - d; d = c * 2 + a; algorithm when e > 0 then b := pre(d) + 1; c := b / 2; end when; end A;
comment:9 Changed 3 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:10 Changed 3 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
changeset:9046
Fixed regression introduced in r9034. Jacobian calculation no longer assumes that SimpleEquationBlocks are scalar.
Partial solution of this problem