From 245630aef8fd76629f9e82f5b94c0d91cfefdfa4 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Fri, 22 Mar 2024 18:10:51 +0100 Subject: [PATCH 1/4] Change 'static' to 'constant' in the specification to differentiate between static objects and non-changing, i.e. constant, values. Signed-off-by: ClemensLinnhoff --- doc/spec/ground_truth_init_parameters.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/spec/ground_truth_init_parameters.adoc b/doc/spec/ground_truth_init_parameters.adoc index 5ebd704..ed06846 100644 --- a/doc/spec/ground_truth_init_parameters.adoc +++ b/doc/spec/ground_truth_init_parameters.adoc @@ -5,17 +5,17 @@ endif::[] = 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. +Its purpose is to provide the model with information that is constant throughout the simulation, for example the map in OSI format or the model_reference of a MovingObject. -`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. +`OSMPGroundTruthInit` contains all constant 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 constant 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. +This allows a model to do expensive map calculations or loading 3D assets 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: +Ground truth initialization parameters shall be named with the following prefix: [source,protobuf] ---- @@ -28,7 +28,7 @@ OSMPGroundTruthInit * `OSMPGroundTruthInit` shall 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=GroundTruth` as part of the MIME type parameters. * `OSMPGroundTruthInit` shall be encoded as `osi3::GroundTruth`. -* `OSMPGroundTruthInit` shall contain all static data encountered by the model during a simulation run. +* `OSMPGroundTruthInit` shall contain all constant data encountered by the model during a simulation run. * The IDs of objects in `OSMPGroundTruthInit` shall be identical to the IDs of the same objects contained in later `OSMPSensorViewIn` or other input data. * If the model is instantiated multiple times, then all instantiations should receive the exact same content stored in the `OSMPGroundTruthInit` parameter. * 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 `fmi2SetInteger` that provides those values until the end of the following `fmi2ExitInitializationMode` call. From 5305d109f6fe2c36cdfaaaf6520ca73d4b83b205 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 25 Mar 2024 13:03:11 +0100 Subject: [PATCH 2/4] Change constant to 'does not change' Signed-off-by: ClemensLinnhoff --- doc/spec/ground_truth_init_parameters.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/spec/ground_truth_init_parameters.adoc b/doc/spec/ground_truth_init_parameters.adoc index ed06846..dc8e62a 100644 --- a/doc/spec/ground_truth_init_parameters.adoc +++ b/doc/spec/ground_truth_init_parameters.adoc @@ -5,7 +5,7 @@ endif::[] = 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 information that is constant throughout the simulation, for example the map in OSI format or the model_reference of a MovingObject. +Its purpose is to provide the model with information that does not change throughout the simulation, for example the map in OSI format or the model_reference of a MovingObject. `OSMPGroundTruthInit` contains all constant 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 constant during the simulation run. From ed06f86b99cf81e694cbf090ec27cb94b16b182c Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 25 Mar 2024 13:08:58 +0100 Subject: [PATCH 3/4] Further rewording Signed-off-by: ClemensLinnhoff --- doc/spec/ground_truth_init_parameters.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/spec/ground_truth_init_parameters.adoc b/doc/spec/ground_truth_init_parameters.adoc index dc8e62a..ea40952 100644 --- a/doc/spec/ground_truth_init_parameters.adoc +++ b/doc/spec/ground_truth_init_parameters.adoc @@ -7,8 +7,8 @@ endif::[] All models can optionally consume `osi3::GroundTruth` via an initialization parameter called `OSMPGroundTruthInit`. Its purpose is to provide the model with information that does not change throughout the simulation, for example the map in OSI format or the model_reference of a MovingObject. -`OSMPGroundTruthInit` contains all constant 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 constant during the simulation run. +`OSMPGroundTruthInit` contains all data encountered by the model that does not change during a simulation run, for example, roads. +All data provided in this message can be assumed by the receiver to not change 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 or loading 3D assets only once during initialization, and to share the calculated data between multiple instantiations. @@ -28,7 +28,7 @@ OSMPGroundTruthInit * `OSMPGroundTruthInit` shall 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=GroundTruth` as part of the MIME type parameters. * `OSMPGroundTruthInit` shall be encoded as `osi3::GroundTruth`. -* `OSMPGroundTruthInit` shall contain all constant data encountered by the model during a simulation run. +* `OSMPGroundTruthInit` shall contain all data encountered by the model that does not change during a simulation run. * The IDs of objects in `OSMPGroundTruthInit` shall be identical to the IDs of the same objects contained in later `OSMPSensorViewIn` or other input data. * If the model is instantiated multiple times, then all instantiations should receive the exact same content stored in the `OSMPGroundTruthInit` parameter. * 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 `fmi2SetInteger` that provides those values until the end of the following `fmi2ExitInitializationMode` call. From 84927bbbab92e0b5f6620f4528cfb1fa03a209b7 Mon Sep 17 00:00:00 2001 From: Clemens Linnhoff Date: Wed, 27 Mar 2024 16:11:01 +0100 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Pierre R. Mai --- doc/spec/ground_truth_init_parameters.adoc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/spec/ground_truth_init_parameters.adoc b/doc/spec/ground_truth_init_parameters.adoc index ea40952..a2f0194 100644 --- a/doc/spec/ground_truth_init_parameters.adoc +++ b/doc/spec/ground_truth_init_parameters.adoc @@ -5,10 +5,11 @@ endif::[] = 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 information that does not change throughout the simulation, for example the map in OSI format or the model_reference of a MovingObject. +Its purpose is to provide the model with information in OSI format that does not change throughout the simulation, i.e. is considered static. +This can encompass, for example, the road network or referenced 3D models. -`OSMPGroundTruthInit` contains all data encountered by the model that does not change during a simulation run, for example, roads. -All data provided in this message can be assumed by the receiver to not change during the simulation run. +`OSMPGroundTruthInit` contains only data encountered by the model that does not change during a simulation run. +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 or loading 3D assets only once during initialization, and to share the calculated data between multiple instantiations. @@ -28,7 +29,7 @@ OSMPGroundTruthInit * `OSMPGroundTruthInit` shall 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=GroundTruth` as part of the MIME type parameters. * `OSMPGroundTruthInit` shall be encoded as `osi3::GroundTruth`. -* `OSMPGroundTruthInit` shall contain all data encountered by the model that does not change during a simulation run. +* `OSMPGroundTruthInit` shall contain only data encountered by the model that does not change during a simulation run. * The IDs of objects in `OSMPGroundTruthInit` shall be identical to the IDs of the same objects contained in later `OSMPSensorViewIn` or other input data. * If the model is instantiated multiple times, then all instantiations should receive the exact same content stored in the `OSMPGroundTruthInit` parameter. * 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 `fmi2SetInteger` that provides those values until the end of the following `fmi2ExitInitializationMode` call.