Opened 3 years ago

Closed 3 years ago

#4973 closed defect (fixed)

CS FMUs don't react to change in discrete inputs

Reported by: efredriksson Owned by: efredriksson
Priority: major Milestone: Pending
Component: FMI/Export Version: trunk
Keywords: Cc:

Description (last modified by efredriksson)

Consider the model:

model Plant
output Real T(start=10.0);
input Real Tenv(start=0.0);
parameter Real V = 9.0;
parameter Real R = 1.0;
parameter Real k = 0.05;
input Boolean onSwitch;
if onSwitch then
der(T) = (Tenv - T) + V^2 / (R + k*T);

der(T) = (Tenv - T);
end if;
end Plant;

When exporting it as a CS FMU and simulating with a changing onSwitch this will not be propagated as an externally triggered event for the underlying ME FMU.

Change History (5)

comment:1 Changed 3 years ago by efredriksson

r8972 Made references to real inputs more explicit as to not mix-up the handling of real inputs with discrete inputs. Some general clean-up also.

comment:2 Changed 3 years ago by efredriksson

Description: modified (diff)

comment:3 Changed 3 years ago by efredriksson

r8979 Added check if the user changes integer or boolean inputs between calls to do_step.

comment:4 Changed 3 years ago by efredriksson

There is more work related to this that should be done in #5025 and #4815.

comment:5 Changed 3 years ago by efredriksson

Resolution: fixed
Status: newclosed

r8984 Fixed check for discrete reals (to be added later) such that it is relative.

Note: See TracTickets for help on using tickets.