Skip to content

BUILDING-ADOCY/QU-TRAX-ALGORITHM

Repository files navigation

Q-TRAX Banner

QU-TRAX Algorithm - Quantum-Inspired Logistics Optimizer


Project Overview

QU-TRAX is a production-ready, quantum-inspired logistics optimization engine designed to solve complex problems in supply chain management, such as:

  • Route optimization (TSP, VRP)
  • Dynamic scheduling and resource allocation
  • Intelligent warehouse and traffic load management

Leveraging quantum-inspired algorithms like Simulated Annealing and Quantum Collapse techniques, Q-TRAX aims to provide efficient, scalable, and flexible solutions to logistics challenges.


🛠️ Features Developed Till Date

  • Modular backend architecture built with Python FastAPI and async workers
  • Dynamic traffic generator module simulating logistics loads and scenarios
  • Redis-based job queue with RQ workers for asynchronous task execution
  • WebSocket support for real-time progress updates on optimization jobs
  • Configurable quantum-inspired simulation algorithm core
  • Support for multiple environment setups (Mac, Windows, Linux) with detailed installation scripts
  • Logging and debugging facilities to trace optimization workflow and worker statuses

⚙️ Technology Stack

Component Technology / Tool
Backend Framework FastAPI (Python)
Task Queue & Workers Redis + RQ
Algorithm Core Custom Quantum-inspired Simulation (Python)
Real-time Updates WebSockets
Database (planned) PostgreSQL (pgvector for embeddings)
Containerization Docker (planned)
Development OS MacOS, Windows, Linux

📥 Installation & Setup

Prerequisites

  • Python 3.10+
  • Redis server
  • Git
  • (Optional) Docker

1. Clone the repository

git clone https://github.com/BUILDING-ADOCY/Q-TRAX-ALGORITHM.git
cd q-trax

2. Setup Python virtual environment & install dependencies

Mac & Linux:

python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

Windows (PowerShell):

python -m venv venv
.\venv\Scripts\Activate.ps1
pip install --upgrade pip
pip install -r requirements.txt

3. Install and start Redis server

Mac (with Homebrew):

brew install redis
brew services start redis

Verify Redis is running:

redis-cli ping
# Should respond with PONG

Windows:

redis-server

Verify Redis is running in another terminal:

redis-cli ping
# Should respond with PONG

Linux (Ubuntu/Debian):

sudo apt update
sudo apt install redis-server
sudo systemctl start redis
sudo systemctl enable redis

Verify Redis is running:

redis-cli ping
# Should respond with PONG

4. Run RQ Worker to process optimization jobs

In a new terminal window, activate your virtual environment and run:

rq worker qtrax

You should see the worker waiting for jobs.


5. Start the FastAPI backend server

Run:

uvicorn main:app --reload

The API will be available at: http://localhost:8000


🧩 Basic Usage

  • Submit optimization jobs via the API endpoint /enqueue_dynamic
  • Track job status and progress in real-time using WebSocket /ws/results/{job_id}
  • The backend asynchronously executes the quantum-inspired simulation algorithm and streams updates until completion

📄 Technical Documentation & Use Case

Use Case: Dynamic Route Optimization

Scenario: A logistics company wants to optimize delivery routes for a fleet of vehicles, minimizing total travel distance while factoring in traffic and warehouse constraints.

How Q-TRAX Works:

  • The client submits delivery points and constraints to Q-TRAX backend.
  • Q-TRAX’s quantum-inspired algorithm uses simulated annealing and quantum collapse heuristics to explore the solution space.
  • The process runs asynchronously, providing real-time progress updates.
  • The optimized routing solution is returned for execution, improving logistics efficiency.

🔮 Future Roadmap

  • Integrate PostgreSQL database with pgvector for embedding-based search
  • Dockerize components for container-based deployment
  • Build a frontend dashboard with interactive visualizations
  • Add machine learning-based traffic and demand forecasting
  • Extend support for multimodal transport and advanced resource scheduling

📚 References & Resources


📝 Contact & Contribution

Feel free to contribute or raise issues! Contact: [surajmahapatra2003@gmail.com] GitHub: (https://github.com/BUILDING-ADOCY/Q-TRAX-ALGORITHM.git)


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors