Open
Conversation
Signed-off-by: Moritz Schweppenhaeuser <moritz.schweppenhaeuser@fokus.fraunhofer.de>
Add AggregatedSpatioTemporalProcessor to aggregate traffic metrics over configurable time intervals, significantly reducing data volume while preserving analytical value. Refactoring: - Extract AbstractSpatioTemporalProcessor base class with shared logic - Refactor SpatioTemporalProcessor to extend base (273→92 lines, 66% reduction) - Replace custom aggregation with MOSAIC Aggregator class - Eliminate 265+ lines of duplicate code across processors - Introduce ComputedMetrics record for consistent data transfer Storage Layer: - Add insertAggregatedTraversalMetrics() to FcdDataStorage interface - Implement SQLite storage with aggregated_traversal_metrics table - Implement Parquet storage with aggregated_metrics.parquet output - Add AggregatedMetricRecord for Parquet serialization Configuration: - Add example config to BeST scenario TseServerApp.json - Add AGGREGATED_PROCESSOR_EXAMPLE.md documentation - Support configurable aggregationInterval and processingDelay Build: - Add fcd-shaded-jar Maven profile for standalone JAR creation Benefits: - Reduces storage requirements (865 traversals → ~50 intervals) - Maintains temporal and spatial mean speed accuracy - Enables min/max/variance analysis via MOSAIC Aggregator - Single source of truth for metric computation logic - Handles late-arriving data with configurable processing delay
- Add naiveMeanSpeed and speedPerformanceIndex to ComputedMetrics - Store speedPerformanceIndex in traversal_metrics (Parquet) - Aggregate and store naiveMeanSpeed and speedPerformanceIndex in aggregated_traversal_metrics (SQLite and Parquet) - Update FcdDataStorage interface and implementations
- Calculate average Speed Performance Index in getAveragesForInterval - Pass calculated value instead of null to TraversalStatistics constructor
- Limit SPI values to 1.0 even if vehicles exceed max speed - Prevents misleading metrics > 100% performance
- Limit SPI values to 1.0 even if vehicles exceed max speed - Prevents misleading metrics > 100% performance
Signed-off-by: Moritz Schweppenhaeuser <moritz.schweppenhaeuser@fokus.fraunhofer.de>
Signed-off-by: Moritz Schweppenhaeuser <moritz.schweppenhaeuser@fokus.fraunhofer.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces comprehensive support for storing Traffic State Estimation (TSE) data using Apache Parquet and adds new aggregation capabilities for traffic metrics.
Key Changes
FcdParquetStorage):fcd_records.parquet) as GeoParquet.traversal_metrics.parquet).aggregated_metrics.parquet).thresholds.parquet).connection_data.parquet).ParquetSinkAPI to allow for custom data extensions.AggregatedSpatioTemporalProcessorto compute and store metrics over configurable time intervals (e.g., 15-minute windows).processingDelayto handle late-arriving data in distributed simulations.AbstractSpatioTemporalProcessorto reduce code duplication between the standard and aggregated processors.FcdDataStorageinterface to support aggregated metric insertion.PARQUET_SUPPORT.md(merged intoREADME.md) detailing configuration and usage of the new Parquet features.AGENTS.mdandREADME.mdto reflect the new architecture and build options.Affected parts of the online documentation
FcdParquetStorage.AggregatedSpatioTemporalProcessor.Definition of Done
Prerequisites
Required
type(scope): descriptionorigin/mainhas been merged into your Fork.Special notes to reviewer
FcdParquetStorageimplementation includes a mechanism to rewrite thetraversal_metrics.parquetfile when Relative Traffic Status Metrics (RTSM) are updated, as Parquet files are immutable. This is handled by caching relevant records in memory and rewriting the file upon update.fcd-shaded-jarhas been added to build a standalone JAR with all dependencies, which is useful for deployment in environments where dependencies are not provided by the container.