Open chrbertsch opened 2 years ago
when one exports FMUs with FMI-Kit, the start values for inputs are set to 0
This reflects the actual start value in the binary.
(Workaround: set the input start value with an IC block directly after the input)
This is not really a solution as it overrides the input for the first step regardless whether or not it has been set.
Is there a way so set meaningful start values for inputs of such FMUs?
Currently not.
@chrbertsch, can you share an example to reproduce the issue?
@chrbertsch, can you share an example to reproduce the issue?
Is it possible to specify a nonzero start value for In1
for FMU export?
Currently the start value is generated as zero:
<!-- Inputs -->
<ScalarVariable name="In1" valueReference="2" causality="input">
<Real start="0"/>
</ScalarVariable>
Otherwise the generated FMU will have a division by zero error during initialization in some tools, even if the Input is connected to a nonzero source.
Is it possible to specify a nonzero start value for In1 for FMU export?
No.
The FMI standard requires, that you provide meaningful start values for inputs. https://github.com/modelica/fmi-guides/issues/31
However, when one exports FMUs with FMI-Kit, the start values for inputs are set to 0, which could e.g. lead to division by zero errors for inputs that are assumed to be nonzero.
Is there a way so set meaningful start values for inputs of such FMUs? (Workaround: set the input start value with an IC block directly after the input)