3.2.9 Ground truth initialization parameters
All models can optionally consume osi3::GroundTruth via an initialization parameter called OSMPGroundTruthInit.
Its purpose is to provide the model with a view of the static environment, for example the map, in OSI format.
OSMPGroundTruthInit contains all static data encountered by the model during a simulation run, for example, roads.
All data provided in this message can be assumed by the receiver to be static during the simulation run.
If the model is instantiated multiple times, all instantiations should receive the exact same content. This allows a model to do expensive map calculations only once during initialization, and to share the calculated data between multiple instantiations.
Prefix
Ground truth initialization paramters shall be named with the following prefix:
OSMPGroundTruthInit
Rules
-
If a model needs ground truth during initialization, it shall have a parameter named
OSMPGroundTruthInit. -
OSMPGroundTruthInitshall be defined as a notional discrete binary input parameter variable, with@causality="parameter",@variability="fixed"and@initial="exact". -
The MIME type of the variable shall specify the
type=GroundTruthas part of the MIME type parameters. -
OSMPGroundTruthInitshall be encoded asosi3::GroundTruth. -
OSMPGroundTruthInitshall contain all static data encountered by the model during a simulation run. -
The IDs of objects in
OSMPGroundTruthInitshall be identical to the IDs of the same objects contained in laterOSMPSensorViewInor other input data. -
If the model is instantiated multiple times, then all instantiations should receive the exact same content stored in the
OSMPGroundTruthInitparameter. -
The guaranteed lifetime of the ground-truth protocol-buffer pointer provided as input to the FMU shall be from the time of the call to
fmi2SetIntegerthat provides those values until the end of the followingfmi2ExitInitializationModecall.