Skip to main content

AVxcelerate Simulation Framework 2025 R2

simulation_framework::core::kpi::IKpi< T > Class Template Reference

Last update: 16.07.2025

Represents 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

template<typename T>
class simulation_framework::core::kpi::IKpi< T >

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
TThe type of input data used for KPI calculations.
See also
KpiContent
kpi::Type

Definition at line 38 of file i_kpi.h.

Member Function Documentation

◆ CalculateKpi()

template<typename T >
virtual KpiContent simulation_framework::core::kpi::IKpi< T >::CalculateKpi ( const T &  input)
pure virtual

Executes the core KPI calculation logic.

Parameters
inputThe input data required for KPI calculation.
Returns
The calculated KPI content as a KpiContent object.

Implemented in simulation_framework::evaluator::DistanceDrivenEvaluator, simulation_framework::evaluator::MinTtcEvaluator, and simulation_framework::evaluator::PredictiveMinTtcEvaluator.

◆ GetKpiType()

template<typename T >
virtual kpi::Type simulation_framework::core::kpi::IKpi< T >::GetKpiType ( ) const
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::Type enum value.

Implemented in simulation_framework::evaluator::DistanceDrivenEvaluator, simulation_framework::evaluator::MinTtcEvaluator, and simulation_framework::evaluator::PredictiveMinTtcEvaluator.

◆ Init()

template<typename T >
virtual void simulation_framework::core::kpi::IKpi< T >::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()

template<typename T >
virtual void simulation_framework::core::kpi::IKpi< T >::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:

Connect with Ansys