关于「东西方原典考辨:丁谓「一举而三役济」与欧拉的七桥」,《买手扫货路线与时间窗》给出的定量结论是什么?
结论:第七章考辨沈括记丁谓「一举而三役济」(示意账本省下 0.826)与欧拉的七桥。
数据口径:书中的坐标、专柜、营业时段、排队时长与限购件数均为示意,不对应任何真实店铺;全部计算由书中程序生成;本书是非个人化经营建议,跨境所购物品须按各地海关规定如实申报并遵守限购规定,书中不讨论任何规避做法。 第五章是全书的转折:示意东京日上,20.99 公里的最短闭环只买到 12 件,件数最多的方案多走 0.32 公里就买齐 15 件;随机日上,把最近邻换成最短闭环每天只多买 0.03 件,按时间窗排序多买 2.93 件。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.826
| job separate combined saved | |
| earth | 2000 100 1900 |
| goods | 3000 600 2400 |
| rubble | 1200 80 1120 |
| canal opening (fixed) | 300 |
| total | 6200 1080 share saved 0.826 |
| combined still cheaper while water cost factor < 1.907 | |
| buyer: ten out-and-back trips 52.38 km vs one loop 20.99 km | |
| loop share of the star walk | 0.401 |
查看完整验算程序
# Chapter 7. p71: "one move, three jobs" (Ding Wei, as told by Shen Kuo).
# Model: an illustrative cost account in cart-li (loads times li). The
# palace needs earth for bricks, timber and stone brought in, and rubble
# taken away. Separate plan: earth from a far pit, goods hauled overland
# from the river, rubble carted to a far dump. Combined plan: dig the
# street (earth on site), flood the trench and float the goods to the
# gate, then fill the trench with rubble. Every number is a stated
# assumption, not a historical record. Second part: the same idea on a
# buyer's day, ten out-and-back trips against one loop (p11 district).
import math
EARTH, GOODS, RUBBLE = 100, 100, 80 # 车次(示意)
FAR_PIT, OVERLAND, FAR_DUMP = 20, 30, 15 # 里(示意)
NEAR, WATER_FACTOR, CANAL_FIXED = 1, 0.2, 300
sep = [EARTH * FAR_PIT, GOODS * OVERLAND, RUBBLE * FAR_DUMP]
comb = [EARTH * NEAR, GOODS * OVERLAND * WATER_FACTOR, RUBBLE * NEAR]
print("job separate combined saved")
for name, a, b in zip(("earth", "goods", "rubble"), sep, comb):
print("%-8s %10.0f %9.0f %7.0f" % (name, a, b, a - b))
tot_s, tot_c = math.fsum(sep), math.fsum(comb) + CANAL_FIXED
print("canal opening (fixed) %5.0f" % CANAL_FIXED)
print("total %10.0f %9.0f share saved %.3f" % (
tot_s, tot_c, 1 - tot_c / tot_s))
# 盈亏平衡:水运系数多高时合并方案不再省
be = (tot_s - comb[0] - comb[2] - CANAL_FIXED) / (GOODS * OVERLAND)
print("combined still cheaper while water cost factor < %.3f" % be)
PTS = [(0.0, 0.0), (3.6, 2.7), (-3.5, -2.5), (2.7, 1.4), (1.4, -1.2),
(0.8, 0.6), (0.6, -2.0), (-0.6, -0.6), (1.8, 3.0), (3.6, 0.3),
(-0.4, -1.4)]
star = math.fsum(2 * math.hypot(x, y) for x, y in PTS[1:])
print("buyer: ten out-and-back trips %.2f km vs one loop 20.99 km" % star)
print("loop share of the star walk: %.3f" % (20.99 / star))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《旅行商二元交换与时间窗车辆路径、东京大阪首尔扫货路线最短闭环与专柜开门时间窗母典》第 7 章「东西方原典考辨:丁谓「一举而三役济」与欧拉的七桥」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-298 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026298,
author = {Fan, Yafu},
title = {Two-Opt Travelling-Salesman Search and Vehicle Routing with Time Windows: Shortest Shopping Loops in Tokyo, Osaka and Seoul under Counter Opening Hours},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}