Join GitHub today
Consider a master/slave co-simulation configuration with several slaves. For the sake of simplicity assume slaves compatible with FMI-2.0. Slaves communicates only with the master at communication steps.
This mechanism is useful in several situations:
--This may also be used by the slave for efficiently handling the predictable triggered (internal) events or even handling some internal non exposed events that create discontinuity in slave outputs.
-- Sometimes there are some important information in the slave output signal that may be ignored by the others or by the master if the communication step size is too big.
Currently there is no mechanism for this purpose.
The type of return value is Float64 with fmi2GetFloat64Status ()
Hi would it not be easier to state the max doStepSize in the xml?
Is it sufficient with a fixed value in the xml? (default 0 = no limit)
If I understand the proposal correctly, then the idea would be to have something like the nextEventTime mechanism for ME for (Hybrid-)CS: The FMU returns after each successfully completed DoStep optional information about a limit to the next time, indicating beforehand that the master should not try to step past that time limit. For time-based events or other predictable events, this approach can be made to work, and makes sense, since it would allow the master to know about those time limits before stepping all of the FMUs, which would be both simpler, and more efficient than approach 2. (I've changed the maximum step size to an event time in this description, since I think that makes more sense, in terms of mirroring the ME approach).
Of course for many other sources of events, which are not predictable a (potentially long) time before-hand, this does not buy you much, i.e. you'd need the early return mechanism for those.
@KarlWernersson : The value MaximumCommunicationStep is usually variable and may varies as a function of the FMU inputs. So this value cannot be retrieved after DoStep. It should be retrieved after setXXX (inputs) and before calling DoStep().
@pmai : yes, this is the main idea, but it is not restricted to predictable events. FMU (CS) may not have any event at all and be purely internally continuous, as the use case 3.