????????欢迎来到本博客????????
??博主优势:??????博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
??座右铭:行百里者,半于九十。
??????本文目录如下:??????
目录
??1 概述
??2 运行结果
??3 参考文献
??4 Matlab代码实现
??1 概述
本研究以亚丁湾反海盗护航行动的真实背景为基础,提出了直升机巡逻可疑船只(移动目标)的移动目标旅行推销员问题(MT-TSP)。由于MT-TSP中的目标随时间移动,因此分析了护航船队、直升机和可疑船只的实时位置。提出了MT-TSP的数学公式,旨在最小化所有目标的累积威胁值。由于MT-TSP具有高度非线性和动态性,我们提出了一种混合遗传算法和模拟退火启发式(HGA-SA)来解决该模型。提出了数值实验来测试所提出方法的性能。在具有20至50个目标的情况下,与遗传算法(GA)和模拟退火(SA)相比,HGA-SA的解决方案质量、计算时间和稳定性均得到了显着改善,证明了HGA-SA在解决MT-TSP模型中的优越性和有效性。
??2 运行结果
部分代码:
%popsize population size
%X initial dataset
%MAXGEN the number of max generatioins
%N the number of moving targets
%Pc crossover
%Pm mutation
%output:
%optRoute patrol path
%bestsol best function value
%fx targets location (x-ais) when patroling it
%fy targets location (y-ais) when patroling it
%t time when patrol the target
clear
clc
close all
%% parameters
tic;
popsize = 20; %population size
MAXGEN = 1000; %the number of max generatioins
Pc = 0.9; %crossover probability
Pm = 0.1; %muatation probability
vs = 14; %convoy velocity
vh = 135; %helicopter velocity
%% download data
data = load('20.txt');
X = [data(:,2) data(:,3) data(:,4) data(:,5)];%No.;X-ais;Y-ais;velocity
X(:,5) = Time(X,vs); %catch-up time
N = size(X,1); %the number of moving targets
objv = zeros(N,1);
%% initialization
pop = zeros(popsize,N); %popualtion initialization
for i = 1:popsize/2
pop(i,:) = Initialization(X);
end
for i = popsize/2+1:N
pop(i,:) = randperm(N);
end
%% fitness objective
for i = 1:popsize
objv(i) = PathLength(X(pop(i,:),:)); %calculate the value
end
for gen = 1:MAXGEN
before = pop;
beforeobj = objv;
%% select
[pop,max_pop] = Select(pop,objv);
%% recombine
pop = Recombin(pop,X,Pc);
%% mutation
pop = Mutate(pop,Pm);
outpoint = randperm(popsize,1);
pop(outpoint,:) = max_pop; %keep the best
after = pop;
%% function value
for m = 1:popsize
objv(m) = PathLength(X(pop(m,:),:));
end
afterobj = objv;
%% sa
[~,index] = sort(afterobj);
a = index(floor(popsize/2):end);
[objv(a),pop(a,:)] = Sa(before(a,:),beforeobj(a),after(a,:),afterobj(a),X,gen);
%% best solution
??3 参考文献
文章中一些内容引自网络,会注明出处或引用为参考文献,难免有未尽之处,如有不妥,请随时联系删除。
[1] Wang Y , Wang N .Moving-target travelling salesman problem for a helicopter patrolling suspicious boats in antipiracy escort operations[J].Expert Systems with Application, 2023.