1 内容介绍 【智能优化算法-红风筝优化算法】基于红风筝优化算法求解单目标优化问题附matlab代码 2 部分代码 clear all; close all; clc; Function_name = 'F2'; % function name Npop = 50; % Number of search
1 内容介绍
【智能优化算法-红风筝优化算法】基于红风筝优化算法求解单目标优化问题附matlab代码
2 部分代码
clear all;
close all;
clc;
Function_name = 'F2'; % function name
Npop = 50; % Number of search agents
Max_it = 1000; % Maximum number of iterations
[lb,ub,nD,fobj]=Get_Functions_details(Function_name);
[xposbest,fvalbest,Curve]=ROA(Npop,Max_it,lb,ub,nD,fobj);
figure('Position',[500 500 660 290])
subplot(1,2,1);
func_plot(Function_name);
title('Objective space')
xlabel('x_1');
ylabel('x_2');
zlabel([Function_name,'( x_1 , x_2 )'])
subplot(1,2,2);
semilogy(Curve,'Color','r');
hold on
title('Objective space')
xlabel('Iterations');
ylabel('Best score');