Skip to content

Packs / geospatial-public

route-order-tsp

order delivery stops into a short round trip with nearest-neighbour plus 2-opt improvement

L2 Checks passed 3 of 3 runsv1.0.0Tech-Realm/space-geospatial-public

Install

logicpacks pack use geospatial-public/route-order-tsp
get_pack geospatial-public/route-order-tsp

The second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.

Keys it needs (names only)

None.

Playbooks included

  • Spec: spec/SPEC.md (goal, steps, edge cases, don’ts)
  • Routes: python-stdlibortools
  • Checks: 1 in outcome/checks.yaml
  • Code: route.py
  • Tools: python3

Usage, last 8 weeks

New: no recorded use yet.

Purpose (from spec/SPEC.md)

Goal

Order delivery stops into a short round trip with nearest-neighbour plus 2-opt improvement.

Steps

  1. List the depot first, then stops.
  2. Run route.py for a straight-line order.
  3. For real road order and ETAs use OSRM/Valhalla (maps space) with this order as a start.

Edge cases

  • Time windows and vehicle capacity need a real VRP solver (OR-Tools).
  • Over ~200 stops 2-opt gets slow in pure Python.

Don'ts

  • Don't promise ETAs from straight-line km.

Routes (free first)

  1. python-stdlib: code/route.py (no install).
  2. ortools (free): Google OR-Tools for VRP with capacity/time windows (pip install ortools)