Opened 21 months ago

Last modified 20 months ago

#5557 new defect

Dynamic states produce incorrect dependencies in FMU

Reported by: jsten Owned by: Jesper Mattsson
Priority: major Milestone:
Component: CodeGen/FMIXML Version: trunk
Keywords: Cc:


The model:

model A
    Real x;
    Real y;
    Real vx;
    Real vy;
    Real lambda;
    der(x) = vx;
    der(y) = vy;
    der(vx) = lambda*x;
    der(vy) = lambda*y - 2;
    x^2 + y^2 = 1;
end A;

Produces the following FMU XML:

                <Unknown index="7" dependencies="" />
                <Unknown index="10" dependencies="" />
                <Unknown index="6" dependencies="" />
                <Unknown index="7" dependencies="" />
                <Unknown index="9" dependencies="" />
                <Unknown index="10" dependencies="" />

Where index 7 and 10 are the dynamic derivatives.

The problem is that non of the derivatives list their states as dependencies. This is wrong, the two dynamic states should be listed.

Change History (3)

comment:1 Changed 21 months ago by jsten

Fixed dependency computation for dynamic derivatives, the FMU XML didn't list the corresponding dynamic states as dependencies for the dynamic derivatives.

comment:2 Changed 21 months ago by jsten

As I did the previous fixed I noticed that there is more issues with the collection attributes on FAbstractEquation in conjunction with dynamic states. Non of FDSDerExp and FDSRefExp goes down into the getUses() nta list and collect the reference there. This leads to incorrect dependencies in some cases. I'm however, at this point, unable to find a model which exposes this. So let's keep this open until we can find such a model or deduct that it can't happen.

comment:3 Changed 20 months ago by Christian Andersson

Milestone: 2.2.x

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.