Loading...
Loading...
Compare original and translation side by side
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.铁律:VRP是NP难问题——精确解决方案不具备可扩展性
对于n个客户,解空间呈阶乘级增长。精确方法(如分支定界法)仅适用于n<25的场景。对于真实世界的问题(50-1000+个客户),必须使用启发式算法。一个与最优解误差在5%以内的优质启发式解,远比对计算耗时数小时的最优解更有价值。{
"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}
}{
"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}
}| Input | Expected | Why |
|---|---|---|
| One customer demand > capacity | Infeasible or split delivery | Need split delivery VRP variant |
| All customers co-located | Minimal routing, capacity-limited trips | Distance is trivial, trips determined by load |
| Tight time windows | More vehicles needed | Time constraints may prevent full-capacity routes |
| 输入 | 预期输出 | 原因 |
|---|---|---|
| 单个客户需求超过车辆容量 | 不可行或拆分配送 | 需要使用支持拆分配送的VRP变体 |
| 所有客户位置重合 | 最小化路径规划,按容量限制安排运输次数 | 行驶距离可忽略,运输次数由负载决定 |
| 严格的时间窗约束 | 需要更多车辆 | 时间约束可能导致无法充分利用车辆容量 |
references/clarke-wright.mdreferences/metaheuristics.mdreferences/clarke-wright.mdreferences/metaheuristics.md