FMUComplianceChecker
FMUComplianceChecker copied to clipboard
FMU Checker does not perform semantic checks on scalar variables
(moved from https://trac.fmi-standard.org/ticket/398; reported by Lausdahl)
The FMU Checker seems to be missing the semantics checks from the standard and thus not reporting any error for modelDescription.xml which contain obvious errors.
Here is an example. The model description includes this scalar variable:
<ScalarVariable
name="logicalNot.y"
valueReference="186">
<Boolean/>
</ScalarVariable>
This is of cause not allowed since the standard says as follows:
variability
"continuous": Only a variable of type = “Real” can be “continuous”.
ModelExchange: No restrictions on value changes.
CoSimulation: By convention, the variable is from a differential
and
The default is “continuous”
So the above scalar variable can be expanded as follows:
<ScalarVariable
name="logicalNot.y"
variability="continuous"
valueReference="186">
<Boolean/>
</ScalarVariable>
So defining this with type Boolean is an error and should be reported.
Some of the Test_FMUs have this issue e.g: Test_FMUs/FMI_2.0/CoSimulation/win32/MWorks/2016/ControlledTemperature/ControlledTemperature.fmu Test_FMUs/FMI_2.0/CoSimulation/win32/MWorks/2016/BooleanNetwork1/BooleanNetwork1.fmu Reason