1 简介

基于节约算法求解带时效性约束的物流中心选址问题.分析选址问题的时效性约束条件,构造带时效性约束的物流中心选址模型,利用节约算法设计选址模型的精确算法,并给出具体算例,验证模型和算法的可行性.研究结果表明,该算法能够求解带时效性约束的选址模型,又能够求解不带时效性约束的重心选址模型,是一种比传统算法更有效的求解物流中心选址问题的算法.

2 部分代码


          
          
clc
  • 1.

          
          
clear all
  • 1.

          
          
p1=0.9;
  • 1.

          
          
customer=xlsread('customer.xlsx'); %需求点信息
  • 1.

          
          
facility=xlsread('facility.xlsx'); %设施点信息
  • 1.

          
          
facilityposition=facility(:,2:3); %设施坐标
  • 1.

          
          
customerposition=customer(:,2:3); %需求点坐标
  • 1.

          
          
position=[facilityposition;customerposition];
  • 1.

          
          
xlswrite('position.xlsx',position)
  • 1.

          
          
position1=[position(:,1) position(:,2)];
  • 1.

          
          
distMatrix=dists(position1); %计算得出的两点之间的距离
  • 1.

          
          
xlswrite('distMatrix.xlsx',distMatrix)
  • 1.
  • 1.

          
          
ttimeu=fix(distMatrix); %两点之间的距离
  • 1.

          
          
%%%%%%%%%%%%%%%%%%%%%%%%%固定数据%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  • 1.

          
          
Qofcar=200; %车辆容量
  • 1.

          
          
costofallcar=5000; %车辆固定成本
  • 1.

          
          
costofunitdistance=9; %单位距离成本
  • 1.

          
          
tanpaifangyinzi=1; %车辆碳排放因子
  • 1.

          
          
danweiyouhao=1; %车辆单位油耗
  • 1.

          
          
%%%%%%%%%%%%%%%%%%%%%%%计算出来的数据%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  • 1.

          
          
Numberofpoints=size(customer,1); %需求点数量
  • 1.

          
          
Numberoffacilities=size(facility,1); %设施点数量
  • 1.

          
          
quantity=[customer(:,1) customer(:,4) customer(:,4)]; %需求点需求量
  • 1.

          
          
Qoffacilities=[facility(:,1) facility(:,4)]; %设施容量
  • 1.

          
          
timewindow=[customer(:,1) customer(:,6:7)]; %需求点时间窗
  • 1.

          
          
countfacility=facility(:,5); %建立设施固定成本
  • 1.

          
          
codeofpicture=1;
  • 1.
  • 1.
  • 1.

          
          
timewindow
  • 1.
  • 1.

          
          
assignofpoint=[2 1 2 1 3 3 1 2 1 1 2 3 2];
  • 1.

          
          
[outcome1,outcome2,outcome3]=cw(Numberoffacilities,assignofpoint,ttimeu,timewindow,distMatrix,quantity,Qofcar,p1);
  • 1.

          
          
%outcome1=[1 1 2 1 2 3 3 4 4 3 5 5 5];
  • 1.

          
          
%outcome2=[9 2 10 4 7 13 1 11 8 3 12 5 6];
  • 1.

          
          
[outcome1,outcome2,outcome3]=tabu(outcome1,outcome2,outcome3,distMatrix,ttimeu,Numberoffacilities,timewindow);
  • 1.
  • 1.

          
          
[Picture]=picture(codeofpicture,outcome1,outcome2,outcome3,customer,facility);
  • 1.

3 仿真结果

【优化选址】基于节约算法求解考虑碳排放及带时间窗的物流选址问题附matlab代码_数据

4 参考文献

[1]于晓东. 基于人工蜂群算法的考虑碳排放的带时间窗车辆路径问题研究[D]. 大连理工大学, 2016.

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

部分理论引用网络文献,若有侵权联系博主删除。

【优化选址】基于节约算法求解考虑碳排放及带时间窗的物流选址问题附matlab代码_参考文献_02