#1801 closed defect (fixed)
Fixed simplification of matrix-vector multiplication
Reported by: | Willi Braun | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.0 |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: |
Description
The dimensions of variables inside of equations are determined wrong for the following model:
model A Real x[4]; constant Real A[:,:] = {{1,0,2,3},{-1,2,0,0},{2,0,0,0},{0,0,1,1}}; Real b[:] = {1,2,3,time}; equation A*x = b; end A;
result:
class A Real x[1]; Real x[2]; Real x[3]; Real x[4]; [...] equation x[1,1] - x[2,1] + 2.0 * x[3,1] = b[1]; 2.0 * x[2,2] = b[2]; 2.0 * x[1,3] + x[4,3] = b[3]; 3.0 * x[1,4] + x[4,4] = b[4]; end A;
That issues occurs if the size of A,x >3, otherwise it works.
Change History (6)
comment:1 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:2 by , 12 years ago
comment:3 by , 12 years ago
Fixed in r12890. I will close this when I get back from coffee and add the new testcase.
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:6 by , 12 years ago
Summary: | wrong array dimension in equations → Fixed simplification of matrix-vector multiplication |
---|
Note:
See TracTickets
for help on using tickets.
This is a problem with simplify. I will fix it.