simulation_framework::evaluator::GtBaseEvaluator Class Reference
Last update: 16.07.2025This is the implementation of IEvaluator interface and provides users ability to evaluate KPIs that are added by themselves. This class controls all KPIs centrally and fill/reset the KpiMessage accordingly based on each KPI's calculation result. More...
#include <gt_base_evaluator.h>


Public Member Functions | |
| void | Init () |
| void | Reset () |
| void | Evaluate () |
| void | AddKpi (std::unique_ptr< core::kpi::IKpi< osi3::GroundTruth > > kpi) override |
| core::kpi::KpiMessage | GetKpiMessage () const |
| void | SetInput (const osi3::GroundTruth &ground_truth) |
Public Member Functions inherited from simulation_framework::core::IEvaluator< osi3::GroundTruth > | |
| virtual void | AddKpi (std::unique_ptr< kpi::IKpi< osi3::GroundTruth > > kpi)=0 |
Detailed Description
This is the implementation of IEvaluator interface and provides users ability to evaluate KPIs that are added by themselves. This class controls all KPIs centrally and fill/reset the KpiMessage accordingly based on each KPI's calculation result.
To join the simulation, the evaluator must be injected into an Activity and required KPIs need to be added using AddKpi(std::unique_ptr<core::kpi::IKpi<osi3::GroundTruth>> kpi).
Example of creating one customized KpiEvaluatorActivity containing 2 KPIs and publish the KpiMessage into KpiLoggerTopic to have the KPI results in output json
Definition at line 132 of file gt_base_evaluator.h.
Member Function Documentation
◆ AddKpi()
|
override |
Add one KPI into this evaluator
- Parameters
-
kpi The iKpi interface
◆ Evaluate()
|
virtual |
Calculate all KPIs (call all kpi->CalculateKpi(gt);) which are added in this evaluator and fill the KpiMessage
Implements simulation_framework::core::IEvaluator< osi3::GroundTruth >.
◆ GetKpiMessage()
|
virtual |
Get the filled KPI messages based on calculation of all KPIs
- Returns
- A kpi::KpiMessage object, the vector of KpiContent represents of all added KPIs into this evaluator
Implements simulation_framework::core::IEvaluator< osi3::GroundTruth >.
◆ Init()
|
virtual |
Initial all KPIs (call all kpi->Init();) which are added in this evaluator
Implements simulation_framework::core::IEvaluator< osi3::GroundTruth >.
◆ Reset()
|
virtual |
Clear KpiMessage and reset all KPIs (call all kpi->Reset();) which are added in this evaluator
Implements simulation_framework::core::IEvaluator< osi3::GroundTruth >.
◆ SetInput()
|
virtual |
Set GroundTruth message for KPI calculations
- Parameters
-
ground_truth The osi groundtruth type in protobuf
Implements simulation_framework::core::IEvaluator< osi3::GroundTruth >.
The documentation for this class was generated from the following file:
Public Member Functions inherited from