# 模拟退火

**模拟退火**（Simulated annealing，SA）是一种概率性优化方法，用于寻找组合优化问题的近似解。在搜索过程中，通常沿着代价函数向下移动，但偶尔也以一定概率接受向上移动，该概率随着一个称为温度的控制参数降低而减小。该方法由斯科特·柯克帕特里克（Scott Kirkpatrick）、C. 丹尼尔·格拉特（C. Daniel Gelatt, Jr.）和马里奥·P. 韦基（Mario P. Vecchi）在IBM于1983年发表于《科学》（*Science*）的论文中提出，弗拉多·切尔尼（Vlado Černý）于1985年独立地针对旅行商问题提出了相同思想。<sup>[1](https://cgi.cse.unsw.edu.au/~cs4601/refs/papers/KirkpatrickGelattVecchi83.pdf)</sup><sup> • </sup><sup>[2](https://cir.nii.ac.jp/crid/1362262946050150272?lang=en)</sup>

| 关键事实 | 详情 |
|---|---|
| 起源 | 由柯克帕特里克、格拉特和韦基（IBM托马斯·J.沃森研究中心）于1983年5月13日在《科学》上提出；切尔尼于1985年独立提出<sup>[1](https://cgi.cse.unsw.edu.au/~cs4601/refs/papers/KirkpatrickGelattVecchi83.pdf)</sup><sup> • </sup><sup>[2](https://cir.nii.ac.jp/crid/1362262946050150272?lang=en)</sup> |
| 物理基础 | 改编自梅特罗波利斯、罗森布鲁斯、罗森布鲁斯、泰勒和泰勒（1953）的Metropolis算法，该算法模拟热平衡状态下的原子<sup>[3](https://www.osti.gov/biblio/4390578)</sup><sup> • </sup><sup>[1](https://cgi.cse.unsw.edu.au/~cs4601/refs/papers/KirkpatrickGelattVecchi83.pdf)</sup> |
| 接受准则 | 改进的移动总是被接受；代价增加ΔE的恶化移动以概率\( \exp(-\Delta E / T) \)被接受，其中T为当前温度<sup>[4](https://link.springer.com/article/10.1007/s10479-015-2019-x)</sup> |
| 收敛保证 | 哈耶克（Hajek，1988）证明了当进度表满足\( T(t) = c/\log(1+t) \)且c至少为最深非全局局部极小值的深度时，算法依概率收敛到全局极小值<sup>[5](https://pubsonline.informs.org/doi/10.1287/moor.13.2.311)</sup> |
| 实际权衡 | 模拟退火通常需要更多计算资源，以换取不陷入局部最优，适用于替代方案是枚举的情形<sup>[6](https://www.sciencedirect.com/science/article/pii/030504839490006X)</sup> |
| 标志性应用 | 超大规模集成电路布局与布线：TimberWolf软件包使用模拟退火，针对1000单元电路，与竞争软件包相比将估计线长减少了44%<sup>[7](https://janders.eecg.utoronto.ca/1387/readings/timberwolf.pdf)</sup> |
| 必要要素 | 配置描述、随机移动生成器、定量目标函数，以及温度和迭代次数的退火进度表<sup>[1](https://cgi.cse.unsw.edu.au/~cs4601/refs/papers/KirkpatrickGelattVecchi83.pdf)</sup> |

## 起源与物理类比

该方法基于统计力学与组合优化之间的类比。在统计力学中，温度为T的热平衡系统以玻尔兹曼概率\( \exp(-E/k_{B}T) \)占据各配置，其中E为配置的能量，\( k_{B} \)为玻尔兹曼常数。对固体进行仔细退火——先熔化，然后在凝固点附近长时间停顿并缓慢降温——可使材料达到低能晶态；快速淬火则会产生缺陷或玻璃态，仅具有亚稳的局部最优结构。<sup>[1](https://cgi.cse.unsw.edu.au/~cs4601/refs/papers/KirkpatrickGelattVecchi83.pdf)</sup>

计算核心是Metropolis算法，由尼古拉斯·梅特罗波利斯（Nicholas Metropolis）、阿里安娜·W. 罗森布鲁斯（Arianna W. Rosenbluth）、马歇尔·N. 罗森布鲁斯（Marshall N. Rosenbluth）、奥古斯塔·H. 泰勒（Augusta H. Teller）和爱德华·泰勒（Edward Teller）于1953年在洛斯阿拉莫斯提出，用于模拟处于平衡状态的原子集合。<sup>[3](https://www.osti.gov/biblio/4390578)</sup>每一步提出一个小的随机位移，计算能量变化ΔE，若ΔE ≤ 0则接受该移动，否则以概率\( P(\Delta E) = \exp(-\Delta E / k_{B}T) \)接受。重复此步骤使系统趋于玻尔兹曼分布。<sup>[1](https://cgi.cse.unsw.edu.au/~cs4601/refs/papers/KirkpatrickGelattVecchi83.pdf)</sup>

柯克帕特里克、格拉特和韦基用优化问题的代价函数替代能量，在一系列缓慢降低的温度值下运行Metropolis过程。迭代改进法仅接受降低代价的重排，其行为类似于直接淬火至T = 0，通常终止于亚稳解；退火中受控的向上步骤使搜索能够离开局部最优。<sup>[1](https://cgi.cse.unsw.edu.au/~cs4601/refs/papers/KirkpatrickGelattVecchi83.pdf)</sup>切尔尼1985年的论文针对旅行商问题独立地得出了相同思想，将站点的每个排列视为一个配置，将路线长度视为其能量，并在若干实例上展示了达到或非常接近真实最优的解。<sup>[2](https://cir.nii.ac.jp/crid/1362262946050150272?lang=en)</sup>

## 算法工作原理

通用算法包含两个嵌套循环。在内层循环中，于固定温度下生成并评估一个候选邻域解；改进的候选解被接受，非改进的候选解以概率\( \exp(-(f(i')-f(i))/T(j)) \)被接受，其中f为目标值，T(j)为状态j处的温度。由于指数形式，高温时接受较差解的情况频繁，温度降低后则变得罕见，因此搜索初期广泛探索，后期逐渐细化局部区域。外层循环根据冷却方案降低温度，直至达到最终温度或停止条件。<sup>[4](https://link.springer.com/article/10.1007/s10479-015-2019-x)</sup><sup> • </sup><sup>[8](https://onlinelibrary.wiley.com/doi/10.1155/2019/8134674)</sup>

**冷却进度表。** 进度表规定了初始温度、最终温度、限制每个温度下迭代次数的平衡条件，以及递减的温度序列。<sup>[8](https://onlinelibrary.wiley.com/doi/10.1155/2019/8134674)</sup>伊利诺伊大学的布鲁斯·哈耶克（Bruce Hajek）于1988年建立了算法状态依概率收敛到全局最小代价状态集合的进度表充要条件：对于参数形式\( T(t) = c/\log(1+t) \)，常数c必须大于或等于最深非全局局部极小值的深度（深度需适当定义）。<sup>[5](https://pubsonline.informs.org/doi/10.1287/moor.13.2.311)</sup>在实践中，这种对数进度表过于缓慢：科恩（Cohn）和菲尔丁（Fielding）指出，收敛算法在实践中被认为太慢，而沸腾、恒温和快速冷却等仅具有小概率达到全局极小值的进度表，在实践和理论上都可以得到辩护。<sup>[9](https://epubs.siam.org/doi/10.1137/S1052623497329683)</sup>一项关于进度表的实证研究同样发现，对于保证收敛而言，没有明显优于对数进度表的方案，同时构造出了一种无法在实践中使用的最优进度表。<sup>[10](https://www.sciencedirect.com/science/article/abs/pii/S0377221704003388)</sup>

**邻域结构。** 当两个解的配置在少数分量上不同或能量值接近时，它们互为邻居。邻域的选择定义了算法可以做出的候选移动，对性能有显著影响，甚至改变哪些解被视为局部最优。<sup>[8](https://onlinelibrary.wiley.com/doi/10.1155/2019/8134674)</sup>

## 应用

1983年的论文将该方法应用于计算机优化设计中的问题，包括划分、元件放置和电子系统布线，并在多达数千个城市的旅行商问题上进行了测试。<sup>[1](https://cgi.cse.unsw.edu.au/~cs4601/refs/papers/KirkpatrickGelattVecchi83.pdf)</sup>C. 库拉马斯（C. Koulamas）、S. R. 安东尼（S. R. Antony）和R. 杰恩（R. Jaen）1994年的一项综述发现，模拟退火在运筹学中被应用于单机调度、流水车间调度、作业车间调度、批量确定和旅行商问题等传统领域，以及图着色和数划分等非传统领域。<sup>[6](https://www.sciencedirect.com/science/article/pii/030504839490006X)</sup>

**超大规模集成电路设计。** TimberWolf布局与布线软件包使用模拟退火进行标准单元放置、宏单元/定制单元放置和全局布线。其实现以用户指定的因子α（通常在0.8至0.95范围内）指数降低温度，门阵列放置每单元每阶段生成20个新状态，标准单元放置每单元每阶段生成100个或更多新状态，当代价连续三个阶段不变时停止。对于与Zymos软件包接口的1000单元电路，TimberWolf将总估计线长减少了44%。<sup>[7](https://janders.eecg.utoronto.ca/1387/readings/timberwolf.pdf)</sup>

**仿真优化。** 该框架最初针对确定性函数，现已扩展到随机仿真，模拟退火因其易于实现而仍然是若干商业仿真优化软件包中的流行技术。<sup>[4](https://link.springer.com/article/10.1007/s10479-015-2019-x)</sup>

**多目标优化。** 模拟退火向多目标问题的扩展维护一个在探索可行域过程中收集的非支配解档案，构建近似帕累托最优集；由于涉及多个目标函数时平衡探索与利用需要特殊设计，因此存在许多变体。<sup>[8](https://onlinelibrary.wiley.com/doi/10.1155/2019/8134674)</sup>

## 与其他元启发式算法的比较

模拟退火与遗传算法（GA）和禁忌搜索（TS）同属通用迭代启发式算法家族，均适用于精确求解会遭遇组合爆炸的组合优化问题。<sup>[11](https://www.sciencedirect.com/science/article/pii/S0925527306000971)</sup>比较结果因问题而异：

- 对于二值和综合机器分组问题，模拟退火优于遗传算法和禁忌搜索，尤其在大规模问题上。<sup>[12](https://www.tandfonline.com/doi/abs/10.1080/00207540210131851)</sup>
- 对于限时、限解和无限制条件下的设施选址问题，禁忌搜索在大多数情况下表现很好，而模拟退火和遗传算法的表现更依赖于问题类型和所用标准。<sup>[11](https://www.sciencedirect.com/science/article/pii/S0925527306000971)</sup>
- 对于二次分配问题，一项研究发现遗传算法给出更好的解质量，而禁忌搜索执行时间更短。<sup>[13](https://arxiv.org/abs/1407.4863)</sup>
- 对于交通微观仿真模型的校准，三种元启发式算法均找到了优于手动校准的参数，禁忌搜索比遗传算法和模拟退火更频繁地收敛到最优解。<sup>[14](https://journals.sagepub.com/doi/10.1177/0037549716683028)</sup>

这些结果支持了一个普遍发现：没有单一元启发式算法在所有问题类型上占主导地位，模拟退火的相对优势取决于问题和性能标准。<sup>[11](https://www.sciencedirect.com/science/article/pii/S0925527306000971)</sup>

## 后续发展

理论工作持续界定模拟退火所能保证的范围。2022年的一项结果证明，当初始温度\( T_{0} \ge w_{\max} \)且乘性冷却方案的因子为\( 1 - 1/\ell \)（其中\( \ell = \omega(mn\ln(m)) \)）时，模拟退火以至少\( 1 - 1/m \)的概率在时间\( O(\ell(\ln\ln(\ell) + \ln(T_{0}/w_{\min}))) \)内计算出一棵权重至多为最优值\( 1+\kappa \)倍的生成树，使模拟退火成为最小生成树问题的多项式时间近似方案。<sup>[15](https://arxiv.org/abs/2204.02097)</sup>

工程工作则着眼于速度。2026年《自然·通讯》（*Nature Communications*）的一篇论文报道了针对约束满足问题的模拟退火硬件加速，指出模拟退火等元启发式算法通过概率性地探索解空间中的高影响区域，相比暴力搜索（对于分支因子b和决策深度n，规模为\( O(b^{n}) \)）可大幅降低计算开销。<sup>[16](https://doi.org/10.1038/s41467-026-74893-1)</sup>混合方法也已出现：量子增强模拟退火（Quantum Enhanced Simulated Annealing，QESA）将量子退火集成到模拟退火中，以解决连续二次规划问题。<sup>[17](https://doi.org/10.1145/3807447)</sup>

## References

1. [S. Kirkpatrick, C. D. Gelatt, Jr., M. P. Vecchi (1983). Optimization by Simulated Annealing. *Science* 220(4598).](https://cgi.cse.unsw.edu.au/~cs4601/refs/papers/KirkpatrickGelattVecchi83.pdf)
2. [V. Černý (1985). Thermodynamical approach to the traveling salesman problem: An efficient simulation algorithm. *Journal of Optimization Theory and Applications* 45(1), 41-51.](https://cir.nii.ac.jp/crid/1362262946050150272?lang=en)
3. [Metropolis, Rosenbluth, Rosenbluth, Teller, Teller (1953). Equation of state calculations by fast computing machines. OSTI.](https://www.osti.gov/biblio/4390578)
4. [Amaran et al. (2016). Simulation optimization: a review of algorithms and applications. *Annals of Operations Research*.](https://link.springer.com/article/10.1007/s10479-015-2019-x)
5. [Bruce Hajek (1988). Cooling Schedules for Optimal Annealing. *Mathematics of Operations Research* 13(2), 311-329.](https://pubsonline.informs.org/doi/10.1287/moor.13.2.311)
6. [C. Koulamas, S. R. Antony, R. Jaen (1994). A survey of simulated annealing applications to operations research problems. *Omega* 22(1), 41-56.](https://www.sciencedirect.com/science/article/pii/030504839490006X)
7. [C. Sechen et al. (1985). The TimberWolf placement and routing package. *IEEE Journal of Solid-State Circuits*.](https://janders.eecg.utoronto.ca/1387/readings/timberwolf.pdf)
8. [Khalil Amine et al. (2019). Multiobjective Simulated Annealing: Principles and Algorithm Variants. *Advances in Operations Research*.](https://onlinelibrary.wiley.com/doi/10.1155/2019/8134674)
9. [Harry Cohn, Mark Fielding (1999). Simulated Annealing: Searching for an Optimal Temperature Schedule. *SIAM Journal on Optimization*.](https://epubs.siam.org/doi/10.1137/S1052623497329683)
10. [A theoretical study on the behavior of simulated annealing leading to a new cooling schedule. *European Journal of Operational Research*.](https://www.sciencedirect.com/science/article/abs/pii/S0377221704003388)
11. [Marvin A. Arostegui Jr., Sukran N. Kadipasaoglu, Basheer M. Khumawala (2006). An empirical comparison of Tabu Search, Simulated Annealing, and Genetic Algorithms for facilities location problems. *International Journal of Production Economics* 103(2), 742-754.](https://www.sciencedirect.com/science/article/pii/S0925527306000971)
12. [Comparative study of simulated annealing, genetic algorithms and tabu search for solving binary and comprehensive machine-grouping problems. *International Journal of Production Research* 40(9).](https://www.tandfonline.com/doi/abs/10.1080/00207540210131851)
13. [A Comparative Study of Meta-heuristic Algorithms for Solving Quadratic Assignment Problem. arXiv:1407.4863.](https://arxiv.org/abs/1407.4863)
14. [Abhay D. Lidbe, Alexander M. Hainen, Steven L. Jones (2017). Comparative study of simulated annealing, tabu search, and the genetic algorithm for calibration of the microsimulation model. *Simulation* 93(1).](https://journals.sagepub.com/doi/10.1177/0037549716683028)
15. [Simulated Annealing is a Polynomial-Time Approximation Scheme for the Minimum Spanning Tree Problem. arXiv:2204.02097.](https://arxiv.org/abs/2204.02097)
16. [Hardware acceleration of simulated annealing for constraint satisfaction problems. *Nature Communications* 17, 8905 (2026).](https://doi.org/10.1038/s41467-026-74893-1)
17. [Extending Quantum Annealing to Continuous Domains: a Hybrid Method for Quadratic Programming. *ACM Transactions on Quantum Computing*.](https://doi.org/10.1145/3807447)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › General discrete mathematics and discrete structures › Combinatorics › Combinatorics in other fields › Combinatorics and physics

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/simulated-annealing

English original: https://www.edgepedia.org/simulated-annealing
