Google Sign-In Required

Use your company Google account to access the BetterFleet private content.

Back to private home

BetterFleet Support Private
Skip to content
BetterFleet Dev Wiki
bf-bnl-schedule-analysis-compute
Initializing search
    bf-dev
    • Home
    • Product Capabilities
    • Process
    • Current Work
    • System Design
    • Software Reference
    • Operations
    bf-dev
    • Home
      • Overview
      • Manage
      • Overview
      • Product Engineering Workflow
      • Product Engineering Delivery
      • Product Engineering Workflow in Linear
        • GitLab Feature Flags
        • In-App Docs Authoring
        • Release Notes
      • Templates
      • Publishing
      • Workflow Companions
      • Overview
      • Active Artifacts
      • Backlog Artifacts
      • Archived Artifacts
      • Overview
      • Microgrid
      • OSCP
        • Challenge
        • Specification
        • Spec
        • Architecture
        • Overview
        • Script Runtime Model
        • Compose Profiles and Modes
        • Repo Topology
        • CI and Release Integration
        • Overview
        • Internal Application Diagrams
          • Overview
          • Web Model
          • Core Model
        • Service Interaction Flows
        • Data and State
          • Index
          • bf-manage-web
          • bf-manage-core
          • bf-manage-connect
          • bf-manage-sitepwrmon
          • bf-manage-incidents
          • bf-telematics
          • bf-depot-sim
          • bf-manage-roaming
          • bf-support-microsite
          • bf-digital-twin
          • bf-schedule-creator
        • Overview
        • Internal Application Diagrams
        • Migration and Flags
        • Simulation Request Lifecycle
          • Index
          • bf-bnl-ui
          • bf-bnl-settings
          • bf-bnl-schedule-analysis-compute
            • What this service is
            • Code anatomy
            • Architectural characteristics
            • Documentation and tests in-repo
            • Internal request lifecycle
          • bf-route-modelling
          • bf-schedule-creator
          • bf-digital-twin
        • Overview
        • Secrets and Env Strategy
        • Vendors and Local Dependencies
        • ADRs
        • Service Matrix
        • Cloud Dependencies
        • Ports and URLs
      • Onboarding
      • Daily Operations Runbook
        • Overview
        • Staging Hotfix Release
        • Production Hotfix Release
        • Terraform Plan Dry Runs
      • Troubleshooting
      • Testing Guide
    • What this service is
    • Code anatomy
    • Architectural characteristics
    • Documentation and tests in-repo
    • Internal request lifecycle

    bf-bnl-schedule-analysis-compute¶

    What this service is¶

    bf-bnl-schedule-analysis-compute is the legacy compute service for Plan simulations. It performs trip/charging/depot and SOH-related analyses and returns computed outputs to orchestrators.

    Code anatomy¶

    • src/app.py: FastAPI app entrypoint.
    • src/scheduleAnalysis/*: schedule analysis pipeline modules.
    • src/chargingAnalysis/*: charging strategy and charging-data analysis.
    • src/depotAnalysis/*: depot-oriented analysis, with experiments/helpers.
    • src/sohAnalysis/*: battery state-of-health analysis.
    • src/stats/*: metrics/statistical utilities.

    Architectural characteristics¶

    • Batch/compute oriented service with scenario lock/update flow documented in README.
    • Legacy Pipenv-based dependency management in-repo.

    Documentation and tests in-repo¶

    • README includes task execution flow diagram and local run guidance.
    • Tests segmented by analysis domain with substantial fixture data.

    Internal request lifecycle¶

    sequenceDiagram
      participant Caller as settings service
      participant Api as compute api
      participant Schedule as schedule analysis
      participant Charging as charging analysis
      participant Depot as depot analysis
      participant Soh as soh analysis
      participant Route as route modelling
      participant S3 as aws s3
    
      Caller->>Api: analysis request
      Api->>Schedule: derive schedule metrics
      Api->>Charging: derive charging strategy outputs
      Api->>Depot: derive depot metrics
      Api->>Soh: derive battery soh outputs
      Charging->>Route: call route modelling when needed
      Route-->>Charging: route modelling outputs
      Api->>S3: write or read compute artifacts when configured
      Api-->>Caller: aggregated compute response
    Made with Material for MkDocs