python:改进型鳟海鞘算法(SSALEO)求解23个基本函数

一、改进型鳟海鞘算法SSALEO

改进型鳟海鞘算法(SSALEO)由Mohammed Qaraad等人于2022年提出。

参考文献:M. Qaraad, S. Amjad, N. K. Hussein, S. Mirjalili, N. B. Halima and M. A. Elhosseini, "Comparing SSALEO as a Scalable Large Scale Global Optimization Algorithm to High-Performance Algorithms for Real-World Constrained Optimization Benchmark," in IEEE Access, vol. 10, pp. 95658-95700, 2022, doi: 10.1109/ACCESS.2022.3202894.

二、SSALEO求解23个测试函数

23个测试函数简介

测试集:23组基本测试函数简介及图像(提供python代码)_IT猿手的博客-CSDN博客

部分代码

from FunInfo import Get_Functions_details
from SSALEO import SSALEO
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['Microsoft YaHei']
#主程序
function_name =13 #测试函数1-23
SearchAgents_no = 50#种群大小
Max_iter = 100#迭代次数
lb,ub,dim,fobj=Get_Functions_details(function_name)#获取问题信息
BestX,BestF,curve = SSALEO(SearchAgents_no, Max_iter,lb,ub,dim,fobj)#问题求解

#画收敛曲线图
if BestF>0:
    plt.semilogy(curve,color='r',linewidth=2,label='SSALEO')
else:
    plt.plot(curve,color='r',linewidth=2,label='SSALEO')
plt.xlabel("Iteration")
plt.ylabel("Fitness")
plt.xlim(0,Max_iter)
plt.title("F"+str(function_name))
plt.legend()
plt.savefig(str(function_name)+'.png')
plt.show()
print('\nThe best solution is:\n'+str(BestX))
print('\nThe best optimal value of the objective funciton is:\n'+str(BestF))

部分结果

三、完整Python代码

最近更新

  1. TCP协议是安全的吗?

    2023-12-26 09:16:02       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-26 09:16:02       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-26 09:16:02       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-26 09:16:02       18 阅读

热门阅读

  1. 查看docker映射数据卷

    2023-12-26 09:16:02       34 阅读
  2. 【头歌系统Python实验】Python面向对象之对象成员

    2023-12-26 09:16:02       34 阅读
  3. [hive] sql中distinct的用法和注意事项

    2023-12-26 09:16:02       45 阅读