【路径规划】基于遗传算法求解三维装载下的汽车零部件循环取货路径规划问题含Matlab源码

1 简介

在考虑汽车零部件包装箱长、宽、高等三维尺寸的约束下,以配送中心为原点,分派多辆同一规格的货车到n个供应商处取货,最后回到配送中心。本章所构建的三维装载约束下的汽车零部件循环取货路径优化模型要解决的问题是确定循环取货路径,要求充分考虑汽车零部件在货车车厢中的三维装载位置,确保每个供应商处的零部件均能成功装载,尽可能使车辆装载率最大,且所有车辆的总行驶路径最短。

基于上述分析,本文所研究的循环取货优化问题可做如下假设:

假设条件:

(1) 一个配送中心与多个供应商,且车辆从配送中心出发,最后均回到配送中心;

(2) 每辆货车车厢规格(即车厢长、宽、高,载重质量等)均相同;

(3) 每辆货车匀速行驶,且行驶速度已知;不存在交通堵塞情况;

(4) 配送中心与各零部件供应商以及各供应商之间的距离已知;

(5) 各供应商处提供的零部件均由长方体箱包装,且各长方体箱的尺寸、数量、重量等参数已知;

(6) 每个供应商提供的零部件总体积、总重量均小于每辆车的容积与载重质量;每个供应商只由一辆车完成服务,且只服务一次;

(7) 每条线路上的货物总重量、总体积不得超过货车载重质量及容积;

(8) 考虑汽车零部件供应的准时性,每辆货车必须在规定时间以内返回配送中心;

(9) 零部件(指长方体包装箱,下同)必须在车厢内部,不得超出车厢车门;

(10) 零部件的边总是与车厢的边平行或者垂直、高度方向与车厢高度方向平行,且不得倒置;

(11) 货物的重心即为几何中心。

参数及变量符号说明:

2 部分代码

load('coordinate_data.mat');load('goods_data.mat');%distribution_centercenter.x=25;center.y=25;%suppliers countnum_of_node=20;coordinate_data=coordinate_data(3:end,:);coordinate_data=cell2mat(coordinate_data);goods_data=goods_data(2:end-1,:);%goods_data=cell2mat(goods_data);%data of totaltotal=struct('volume',0,'weight',0);%struct of distribution center and goodssupplier_struct=...    struct('supplier_number',[],'x',[],'y',[],...    'volume_in_total',0,'weight_in_total',0,...    'goods',...    struct('number',[],'count',[],...    'length',[],'width',[],'height',[],...    'volume_for_each',[],'weight_for_each',[],...    'volume_in_total',[],'weight_in_total',[]));supplier_struct(1:20)=...    struct('supplier_number',[],'x',[],'y',[],...    'volume_in_total',0,'weight_in_total',0,...    'goods',...    struct('number',[],'count',[],...    'length',[],'width',[],'height',[],...    'volume_for_each',[],'weight_for_each',[],...    'volume_in_total',[],'weight_in_total',[]));%supplier's goods indexgoods_index=0;%circulate[goods_data_size1,~]=size(goods_data);for index=1:goods_data_size1    %non zero    if goods_data{index,1}~=0        %temp number        temp_num=goods_data{index,1};        supplier_struct(temp_num).supplier_number=...            temp_num;        %location        supplier_struct(temp_num).x=...            coordinate_data(temp_num,2);        supplier_struct(temp_num).y=...            coordinate_data(temp_num,3);                %goods index reset for this supplier        goods_index=0;    else        goods_data{index,1}=temp_num;    end        %goods index++    goods_index=goods_index+1;    %number of this goods    supplier_struct(temp_num).goods(goods_index).number=...        goods_data{index,2};    %length of this goods    supplier_struct(temp_num).goods(goods_index).length=...        goods_data{index,3}/1000;    %width of this goods    supplier_struct(temp_num).goods(goods_index).width=...        goods_data{index,4}/1000;    %height of this goods    supplier_struct(temp_num).goods(goods_index).height=...        goods_data{index,5}/1000;    %count of this goods    supplier_struct(temp_num).goods(goods_index).count=...        goods_data{index,6};        %volume of this goods    supplier_struct(temp_num).goods(goods_index).volume_for_each=...        supplier_struct(temp_num).goods(goods_index).length*...        supplier_struct(temp_num).goods(goods_index).width*...        supplier_struct(temp_num).goods(goods_index).height;    %weight of this goods    supplier_struct(temp_num).goods(goods_index).weight_for_each=...        goods_data{index,8}/...        supplier_struct(temp_num).goods(goods_index).count;    %volume of this goods in total    supplier_struct(temp_num).goods(goods_index).volume_in_total=...        supplier_struct(temp_num).goods(goods_index).volume_for_each*...        supplier_struct(temp_num).goods(goods_index).count;    %weight of this goods in total    supplier_struct(temp_num).goods(goods_index).weight_in_total=...        goods_data{index,8};        %accumulate    supplier_struct(...        goods_data{index,1}).volume_in_total=...        supplier_struct(...        goods_data{index,1}).volume_in_total+...        goods_data{index,7};    supplier_struct(...        goods_data{index,1}).weight_in_total=...        supplier_struct(...        goods_data{index,1}).weight_in_total+...        goods_data{index,8};    end%accumulate total figurefor supplier_index=1:num_of_node    total.volume=total.volume+...        supplier_struct(supplier_index).volume_in_total;    total.weight=total.weight+...        supplier_struct(supplier_index).weight_in_total;endclear index temp_num goods_index supplier_index;clear goods_data_size1 goods_data_size2;goods_data=cell2mat(goods_data);%recoveryoriginal_data_struct=...    struct('coordinate_data',coordinate_data,...    'goods_data',goods_data);clear coordinate_data goods_data;

3 仿真结果

4 参考文献

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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

matlab科研助手

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值