一、部分代码
差异化创意搜索(Differentiated Creative Search ,DCS)算法由Poomin Duankhan 等人于2024年提出,DCS将独特的知识获取过程与创造性的现实主义范式相结合,通过采用双重策略方法,提高算法效率。
参考文献:
[1]Duankhan P, Sunat K, Chiewchanwattana S, et al. The Differentiated Creative search (DCS): Leveraging Differentiated knowledge-acquisition and Creative realism to address complex optimization problems[J]. Expert Systems with Applications, 2024: 123734. Redirecting
原文链接:https://blog.csdn.net/weixin_46204734/article/details/139334785
close all
clear
clc
rng('default');
%% 载入数据
data.S=[50,950,12]; %起点位置 横坐标与纵坐标需为50的倍数
data.E=[950,50,1]; %终点点位置 横坐标与纵坐标需为50的倍数
data.Obstacle=xlsread('data1.xls');
data.numObstacles=length(data.Obstacle(:,1));
%% 画图
figure
hold on
plot(curve,'r','LineWidth',2)
xlabel('迭代次数')
ylabel('路径长度')
legend(str);
[~,result]=fobj(Best_pos);
drawPc(result,option,data,str)
result.path(:,1)=result.path(:,1).*data.unit(1);
result.path(:,2)=result.path(:,2).*data.unit(2);
result.path(:,3)=result.path(:,3).*data.unit(3);
%% 显示路径信息
fprintf("路径坐标:\n");
display(result.path)
fprintf("路径长度:%f\n",result.fit);
二、部分结果
路径坐标:
50 950 12
100 900 12
150 850 12
150 800 12
150 750 12
150 700 12
200 650 12
250 600 11
250 550 10
250 500 10
250 450 9
300 400 9
350 350 8
400 350 7
450 350 6
500 350 6
550 300 6
600 300 6
600 300 5
600 300 4
650 300 4
700 250 3
750 200 3
800 150 2
850 100 2
900 50 1
950 50 1
路径长度:1450.603487
三、完整MATLAB代码