资源简介

将蚁群算法应用到无人机中,实现无人机的航迹任务规划

资源截图

代码片段和文件信息

function costValue=calCostValue(CurrUAVCostMatrxRcity_n)
% 计算指定路径的代价值
%
%
costValue=0;
for j=2:(city_n)                    
                   if(j==2 && R(j)==city_n)
                         costValue=CurrUAVCostMatrx(R(j-1)R(j)); %如果只要起点和终点,则认为其不用执行任务,代价不增加。【1,15】
                    else
                         costValue=costValue+CurrUAVCostMatrx(R(j-1)R(j));    %原距离加上第j个城市到第j+1个城市的距离
                    end
                    if(R(j)==city_n)
                        break;
                    end
end

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      44524  2016-06-07 14:53  TargetThreat_data.mat

     文件        915  2011-06-20 10:44  TwoOpt.m

     文件      24675  2011-05-20 09:34  UAV_PathPlaning.mat

     文件        589  2011-05-23 15:17  calCostValue.m

     文件        740  2015-12-02 17:51  DrawRoute.m

     文件       1958  2016-01-17 12:03  generator.m

     文件        423  2011-05-19 10:18  inversion.m

     文件       6449  2016-01-17 11:32  SingleUAV.m

----------- ---------  ---------- -----  ----

                80273                    8


评论

共有 条评论