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.0.tar.gz (5.8 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.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lambda_g_optimizer-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 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.0.tar.gz
Algorithm Hash digest
SHA256 a1a7ea6492e1d81381c856ca6f91afb7794d4a193e428a318b7b0821600fd983
MD5 a52254613fd10868801399fc789670ac
BLAKE2b-256 92db3aacf97adcb76a79b4011c1d241a52a9afffb88a76022ae98da23b34a180

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lambda_g_optimizer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6743bb0a429dd5fc6b774e722fb1feb01d9245f69dd5e85539efcd3d6dea7fc
MD5 c6c54a44ee9ea70e406ce94388159f00
BLAKE2b-256 efea40feff5d49511d99f3669a54431fc012cb099db1b2ed9ef36c6fd74e5b83

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