> ## 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::PredictiveMinTtcEvaluator

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

**Definition**: `autonomy/evaluator/predictive_min_ttc_evaluator/predictive_min_ttc_evaluator.h` (line 31)

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

Definition of [PredictiveMinTtcEvaluator](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1evaluator_1_1PredictiveMinTtcEvaluator.md) class to calculate the minimum time to collision. This will store the lowest value of TTC being observed during one simulation run.

**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_1PredictiveMinTtcEvaluator_1a8778dbbad77b21dec72930729a8f52a7)
* [GetKpiType](#classsimulation__framework_1_1evaluator_1_1PredictiveMinTtcEvaluator_1afa04796b1e66b16c1f33ee011530cb90)
* [Init](#classsimulation__framework_1_1evaluator_1_1PredictiveMinTtcEvaluator_1aad25aefd4cb26ff9697c441d39de2deb)
* [PredictiveMinTtcEvaluator](#classsimulation__framework_1_1evaluator_1_1PredictiveMinTtcEvaluator_1ad053b6beae6e2c424e89c268bc4c8941)
* [Reset](#classsimulation__framework_1_1evaluator_1_1PredictiveMinTtcEvaluator_1a8f78acf7646d8476fdbbdc931fbc3ffe)
* [\~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)
* [\~PredictiveMinTtcEvaluator](#classsimulation__framework_1_1evaluator_1_1PredictiveMinTtcEvaluator_1af2cfc869b789faf7d46a1ddacf96747d)

## Public functions

### Function PredictiveMinTtcEvaluator

![][public]

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

**Parameters**:

* const std::string & **kpi\_name** = "predictive\_min\_ttc"

**Return type**:

### Function \~PredictiveMinTtcEvaluator

![][public]

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

**Return type**:

### Function Init

![][public]

```cpp theme={null}
void simulation_framework::evaluator::PredictiveMinTtcEvaluator::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::PredictiveMinTtcEvaluator::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::PredictiveMinTtcEvaluator::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::PredictiveMinTtcEvaluator::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"
