Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

algo-sc-routing算法 SC 路由

Agent Skill

algo-sc-routing 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

392

周安装

16

GitHub Stars

125

下载量

127
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:algo-sc-routing(算法 SC 路由)
来源仓库:https://github.com/asgard-ai-platform/skills
仓库路径:skills/algo-sc-routing
安装命令:
npx skills add https://github.com/asgard-ai-platform/skills --skill algo-sc-routing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/asgard-ai-platform/skills --skill algo-sc-routing

简介

algo-sc-routing 为车辆配送路径寻找最低总距离或成本的方案。

  • 适用于物流车队调度、快递路线规划与多站点服务优化。
  • 采用启发式或元启发式算法处理NP-hard问题,支持容量约束。
  • 安装命令:npx skills add https://github.com/asgard-ai-platform/skills --skill algo-sc-routing
  • 节点超过25个时建议使用近似算法而非精确解

SKILL.md

Vehicle Routing Problem (VRP)

Overview

VRP determines optimal routes for a fleet of vehicles to serve a set of customers from a depot, minimizing total distance or cost. NP-hard — exact solutions only feasible for small instances (< 25 nodes). Practical solutions use heuristics (Clarke-Wright savings, sweep) or metaheuristics (simulated annealing, genetic algorithm).

When to Use

Trigger conditions:

  • Planning daily delivery routes for a fleet of vehicles
  • Minimizing total travel distance/time under capacity constraints
  • Optimizing route assignments across multiple vehicles

When NOT to use:

  • For single-vehicle route optimization (use TSP solvers)
  • For real-time dynamic routing with continuous order arrivals (use online algorithms)

Algorithm

IRON LAW: VRP Is NP-Hard — Exact Solutions Don't Scale
For n customers, the solution space grows factorially. Exact methods
(branch and bound) work for n < 25. For real-world problems (50-1000+
customers), heuristics are REQUIRED. A good heuristic solution within
5% of optimal is far more valuable than an optimal solution that takes
hours to compute.

Phase 1: Input Validation

Collect: depot location, customer locations and demands, vehicle capacity, number of vehicles, time windows (if applicable), distance/time matrix. Gate: All locations geocoded, demand doesn't exceed vehicle capacity per customer.

Phase 2: Core Algorithm

Clarke-Wright Savings Heuristic:

  1. Start with each customer on its own route (depot → customer → depot)
  2. Compute savings for merging route pairs: s(i,j) = d(depot,i) + d(depot,j) - d(i,j)
  3. Sort savings descending
  4. Merge routes greedily if capacity constraint allows
  5. Improve with 2-opt (swap edges within routes) and or-opt (move customers between routes)

Phase 3: Verification

Check: all customers visited exactly once, no vehicle exceeds capacity, all routes start and end at depot. Compare total distance against lower bound. Gate: All constraints satisfied, solution within 10% of lower bound.

Phase 4: Output

Return routes with sequence, distance, and load.

Output Format

{
  "routes": [{"vehicle": 1, "sequence": ["depot", "C3", "C7", "C1", "depot"], "distance_km": 45, "load": 850, "capacity": 1000}],
  "summary": {"total_distance_km": 180, "vehicles_used": 4, "utilization_avg": 0.82},
  "metadata": {"customers": 30, "method": "clarke_wright_2opt", "computation_ms": 150}
}

Examples

Sample I/O

Input: 10 customers, 2 vehicles (cap=500), depot at center Expected: 2 routes, each serving ~5 customers, total distance minimized by geographic clustering.

Edge Cases

InputExpectedWhy
One customer demand > capacityInfeasible or split deliveryNeed split delivery VRP variant
All customers co-locatedMinimal routing, capacity-limited tripsDistance is trivial, trips determined by load
Tight time windowsMore vehicles neededTime constraints may prevent full-capacity routes

Gotchas

  • Distance matrix quality: Road distance ≠ Euclidean distance. Use actual road network distances (Google Maps, OSRM) for practical routing.
  • Time windows add complexity: VRPTW (VRP with Time Windows) is significantly harder. Customers requiring specific delivery windows fragment routes.
  • Dynamic vs static: Real-world routing has cancellations, additions, and traffic. Plan static routes but allow dynamic re-optimization.
  • Driver constraints: Maximum driving hours, break requirements, and overtime costs add practical constraints not in the basic model.
  • Return to depot: Standard VRP assumes routes return to depot. Open VRP (routes end at last customer) needs different formulation.

References

  • For Clarke-Wright algorithm implementation, see references/clarke-wright.md
  • For metaheuristic approaches (SA, GA), see references/metaheuristics.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.09%
按下载量换算47

Claude

30%
按下载量换算38

Cursor

20.13%
按下载量换算26

Gemini CLI

9.14%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills