modelica / fmi-ls-ref

Draft for FMI Layered Standard References
Other
4 stars 3 forks source link

Meaning of 'stepSize' and possible new 'interval' attribute to Experiment element #12

Open casella opened 3 weeks ago

casella commented 3 weeks ago

Follow-up of the discussion in PR modelica/fmi-standard#1980.

FMI-LS-REF Section 3.3. defines the Experiment element in the manifest file with attributes name, description, startTime, stopTime, tolerance, stepSize. Although the last four attributes have the same name as in the FMI DefaultExperiment XML element, the description of the last attribute stepSize is not the same as in FMI. Furthermore, it is a tautology, i.e., it doesn't explain anything. Does it mean the size of a fixed step-size solver? Does it mean the communication interval of a variable-step-size solver? Does it mean both, depending on the context?

Most importantly, how do two strictly related existing MA standards, Modelica and FMI, deal with that?

The current situation is a rather messy:

In modelica/fmi-standard#1991 I am proposing to fix this issue in FMI either by adding an interval attribute to DefaultExperiment, or by defining the meaning of stepSize in FMI-ME to be the same of FMI-CS, i.e., the default communication interval. However, this needs to follow the FMI release cycle timing, which is very constrained.

@chrbertsch in modelica/fmi-standard#1980 suggests that we fix this issue in FMI-LS-REF instead. I think we should also do that, i.e. fix both FMI (eventually) and FMI-LS-REF (now). However, we should do that in a coordinated way that avoids generating further ambiguity and confusion.

My suggestion is that the concept of Interval for experiments, which is defined in Modelica since 2012, should eventually have clearly defined consistent counterparts in FMI and FMI-LS-REF.

There are different ways to do that, either by (re)defining the meaning of stepSize in FMI-ME and FMI-LS-REF and/or adding a new attribute interval in FMI and FMI-LS-REF. I'm not sure which path is the best, but we should definitely do something about it, because the current status is really a bit messy.

All things considered, this is probably a relatively minor issue. However, it is a nice case study for trying to develop _coordinated_ standards within the MA.

chrbertsch commented 3 weeks ago
  • FMI 2.0.4 has stepSize meaning default communication interval for FMI-CS, default fixed step size for FMI-ME

  • FMI 2.0.5 draft and FMI 3.0.x have stepSize meaning default communication interval for FMI-CS, but meaning nothing for FMI-ME

Correction: there is no change in FMI 2.0.5rc1 compared to FMI 2.0.4.