1 简介
随着市场经济的发展,人们对各种商品的需求量正在呈指数增加,极大地发展了异地运输物流。物流行业的发展态势使得在社会各界形成了一个共识——物流行业存在巨大发展潜力并能够带来难以想象的经济效益。如何提高运输和配送效率,如何减少资源损耗从而降低运输成本,对企业来说既是机遇又是挑战,也逐渐成为理论界研究热点。
对大型企业来说,在各个地区设立中央地区总仓是普遍做法。一般来说,各个地区总仓的货品都是齐全的,其对应的经典的单层车辆路径规划问题大多假设单级运输,即将客户订单整合后,通过地区总仓的大型货运车辆直接向发出订单的客户分配货物。例如,某生产企业设立华东仓,接到订单后将所需商品直接由华东仓配送至顾客手中。
随着顾客对时效性的要求越来越高,多级物流网络运输的建立和推广应运而生。现在普遍的模式是双层车辆路径优化问题,即将货物从地区总仓运输到各个城市周边的区域集散中心, 而城市内部的货物运输转而由体积较小的小型车辆进行分拣运输至终端客户。例如,某生产企业设立华东仓,同时在上海、杭州、南京等城市设立区域集散中心,商品批量从华东仓运至各个区域集散中心,而顾客的订单由各区域集散中心配送。
如何选择合适的运输配送策略,目标是使得企业的成本最小,是各企业亟需解决的问题。
2 部分代码
%YALMIPDEMO Brief tutorial and examples.
%
% See also YALMIPTEST
% Author Johan L鰂berg
% $Id: yalmipdemo.m,v 1.7 2007-04-04 07:30:58 joloef Exp $
disp('Please run examples from YALMIP Wiki instead.')
disp('The examples here are obsolute.')
return
% Check for paths
if ~(exist('socpex')==2)
disp('You have to set the path to the demo library (...\yalmip\demos\)')
return;
end
i = 1;
problems{i}.class = 0;
problems{i}.info = 'Getting started, the basics';
problems{i}.call = 'basicsex';i = i+1;
problems{i}.class = 1;
problems{i}.info = 'Linear and quadratic programming';
problems{i}.call = 'regressex';i = i+1;
problems{i}.class = 1;
problems{i}.info = 'Second order cone programming';
problems{i}.call = 'socpex';i = i+1;
problems{i}.class = 2;
problems{i}.info = 'Lyapunov stability (SDP)';
problems{i}.call = 'stabilityex';i = i+1;
problems{i}.class = 0;
problems{i}.info = 'Model predictive control (LP,QP,SDP)';
problems{i}.call = 'mpcex';i = i+1;
problems{i}.class = 2;
problems{i}.info = 'Determinant maximization (MAXDET)';
problems{i}.call = 'maxdetex';i = i+1;
problems{i}.class = 2;
problems{i}.info = 'Decay-rate estimation (SDP)';
problems{i}.call = 'decayex';i = i+1;
problems{i}.class = 0;
problems{i}.info = 'Mixed integer programming (MILP,MIQP,MICP)';
problems{i}.call = 'milpex';i = i+1;
problems{i}.class = 3;
problems{i}.info = 'Working with polynomial expressions';
problems{i}.call = 'nonlinex';i = i+1;
problems{i}.class = 3;
problems{i}.info = 'Working with nonlinear operators';
problems{i}.call = 'nonlinopex';i = i+1;
problems{i}.class = 3;
problems{i}.info = 'Nonlinear semidefinite programming using PENBMI (BMI)';
problems{i}.call = 'bmiex1';i = i+1;
problems{i}.class = 3;
problems{i}.info = 'Decay-rate estimation revisited with PENBMI (BMI)';
problems{i}.call = 'decaybmiex';i = i+1;
problems{i}.class = 3;
problems{i}.info = 'Simultaneous stabilization with PENBMI (BMI)';
problems{i}.call = 'simstabex';i = i+1;
problems{i}.class = 4;
problems{i}.info = 'Sum-of-squares decompositions';
problems{i}.call = 'sosex';i = i+1;
problems{i}.class = 4;
problems{i}.info = 'Polynomial programming using moment-relaxations';
problems{i}.call = 'momentex';i = i+1;
problems{i}.class = 4;
problems{i}.info = 'Global nonlinear programming';
problems{i}.call = 'globalex';i = i+1;
problems{i}.class = 5;
problems{i}.info = 'Multi-parametric programming';
problems{i}.call = 'mptex';i = i+1;
problems{i}.class = 5;
problems{i}.info = 'KYP problems (SDP)';
problems{i}.call = 'kypdex';i = i+1;
problems{i}.class = 5;
problems{i}.info = 'Posynomial geometric programming';
problems{i}.call = 'geometricex';i = i+1;
problems{i}.class = 5;
problems{i}.info = 'Complex-valued problems';
problems{i}.call = 'complexex';i = i+1;
problems{i}.class = 5;
problems{i}.info = 'Dual variables';
problems{i}.call = 'dualex';i = i+1;
while (1)
clc
echo off
disp(' ')
disp(' ')
disp(' YALMIP DEMO')
disp(' ')
oldclass = 0;
for i = 1:length(problems)
% if problems{i}.class == oldclass
% fprintf('\n');
% end
fprintf([' %1.2d) ' problems{i}.info '\n'],i);
% oldclass = problems{i}.class;
end
disp(' ');
disp(' 0) quit')
inp = input('Select demo: ');
try
if ~isempty(inp)
switch(inp)
case 0
return
otherwise
if inp<=length(problems)
eval(problems{inp}.call);
end
end
end
catch
disp(lasterr)
pause
end
end
3 仿真结果
4 参考文献
[1]张兴锐, 吴仕帅, 孙佳欣. 基于Yalmip工具箱与遗传算法的铁路运输分配问题优化方法[J]. 电子世界, 2018(16):2.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。