Skip to main content

High-performance route optimizer using Lambda_G geometric energy minimization. 3-8% better than standard algorithms.

Project description

Lambda_G Optimizer

High-performance route optimization using geometric energy minimization.

PyPI version License: AGPL v3

Performance

Metric Result
vs Pure Greedy +12% improvement
vs Standard 2-Opt +3-8% improvement
Win Rate 8/9 test cases

Installation

pip install lambda-g-optimizer

Quick Start

Command Line

# Optimize a route from CSV (x,y coordinates per line)
lambda-g --file delivery_stops.csv

Python API

from lambda_g.solver import LambdaGSolver
import numpy as np

# Your coordinates (x, y)
coords = np.array([
    [500, 500],  # Depot
    [120, 340],  # Stop 1
    [780, 220],  # Stop 2
    [450, 890],  # Stop 3
])

solver = LambdaGSolver(coords)
optimal_path, distance = solver.optimize()

print(f"Optimal route: {optimal_path}")
print(f"Total distance: {distance:.2f}")

Input Format

CSV file with x,y coordinates (one per line):

500,500
120,340
780,220
450,890

Output

[*] Optimizing 60 nodes via Lambda_G Manifold...
[*] Phase 1: Multi-start greedy seeding...
[*] Phase 2: Refining top candidates via 2-opt...

[*] Results:
    Standard (start=0): 5162.51
    Lambda_G Hybrid:    5013.33

[✔] Lambda_G WINS by 2.89%

Final Path Distance: 5013.33
Optimized Sequence: [45, 10, 16, ...]

Use Cases

  • Delivery Routing: Last-mile delivery optimization
  • Fleet Management: Multi-vehicle route planning
  • Warehouse: Picker path optimization
  • Field Service: Technician routing
  • Crypto/DeFi: DEX swap path optimization, validator routing

How It Works

Lambda_G uses a geometric energy function instead of just minimizing path length:

E = path_length + (angular_variance / φ) + (radial_variance / φ²)

Where φ (phi) is the Golden Ratio (1.618...).

This creates preference for geometrically coherent solutions that standard algorithms miss.

Author

Abhishek Srivastava

License

Dual Licensed:

If you use Lambda_G in a commercial product or SaaS without open-sourcing your code, you need a commercial license.

Contact: abhiamu515@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lambda_g_optimizer-0.2.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lambda_g_optimizer-0.2.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file lambda_g_optimizer-0.2.0.tar.gz.

File metadata

  • Download URL: lambda_g_optimizer-0.2.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for lambda_g_optimizer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 df74c04187a04d8e3187b75533325b07f20104a554153120adefa171e9286633
MD5 f0ffc3fc75785972b0610627c4655ec5
BLAKE2b-256 9c5024eece878df733b5c7e6cfce6a62fd5e4804845819b2ec3ae7075770f80a

See more details on using hashes here.

File details

Details for the file lambda_g_optimizer-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lambda_g_optimizer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19a29c0c13955300a08fd4f55098e0c174b0f555be118925209afebe9dd50c4e
MD5 c9f75434c5104a81e7308aa8fb7a32fc
BLAKE2b-256 c8387ba4eabb5d4d66c95183576601a2647809b01a23d1252366ff4493d23821

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page