【智能优化算法-交配算法】基于进化交配算法求解单目标优化问题附matlab代码Evolutionary Mating Algorithm (EMA)

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法  神经网络预测 雷达通信  无线传感器

信号处理 图像处理 路径规划 元胞自动机 无人机

⛄ 内容介绍

针对约束优化问题,提出了一种新的进化算法——进化匹配算法(EMA)。该算法采用哈代-温伯格平衡和交叉指数中的随机交配概念,以产生新的后代。在该算法中,环境因素的影响(即捕食者的存在)也被视为一种探索性机制。

⛄ 部分代码

%_________________________________________________________________________________

% Main program for EMA Version 1 solution published in NCAA

%_________________________________________________________________________________

clear all 

clc

format long e;

SearchAgents_no=30; % Number of search agents

Function_name='F12'; % Name of the test function that can be from F1 to F23 

Max_iteration=500; % Maximum numbef of iterations

% Load details of the selected benchmark function

[lb,ub,dim,fobj]=Get_Functions_details(Function_name);

[Target_score,Target_pos,Cg_curve, Trajectories,fitness_history, position_history]=EMA(SearchAgents_no,Max_iteration,lb,ub,dim,fobj);

display(['The best solution obtained by OPTIMIZER is : ', num2str(Target_pos)]);

display(['The best optimal value of the objective function found by OPTIMIZER is : ', num2str(Target_score)]);

% 1、画出所选基准函数的三维立体图形

figure;

subplot(121)

func_plot(Function_name);

title(Function_name)

xlabel('x_1');

ylabel('x_2');

zlabel([Function_name,'( x_1 , x_2 )'])

% 2、画出目标函数值变化曲线图

subplot(122)

t = 1:Max_iteration;

semilogy(t,Cg_curve, 'm-','linewidth', 2, 'MarkerSize', 8);

title(Function_name)

xlabel('Iteration');

ylabel('Fitness');

axis fill

grid on

box on

legend('EMA');

⛄ 运行结果

⛄ 参考文献

❤️ 关注我领取海量matlab电子书和数学建模资料

❤️部分理论引用网络文献,若有侵权联系博主删除

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值