【优化算法】学生心理学优化算法(SPBO)【含Matlab源码 1430期】
一、获取代码方式
获取代码方式1:
通过订阅紫极神光博客付费专栏,凭支付凭证,私信博主,可获得此代码。
获取代码方式2:
完整代码已上传我的资源:【优化算法】学生心理学优化算法(SPBO)【含Matlab源码 1430期】
备注:
订阅紫极神光博客付费专栏,可免费获得1份代码(有效期为订阅日起,三天内有效);
二、部分源代码
% Student psychology based optimization (SPBO)algorithm
%
%
%
%
% Main paper:
% Bikash Das, V Mukherjee, Debapriya Das, Student psychology based optimization algorithm: A new population based
% optimization algorithm for solving optimization problems, Advances in Engineering Software, 146 (2020) 102804.
%_______________________________________________________________________________________________
% You can simply define your objective function in a seperate file and load its handle to fobj
% The initial parameters that you need are:
%__________________________________________
% fobj = @Objective function
% variable = number of your variables
% Max_iteration = maximum number of iterations
% student = number of search agents
% mini=[mini1,mini2,...,minin] where mini is the lower bound of variable n
% maxi=[maxi1,maxi2,...,maxin] where maxi is the upper bound of variable n
% If all the variables have equal lower bound you can just
% define mini and maxi as two single numbers% To run SPBO: [Best_fitness,Best_student,Convergence_curve]=SPBO(student,Max_iteration,mini,maxi,variable,fobj)
%______________________________________________________________________________________________clear all
clcstudent=20; % Number of student (population)Function_name='F5'; % Name of the test function that can be from F1 to F23 Max_iteration=1000; % Maximum number of iterations% Load details of the selected benchmark function
[mini,maxi,variable,fobj]=Functions(Function_name);%Solution obtained using SPBO
[Best_fitness,Best_student,Convergence_curve]=SPBO(student,Max_iteration,maxi,mini,variable,fobj);% Converging Curve
figure (1)
plot (Convergence_curve);
title('Convergence curve')
xlabel('Iteration');
ylabel('Fitness of best student so far');display(['The best solution obtained by SPBO is : ', num2str(Best_student)]);
display(['The best optimal value of the objective funciton found by SPBO is : ', num2str(Best_fitness)]);% Student psychology based optimization (SPBO)algorithm
%
% Source codes demo version 1.0
%
% Developed in MATLAB R2017b
%
% Author and programmer: Bikash Das, V. Mukherjee, D. Das
%
% e-Mail: bcazdas@gmail.com, vivek_agamani@yahoo.com, ddas@ee.iitkgp.ernet.in
%
%
% Main paper:
% Bikash Das, V Mukherjee, Debapriya Das, Student psychology based optimization algorithm: A new population based
% optimization algorithm for solving optimization problems, Advances in Engineering Software, 146 (2020) 102804.
%_______________________________________________________________________________________________
% You can simply define your objective function in a seperate file and load its handle to fobj
% The initial parameters that you need are:
%__________________________________________
% fobj = @Objective function
% variable = number of your variables
% Max_iteration = maximum number of iterations
% student = number of search agents
% mini=[mini1,mini2,...,minin] where mini is the lower bound of variable n
% maxi=[maxi1,maxi2,...,maxin] where maxi is the upper bound of variable n
% If all the variables have equal lower bound you can just
% define mini and maxi as two single numbers% To run SPBO: [Best_fitness,Best_student,Convergence_curve]=SPBO(student,Max_iteration,mini,maxi,variable,fobj)
%______________________________________________________________________________________________function [mini,maxi,variable,fobj] = Functions(F)switch Fcase 'F1'fobj = @F1;mini=-5.12;maxi=5.12;variable=10;case 'F2'fobj = @F2;mini=-10;maxi=10;variable=10;case 'F3'fobj = @F3;mini=-100;maxi=100;variable=10;case 'F4'fobj = @F4;mini=-5.12;maxi=5.12;variable=10;case 'F5'fobj = @F5;mini=-1.28;maxi=1.28;variable=10;endend% Step
% F1function o = F1(x)
o=sum(((x+.5)).^2);
end% Sum Square
% F2function o = F2(x)
variable=size(x,2);
o=sum([1:variable].*(x.^2));
end% Sphere
% F3function o = F3(x)
o=sum((x).^2);
end% Rastrigin
% F4function o = F4(x)
variable=size(x,2);
o=sum(x.^2-10*cos(2*pi.*x))+10*variable;
end% Quartic
% F5function o = F5(x)
variable=size(x,2);
o=sum([1:variable].*(x.^4));
end
三、运行结果
四、matlab版本及参考文献
1 matlab版本
2014a
2 参考文献
[1] 包子阳,余继周,杨杉.智能优化算法及其MATLAB实例(第2版)[M].电子工业出版社,2016.
[2]张岩,吴水根.MATLAB优化算法源代码[M].清华大学出版社,2017.
【优化算法】学生心理学优化算法(SPBO)【含Matlab源码 1430期】相关推荐
- 【单目标优化求解】基于matlab黑猩猩算法求解单目标问题【含Matlab源码 1413期】
一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[单目标优化求解]基于matlab黑猩猩算法求解单目标问题[含Matlab源码 1413期] 点击上面蓝色字体,直接付费下载,即可. 获取代 ...
- 【风电功率预测】基于matlab帝国殖民竞争算法优化BP神经网络风电功率预测【含Matlab源码 1314期】
⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源: [风电功率预测]基于matlab帝国殖民竞争算法优化BP神经网络风电功率预测[含Matlab源码 1314期] ⛄二.帝国殖民竞争算法简 ...
- 【APF三维路径规划】基于matlab人工势场算法无人机三维路径规划【含Matlab源码 168期】
一.获取代码方式 获取代码方式1: 通过订阅紫极神光博客付费专栏,凭支付凭证,私信博主,可获得此代码. 获取代码方式2: 完整代码已上传我的资源:[三维路径规划]基于matlab人工势场算法无人机三维 ...
- 【RRT三维路径规划】基于matlab RRT算法无人机三维路径规划【含Matlab源码 155期】
一.获取代码方式 获取代码方式1: 通过订阅紫极神光博客付费专栏,凭支付凭证,私信博主,可获得此代码. 获取代码方式2: 完整代码已上传我的资源:[三维路径规划]基于matlab RRT算法无人机三维 ...
- 【RRT三维路径规划】基于matlab RRT算法无人机三维路径规划【含Matlab源码 1363期】
一.获取代码方式 获取代码方式1: 通过订阅紫极神光博客付费专栏,凭支付凭证,私信博主,可获得此代码. 获取代码方式2: 完整代码已上传我的资源:[三维路径规划]基于matlab RRT算法无人机三维 ...
- 【物流选址】基于matlab免疫算法求解物流选址问题【含Matlab源码 020期】
一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[物流选址]基于matlab免疫算法求解物流选址问题[含Matlab源码 020期] 获取代码方式2: 付费专栏Matlab路径规划(初级版 ...
- 【A_star三维路径规划】基于matlab A_star算法无人机三维路径规划【含Matlab源码 446期】
⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[三维路径规划]基于matlab A_star算法无人机三维路径规划[含Matlab源码 446期] 获取代码方式2: 付费专栏Matla ...
- 【ACO TSP】基于matlab蚁群算法求解31城市旅行商问题【含Matlab源码 1147期】
一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[TSP]基于matlab蚁群算法求解31城市旅行商问题[含Matlab源码 1147期] 点击上面蓝色字体,直接付费下载,即可. 获取代码 ...
- 【LSSVM回归预测】基于matlab灰狼算法优化最小支持向量机GWO-LSSVM数据预测【含Matlab源码 2259期】
⛄一.灰狼算法优化最小支持向量机GWO-LSSVM简介 1 算法理论 采用灰狼优化算法的最小二乘支持向量机模型预测时,为避免过拟合现象和检验该模型的有效性,将实证部分主要分为:①基于灰狼优化算法的最小 ...
- 【LSSVM回归预测】基于matlab狮群算法优化最小二乘支持向量机LSO-LSSVM数据回归预测【含Matlab源码 2261期】
⛄一.狮群算法简介 狮群优化算法(lion swarm optimization algorithm, LSO)是在狮群协作捕猎的基础上提出的一种群智能优化算法.狮群算法将狮群分成3个部分:狮王.母狮 ...
最新文章
- python之互斥锁
- 学python需要什么基础知识-没学过Python先要学习哪些基础知识?
- 试图理解80836实模式转变为保护模式
- mysql日期时间函数(常用的)
- boost::lockfree::queue用法的测试程序
- 2020蓝桥杯省赛---java---A---7(回文日期)
- hdu 4322 最大费用流
- 如何让.Net控件在设计时InitializeComponent()中不生成相关代码
- RabbitMQ系列(三)RabbitMQ交换器Exchange介绍与实践
- 压缩JavaScript的宏
- 可视化排班管理_呼叫中心外包之管理要点与数据分析对策
- 基于Netty实现群聊功能
- 小动物领养网站/宠物救助网站
- pascal指针 c语言指针,pascal指针 - Pascal教程
- 关于nuxt sass-loader 报错 in ./pages/index.vue?vuetype=styleindex=0id=2a183b29lang=scssscoped=true
- 从汇编层次理解malloc函数
- 安卓系统Remix_OS 的vmware虚拟机安装
- Comet OJ-2019国庆欢乐赛
- Nordic Thingy:52 SDK 安装及编译
- 外文文献翻译(OCR+Deepl+Mathpix)|CSDN创作打卡
热门文章
- 12_通过上下文操作私有目录模式说明
- [bzoj1055][HAOI2008]玩具取名
- 转:java中获取实体类中的get、set方法名
- MEF的asp.net Hello World程序
- SQL Server数据导入导出的几种方法
- Excel 横向比例图
- C#委托 模板和回调函数
- Atitit aop的一些资料 目录 2. AOP(面向切面)	1 2.1. 切面(Aspect):其实就是共有功能的实现。如日志切面、权限切面、事务切面等	2 2.2. 通知(Advice
- Atitit 遍历文件夹算法 autoit attilax总结
- Atitit nodejs5 nodejs6 nodejs 7.2.1 新特性attialx总结