The Tabu Search (TS) algorithm provides a way of solving the unidirectional flow optimization model without having to deal with some of the complex features of the model such as the quadratic objective function. TS was originally created and formalized by Glover [83-85]. It is a metaheuristic method that employs local search for the optimization of mathematical models.
General Tabu Search Algorithm //Preliminary Definitions
it_count = 1; //Initialize iteration counter
ITMAX= MaxIterations; //Define maximum number of iterations MAX_L = MaxLength; // Define a maximum size for the Tabu List T=Ø; //Define an empty Tabu List
N = NumberCandidates; //Define number of candidate solutions to generate per iteration //Initialization
So = InitialSolution(); //
S = So; // Define an initial solution S* = S; //Set S as the best known solution
58 | P a g e f* = ObjectiveFunction(S); //Determine the performance of S
T= T+S; // Add solution S to the Tabu List Repeat
it_count=it_count+1; // Update Iteration Counter
// Generate N candidate solutions in the neighbourhood of S {S’} = Neighbourhood(N,S);
{S’}= {S’}- T; // Discard candidate solutions that appear in the Tabu List S”= argmin[ObjectiveFunction(S’)]; // Evaluate and Select Best Candidate S=S”; //Change Current Active Search Point to Best Candidate Point
if f”>f* //If the performance of best candidate surpasses that of the best known solution S*=S”;//Set best known solution to best candidate
f* = f”;// Save the best known objective value end
T=T+S”; // Add the Best Candidate to the Tabu List
if size(T) = MAX_L; //If the Tabu List has reached its maximum size
T=RemoveOldest(T) ; // Remove the solution that is the oldest in the Tabu List end
Until (it_count=ITMAX)
The Tabu Search algorithm presented here requires the initialization of an iteration counter and the definition of a maximum iteration count. The algorithm requires that an empty Tabu List be defined at the outset and a maximum length for the list to be defined. The Tabu List is a list of solutions for tweaks have has been conducted in an effort to find improved solutions in the
‘neighbourhood’. The term ‘neighbourhood’ implies that the tweaks are minor enough for a modified solution to still be considered very similar to the original solution
An initial solution is generated by the InitialSolution() function. Solution representation and initialization are discussed in section 5.3.2.1. The initial solution So is defined to be the active solution S on which tweaks will be conducted in order to find improved solutions. The initial solution is then set as the best known solution S* and added to the Tabu List. Solutions in the Tabu List will not be explored again by performing teaks. Prior to adding the initial solution to the Tabu List, the objective function value is computed and stored. The computation of objective function values is discussed in section 5.3.2.2.
The TS algorithm tweaks a single active solution S in each iteration of the repeating loop. N candidate solutions are generated by performing tweaks to the solution S. The manner in which
59 | P a g e these tweaks are formed is discussed in section 5.3.2.3. Candidate solutions that match solutions in the Tabu List are immediately discarded. The remaining candidate solutions are evaluated for their best objective function values. The best performing candidate S’’ is then set as the active solution S. If the objective function value of the best candidate outperforms that of the best known solution, it is set as the best solution and the best objective function value is updated. The active solution is then added to the Tabu List and if the Tabu List has exceeded its length, the oldest solution in the list is removed. The process of continuously updating the active solution and generating candidate solutions continues until the iteration counter reaches the maximum count.
The algorithm can also be terminated when f* converges onto a prescribed value however, this option was not implemented here.
The TS algorithm as described here was implemented in the Matlab® program development environment. The program code may be viewed on the accompanying CD.
5.3.2.1 Solution Representation and Initialization
The solution to the flow problem is represented as an ordered set, e.g. S={1,3,2,4,6,5,9,8,10}. This implies that the site for machine 2 is at the third position in the sequence, etc. The initial solution is be generated by the InitialSolution() function by performing a random permutation without repetition of indices 1,…,M. The method of representing a solution allows only one machine site to occupy one position in the sequence; it therefore ensures that the second and third constraints (equations 46 and 47) are satisfied.
5.3.2.2 Objective Function Calculation
The representation of the solution as an ordered set is easily converted to xiα and xjβ format. If machine i is in location α according to the set, fix xiα =1 and xiα =0 for every other α. Set xjβ = xiα for all (j,β) = (i,α). The objective value value is then calculated using equation 44.Note that the manner in which the set representation is converted in values for variables xiα and xjβ ensures that the first and last constraints (equations 45 and 48) are enforced.
5.3.2.3 Generation of Candidate Solutions
Candidate solutions in the neighbourhood of S are generated by the Neighbourhood() function as follows:
1. Create a duplicate of S.
2. If K is the cardinality of the set S, randomly select two positions in the interval 1 to K.
3. Swap the elements in S that are stored at the two positions.
4. Repeat steps 1-3 N times, to create N candidate solutions.
60 | P a g e