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

简介: 【路径规划】基于遗传算法求解三维装载下的汽车零部件循环取货路径规划问题含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代码问题可私信交流。


相关文章
|
2月前
|
机器学习/深度学习 人工智能 监控
AI算法分析,智慧城管AI智能识别系统源码
AI视频分析技术应用于智慧城管系统,通过监控摄像头实时识别违法行为,如违规摆摊、垃圾、违章停车等,实现非现场执法和预警。算法平台检测街面秩序(出店、游商、机动车、占道)和市容环境(垃圾、晾晒、垃圾桶、路面不洁、漂浮物、乱堆物料),助力及时处理问题,提升城市管理效率。
AI算法分析,智慧城管AI智能识别系统源码
|
3月前
|
传感器 算法 自动驾驶
混合A*运动规划算法:路径规划和路径跟踪-MPC-LQR-PID算法
混合A*运动规划算法:路径规划和路径跟踪-MPC-LQR-PID算法
98 0
混合A*运动规划算法:路径规划和路径跟踪-MPC-LQR-PID算法
|
3月前
|
人工智能 算法 数据可视化
路径规划最全综述+代码+可视化绘图(Dijkstra算法+A*算法+RRT算法等)-2
路径规划最全综述+代码+可视化绘图(Dijkstra算法+A*算法+RRT算法等)-2
322 0
|
18天前
|
设计模式 算法 Java
[设计模式Java实现附plantuml源码~行为型]定义算法的框架——模板方法模式
[设计模式Java实现附plantuml源码~行为型]定义算法的框架——模板方法模式
|
26天前
|
算法 C#
winform车牌识别源码(纯算法)
使用C#和Winform开发的纯算法车牌识别系统,无需依赖外部框架。通过去雾、灰度化、均衡化、中值滤波等步骤实现车牌定位和识别。包含详细步骤及源码,适合学习研究。演示视频:[BV1yq4y1a7cb](https://www.bilibili.com/video/BV1yq4y1a7cb/?spm_id_from=333.337.search-card.all.click&vd_source=6d6d1b4c92d36f8d9ca8a23a286bae20)。
|
1月前
|
算法 索引
【算法与数据结构】深入二叉树实现超详解(全源码优化)
【算法与数据结构】深入二叉树实现超详解(全源码优化)
|
1月前
|
存储 算法 编译器
【数据结构】栈算法(算法原理+源码)
【数据结构】栈算法(算法原理+源码)
【数据结构】栈算法(算法原理+源码)
|
1月前
|
存储 人工智能 算法
哈夫曼算法详细讲解(算法+源码)
哈夫曼算法详细讲解(算法+源码)
|
2月前
|
机器学习/深度学习 算法 大数据
基于PyTorch对凸函数采用SGD算法优化实例(附源码)
基于PyTorch对凸函数采用SGD算法优化实例(附源码)
36 3
|
2月前
|
算法 Java 索引
【数据结构与算法】4、双向链表(学习 jdk 的 LinkedList 部分源码)
【数据结构与算法】4、双向链表(学习 jdk 的 LinkedList 部分源码)
35 0

热门文章

最新文章