OpenModelica / OMSimulator

The OpenModelica FMI & SSP-based co-simulation environment.
Other
67 stars 49 forks source link

oms.exportSSVTemplate problem #1280

Open robha67 opened 6 months ago

robha67 commented 6 months ago

Description

1) An SSV file is generated using the exportSSVTemplate API command. A sub set of the parameters exported to the SSV have the following description in the ModelDescription file:

<ScalarVariable name="drag.pi" variability="constant"

This is represented in the SSV as:

<ssv:Parameter name="model.drag.pi" <ssv:Real value = "3.1415..." /> </ssv:Parameter>

If this SSV file is addded to SSP resources and referenced using the OMS API, then I get the following warning message upon simulation

"warning: It is not allowed to provide a start value if initial = "calculated" or causality ="independent"" in the simulation log. This is then followed by a crashed simulation.

@arun3688 @lochel

Should it be possible to change ScalarVariables labeled as constant? (see page 45 in https://fmi-standard.org/assets/releases/FMI_for_ModelExchange_and_CoSimulation_v2.0.pdf)

If not, shouldn't the oms.exportSSVTemplate command ommitt such parameters from the SSV file?