# 基于无人机的移动边缘计算网络（Matlab代码实现）

## 🎉3 参考文献

[1]邱铭. 基于微波供能的无人机移动边缘计算网络研究[D].广东工业大学,2020.DOI:10.27029/d.cnki.ggdgu.2020.001588.

## 👨‍💻4 Matlab代码

%% parameters
global imgnum; %looping times
global N; % divide [0,1]*[0,1] map into N*N grid
global TARGET;
global UAV_info; % UAVs location matrix
global UAVnum;
global UAV_pos; % UAVi's initial position
global SumTarget;
global needReplan;
global enemysUK;
global enemysUK2plot;
global enemysK;
global enemysSize;
global traceRecord;
global G;
%% initialize target
imgnum=0;
TARGET = round([0.95 0.95]*N);    %target position
%% initialize UAV
UAV_info = UAV_initialize;
UAVnum=size(UAV_info,1);
UAV_pos=[];
for i=1:UAVnum
UAV_pos(i,:)=UAV_info(i,1:2);
end
needReplan=ones(1,UAVnum);      %UAVi need to replan when needReplan(i)=1
SumTarget=zeros(1,UAVnum);      %when UAVi's SumTarget(i)=1, don't need further move
%% initialize enemys
enemysUK=enemyGuass;    %Unknown obstacles(includs all UAVs) location matrix
enemysSize=size(enemysUK,1);
enemysUK2plot=enemys();        %used when drawing map
enemysK={}; % no enemy is detected initially
for i=1:UAVnum
enemysK{i}=[];
end
%% initialize trace record
traceRecord={}; % no record of trace initially
for i=1:UAVnum
traceRecord{i}=[];
end
%% initialize G Matrix
G={};
D=ones(N,N)*N^2;  %initialize D with all elements are N^2 and target 0
D(TARGET(1),TARGET(2))=0;
for i=1:UAVnum
G{i}=[D];
end
%% parameters
global imgnum; %looping times
global N; % divide [0,1]*[0,1] map into N*N grid
global TARGET;
global UAV_info; % UAVs location matrix
global UAVnum;
global UAV_pos; % UAVi's initial position
global SumTarget;
global needReplan;
global enemysUK;
global enemysUK2plot;
global enemysK;
global enemysSize;
global traceRecord;
global G;
%% initialize target
imgnum=0;
TARGET = round([0.95 0.95]*N);    %target position
%% initialize UAV
UAV_info = UAV_initialize;
UAVnum=size(UAV_info,1);
UAV_pos=[];
for i=1:UAVnum
UAV_pos(i,:)=UAV_info(i,1:2);
end
needReplan=ones(1,UAVnum);      %UAVi need to replan when needReplan(i)=1
SumTarget=zeros(1,UAVnum);      %when UAVi's SumTarget(i)=1, don't need further move
%% initialize enemys
enemysUK=enemyGuass;    %Unknown obstacles(includs all UAVs) location matrix
enemysSize=size(enemysUK,1);
enemysUK2plot=enemys();        %used when drawing map
enemysK={}; % no enemy is detected initially
for i=1:UAVnum
enemysK{i}=[];
end
%% initialize trace record
traceRecord={}; % no record of trace initially
for i=1:UAVnum
traceRecord{i}=[];
end
%% initialize G Matrix
G={};
D=ones(N,N)*N^2;  %initialize D with all elements are N^2 and target 0
D(TARGET(1),TARGET(2))=0;
for i=1:UAVnum
G{i}=[D];
end

|
22天前
|

RPN(Region Proposal Networks)候选区域网络算法解析（附PyTorch代码）
RPN(Region Proposal Networks)候选区域网络算法解析（附PyTorch代码）
165 1
|
30天前
|

m基于深度学习网络的手势识别系统matlab仿真,包含GUI界面
m基于深度学习网络的手势识别系统matlab仿真,包含GUI界面
38 0
|
1月前
|

52 2
|
1月前
|

m基于深度学习网络的性别识别系统matlab仿真,带GUI界面
m基于深度学习网络的性别识别系统matlab仿真,带GUI界面
26 2
|
30天前
|

22 2
|
1月前
|

30 3
|
1月前
|

41 3
|
1月前
|

m基于深度学习网络的瓜果种类识别系统matlab仿真,带GUI界面
m基于深度学习网络的瓜果种类识别系统matlab仿真,带GUI界面
30 0
|
3天前
|

【MATLAB】GA_ELM神经网络时序预测算法
【MATLAB】GA_ELM神经网络时序预测算法
274 9
|
22天前
|

18 0