Opened 12 years ago
Last modified 12 years ago
#2088 closed defect
Mat results get corrupted with variable filters — at Version 2
Reported by: | Teemu Lempinen | Owned by: | Lennart Ochel |
---|---|---|---|
Priority: | high | Milestone: | 1.9.0 |
Component: | Run-time | Version: | trunk |
Keywords: | Cc: |
Description (last modified by )
Mat file is corrupted with "A = B" equations, if B is filtered out.
To reproduce the problem, simulate the example model below with
variableFilter=".*[^X]"
model Model Real Var3; parameter Real Var1 = 1; Real Var2X( start=0, fixed=true); equation Var3 = Var2X; der(Var2X) = + Var1; end Model;
The resulting mat file dataInfo block becomes as follows:
int dataInfo(4,4) 2 1 0 -1 2 2 0 -1 1 2 0 0 0 0 0 0
If there are more "A=B" equations, there are more "0 0 0 0" lines.
What I would like is as follows, but I do not know if it is possible:
If there are equations "A=C" and "B=C" and the variable C is filtered out, A or B should become the "primary" variable for .mat file, store the values of C and the other should refer to those values.
The easy way would be to filter A and B out too. At least that way the results would not be distorted. It took me quite a few hours to realize why my relatively large model was giving wrong results for certain parameter variables.
Change History (2)
comment:1 by , 12 years ago
Component: | Backend → Run-time |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 12 years ago
Description: | modified (diff) |
---|