simulation_framework::core::kpi::IKpi< T > Class Template Reference
Last update: 16.07.2025Represents core KPI calculation logic. More...
#include <i_kpi.h>
Public Member Functions | |
| virtual | ~IKpi ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
| virtual void | Init ()=0 |
| Initializes the KPI logic. | |
| virtual void | Reset ()=0 |
| Resets the KPI logic. | |
| virtual KpiContent | CalculateKpi (const T &input)=0 |
| Executes the core KPI calculation logic. | |
| virtual kpi::Type | GetKpiType () const =0 |
| Retrieves the KPI type. | |
Detailed Description
Represents core KPI calculation logic.
The IKpi template class defines the interface for calculating a Key Performance Indicator (KPI) based on a specific input type. It includes initialization, reset, and calculation methods for KPI evaluators. Example KPIs include Time to Collision (TTC) or Maximum Acceleration.
- Template Parameters
-
T The type of input data used for KPI calculations.
- See also
- KpiContent
- kpi::Type
Member Function Documentation
◆ CalculateKpi()
|
pure virtual |
Executes the core KPI calculation logic.
- Parameters
-
input The input data required for KPI calculation.
- Returns
- The calculated KPI content as a
KpiContentobject.
Implemented in simulation_framework::evaluator::DistanceDrivenEvaluator, simulation_framework::evaluator::MinTtcEvaluator, and simulation_framework::evaluator::PredictiveMinTtcEvaluator.
◆ GetKpiType()
|
pure virtual |
Retrieves the KPI type.
Indicates the type of KPI, which can be one of the following:
kpi::Type::kScalar: A scalar value with a unit.kpi::Type::kTimeSeries: A time series representation.kpi::Type::kLog: A continuous log.- Returns
- The type of the KPI as a
kpi::Typeenum value.
Implemented in simulation_framework::evaluator::DistanceDrivenEvaluator, simulation_framework::evaluator::MinTtcEvaluator, and simulation_framework::evaluator::PredictiveMinTtcEvaluator.
◆ Init()
|
pure virtual |
Initializes the KPI logic.
Sets up any necessary state or resources required for KPI calculation.
Implemented in simulation_framework::evaluator::DistanceDrivenEvaluator, simulation_framework::evaluator::MinTtcEvaluator, and simulation_framework::evaluator::PredictiveMinTtcEvaluator.
◆ Reset()
|
pure virtual |
Resets the KPI logic.
Clears temporary data and prepares the KPI logic for a new calculation, especially if the simulation needs to be restarted.
Implemented in simulation_framework::evaluator::DistanceDrivenEvaluator, simulation_framework::evaluator::MinTtcEvaluator, and simulation_framework::evaluator::PredictiveMinTtcEvaluator.
The documentation for this class was generated from the following file: