modelica / Reference-FMUs

Functional Mock-up Units for development, testing and debugging
Other
129 stars 60 forks source link

SetFloat64 on x in state space FMU ME #508

Open KarlWernersson opened 1 month ago

KarlWernersson commented 1 month ago

The FMU don't allow setting state vector x. This should be allowed in Model Exchange

t-sommer commented 1 month ago

Can you provide steps to reproduce the problem?

KarlWernersson commented 1 month ago

call setFloat64 with value reference 11 in mode exchange, the code does not allow that value reference

t-sommer commented 1 month ago

In Intialization Mode:

Function fmi3Set{VariableType} This function can be called for variables with variabilityconstant and with initial = exact. [Inputs u, parameters p and continuous-time states xc,initial=exact are included here.]

The variable x (with value reference 11) has initial = "calculated", so I should it be settable?

KarlWernersson commented 1 month ago

no but its is a state so it should be settable in continuous time mode and event mode. In initialization mode its not as the initial values is internally computed.