> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class simulation_framework::evaluator::DistanceDrivenEvaluator

![][C++]
![][public]

**Definition**: `autonomy/evaluator/distance_driven_evaluator/distance_driven_evaluator.h` (line 30)

class [DistanceDrivenEvaluator](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1evaluator_1_1DistanceDrivenEvaluator.md)

Definition of [DistanceDrivenEvaluator](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1evaluator_1_1DistanceDrivenEvaluator.md) class to To fulfill this we want to implement a KPI evaluator that aggregates the distance driven by the ego vehicle over the course of the simulation.

**Inherits from**:

* [simulation\_framework::core::kpi::IKpi\< osi3::GroundTruth >](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1core_1_1kpi_1_1IKpi.md)

## Members

* [CalculateKpi](#classsimulation__framework_1_1evaluator_1_1DistanceDrivenEvaluator_1a84b5bd6ae0f4af77a17363b20ed5b086)
* [DistanceDrivenEvaluator](#classsimulation__framework_1_1evaluator_1_1DistanceDrivenEvaluator_1a73f1fbf32fa117be135700df7bd9bf80)
* [GetKpiType](#classsimulation__framework_1_1evaluator_1_1DistanceDrivenEvaluator_1acc4088bba0acb50e544228f3ed1fa35a)
* [Init](#classsimulation__framework_1_1evaluator_1_1DistanceDrivenEvaluator_1abfe81ec22fdea705cf8ed83d51f2f3eb)
* [Reset](#classsimulation__framework_1_1evaluator_1_1DistanceDrivenEvaluator_1a0ae35bde229b1db909a6331e8062d3ac)
* [\~DistanceDrivenEvaluator](#classsimulation__framework_1_1evaluator_1_1DistanceDrivenEvaluator_1ae4f36d8b8680c725648fee833bb1f501)
* [\~IKpi](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1core_1_1kpi_1_1IKpi.md#classsimulation__framework_1_1core_1_1kpi_1_1IKpi_1ab56f1f4f0afe45f82e9c591df22d1377)

## Public functions

### Function DistanceDrivenEvaluator

![][public]

```cpp theme={null}
simulation_framework::evaluator::DistanceDrivenEvaluator::DistanceDrivenEvaluator(const std::string &kpi_name="driven_dist")
```

**Parameters**:

* const std::string & **kpi\_name** = "driven\_dist"

**Return type**:

### Function \~DistanceDrivenEvaluator

![][public]

```cpp theme={null}
simulation_framework::evaluator::DistanceDrivenEvaluator::~DistanceDrivenEvaluator()=default
```

**Return type**:

### Function Init

![][public]

```cpp theme={null}
void simulation_framework::evaluator::DistanceDrivenEvaluator::Init() override
```

Initializes the KPI logic.

Sets up any necessary state or resources required for KPI calculation.

**Return type**: void

**Reimplements**: [Init](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1core_1_1kpi_1_1IKpi.md#classsimulation__framework_1_1core_1_1kpi_1_1IKpi_1affa38e79e2d2fe57ac913fa736437fae)

### Function Reset

![][public]

```cpp theme={null}
void simulation_framework::evaluator::DistanceDrivenEvaluator::Reset() override
```

Resets the KPI logic.

Clears temporary data and prepares the KPI logic for a new calculation, especially if the simulation needs to be restarted.

**Return type**: void

**Reimplements**: [Reset](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1core_1_1kpi_1_1IKpi.md#classsimulation__framework_1_1core_1_1kpi_1_1IKpi_1ad08cdb1d1091c84920a9733a81c752a5)

### Function CalculateKpi

![][public]

```cpp theme={null}
core::kpi::KpiContent simulation_framework::evaluator::DistanceDrivenEvaluator::CalculateKpi(const osi3::GroundTruth &ground_truth) override
```

Executes the core KPI calculation logic.

**Parameters**:

* **input**: The input data required for KPI calculation.

**Returns**:

The calculated KPI content as a `KpiContent` object.

**Parameters**:

* const osi3::GroundTruth & **input**

**Return type**: [core::kpi::KpiContent](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/structsimulation__framework_1_1core_1_1kpi_1_1KpiContent.md)

**Reimplements**: [CalculateKpi](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1core_1_1kpi_1_1IKpi.md#classsimulation__framework_1_1core_1_1kpi_1_1IKpi_1a614cb6051405e8865257360eefff9ab6)

### Function GetKpiType

![][public]
![][const]

```cpp theme={null}
core::kpi::Type simulation_framework::evaluator::DistanceDrivenEvaluator::GetKpiType() const override
```

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.

**Return type**: core::kpi::Type

**Reimplements**: [GetKpiType](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1core_1_1kpi_1_1IKpi.md#classsimulation__framework_1_1core_1_1kpi_1_1IKpi_1aeef163c532f5b7b03e685642cb75ccaa)

[private]: https://img.shields.io/badge/-private-red "private"

[public]: https://img.shields.io/badge/-public-brightgreen "public"

[const]: https://img.shields.io/badge/-const-lightblue "const"

[C++]: https://img.shields.io/badge/language-C%2B%2B-blue "C++"

[protected]: https://img.shields.io/badge/-protected-yellow "protected"

[static]: https://img.shields.io/badge/-static-lightgrey "static"
