亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? rtetc.m

?? 物流分析工具包。Facility location: Continuous minisum facility location, alternate location-allocation (ALA)
?? M
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
function [TC,XFlg,out] = rteTC(rte,varargin)
%RTETC Calculate total cost of route with time windows.
%            TC = rteTC(rte,C)
% [TC,XFlg,out] = rteTC(rte,C,cap,twin,rtefeas)
%               = rteTC(rte),  use arguments C,twin,... from previous call
%                              and do not check input for errors
%    rte = vector of single-route vertices
%        = m-element cell array of m routes
%          (to get sum(TC) as output, use vector rte = [rte{:}] as input)
%      C = n x n matrix of costs between n vertices
%     TC = m-element vector of route costs, where 
%          TC(i) = Inf if route i is infeasible
%
% Optional input and output arguments used to determine route feasibility:
%    cap = {q,Q} = cell array of capacity arguments, where
%              q = n-element vector of vertex demands, with depot q(1) = 0
%              Q = maximum route load
%   twin = {ld,TW,st} = cell array of time window arguments, where
%             ld = n or (n+1)-element vector of loading/unloading
%                  timespans, where
%                     ld(rte(1))   = load at depot
%                     ld(n+1)      = unload at depot, if rte(1) == rte(end)
%                = scalar of constant values "ld" for rte(2) ... rte(end)  
%                  and 0 for rte(1); or rte(2) ... rte(end-1) and 0 for
%                   rte(end), if rte(1) == rte(end)
%                = 0, default
%             TW = n or (n+1) x 2 matrix of time windows, where
%                     TW(i,1)      = start of time window for vertex i
%                     TW(i,2)      = end of time window
%                     TW(rte(1),:) = start time window at depot
%                     TW(n+1,:)    = finish time window at depot, 
%                                    if rte(1) = rte(end)
%                = (n+1)-element cell array, if multiple windows, where
%                     TW{i}        = (2 x p)-element vector of p window 
%                                    (start,end) pairs
%             st = (optional) m-element vector of starting times at depot
%                = TW(1,1) or min(TW{1}), default (earliest starting time)
%rtefeas = {'rtefeasfun',P1,P2,...} = cell array specifying user-defined
%          function to test the feasibility of a single route (in addition  
%          to time windows, capacity, and maximum cost), where RTETC 
%          argument out(i) along with user-specified arguments P1,P2,... 
%          are passed to function and a logical value should be returned: 
%                 isfeas = RTEFEASFUN(out(i),P1,P2,...)
%        = {'maxTCfeas',maxTC} is a predefined route feasibility function
%          to test if the total cost of a route (including loading/
%          unloading times "ld") exceeds the maximum waiting time "maxTC"
%          (see below for code)
%XFlg(i) = exitflag
%        =  1, if route is feasible
%        = -1, if infeasible due to capacity
%        = -2, if infeasible due to time windows
%        = -3, if infeasible due to user-defined feasibility function
%    out = m-element struct array of outputs
% out(i) = output structure with fields:
%        .Rte     = route indices, rte{i}
%        .Cost    = cost from vertex j-1 to j, 
%                   Cost(j) = C(r{i}(j-1),r{i}(j)) and Cost(1) = 0
%                 = drive timespan from vertex j-1 to j
%        .Demand  = demands of vertices on route, q(rte{i})
%        .Arrive  = time of arrival
%        .Wait    = wait timespan if arrival prior to beginning of window
%        .Start   = time loading/unloading started (starting time for
%                   route is "Start(1)")
%        .LD      = loading/unloading timespan, ld(rte{i})
%        .Depart  = time of departure (finishing time is "Depart(end)")
%        .Total   = total timespan from departing vtx j-1 to depart. vtx j
%                   (= drive + wait + loading/unloading timespan)
%        .EarlySF = earliest starting and finishing times (default starting
%                   time is "st" and default finish. time is "EarlySF(2)")
%        .LateSF  = latest starting and finishing times
%
% For each route rte{i}, feasibility is determined in the following order:
%    1. Capacity feasibility: SUM(q(rte{i})) <= Q if feasible
%    2. Time window feasiblity: [TCi,ignore,outi] = RTETC(rte{i},C,twin);
%                               TCi < Inf if feasible
%    3. User defined feasibility: isfeas = RTEFEASFUN(outi,P1,P2,...);
%                                 isfeas == true if feasible
%
% Code for example route feasibility function:
%
% function isfeas = maxTCfeas(outi,maxTC)
% %MAXTCFEAS Maximum total cost route feasibility function.
% % isfeas = maxwaitfeas(outi,maxTC)
% %   outi = struct array of outputs from RTETC for single route i
% %          (automatically passed to function)
% %  maxTC = scalar max. total cost (including un/loading times) of route
% %
% % Route is feasible if sum(outi.Total) <= maxTC
% %
% % This function can be used as a template for developing other
% % route feasibility functions.
% 
% % Input error check
% if ~isnumeric(maxTC) || length(maxTC(:)) ~= 1 || maxTC < 0
%    error('"maxTC" must be a nonnegative scalar.')
% end
% 
% % Feasibility test
% if sum(outi.Total) <= maxTC
%    isfeas = true;
% else
%    isfeas = false;
% end
%
%
% Examples:
% % 4-vertex graph
% IJD = [1 -2 1; 2 -3 2; 3 -4 1; 4 -1 1];
% C = dijk(list2adj(IJD))                  %  C =  0   1   2   1
%                                          %       1   0   2   2
%                                          %       2   2   0   1
%                                          %       1   2   1   0
% rte = [1 2 3 4 1];
% TC = rteTC(rte,C)                        % TC =  5
%
% % Different route, same C from previous call
% TC = rteTC([1 2 3 4])                    % TC =  4
%
% % Time-windows
% ld = 0
% TW = [ 6 18       % Start time window at depot
%        8 11
%       12 14
%       15 18
%       18 24]      % Finish time window at depot
% [TC,XFlg,out] = rteTC([1 2 3 4 1],C,[],{ld,TW})
%                                          %   TC =  8
%                                          % XFlg =  1
%                                          %  out = 
%                                          %          Rte: [1 2 3 4 1]
%                                          %         Cost: [0 1 2 1 1]
%                                          %       Demand: []
%                                          %       Arrive: [0 11 13 14 16]
%                                          %         Wait: [0 0 0 1 2]
%                                          %        Start: [10 11 13 15 18]
%                                          %           LD: [0 0 0 0 0]
%                                          %       Depart: [10 11 13 15 18]
%                                          %        Total: [0 1 2 2 3]
%                                          %      EarlySF: [10 18]
%                                          %       LateSF: [10 18]
%
% % Not feasible if total cost exceeds 4
% [TC,XFlg] = rteTC([1 2 3 4 1],C,[],[],{'maxTCfeas',4})
%                                          %   TC = Inf
%                                          % XFlg =  -3
% [TC,XFlg] = rteTC([1 2 3 4 1],C,[],[],{'maxTCfeas',4})
%                                          %   TC = Inf
%                                          % XFlg =  -3

% Copyright (c) 1994-2006 by Michael G. Kay
% Matlog Version 9 13-Jan-2006 (http://www.ie.ncsu.edu/kay/matlog)

% Input Error Checking ****************************************************

persistent C q Q ld TW st rtefeas     % Set to empty

if nargin < 2
   if isempty(C)
      error('Additional input arguments required for first call.')
   else
      isfirstcall = 0;
   end
else
   isfirstcall = 1;
   if length(varargin) < 4
      [varargin{length(varargin)+1:4}] = deal([]);
   end
   [C,cap,twin,rtefeas] = deal(varargin{:});
   [q,Q,ld,TW,st] = deal([]);
end

m = 1;
if iscell(rte), m = length(rte); end
TC = Inf * ones(m,1);                % All routes initialized to infeasible
XFlg = ones(m,1);                    % All flags inialized to feasible

[n,nC] = size(C);

% Route
if isfirstcall & ~isempty(rte) & (~(isreal(rte) | iscell(rte)) | ...
      (~iscell(rte) & (min(size(rte)) ~= 1 | ...
      any(rte(:) < 1 | rte(:) > n))) | ...
      (iscell(rte) & (any(cellfun('prodofsize',rte) ~= ...
      cellfun('length',rte)) | any([rte{:}] < 1 | [rte{:}] > n))))
   error('"rte" not a valid route.')
end

% Cost
if isfirstcall
   if n ~= nC
      error('C must be a square matrix.')
   elseif any(any(C<0))
      error('C must be a non-negative matrix.')
   elseif any(diag(C) ~= 0)
      error('C must have zeros along its diagonal.')
   end
end

% Capacity
if isfirstcall && ~isempty(cap)
   if ~iscell(cap) || length(cap(:)) ~= 2
      error('"cap" must be a two element cell array.')
   end
   q = cap{1}; Q = cap{2};
   if length(q(:)) ~= n
      error(['"q" must be an ',num2str(n),'-element vector.'])
   elseif q(1) ~= 0
      error('Depot''s demand, q(1), should equal 0.');
   elseif length(Q(:)) ~= 1 || Q < 0
      error('Q must be a nonnegative scalar.')
   elseif any(q > Q)
      error('Elements of "q" can not be greater than Q.')
   end
end

% Time window
if isfirstcall && ~isempty(twin)
   if ~iscell(twin) || length(twin(:)) < 1 || length(twin(:)) > 3
      error('"twin" must be a one or three element cell array.')
   end
   ld = twin{1};
   if ~isempty(ld), ld = ld(:)'; end
   if length(twin) > 1, TW = twin{2}; else TW = []; end
   if ~isempty(TW) && ~iscell(TW), TW = padmat2cell(TW); end
   if length(twin) > 2, st = twin{3}; st = st(:); else st = []; end

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天综合色天天综合色h| 亚洲欧美激情插| 精品影院一区二区久久久| 欧美一级夜夜爽| 激情小说亚洲一区| 久久品道一品道久久精品| zzijzzij亚洲日本少妇熟睡| 国产精品乱人伦| 一本久久精品一区二区| 午夜亚洲国产au精品一区二区| 欧美放荡的少妇| 韩国女主播成人在线观看| 国产精品久久久久久久久久久免费看 | 久久一区二区视频| 成人综合婷婷国产精品久久蜜臀| 国产精品国产自产拍高清av王其 | 亚洲美女免费视频| 欧美狂野另类xxxxoooo| 精品在线一区二区| 亚洲天天做日日做天天谢日日欢| 欧美日韩国产综合草草| 精彩视频一区二区三区| 亚洲少妇中出一区| 欧美大片顶级少妇| 91首页免费视频| 蜜臀av性久久久久蜜臀av麻豆| 国产精品久久精品日日| 日韩一区二区三区四区五区六区| 9i在线看片成人免费| 日本vs亚洲vs韩国一区三区二区| 国产精品久久久久久久久搜平片 | 中文字幕乱码一区二区免费| 欧美视频中文字幕| 国产美女主播视频一区| 午夜视频久久久久久| 国产精品超碰97尤物18| 欧美一区二区三级| 91老司机福利 在线| 国产在线精品视频| 午夜在线电影亚洲一区| 国产精品久久久99| 久久久综合精品| 7777精品伊人久久久大香线蕉最新版| fc2成人免费人成在线观看播放| 捆绑调教一区二区三区| 一区二区三区视频在线看| 国产片一区二区三区| 日韩一二三区不卡| 欧美午夜精品久久久久久孕妇| 国产成人av影院| 韩国视频一区二区| 青青草伊人久久| 午夜一区二区三区视频| 亚洲视频在线一区二区| 欧美国产欧美综合| 久久九九国产精品| 精品欧美一区二区在线观看| 欧美日韩在线不卡| 91久久国产综合久久| av一二三不卡影片| 丰满白嫩尤物一区二区| 精品系列免费在线观看| 六月丁香综合在线视频| 日本欧美大码aⅴ在线播放| 亚洲国产成人tv| 亚洲一区免费视频| 亚洲成a人片综合在线| 亚洲影视在线观看| 亚洲第一综合色| 亚洲一区二区在线免费观看视频| 亚洲视频一区二区在线观看| 中文字幕在线不卡一区二区三区| 久久久精品国产免大香伊| 精品乱码亚洲一区二区不卡| 日韩三级视频中文字幕| 日韩视频在线观看一区二区| 日韩欧美一区二区视频| 精品少妇一区二区三区日产乱码| 日韩精品一区二区三区视频 | 久久久精品国产免大香伊| 26uuu亚洲婷婷狠狠天堂| 久久亚洲综合av| 亚洲国产高清在线| 亚洲欧美激情插| 亚洲国产精品影院| 毛片av一区二区三区| 国产麻豆91精品| 成人自拍视频在线观看| 91免费版pro下载短视频| 色婷婷久久久综合中文字幕| 欧美三级日韩在线| 日韩精品一区二区三区三区免费 | 麻豆传媒一区二区三区| 蜜臀av亚洲一区中文字幕| 国内精品不卡在线| 波多野结衣91| 在线观看国产91| 777奇米四色成人影色区| 26uuu亚洲| 亚洲人成伊人成综合网小说| 亚洲狠狠爱一区二区三区| 日韩精品一区第一页| 久久99日本精品| 成人a级免费电影| 欧美在线free| 精品国产a毛片| 亚洲天堂网中文字| 蜜桃一区二区三区在线观看| 夫妻av一区二区| 欧美高清视频www夜色资源网| 精品国产免费人成电影在线观看四季| 久久精品男人天堂av| 亚洲国产一二三| 国产精品正在播放| 在线免费亚洲电影| 久久九九久久九九| 午夜精品久久久久久久久久久| 激情久久五月天| 在线国产亚洲欧美| 2021中文字幕一区亚洲| 夜夜亚洲天天久久| 国产中文一区二区三区| 欧美三级乱人伦电影| 欧美激情一区二区三区蜜桃视频| 亚洲国产人成综合网站| 国产精品自拍av| 在线成人免费视频| ...av二区三区久久精品| 美脚の诱脚舐め脚责91 | 成人免费视频视频在线观看免费 | 欧美高清激情brazzers| **性色生活片久久毛片| 韩国理伦片一区二区三区在线播放| 色天使色偷偷av一区二区| 久久影院视频免费| 欧美a级一区二区| 在线观看亚洲专区| 中文字幕日韩av资源站| 国产一区二区女| 91精品国产色综合久久不卡电影| 国产精品久久久久久久久免费樱桃| 激情综合五月婷婷| 欧美一区二区在线看| 亚洲一区在线观看视频| www.综合网.com| 亚洲国产精品精华液ab| 久久99精品一区二区三区三区| 色哟哟在线观看一区二区三区| 久久久久久久久久久久电影 | 日韩国产精品久久久| 欧洲一区在线电影| 综合网在线视频| 成人丝袜高跟foot| 国产精品污污网站在线观看| 国产激情一区二区三区| 欧美激情艳妇裸体舞| 精品系列免费在线观看| 日韩一级二级三级精品视频| 亚洲h在线观看| 欧美日韩国产中文| 日韩专区在线视频| 在线播放日韩导航| 性感美女久久精品| 欧美一区二区日韩| 蜜臀av国产精品久久久久| 欧美一区二区三区成人| 蜜桃久久久久久| 精品福利av导航| 国产一区二区精品在线观看| 久久综合色婷婷| 国产精品一二一区| 国产精品免费人成网站| 成人h精品动漫一区二区三区| 国产精品福利电影一区二区三区四区 | 日韩一区二区在线观看视频| 日韩成人免费看| 日韩欧美国产1| 国产精品一区一区三区| 欧美激情一区二区三区蜜桃视频| 丰满岳乱妇一区二区三区| 中文字幕中文字幕一区二区| 91高清视频在线| 日韩精品每日更新| 久久日一线二线三线suv| 国产成人8x视频一区二区| 亚洲色图清纯唯美| 欧美系列日韩一区| 久久精品国产秦先生| 国产精品日韩精品欧美在线| 色综合久久久久| 男女男精品视频网| 国产人成亚洲第一网站在线播放 | 蜜臀av一区二区| 国产女人水真多18毛片18精品视频| www.99精品| 亚洲成av人片一区二区三区| 精品国产髙清在线看国产毛片| 成人激情免费视频| 奇米影视7777精品一区二区| 久久久一区二区三区|