edgepedia

技术与人造世界 / 计算技术与数字系统 / 人工智能与数据 / Algorithms and computational methods / Optimization and dynamic programming / Physics- and human-inspired metaheuristics

综合 · Edgepedia阅读需 8 分钟

正弦余弦算法

阅读英文原文

正弦余弦算法(SCA)是一种基于种群、无梯度的元启发式方法(一种无需问题特定知识来引导试探解的通用搜索方法),用于连续优化;它利用正弦和余弦函数,使候选解朝当前找到的最优解波动或远离该最优解,从而更新候选解。它不需要梯度信息,而且在元启发式方法中不同寻常的是,也不需要来自自然或人类行为的隐喻;其搜索模型直接由周期数学函数构建。1

关键事实详情
提出论文赛义达利·米尔贾利利(Seyedali Mirjalili),《知识系统》(Knowledge-Based Systems),第96卷,第120–133页,2016年2
位置更新在当前位置上添加一个朝向当前最优解、由衰减因子缩放的正弦或余弦波动3
控制参数r1 r_{1} (衰减步长),r2∈[0,2π] r_{2} \in [0, 2\pi] ,r3∈[0,2] r_{3} \in [0, 2] ,r4∈[0,1] r_{4} \in [0, 1] ;常数 a a 建议取 24
原始基准测试协议30个搜索代理,500次迭代,30次运行,威尔科克森秩和检验3
主要弱点早熟收敛,归因于未定义的开发机制5
典型种群规模一项应用研究建议30–406
官方代码作者在 MATLAB 中央文件交换发布的 MATLAB 实现7

工作原理

SCA 维护一个候选解种群。每次迭代,每个解都围绕一个目标点 P P 移动,P P 是当前找到的最优解,移动规则为

Xit+1=Xit+r1⋅sin⁡(r2)⋅∣r3⋅Pit−Xit∣ X_{i}^{t+1} = X_{i}^{t} + r_{1} \cdot \sin(r_{2}) \cdot | r_{3} \cdot P_{i}^{t} - X_{i}^{t} |

当 r4<0.5 r_{4} < 0.5 时使用上式;当 r4≥0.5 r_{4} \geq 0.5 时,将上式中的 sin⁡(r2) \sin(r_{2}) 替换为 cos⁡(r2) \cos(r_{2}) 。其中 Xit X_{i}^{t} 是当前解在第 t t 次迭代中第 i i 维的位置,竖线表示绝对值。3 四个随机参数各有不同作用:r1 缩放步长;[0, 2π] 中的 r2 决定代理朝目标点行进或远离目标点的距离;[0, 2] 中的 r3 随机加权目标点的影响(远大于1的值增强该影响,远小于1的值降低该影响);而 r4 r_{4} 以相等概率在正弦和余弦方程之间切换。4

探索—开发平衡来自 r1 r_{1} ,它按

r1=a−t⋅aT r_{1} = a - t \cdot \frac{a}{T}

线性递减,其中 t t 是当前迭代次数,T T 是最大迭代次数,a a 是常数。3 因为 r1 r_{1} 乘以正弦或余弦项,其值决定波动的范围:当正弦和余弦范围落在 (1, 2] 和 [−2, −1) 时,解向外移动并探索搜索空间;当范围落在 [−1, 1] 时,解朝目标点移动并进行开发。3 因此,r1 r_{1} 从 a a 到 0 的线性衰减在整个运行过程中产生从探索到开发的平滑过渡。4

实施方式

标准运行过程如下:在边界内随机初始化一个解种群;评估每个解并将 P P 设为最优解;然后重复直到 T T 次迭代:根据衰减公式计算 r1 r_{1} ,随机抽取 r2 r_{2} 、r3 r_{3} 和 r4 r_{4} ,用正弦或余弦方程更新每个解,评估新位置,并在出现更好的解时替换 P P 。3

原始论文使用30个搜索代理和500次迭代。3 常数 a a 建议取2,因此三角函数波动在 [−2, 2] 范围内运行。4 一项关于压力容器设计的应用研究建议该类问题的种群规模在30到40之间。6 基本算法的可用 MATLAB 实现见一本专为 SCA 编写的开放获取 Springer 图书。8

起源

SCA 由赛义达利·米尔贾利利在论文《SCA:一种求解优化问题的正弦余弦算法》中提出,该论文于2016年发表在《知识系统》上。2 作者公开了 MATLAB 源代码。7

论文就其知识背景提出两点。它认为元启发式方法不需要来自自然的实际灵感,简单的数学函数即可用于设计优化算法;SCA 本身不依赖此类隐喻。3 作者还表示,他最近提出的飞蛾火焰算法在灵感、数学表述和现实应用方面与 SCA 完全不同。3

变体

原始论文本身提出了二进制和多目标版本、莱维飞行和变异算子以及混合化作为未来方向3,文献随后沿这些路径展开。一篇综述将变体分为改进型、多目标和混合型版本。9

应用

已发表的应用涵盖分类与特征选择、图像处理、机器人路径规划、调度、辐射状配电网及其他工程问题9,以及机器学习、工程设计、无线传感器网络和环境建模。8 在原始论文的翼型设计案例研究中,SCA 在一个有约束的真实问题上将阻力从0.009降至0.0061。3

局限与替代方案

若干同行评审来源在相同弱点上趋于一致。一个突出缺点是容易早熟收敛,这被归因于搜索区域内未定义的开发机制。5 SCA 还表现出收敛速度慢、容易陷入局部最优,以及在多模态、高维问题上求解精度相对较低。1 一个结构性原因是原始算法中只有全局最优位置引导进化,因此当个体陷入局部最优时很难逃离,导致停滞。20 性能对种群规模敏感。4

与替代算法相比,情况取决于问题。在原始评估中,SCA 在30次运行中与萤火虫算法(FA)、蝙蝠算法(BA)、花授粉算法(FPA)、引力搜索算法(GSA)、粒子群优化(PSO)和遗传算法(GA)进行比较,并使用威尔科克森秩和检验;在单峰测试函数上,它的收敛速度显著快于这六种算法。3 然而,在压力容器设计问题上,SCA 获得的解排名第四,落后于 GWO、CS 和 SSO,并落后于差分进化21和 GWO。22 • 6

References

  1. Triangular-based sine cosine algorithm for global search and feature selection (TTOSCA, Scientific Reports/PMC, 2025)
  2. Seyedali Mirjalili (2016). SCA: A Sine Cosine Algorithm for solving optimization problems. Knowledge-Based Systems.
  3. SCA: A Sine Cosine Algorithm for solving optimization problems (Mirjalili, Knowledge-Based Systems 96:120-133, 2016, full-text copy)
  4. Sine Cosine Algorithm (book chapter, Bansal et al., Sine Cosine Algorithm for Optimization, Springer 2023)
  5. Enhancing engineering optimization using hybrid sine cosine algorithm with Roulette wheel selection and opposition-based learning (nSCA, Scientific Reports, 2024)
  6. Evaluation of SCA on pressure vessel design (journal application study)
  7. SCA: A Sine Cosine Algorithm - MATLAB Central File Exchange (author's official code release)
  8. Sine Cosine Algorithm for Optimization (Bansal, Bajpai, Rawat, Nagar, Springer, 2023, open access book)
  9. A comprehensive survey of sine cosine algorithm: variants and applications (Artificial Intelligence Review)
  10. Mohamed A. Tawhid, Vimal Savsani (2017). Multi-objective sine-cosine algorithm (MO-SCA) for multi-objective engineering design problems. Neural Computing and Applications.
  11. Rama Chandran Narayanan and colleagues (2023). A Novel Many-Objective Sine–Cosine Algorithm (MaOSCA) for Engineering Applications. Mathematics.
  12. K Srikanth Reddy and colleagues (2017). A New Binary Variant of Sine–Cosine Algorithm: Development and Application to Solve Profit-Based Unit Commitment Problem. Arabian Journal for Science and Engineering.
  13. Hathiram Nenavath, Ravi Kumar Jatoth (2017). Hybridizing sine cosine algorithm with differential evolution for global optimization and object tracking. Applied Soft Computing.
  14. Saeed Nezamivand Chegini, Ahmad Bagheri, Farid Najafi (2018). PSOSCALF: A new hybrid PSO based on Sine Cosine Algorithm and Levy flight for solving optimization problems. Applied Soft Computing.
  15. Jianhua Jiang and colleagues (2019). SCGSA: A sine chaotic gravitational search algorithm for continuous optimization problems. Expert Systems with Applications.
  16. N. Singh, S.B. Singh (2017). A novel hybrid GWO-SCA approach for optimization problems. Engineering Science and Technology an International Journal.
  17. Abdelraouf Ishtaiwi, Ahmad Sami Al-Shamayleh, Hussam N. Fakhouri (2024). A Hybrid JADE–Sine Cosine Approach for Advanced Metaheuristic Optimization. Applied Sciences.
  18. Aoshuang Ye and colleagues (2024). A hybrid algorithm based on improved sine cosine algorithm and population incremental learning and its application to economic load dispatch in power systems. AIMS energy.
  19. Jiatang Cheng, Peisen Song, Yan Xiong (2025). A parameter adaptive sine cosine algorithm for global optimization problems. Engineering Research Express.
  20. Optimization of complex engineering problems using modified sine cosine algorithm (MSCA, Scientific Reports, 2022)
  21. Rainer Storn, Kenneth Price (1997). Differential Evolution – A Simple and Efficient Heuristic for global Optimization over Continuous Spaces. Journal of Global Optimization.
  22. Seyedali Mirjalili and colleagues (2014). Grey Wolf Optimizer. Advances in Engineering Software.

Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Oct 15, 2026

© 2026 Biostate AI。依据 Edgepedia Community License,注明出处即可免费使用。 嵌入参考卡片。

报告错误

正弦余弦算法

请至少选择一个原因。