Opened 12 years ago

Last modified 12 years ago

#2088 closed defect

Mat results get corrupted with variable filters — at Initial Version

Reported by: Teemu Lempinen Owned by: probably noone
Priority: high Milestone: 1.9.0
Component: Run-time Version: trunk
Keywords: Cc:

Description

Mat file is corrupted with "A = B" equations, if B is filtered out.

To reproduce the problem, simulate the example model below with variable filter ".*[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 (0)

Note: See TracTickets for help on using tickets.