# State Statistics (Pro)

{% hint style="info" %}
This feature was added in realvirtual **6.0.7** (Professional)
{% endhint %}

**State Statistics** provides production state tracking with time-based statistics collection for OEE analysis, bottleneck identification, and performance monitoring.

## Overview

The StateStatistics component tracks how much time objects spend in different states, enabling Overall Equipment Effectiveness (OEE) analysis and production optimization.

## Key Features

* **State Time Tracking** – Measure duration in each production state
* **OEE Calculation** – Support for availability, performance, and quality metrics
* **Bottleneck Identification** – Identify which states consume most time
* **Real-Time Monitoring** – Track statistics during simulation runtime
* **Export Capabilities** – Generate reports from collected statistics

## Common Production States

Typical states tracked in industrial automation:

* **Idle** – Waiting for material or instructions
* **Processing** – Active production or handling
* **Blocked** – Cannot proceed due to downstream issues
* **Starved** – Waiting for upstream material delivery
* **Maintenance** – Under maintenance or repair
* **Error** – In error state requiring intervention

## Usage Examples

### Basic State Tracking

```csharp
// StateStatistics component tracks state changes automatically
// Configure which states to monitor in Inspector
```

### OEE Analysis

Statistics collected can be used for:

* **Availability** = (Total Time - Downtime) / Total Time
* **Performance** = Actual Output / Theoretical Maximum Output
* **Quality** = Good Parts / Total Parts Produced
* **OEE** = Availability × Performance × Quality

## Common Applications

* **Production Line Analysis** – Identify inefficiencies in manufacturing processes
* **Bottleneck Detection** – Find which stations limit throughput
* **Shift Performance** – Compare productivity across different time periods
* **Continuous Improvement** – Track impact of process changes over time
* **Capacity Planning** – Understand actual vs theoretical capacity

## Integration Points

* Integrates with [StatDisplay](/components-and-scripts/scene-interaction/statdisplay.md) for visualization
* Compatible with DES simulation for accelerated analysis
* Exports to standard reporting formats

## See Also

* [StatDisplay](/components-and-scripts/scene-interaction/statdisplay.md) - Real-time statistics display


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.realvirtual.io/components-and-scripts/scene-interaction/state-statistics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
