Skip to main content

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: bits.abhi@gmail.com

Metadata

Release files for lambda-g-optimizer 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lambda-g-optimizer 0.2.1
File Size Uploaded Provenance
lambda_g_optimizer-0.2.1.tar.gz 17.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for lambda-g-optimizer 0.2.1
File Interpreter ABI Platform
lambda_g_optimizer-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 34.7 kB

Release files / lambda_g_optimizer-0.2.1.tar.gz

Download URL lambda_g_optimizer-0.2.1.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0851a34c5a675c66c0b1f3c264de3bee2e91c02e09248ee69e0d672371a9ec4e
BLAKE2b-256 checksum
How to use checksums
375b9d85347edb21eb9f1909cbaef43521497e0c779640e721cbf59af0bbd11b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / lambda_g_optimizer-0.2.1-py3-none-any.whl

Download URL lambda_g_optimizer-0.2.1-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d5da79395fe3e168927e1ae3cc3cc9fc330806f98649c9ad5fed508a672a3f8
BLAKE2b-256 checksum
How to use checksums
8f0b61f5f6f1b96851cbaf6d0ae36b8e64261123e307b47b878c9e737fae94cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Security for lambda-g-optimizer 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page