modelica / fmi-standard

Specification of the Functional Mock-up Interface (FMI)
https://fmi-standard.org/
Other
260 stars 84 forks source link

Clarify which variables can be set in Continuous Time Mode #1952

Open t-sommer opened 1 month ago

t-sommer commented 1 month ago

According to the table in 3.2.1. State: Continuous-Time Mode it is allowed to set continuous states in continuous time mode via fmi3SetFloat:

Set continuous-time states xc(t): fmi3SetFloat64, fmi3SetContinuousStates

however the description for fmi3Set{VariableType} contradicts this

Function fmi3Set{VariableType} Only for variables with causality = input and variability = continuous.

see also https://github.com/modelica/Reference-FMUs/issues/508

t-sommer commented 1 month ago

Proposal by @KarlWernersson: allow setVariable{VariableType} for continuous time states as well (regardless of attributes) as defined by the <ContinuousStateDerivative> in the Model Structure.