FMUComplianceChecker
FMUComplianceChecker copied to clipboard
Verify target of Real variables with attribute 'derivative'
When a variable references what other variable they are a derivative of, no warning/error is produced if the referenced variable cannot have a derivative.
Example of part of XML that doesn't produce any warnings/errors:
<ModelVariables>
<!-- idx: 1 -->
<ScalarVariable name="state_var" valueReference="0" variability="discrete" initial="exact">
<Boolean start="true"/>
</ScalarVariable>
<!-- idx: 2 -->
<ScalarVariable name="der(state_var)" valueReference="1" causality="output" variability="continuous" initial="approx">
<Real derivative="1" start="1.0"/>
</ScalarVariable>
</ModelVariables>
<ModelStructure>
<Derivatives>
<Unknown index="2"/>
</Derivatives>
</ModelStructure>
I believe there are two levels of strictness:
- continuous/discrete Real variables
- (continuous/discrete) state variables - the target of the
derivative
attribute has some more limitations (I guess it has to havecausality=local/output
)