• No results found

Algorithms for Solving Robust Counterparts

To solve the robust counterparts of CVRP and SDVRP with different objectives to consider uncertain travel times and demands with the heuristic algorithms, Algorithms 14 and 15 are proposed to consider the total amount of increased demand and travel time in the solution based on parameters ΓQ and ΓT for robust models in disaster relief routing. Depending on

the degree of robustness (that can be decided by ΓQ and ΓT values), a certain uncertain

parameter, e.g., ˆtij for some (i, j) in A, may or may not be included in the solution. The

Tabu Search Algorithm for Ride-sharing

(K0, U0) = current solution, (K, U )best= (K0, U0), σ = ∅ ; while B < Bmaxdo

M = ∅;

find all (K0, U0)hof (K0, U0) according to the move operators;

add the (K0, U0)

hthat satisfy constraints (3.96), (3.97), and (3.104) into M ;

for (K0, U0)h∈ M do

evaluate f ((K0, U0)h) of (K0, U0)h;

end

rank (K0, U0)h∈ M from the smallest f ((K0, U0)h) to the largest f ((K0, U0)h);

for (K0, U0) h∈ M do if (K0, U0)h∈ σ then/ (K0, U0) = (K0, U0)h; add (K0, U0)hto σ; if f ((K0, U0)h) < f ((K0, U0)best) then (K0, U0)best= (K0, U0) h; f ((K0, U0)best) = f ((K0, U0) h); end else if f ((K0, U0)h) < f ((K0, U0)best) then (K0, U0) = (K0, U0) h; add (K0, U0) hto σ; (K0, U0)best= (K0, U0) h; f ((K0, U0)best) = f ((K0, U0) h); end end

break the for-loop when (K0, U0) is updated;

end

update σ based on frequency end

return (K0, U0)bestand f ((K0, U0)best)

of the ride-sharing model to consider uncertain travel times with the heuristic algorithms, Algorithm 16 is proposed to consider the total amount of increased travel time in the solution based on parameters Γk, ∀k ∈ K. Depending on the degree of robustness (that can

be decided by values of Γk, ∀k ∈ K), ˆtij for some (i, j) in A, may or may not be included

in the solution.

Update Demand Based on ΓQ

Given ΓQ, ¯qi, i ∈ N , ˆqi, i ∈ N ;

sort ˆqi, i ∈ N in decreasing order;

l = the position index of ˆqiin sorted order, l = 1, 2, ..., |N |;

S0

Q= the set of nodes of which the ˆqiare considered in the solution based on ΓQ;

SQ0 = ∅ for l ≤ ΓQdo

add node index i of ˆqiat position l into SQ0

end for i ∈ N do if i ∈ SQ0 then qi= ¯qi+ ˆqi else qi= ¯qi end end return qi, i ∈ N

Algorithm 14: Uncertain Demand Selection Algorithm Based on ΓQ

Update Travel Time Based on ΓT

Given ΓT, ¯tij, (i, j) ∈ A, ˆtij, (i, j) ∈ A, and a solution K0;

compute wij, (i, j) ∈ A;

vij= wijtˆij, (i, j) ∈ A;

sort vij, (i, j) ∈ A in decreasing order;

l = the position index of vijin sorted order, l = 1, 2, ..., |A|;

ST0 = the set of arcs of which the vijare considered in the solution based on ΓT. S0T= ∅;

for l ≤ ΓT do

add arc (i, j) of vijat position l into S0T

end for (i, j) ∈ A do if (i, j) ∈ S0 T then t0 ij= ¯tij+ ˆtij else t0ij= ¯tij end end return t0ij, (i, j) ∈ A

Algorithm 15: Uncertain Travel Time Selection Algorithm Based on ΓT

Algorithm 14 is to select the maximum potential increased amount of demand based on ΓQ, which is implemented before the heuristic algorithms are used. As each node is visited

at least once, qi becomes fixed for each solution after determination of set of ˆqi.

Different from evaluating the uncertainty set of demands, the set of selected ˆtij for each

more parameter to be considered, wij, the number of vehicles using an arc (i, j). For an arc

(i, j) where ˆtij is large and wij = 0 (implying that this arc is not used in the solution), this

ˆ

tij is not to be selected in the uncertainty set of travel times when evaluating the maximum

potential increased travel time due to uncertainty. For an arc (i, j) where ˆtij not large

but wij is large, this ˆtij may be selected in the uncertainty set because this arc is used for

multiple vehicles. Algorithm 15 considers the effect of ˆtij and wij together on the maximum

potential increased travel time of a solution. Algorithm 15 is implemented for each new constructed solution in the insertion algorithm and tabu search. The objective function value and metrics of the new solution is computed using t0ij.

Compute Total Increased Travel Time Based on Γk

Given Γk, ∀k ∈ K, ¯tij, (i, j) ∈ A, ˆtij, (i, j) ∈ A, and a solution K0;

for k ∈ K do

sort all ˆtijin route k in decreasing order;

l = the position index of ˆtijin sorted order ;

Sk= the set of arcs of which the ˆtijare considered in route k based on Γk. Sk= ∅;

for l ≤ Γkdo

add arc (i, j) of ˆtijat position l into Sk

end

total increased travel time in route k =P

(i,j)∈Skˆtij;

end

total increased travel time in K0=P

k∈K

P

(i,j)∈Skˆtij

Algorithm 16: Compute Total Increased Travel Time Based on Γk