From 62dadaa9b19d2f87838a88d8ee5d1c02b7f08d3a Mon Sep 17 00:00:00 2001 From: "Low, Siew Wei" Date: Mon, 9 Feb 2026 15:08:45 +0800 Subject: [PATCH 1/2] Editorial Updates --- .../smart-route-planning-agent/docs/toc.rst | 3 + .../docs/user-guide/Overview.md | 16 --- .../docs/user-guide/environment-variables.md | 2 +- .../docs/user-guide/get-started.md | 32 +++--- ...o-build-from-source.md => how-it-works.md} | 100 ++++++++---------- .../docs/user-guide/index.md | 30 ++++++ .../docs/user-guide/index.rst | 24 ----- .../docs/user-guide/release-notes.md | 8 +- .../docs/user-guide/system-requirements.md | 30 +++--- .../traffic-data-analysis-workflow.md | 60 +++++------ 10 files changed, 141 insertions(+), 164 deletions(-) create mode 100644 metro-ai-suite/smart-route-planning-agent/docs/toc.rst delete mode 100644 metro-ai-suite/smart-route-planning-agent/docs/user-guide/Overview.md rename metro-ai-suite/smart-route-planning-agent/docs/user-guide/{how-to-build-from-source.md => how-it-works.md} (60%) create mode 100644 metro-ai-suite/smart-route-planning-agent/docs/user-guide/index.md delete mode 100644 metro-ai-suite/smart-route-planning-agent/docs/user-guide/index.rst diff --git a/metro-ai-suite/smart-route-planning-agent/docs/toc.rst b/metro-ai-suite/smart-route-planning-agent/docs/toc.rst new file mode 100644 index 0000000000..36ccdb145c --- /dev/null +++ b/metro-ai-suite/smart-route-planning-agent/docs/toc.rst @@ -0,0 +1,3 @@ +.. toctree:: + + user-guide/index \ No newline at end of file diff --git a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/Overview.md b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/Overview.md deleted file mode 100644 index f41662d3af..0000000000 --- a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/Overview.md +++ /dev/null @@ -1,16 +0,0 @@ -# Smart Route Planning Agent - -| **STATUS** | Work in Progress | -|------------| ------------------| - -This application uses AI Agent to analyze a route between given source and destination. It communicates with other agents to fetch live analysis reports for traffic intersections found along all feasible routes between the source and destination. Subsequently, the agent finds an optimum route in real-time which is likely to be free from any possible incidents (like congestion, weather, roadblocks, accidents etc.). - -

- Architecture -

- -## Supporting Resources - -- [Get Started Guide](get-started.md) -- [API Reference](api-reference.md) -- [System Requirements](system-requirements.md) diff --git a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/environment-variables.md b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/environment-variables.md index 329223fc9f..9adfc06829 100644 --- a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/environment-variables.md +++ b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/environment-variables.md @@ -1,6 +1,6 @@ # Environment Variables -This document provides comprehensive information about all environment variables used by the Smart Traffic Intelligence Agent. +This section explains the environment variables used by the Smart Route Planning Agent. | **STATUS** | Work in Progress | |------------| ------------------| diff --git a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/get-started.md b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/get-started.md index 36d5e3d4fa..c3a36b685c 100644 --- a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/get-started.md +++ b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/get-started.md @@ -3,33 +3,31 @@ | **STATUS** | Work in Progress | |------------| ------------------| -This application uses AI Agent to analyze a route between given source and destination. It communicates with other agents to fetch live analysis reports for traffic intersections found along all feasible routes between the source and destination. Subsequently, the agent finds an optimum route in real-time which is likely to be free from any possible incidents (like congestion, weather, roadblocks, accidents etc.). - ## Prerequisites Before you begin, ensure the following: -- **System Requirements**: Verify that your system meets the [minimum requirements](./system-requirements.md). -- **Docker Installed**: Install Docker. For installation instructions, see [Get Docker](https://docs.docker.com/get-docker/). +- **System requirements**: Verify that your system meets the [minimum requirements](./system-requirements.md). + +- **Docker platform**: Install Docker platform. For installation instructions, see [Get Docker](https://docs.docker.com/get-docker/). -This guide assumes basic familiarity with Docker commands and terminal usage. If you are new to Docker, see [Docker Documentation](https://docs.docker.com/) for an introduction. +- You are familiar with Docker commands and using the terminal. If you are new to Docker platform, see [Docker Documentation](https://docs.docker.com/) for an introduction. ## Quick Start with Setup Script | **STATUS** | Work in Progress | |------------| ------------------| +Intel recommends using the unified setup script `setup.sh` that configures, builds, deploys, and manages the Smart Route Planning Agent. -The Smart Route Planning Agent includes a unified setup script (`setup.sh`) that combines both setup and orchestration functionality. It handles environment configuration, building, deployment, and ongoing service management. This is the **recommended approach** for getting started and managing the services. - -### 1. Clone the Repository +1. Clone the repository: ```bash git clone https://github.com/open-edge-platform/edge-ai-suites.git cd edge-ai-suites/metro-ai-suite/smart-route-planning-agent ``` -### 2. Run the Complete Setup +2. Run the complete setup: The setup script provides several options. For a complete setup (recommended for first-time users): @@ -37,9 +35,9 @@ The setup script provides several options. For a complete setup (recommended for source setup.sh setup ``` -### 3. Alternative Setup Options +3. Run alternative setup options -For more granular control, the setup script provides individual commands: +For a more granular control, run these commands: ```bash # Set environment variables only @@ -59,23 +57,21 @@ source setup.sh status ``` -### 4. Verify - -Check Smart Route Planning Agent health: +4. Verify the Smart Route Planning Agent health: ```bash curl -s -X GET http://localhost:8082/health ``` -## Manual Setup (Advanced Users) +## Manual Setup for Advanced Users -For advanced users who need more control over the configuration, you can manually set up the stack using Docker Compose. +For advanced users who need more control over the configuration, you can set up the stack manually using Docker Compose tool. ### Manual Environment Configuration -If you prefer to manually configure environment variables instead of using the setup script, see the [Environment Variables Guide](./environment-variables.md) for complete details. +If you prefer to configure environment variables manually instead of using the setup script, see the [Environment Variables Guide](./environment-variables.md) for details. -### Manual Docker Compose Deployment +### Manual Docker Compose Tool Deployment | **STATUS** | Work in Progress | |------------| ------------------| diff --git a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/how-to-build-from-source.md b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/how-it-works.md similarity index 60% rename from metro-ai-suite/smart-route-planning-agent/docs/user-guide/how-to-build-from-source.md rename to metro-ai-suite/smart-route-planning-agent/docs/user-guide/how-it-works.md index 5b99b737b1..a05e5a6e0e 100644 --- a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/how-to-build-from-source.md +++ b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/how-it-works.md @@ -1,25 +1,23 @@ -# How to Build from Source +# How It Works -Build the **Scene Intelligence microservice** from source to customize, debug, or extend its functionality. In this guide, you will: +This section shows how to build the Smart Route Planning Agent from source to customize, debug, or extend its functionality, for developers who want to work directly with the source code. + +You will do the following: - Set up your development environment. - Compile the source code and resolve dependencies. - Generate a runnable build for local testing or deployment. -This guide is ideal for developers who want to work directly with the source code. - ## Prerequisites -Before you begin, ensure the following: -- **System Requirements**: Verify your system meets the [minimum requirements](./system-requirements.md). -- This guide assumes basic familiarity with Git commands, Python virtual environments, and terminal usage. If you are new to these concepts, see: +- **System Requirements**: Verify that your system meets the [minimum requirements](./system-requirements.md). + +- Basic familiarity with Git commands, Python virtual environments, and using the terminal. If you are new to these concepts, see: - [Git Documentation](https://git-scm.com/doc) - [Python Virtual Environments](https://docs.python.org/3/tutorial/venv.html) -## Steps to Build - -This section provides a detailed note on how to build the Scene Intelligence microservice. +## Build Smart Route Planning Agent -**_(Optional)_** Docker Compose builds the _Scene Intelligence_ with a default image and tag name. If you want to use a different image and tag, export these variables: +**(Optional)** Docker Compose tool builds the Smart Route Planning Agent with a default image and tag name. If you want to use a different image and tag, export these variables: ```bash export REGISTRY_URL="your-container-registry_url" @@ -27,33 +25,31 @@ export PROJECT_NAME="your-project-name" export TAG="your_tag" ``` -> **_NOTE:_** `PROJECT_NAME` will be suffixed to `REGISTRY_URL` to create a namespaced url. Final image name will be created/pulled by further suffixing the application name and tag with the namespaced url. +> **Note:** `PROJECT_NAME` will be suffixed to `REGISTRY_URL` to create a namespaced URL. The final image name will be created by suffixing the application name and tag with the namespaced URL. -> **_EXAMPLE:_** If variables are set using above command, the final image names for _Scene Intelligence_ would be `//scene-intelligence:`. +> **Example:** If variables are set using above command, the final image name for Smart Route Planning Agent will be `//scene-intelligence:`. -If variables are not set, in that case, the `TAG` will have default value as _latest_. Hence, final image will be `scene-intelligence:latest`. +If variables are not set, the `TAG` will have the default value, which is `latest`. Hence, the final image name will be `scene-intelligence:latest`. -### 1. Clone the Repository +1. Clone the repository: ```bash git clone https://github.com/open-edge-platform/edge-ai-libraries.git edge-ai-libraries cd edge-ai-libraries/microservices/scene-intelligence ``` -### 2. Set up environment values +2. Set up environment values: -Follow all the instructions provided in the [get started](./get-started.md#set-environment-values) document to set up the environment variables. +Follow the instructions in the [Get Started](./get-started.md#set-environment-values) section to set up the environment variables. -### 3. Build the Docker image - -To build the Docker image, run the following command: +3. Build the Docker image: ```bash cd docker docker compose -f docker/compose.yaml build scene-intelligence ``` -### 4. Run the Docker image +4. Run the Docker image: ```bash docker compose -f docker/compose.yaml up scene-intelligence @@ -61,33 +57,31 @@ docker compose -f docker/compose.yaml up scene-intelligence ## Development Setup -For local development without Docker: +For local development without Docker platform: -### 1. Set up Python Environment +1. Set up Python Environment: ```bash # Create virtual environment python3 -m venv venv -source venv/bin/activate # On Windows: venv\Scripts\activate +source venv/bin/activate # On Windows OS: venv\Scripts\activate -# Or using Poetry (recommended) +# Or, Intel recommends setting up using the Poetry tool poetry install poetry shell ``` -### 2. Install Dependencies +2. Install dependencies: ```bash # Using pip pip install -r requirements.txt -# Using Poetry (recommended) +# Or, Intel recommends setting up using the Poetry tool poetry install ``` -### 3. Set up Configuration Files - -Create the required configuration files: +3. Set up configuration files: ```bash mkdir -p config @@ -97,7 +91,7 @@ cp config/vlm_config.json.example config/vlm_config.json Edit the configuration files according to your environment. -### 4. Set Environment Variables +4. Set environment variables: ```bash export SCENE_INTELLIGENCE_CONFIG_PATH="./config/scene_intelligence_config.json" @@ -106,19 +100,19 @@ export MQTT_BROKER_HOST="localhost" export MQTT_BROKER_PORT=1883 ``` -### 5. Run the Service +5. Run the service: ```bash -# Using Poetry +# Using the Poetry tool poetry run python -m src.scene_intelligence.main # Using pip python -m src.scene_intelligence.main ``` -## Testing the Build +## Test the build -### 1. Run Unit Tests +1. Run unit tests: ```bash # Using Poetry @@ -128,7 +122,7 @@ poetry run pytest tests/ python -m pytest tests/ ``` -### 2. Run Integration Tests +2. Run integration tests: ```bash # Start required services (MQTT broker, VLM service) @@ -141,7 +135,7 @@ poetry run pytest tests/integration/ docker compose -f docker/compose.yaml down ``` -### 3. Verify API Endpoints +3. Verify API endpoints: ```bash # Health check @@ -162,7 +156,7 @@ curl "http://localhost:8001/api/v1/traffic/directional/intersection/3d7b9e1f-c4a ## Development Workflow -### 1. Code Quality +1. Run the following to ensure code quality: ```bash # Format code @@ -177,7 +171,7 @@ poetry run pylint src/ poetry run mypy src/ ``` -### 2. Pre-commit Hooks +2. Run pre-commit hooks: ```bash # Install pre-commit @@ -190,7 +184,7 @@ poetry run pre-commit install poetry run pre-commit run --all-files ``` -### 3. Documentation +3. Generate API documentation: ```bash # Generate API documentation @@ -202,30 +196,30 @@ cd docs/_build/html && python -m http.server 8080 ## Deployment -### 1. Production Build +1. Build for production: ```bash # Build optimized Docker image docker build -t scene-intelligence:production -f docker/Dockerfile.prod . -# Or using Docker Compose with production overrides +# Or using Docker Compose tool with production overrides docker compose -f docker/compose.yaml -f docker compose -f docker/compose.yaml.yml -f docker compose -f docker/compose.yaml.prod.yml build ``` -### 2. Multi-architecture Build +2. Build for multiple architectures: ```bash # Build for multiple architectures docker buildx build --platform linux/amd64,linux/arm64 -t scene-intelligence:latest . ``` -### 3. Kubernetes Deployment +3. Deploy on a Kubernetes Cluster ```bash # Generate Kubernetes manifests helm template scene-intelligence helm/scene-intelligence > k8s-manifests.yaml -# Deploy to Kubernetes +# Deploy on a Kubernetes cluster kubectl apply -f k8s-manifests.yaml ``` @@ -233,24 +227,24 @@ kubectl apply -f k8s-manifests.yaml ### Common Issues -**Dependencies not installing**: -- Ensure Python 3.10+ is installed +**Dependencies are not installed**: +- Ensure Python programming version 3.10+ is installed - Update pip: `pip install --upgrade pip` -- Clear Poetry cache: `poetry cache clear pypi --all` +- Clear the Poetry cache: `poetry cache clear pypi --all` **Import errors**: - Verify PYTHONPATH includes the src directory -- Check virtual environment is activated +- Check that virtual environment is activated - Ensure all dependencies are installed **Configuration errors**: - Validate JSON configuration files - Check file paths in environment variables -- Verify all required configuration sections are present +- Verify that all required configuration sections are present -**Service not starting**: +**Service does not start**: - Check port availability -- Verify MQTT broker connectivity +- Verify Message Queuing Telemetry Transport (MQTT) broker connectivity - Review service logs for detailed error messages ### Debug Mode @@ -262,7 +256,7 @@ export LOG_LEVEL=DEBUG poetry run python -m src.scene_intelligence.main ``` -## Supporting Resources +## Learn More * [Get Started Guide](get-started.md) * [Environment Variables](environment-variables.md) diff --git a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/index.md b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/index.md new file mode 100644 index 0000000000..1c0ace81f6 --- /dev/null +++ b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/index.md @@ -0,0 +1,30 @@ +# Smart Route Planning Agent + +| **STATUS** | Work in Progress | +|------------| ------------------| + +The Smart Route Planning Agent analyzes the route between the given source and destination, and communicates with other agents to fetch live analysis reports for traffic intersections found along feasible routes between the source and destination. Subsequently, the agent finds an optimum route in real-time, which is likely free from any possible incidents such as congestion, weather, roadblocks, and accidents. + +

+ Architecture +

+ +## Learn More + +- [Get Started Guide](get-started.md) +- [API Reference](api-reference.md) +- [System Requirements](system-requirements.md) + + \ No newline at end of file diff --git a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/index.rst b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/index.rst deleted file mode 100644 index f4c88454b5..0000000000 --- a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/index.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. toctree:: - :hidden: - - Overview - -.. toctree:: - - system-requirements - get-started - -.. toctree:: - :caption: How to - - how-to-build-from-source - -.. toctree:: - :caption: References - - environment-variables - api-reference - -.. toctree:: - - release-notes diff --git a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/release-notes.md b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/release-notes.md index b6d8212bbf..c935328b30 100644 --- a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/release-notes.md +++ b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/release-notes.md @@ -7,7 +7,7 @@ ### Features - **Real-time Traffic Analysis**: Comprehensive directional traffic density monitoring with MQTT integration -- **VLM Integration**: Vision Language Model powered traffic scene analysis with sustained traffic detection +- **VLM Integration**: Vision Language Model (VLM)-powered traffic scene analysis with sustained traffic detection - **Sliding Window Analysis**: 15-second sliding window with 3-second sustained threshold for accurate traffic state detection - **Camera Image Management**: Intelligent camera image retention and coordination between API and VLM services - **RESTful API**: Complete HTTP API for traffic summaries, intersection monitoring, and VLM analysis retrieval @@ -23,7 +23,7 @@ ### Technical Specifications -- **Supported Languages**: Python 3.10+ +- **Supported Languages**: Python programming version 3.10 or higher - **Architecture**: Microservice with Docker containerization -- **Dependencies**: FastAPI, MQTT client, aiohttp, structlog -- **External Integrations**: MQTT brokers, VLM OpenVINO serving, camera image streams +- **Dependencies**: FastAPI, MQTT client, aiohttp, and structlog +- **External Integrations**: MQTT brokers, VLM OpenVINO serving, and camera image streams diff --git a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/system-requirements.md b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/system-requirements.md index 8d209ac026..26b8aea1ba 100644 --- a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/system-requirements.md +++ b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/system-requirements.md @@ -1,36 +1,34 @@ # System Requirements -This page provides detailed hardware, software, and platform requirements to help you set up and run the microservice efficiently. +This section shows the hardware, software, and platform requirements to help you set up and run Smart Route Planning Agent efficiently. -## Supported Platforms +The agent currently supports CPU- and GPU-based runs, and runs in the context of video summary pipeline. Hence, the system requirements is as per the documentation in the sample application. -This microservice currently supports CPU and GPU based runs. This microservice is intended to run in the context of video summary pipeline. Hence, supported platform, OS configuration etc. is as per the documentation in the sample application. The documentation here, hence, does not provide separate requirements. +## Supported Operating Systems -**Operating Systems** +- As per the sample application documentation. -- As per sample application documentation. +## Hardware Requirements -**Hardware Platforms** +- As per the sample application documentation. -- As per sample application documentation. - -## Minimum Requirements - -- As per sample application documentation. +## Software Requirements ## Software Requirements -**Required Software**: +- Docker engine version 24.0 +- Python programming language version 3.10 +- Docker Compose tool: [Installation Guide](https://docs.docker.com/compose/install/). + +## Other Requirements -- Docker 24.0 -- Python 3.10 -- Docker Compose: [Installation Guide](https://docs.docker.com/compose/install/). +- As per the sample application documentation. ## Validation - Ensure all required software are installed and configured before proceeding to [Get Started](./get-started.md). -## Supporting Resources +## Learn More - [Overview](Overview.md) - [API Reference](api-reference.md) diff --git a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/traffic-data-analysis-workflow.md b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/traffic-data-analysis-workflow.md index 5046fb1e04..4b73da043c 100644 --- a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/traffic-data-analysis-workflow.md +++ b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/traffic-data-analysis-workflow.md @@ -1,10 +1,6 @@ # Traffic Data Analysis Workflow -## Overview - -The Scene Intelligence microservice employs a sophisticated multi-stage traffic analysis pipeline that combines real-time directional traffic monitoring with AI-powered Vision Language Model (VLM) analysis. This document explains the complete workflow, configuration parameters, and data retention policies. - -## Table of Contents +The Smart Route Planning Agent employs a multi-stage traffic analysis pipeline that combines real-time directional traffic monitoring with AI-powered Vision Language Model (VLM) analysis. This section shows the complete workflow, configuration parameters, and data retention policies. - [Traffic Analysis Pipeline](#traffic-analysis-pipeline) - [VLM Integration and Triggers](#vlm-integration-and-triggers) @@ -55,9 +51,9 @@ The VLM system analyzes high-density traffic situations using a multi-gated appr ## VLM Integration and Triggers -### Trigger Conditions (ALL must be true) +The following are the trigger conditions, in which all must be true: -#### 1. **Threshold Gate**: Traffic Density Exceeds Threshold +1. **Threshold Gate**: traffic density exceeds the threshold: ```python # Configurable via environment or config file @@ -77,7 +73,7 @@ directional_densities = { - **Environment**: `HIGH_DENSITY_THRESHOLD=5.0` - **Config File**: `config/vlm_config.json` → `traffic_analysis.high_density_threshold` -#### 2. **State Change Gate**: Normal → High Traffic Transition +2. **State Change Gate**: normal to high-traffic transition: ```python # Only triggers on state transitions, not continuous high traffic @@ -86,9 +82,9 @@ if previous_state == NORMAL and current_state == HIGH: # Continue to next gate ``` -**Purpose**: Prevents continuous VLM calls during sustained high traffic periods. +**Purpose**: Prevents continuous VLM calls during sustained high-traffic periods. -#### 3. **Persistence Gate**: Sustained High Traffic Duration +3. **Persistence Gate**: sustained high-traffic duration: ```python # Traffic must remain high for minimum duration @@ -104,7 +100,7 @@ if time_in_high_state >= minimum_duration: - **Environment**: `MINIMUM_DURATION_FOR_CONSISTENTLY_HIGH_TRAFFIC_SECONDS=30` - **Config File**: `traffic_analysis.minimum_duration_for_consistently_high_traffic_seconds` -#### 4. **Cooldown Gate**: Time Since Last Analysis +4. **Cooldown Gate**: time since the last analysis: ```python # Prevent frequent VLM calls for same intersection @@ -120,7 +116,7 @@ if time_since_last >= cooldown_minutes * 60: - **Environment**: `VLM_COOLDOWN_MINUTES=1` - **Config File**: `traffic_analysis.vlm_cooldown_minutes` -#### 5. **Concurrency Gate**: No Pending Analysis +5. **Concurrency Gate**: no pending analysis: ```python # Prevent duplicate requests for same intersection @@ -159,7 +155,7 @@ Release Semaphore Slot ### Implementation Details -**Purpose**: Solve timing issues where traffic changes before VLM completes, making analysis invisible to users. +**Purpose**: Solve timing issues where traffic changes before the VLM completes, making analysis invisible to users. #### 1. **Sliding Window Configuration** @@ -185,10 +181,10 @@ traffic_window: List[TrafficWindow] = [] **Process**: -1. Every traffic update adds entry to window +1. Every traffic update adds an entry to the window 2. Remove entries older than 15 seconds 3. Analyze window for sustained periods ≥ 3 seconds -4. Trigger VLM with traffic context from sustained period +4. Trigger VLM with traffic context from a sustained period #### 3. **Sustained Traffic Detection** @@ -245,8 +241,8 @@ Scene Intelligence Service VLM Microservice (4 Workers) **Benefits**: -- Up to 4 intersections analyzed simultaneously -- Each intersection has independent state tracking +- Up to 4 intersections are analyzed simultaneously +- Each intersection has an independent state tracking - Optimal VLM microservice utilization - No blocking between intersections @@ -341,9 +337,9 @@ OV_CONFIG={"PERFORMANCE_HINT": "LATENCY"} # OpenVINO optimization **Features**: -- Environment variable substitution using `${VAR_NAME}` syntax -- Fallback values when environment variables not set -- JSON validation on service startup +- Enable environment variable substitution using the `${VAR_NAME}` syntax +- Enable fallback values when environment variables are not set +- Enable JSON validation on service startup ### Hardcoded Values (Priority: Low) @@ -375,9 +371,9 @@ max_age_hours = 2 # Default cleanup threshold #### Storage Duration -- **In-Memory**: Stored indefinitely until service restart +- **In-Memory**: Stored indefinitely until the service restarts - **API Visibility**: 20 minutes after analysis completion -- **Cleanup**: Manual via `clear_old_analyses()` method (2-hour default, never called automatically) +- **Cleanup**: Manual via the `clear_old_analyses()` method (2-hour default, never called automatically) #### Overwrite Behavior @@ -412,9 +408,9 @@ class VLMAnalysisResult: #### Storage Logic 1. **VLM Analysis**: Images stored with analysis results -2. **Same Retention**: Images persist as long as VLM analysis exists +2. **Same Retention**: Images persist as long as the VLM analysis exists 3. **API Priority**: Serve VLM-stored images first, then fresh images -4. **Overwrite**: Images replaced when new VLM analysis generated +4. **Overwrite**: Images are replaced when a new VLM analysis is generated #### Storage Format @@ -450,15 +446,15 @@ class IntersectionTrafficState: #### Persistence -- **Lifetime**: Exists until service restart -- **Reset**: Only when service restarted or intersection removed +- **Lifetime**: Exists until the service restarts +- **Reset**: Only when the service restarted or the intersection removed - **Updates**: Real-time via MQTT traffic data ## API Integration ### Response Enhancement -All traffic endpoints include VLM analysis when available: +All traffic endpoints will include a VLM analysis when there is enough information for the VLM: ```json { @@ -503,7 +499,7 @@ All traffic endpoints include VLM analysis when available: ## Troubleshooting -### VLM Analysis Not Triggering +### VLM Analysis is Not Triggered Check each gate condition: @@ -570,13 +566,13 @@ docker logs scene-intelligence | grep "VLM analysis completed" ## Summary -The Scene Intelligence traffic analysis system provides: +The Smart Route Planning Agent provides: - **Real-time directional traffic monitoring** with configurable thresholds -- **AI-powered traffic analysis** using Vision Language Models for high-density situations +- **AI-powered traffic analysis** using VLMs for high-density situations - **Windowed analysis** to solve timing issues and provide traffic context -- **Concurrent processing** supporting multiple simultaneous VLM analyses -- **Flexible configuration** via environment variables and config files +- **Concurrent processing** supports multiple simultaneous VLM analyses +- **Flexible configuration** via environment variables and configuration files - **Image retention** tied to VLM analysis lifecycle - **Comprehensive API integration** with enhanced traffic context From c1d643f9dc16fc49fcb1b960a7984f777b267261 Mon Sep 17 00:00:00 2001 From: "Low, Siew Wei" Date: Mon, 9 Feb 2026 17:08:53 +0800 Subject: [PATCH 2/2] update_according_to_guidelines --- .../smart-route-planning-agent/docs/toc.rst | 3 --- .../{_images => _assets}/ITS_architecture.png | Bin .../{how-it-works.md => build-from-source.md} | 2 +- .../docs/user-guide/index.md | 4 ++-- 4 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 metro-ai-suite/smart-route-planning-agent/docs/toc.rst rename metro-ai-suite/smart-route-planning-agent/docs/user-guide/{_images => _assets}/ITS_architecture.png (100%) rename metro-ai-suite/smart-route-planning-agent/docs/user-guide/{how-it-works.md => build-from-source.md} (99%) diff --git a/metro-ai-suite/smart-route-planning-agent/docs/toc.rst b/metro-ai-suite/smart-route-planning-agent/docs/toc.rst deleted file mode 100644 index 36ccdb145c..0000000000 --- a/metro-ai-suite/smart-route-planning-agent/docs/toc.rst +++ /dev/null @@ -1,3 +0,0 @@ -.. toctree:: - - user-guide/index \ No newline at end of file diff --git a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/_images/ITS_architecture.png b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/_assets/ITS_architecture.png similarity index 100% rename from metro-ai-suite/smart-route-planning-agent/docs/user-guide/_images/ITS_architecture.png rename to metro-ai-suite/smart-route-planning-agent/docs/user-guide/_assets/ITS_architecture.png diff --git a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/how-it-works.md b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/build-from-source.md similarity index 99% rename from metro-ai-suite/smart-route-planning-agent/docs/user-guide/how-it-works.md rename to metro-ai-suite/smart-route-planning-agent/docs/user-guide/build-from-source.md index a05e5a6e0e..986c1a0c1f 100644 --- a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/how-it-works.md +++ b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/build-from-source.md @@ -1,4 +1,4 @@ -# How It Works +# Build from Source This section shows how to build the Smart Route Planning Agent from source to customize, debug, or extend its functionality, for developers who want to work directly with the source code. diff --git a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/index.md b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/index.md index 1c0ace81f6..c5bd3a1760 100644 --- a/metro-ai-suite/smart-route-planning-agent/docs/user-guide/index.md +++ b/metro-ai-suite/smart-route-planning-agent/docs/user-guide/index.md @@ -6,7 +6,7 @@ The Smart Route Planning Agent analyzes the route between the given source and destination, and communicates with other agents to fetch live analysis reports for traffic intersections found along feasible routes between the source and destination. Subsequently, the agent finds an optimum route in real-time, which is likely free from any possible incidents such as congestion, weather, roadblocks, and accidents.

- Architecture + Smart Route Planning Agent Architecture

## Learn More @@ -23,7 +23,7 @@ get-started system-requirements environment-variables traffic-data-analysis-workflow -how-it-works +build-from-source release-notes :::