• No results found

Fundamentals of the Nested Search

2.4 A Meta Heuristic: The Nested Tabu Search Algorithm

2.4.3 Fundamentals of the Nested Search

Given some L and B, and their corresponding berth schedule x, a neighboring solution can be defined by some change to B, or to L, or to both vectors. We define a nested approach that explores changes to B given a fixed LP(x) as an inner search T S2, while an outer search T S1 explores changes to L. The first berth position vector B created for any new L in the outer search is the one defined by the hierarchical FF rule.

An example set of nested search steps is illustrated in Figure 11. In this instance, a1 = 1, a2 = 2, a3 = 4, a4 = 3, and a5 = 8 and all vessel due times are 17. Part A of the figure depicts the berth schedule generated by the first-fit rule berth positions corresponding to L = (1, 2, 3, 4, 5). If we conduct a outer search T S1 move that swaps vessels 3 and 4 in the vessel list yielding L = (1, 2, 4, 3, 5), we reach the better solution illustrated in Part B. Next, we conduct two inner search T S2 moves to generate the schedules in Part C and D. In Part C, we illustrate a move where we change only the berth position of vessel 2 from 7 to 10. A second move yields the improved solution

in Part D, where we again change only the berth position of vessel 5 from 1 to 8. It can be shown that the schedule in Part D is an optimal schedule for this instance.

Note that all vessels in all berth schedules given in figure 11 are packed.

Figure 11: Illustration of moving from one solution to another by modifying L and B

We now outline the major steps. At each iteration of T S1, we modify the current L using single swap moves within a randomized neighborhood. Given a list L, define the (p, r, q) randomized neighborhood of lists NL(p, r, q, L) as all lists generated by a single swap in L of the position of one of q randomly-selected vessels (denoted vessel k) with the position of one of p randomly-selected vessels from among the r closest neighbor vessels to k in L. Closeness in L is measured as the absolute difference in

position in the list.

Each candidate neighbor list generated in an iteration of T S1 is initially assigned a berth position vector B by the FF rule (corresponding to a packed solution). These pairs now form a set of candidate moves, each with a corresponding berth schedule x, mark M(x), and primal vessel list LP(x). Each non-tabu candidate move is now considered in sequence, where a tabu move is one whose mark M(x) is currently in the tabu list. If the mark M(x) has not yet been considered during the current T S1

iteration, we initiate the inner search T S2 with x as the initial solution.

In an iteration of T S2, we generate a set of candidate moves using changes to a single entry in the berth position vector B corresponding to the current solution y while keeping the primal list LP(y) fixed. Note that the initial solution used in an iteration of T S2 is packed, and we will restrict neighbor candidates to also be packed in each iteration of T S2. Let VS be the set of all vessels that have adjacent unoccupied berth sections in schedule y for the entire vessel berthing time; note that these sections may be above or below the vessel in the time-space diagram, but not both. For example, in part A of Figure 11, VS = {2, 4, 5}. Given B, we define the (s, VS) randomized neighborhood of berth position vectors NB(s, VS, B) as all those generated by changing the berth position of one of s randomly-selected vessels from the set VS; for the selected vessel, the berth position is shifted up or down in the direction of the adjacent unoccupied berth sections as far as possible before encountering another berthed vessel. Note that the shifted vessel is still supported in space. For each Bj ∈ NB(s, VS, B), a feasible berth schedule is decoded using the vector pair (Bj, LP(y)); recall the discussion in Section 2.4.1. Thus, T S2 moves from one packed solution to another.

The importance of primal vessel lists for the nested search is now established.

Lemma 3 If LP(y) is the primal list for current berth schedule y, every candidate move in an iteration of T S2 yields a new berth schedule with an objective value smaller

Figure 12: The importance of using the primal list in the inner search, T S2

or equal to the current.

Proof. Let v be the vessel whose berth position is shifted in the candidate move, and let tv be its berthing time in the current solution y. By definition, each vessel k currently berthed at some time tk < tv precedes v in the list LP(y) since it is the primal list. Therefore, these vessels will have the same berthing times in the new solution. The same is true for each vessel ` 6= v currently berthed at t` = tv, since the shifted berth position of v is restricted by these vessels. Vessel v and any vessel m where tm > tv may be berthed at the same time, or an earlier time after the shift of vessel v. Clearly, vessel v can berth no later than its current berthing time tv, since the berthing times and positions of precedent vessels in LP(y) do not change.

By simple induction, it can be shown that since the berthing time of a vessel m is

constrained only by its arrival time am and the completion time of some precedent vessel in LP(y), and precedent vessel berthing times are always no later than their current berthing times, each vessel m is berthed at a time no later than its current.

Thus, the lemma holds. 2

Figure 12 illustrates these ideas. Suppose vessel 1 has a1 = 3, vessel 4 has a4 = 5, and all other vessels arrive at time 1. In the example, if the candidate move is to shift the berth position of vessel 4 downward by setting b4 = 8, we reach the schedule on the left part of the figure using the primal list LP = (2, 1, 3, 4, 5). Importantly, however, if the list corresponding to the current solution were not the primal, such a candidate move may be decoded into a solution with a worse objective. For example, list L = (1, 3, 4, 2, 5) also corresponds to the initial solution. However, the same berth position shift in this case yields the solution on the right part of the figure, with a clearly higher objective function value.

The tabu list in T S2 prevents reverse berth shift moves (defined as shifting a vessel back to its previous berth position) for a random number of iterations θ2, where θ2 is distributed discrete uniform on [θ2min, θmax2 ]. At the completion of T S2, a best (lowest objective function value) berth position vector and corresponding best solution is identified for the current candidate move of T S1. After all candidate T S1 moves have been evaluated for the current iteration, the best (lowest objective function value) move is selected as the new current solution x, with its corresponding vessel list L and berth position vector B. The mark M(x) of this solution is placed into the T S1 tabu list for a random number of iterations θ1, where θ1 is discrete uniform on 1min, θmax1 ].

Related documents