1 简介

This paper studies the constrained optimization problem for nonlinear diesel blending. A new hybrid algorithm called cultural harmony search algorithm is presented to solve the proposed optimization problem, which uses cultural knowledge in the belief space of the cultural algorithm to guide the evolving and searching process of the harmony search algorithm. Then, an improved harmony improvisation in the population space of cultural algorithm is developed for new harmony generation to enrich the population diversity. Moreover, in order to accelerate convergence, the domain of decision variables is scaled down by a simplex method at the beginning of the algorithm, and a simplex improved cultural harmony search algorithm is provided. Finally, benchmark functions and the results of application in nonlinear diesel blending of a real-world refinery show the feasibility and effectiveness of the proposed algorithms. The contrasted experiments show that our proposed hybrid algorithm is better than other hybrid algorithms, especially in diesel blending optimization problem.​

2 部分代码

%% Cultural Harmony Learning Algorithm - Created in 18 Jan 2022 by Seyed Muhammad Hossein Mousavi% Here is all about learning with evolutionary algorithms. Harmony search% and cultural algorithms are two fast optimization algorithms which their% result are combined here in order to train inputs for targets in a simple% dataset. Basically, system starts with making initial fuzzy model and fit% the outputs based on inputs by harmony search first and then tries to fit the% harmony search outputs with inputs in the second stage. That means we are using both% evolutionary algorithms to improve the accuracy. System easily could be% used for regression, classification and other optimization tasks. You can%% Cleaningclc;clear;warning('off');%% Data Loadingdata=JustLoad();%% Generate Basic Fuzzy Model% Number of Clusters in FCMClusNum=4; %fis=GenerateFuzzy(data,ClusNum);%%% Tarining Cultural Harmony Algorithm% Harmony Search LearningHarFis=hars(fis,data);        % Harmony Cultural Algorithm LearningCAHSfis=CulturalFCN(HarFis,data);        %% Plot Cultural Harmony Results (Train - Test)% Train Output ExtractionTrTar=data.TrainTargets;TrainOutputs=evalfis(data.TrainInputs,CAHSfis);% Test Output ExtractionTsTar=data.TestTargets;TestOutputs=evalfis(data.TestInputs,CAHSfis);% Train calcErrors=data.TrainTargets-TrainOutputs;MSE=mean(Errors.^2);RMSE=sqrt(MSE);  error_mean=mean(Errors);error_std=std(Errors);% Test calcErrors1=data.TestTargets-TestOutputs;MSE1=mean(Errors1.^2);RMSE1=sqrt(MSE1);  error_mean1=mean(Errors1);error_std1=std(Errors1);% Trainfigure('units','normalized','outerposition',[0 0 1 1])subplot(3,2,1);plot(data.TrainTargets,'c');hold on;plot(TrainOutputs,'k');legend('Target','Output');title('Cultural Harmony Training Part');xlabel('Sample Index');grid on;% Testsubplot(3,2,2);plot(data.TestTargets,'c');hold on;plot(TestOutputs,'k');legend('Cultural Harmony Target','Cultural Harmony Output');title('Cultural Harmony Testing Part');xlabel('Sample Index');grid on;% Trainsubplot(3,2,3);plot(Errors,'k');legend('Cultural Harmony Training Error');title(['Train MSE =     ' num2str(MSE) '  ,     Train RMSE =     ' num2str(RMSE)]);grid on;% Testsubplot(3,2,4);plot(Errors1,'k');legend('Cultural Harmony Testing Error');title(['Test MSE =     ' num2str(MSE1) '  ,    Test RMSE =     ' num2str(RMSE1)]);grid on;% Trainsubplot(3,2,5);h=histfit(Errors, 50);h(1).FaceColor = [.1 .2 0.9];title(['Train Error Mean =   ' num2str(error_mean) '  ,   Train Error STD =   ' num2str(error_std)]);% Testsubplot(3,2,6);h=histfit(Errors1, 50);h(1).FaceColor = [.1 .2 0.9];title(['Test Error Mean =   ' num2str(error_mean1) '  ,   Test Error STD =    ' num2str(error_std1)]);%% Plot Just Fuzzy Results (Train - Test)% Train Output ExtractionfTrainOutputs=evalfis(data.TrainInputs,fis);% Test Output ExtractionfTestOutputs=evalfis(data.TestInputs,fis);% Train calcfErrors=data.TrainTargets-fTrainOutputs;fMSE=mean(fErrors.^2);fRMSE=sqrt(fMSE);  ferror_mean=mean(fErrors);ferror_std=std(fErrors);% Test calcfErrors1=data.TestTargets-fTestOutputs;fMSE1=mean(fErrors1.^2);fRMSE1=sqrt(fMSE1);  ferror_mean1=mean(fErrors1);ferror_std1=std(fErrors1);% Trainfigure('units','normalized','outerposition',[0 0 1 1])subplot(3,2,1);plot(data.TrainTargets,'m');hold on;plot(fTrainOutputs,'k');legend('Target','Output');title('Fuzzy Training Part');xlabel('Sample Index');grid on;% Testsubplot(3,2,2);plot(data.TestTargets,'m');hold on;plot(fTestOutputs,'k');legend('Target','Output');title('Fuzzy Testing Part');xlabel('Sample Index');grid on;% Trainsubplot(3,2,3);plot(fErrors,'g');legend('Fuzzy Training Error');title(['Train MSE =     ' num2str(fMSE) '   ,    Test RMSE =     ' num2str(fRMSE)]);grid on;% Testsubplot(3,2,4);plot(fErrors1,'g');legend('Fuzzy Testing Error');title(['Train MSE =     ' num2str(fMSE1) '   ,    Test RMSE =     ' num2str(fRMSE1)]);grid on;% Trainsubplot(3,2,5);h=histfit(fErrors, 50);h(1).FaceColor = [.3 .8 0.3];title(['Train Error Mean =    ' num2str(ferror_mean) '   ,   Train Error STD =    ' num2str(ferror_std)]);% Testsubplot(3,2,6);h=histfit(fErrors1, 50);h(1).FaceColor = [.3 .8 0.3];title(['Test Error Mean =    ' num2str(ferror_mean1) '   ,   Test Error STD =    ' num2str(ferror_std1)]);

3 仿真结果

4 参考文献

[1] Gao M ,  Zhu Y ,  Cao C , et al. A Hybrid Cultural Harmony Search Algorithm for Constrained Optimization Problem of Diesel Blending[J]. IEEE Access, 2019, PP(99):1-1.

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

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

【智能优化算法】基于文化和谐和学习算法优化模糊函数FUZZY附matlab代码相关推荐

  1. 【图像分割】基于计算机视觉实现视网膜图像中的血管分割附matlab代码

    1 简介 视网膜图像里的血管是可以被观察到的一类微血管,并且它是无创伤的,而其分布位置也属于深度部位[5].其分布.结构和形态特征的变化能在一定程度上反映病变的程度.而白血病.糖尿病以及高血压等疾病都 ...

  2. 基于混合整数二阶锥(MISOCP)的配电网重构(附matlab代码)

    参考资料:主动配电网网络分析与运行调控 (sciencereading.cn) 配电网重构是指在满足配电网运行基本约束的前提下,通过改变配电网中一个或多个开关的状态对配电网中一个或多个指标进行优化.通 ...

  3. 格子玻尔兹曼流体代码_格子玻尔兹曼方法(LBM)学习:对流-扩散问题(附MATLAB代码)...

    (๑❛ᴗ❛๑) 麻烦各位读者收藏之余点个喜欢或赞呢,咱也更有干劲了~ OrzSunspot:格子玻尔兹曼方法(LBM)学习:等温不可压缩流体流动问题(附MATLAB代码)​zhuanlan.zhihu ...

  4. 【多式联运】基于粒子群结合遗传算法实现陆海空多式联运问题附matlab代码

    1 简介 物流运输方式由公路.水路.空运及管道等 3 种方式组成,3 种运输方式在技术上.经济上各有长短,都有适宜的 使用范围,每种运输方式单独运用很难实现节约资源.降本增效.随着我国经济不断发展以及 ...

  5. 基于AlexNet卷积神经网络的手写体数字识别系统研究-附Matlab代码

    ⭕⭕ 目 录 ⭕⭕ ✳️ 一.引言 ✳️ 二.手写体数字识别系统 ✳️ 2.1 MNIST 数据集 ✳️ 2.2 CNN ✳️ 2.3 网络训练 ✳️ 三.手写体数字识别结果 ✳️ 四.参考文献 ✳️ ...

  6. 【图像增强】基于DEHAZENET和HWD的水下去散射图像增强附matlab代码

    1 内容介绍 去散射和边缘增强是解决水下图像的对比度严重衰减.颜色偏差和边缘模糊等问题的关键步骤.这篇论文提出了一种较好的水下图像增强的方法.首先使用经过端到端训练的卷积神经网络去测量输入图片,同时以 ...

  7. 【图像分割】基于区域的重叠椭圆拟合实现细胞分割附matlab代码

    1 内容介绍 一种基于区域的方法,用于用自动确定的可能重叠椭圆的数量来逼近任意 2D 形状.RFOVE 是完全无监督的,在没有任何假设或关于对象形状的先验知识的情况下运行,并且扩展和改进了递减椭圆拟合 ...

  8. 【图像分割】基于方向谷形检测实现静脉纹路分割附MATLAB代码

    1 内容介绍 一种基于方向谷形检测的指静脉图像分割方法及其系统,终端,包括以下步骤:步骤1,接收图像采集模块采集的指静脉图像;步骤2,对截取的指静脉图像进行脊波变换作图像增强处理;步骤3,针对增强处理 ...

  9. 【滤波估计】基于双卡尔曼滤波实现soc和soh联合估计附matlab代码

    1 内容介绍 对电动汽车电池管理系统进行电池状态估计非常重要准确充电,实现电池模型参数的在线更新.在本文中,开路电压的估计转换为开路电压拟合的估计参数,快速时变参数开路电压被转换成几个慢时变参数.提出 ...

最新文章

  1. var_export-输出或返回一个变量的字符串表示
  2. 分布式架构中异步的使用场景
  3. mysql主从整套方案_Mysql主从方案
  4. 对pthread_create未定义的引用
  5. 结构体的一些形式理解
  6. CentOS6.5下安装mongodb
  7. DELL R430服务器做raid5以及安装操作系统过程
  8. 20200528-换脸算法调研
  9. 【渝粤题库】陕西师范大学292161社会保障概论 作业(专升本)
  10. windows(微软知识库)可以根据事件ID查看 各种事件
  11. Excel技巧之减肥
  12. ant Design 中使用 :globa
  13. JQData提供哪些数据
  14. linux服务精简优化解析,CentOS系统环境精简优化详解
  15. Allegro172版本DFM规则之Annular Ring
  16. 【JavaScript】——浅谈js(JavaScript)
  17. 前端学习网络资源链接汇总
  18. OSG - Turn off light
  19. 菲律宾圣安娜開户-人工智能尴尬的2019:需要钱却没钱可烧了
  20. ajdjahhahs

热门文章

  1. CGB2005 JT7-8(文件 图片上传 uuid生成文件名 静态代码块,反向代理,Nginx,Host文件,tomact集群实现项目发布 ,nginx负载均衡种类)
  2. SQL Server 安装文件挂起错误解决办法
  3. 实验2-5-3 求平方根序列前N项和(C语言)
  4. 6. (7.5~8.9)2022年自动化保研信息汇总(预推免)
  5. 小红书怎么找素人?素人投放应注意什么
  6. Elasticsearch之别名
  7. python将简体字转化为繁体字
  8. Ktx ViewModel 之 Hilt-Fragment 测试方法:打包,造工厂,以假换真。读者:什么跟什么啊?
  9. 从0开始学爬虫6比价工具开发1之爬取当当、京东的数据
  10. fft 估计载波频率程序_一种基于扫描精确估计载波频率的方法与流程