Skip to content

About

Vehicle Routing Problem with Time Windows (VRPTW) solver, independent constraint validator, and financial cost-to-serve engine for fleet dispatch optimization.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

🚚 Fleet Route Optimizer — VRPTW Solver & Cost-to-Serve Engine

Mathematical route optimization solver, constraint validator, and financial cost-to-serve analytics engine for the Supply Chain Workspace.

TypeScript Node.js Express Port Tests Passing License: MIT


🎯 Overview

fleet-route-optimizer provides automated constraint optimization and predictive cost modeling for last-mile logistics and regional transport:

  • Constraint Optimization (VRPTW): Vehicle Routing Problem with Time Windows solving customer delivery sequences subject to capacity, shift lengths, time windows, and service durations.
  • Dual Solver Architecture: Baseline Greedy Insertion vs. Metaheuristic 2-Opt local search.
  • Independent Constraint Validation: Hard constraint verification validating that no vehicle exceeds volumetric capacity or violates strict delivery windows.
  • Financial Cost-to-Serve Modeling: Multi-seed Monte Carlo simulation accounting for driver wages, fuel consumption per kilometer, maintenance overhead, and delayed delivery SLA penalty costs.

🔒 Contract Boundaries & Operational Invariants

As mandated by AGENTS.md:

  • Zero Operational Write Access: Solvers operate on immutable, tenant-scoped planning snapshots (DATA-02) and directed routing matrices (ROUTE-01).
  • No Direct Database Writes: Results are returned via typed JSON response contracts, never written directly into operational PostgreSQL tables.
  • Deterministic Evaluation: Re-running scenarios with identical random seeds produces bit-identical cost and route schedules.

🔌 HTTP API Endpoints (Port 8200)

Method Endpoint Description
GET /health Service health status, uptime, and engine version
POST /api/v1/optimize Executes VRPTW solver given customer stops, fleet vehicles, and directed travel-time matrix
POST /api/v1/evaluate Evaluates financial cost-to-serve metrics and Monte Carlo variance across dispatch plans

🚀 Getting Started

Installation & Build

pnpm install
pnpm build

Running Test Suite (16/16 Unit & Scenario Tests)

pnpm test

Starting the Solver Service

pnpm dev

Listens on http://localhost:8200.


📄 License

MIT License.

About

Vehicle Routing Problem with Time Windows (VRPTW) solver, independent constraint validator, and financial cost-to-serve engine for fleet dispatch optimization.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages