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: MIT

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.

Research

Based on peer-reviewed research:

Author

Abhishek Srivastava

License

MIT License - Free for commercial use.

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.1.1.tar.gz (5.7 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.1.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lambda_g_optimizer-0.1.1.tar.gz
  • Upload date:
  • Size: 5.7 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.1.1.tar.gz
Algorithm Hash digest
SHA256 d682f8d4edaba7189dc51334377bee9dcb4845750a61d83c1c12d591207835e8
MD5 1d202e325ec564d2d9775a68fcd155ba
BLAKE2b-256 fa0e1f278cb85a3d8f16787efa97aff5878b650c26e5601b7eeff8949e499fbd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lambda_g_optimizer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bfc3aed24ff3a7869ae04601096dfb1f6206d61ea6a21d98510ac846db9b09ba
MD5 f9baa6e730142afd4294a1100e0e8d13
BLAKE2b-256 411c0fa974e68d1de92c780e5c68c2acdd64e19daf5ecfff3fad5d8df66c639d

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