4.2.1 Introduction to GRASP
Many combinatorial problems are intrinsically difficult in the sense that to be solved they require a number of elementary steps which is exponential in the size of their input. Given their intrinsic hardness, usually such problems are approached heuristically, i.e. they are solved by applying either a heuristic algorithm or a metaheuristic schema, that find good suboptimal solutions in reasonable computational time. The most promising of such techniques include among others Simulated Annealing [Kirkpatrick, 1994], Tabù Search [Glover, 1989; Glover, 1990; Glover & Laguna, 1997], Genetic Algorithms [Goldberg, 1989], Variable Neighborhood Search [Hansen & Mladenovìc, 1998], and GRASP (Greedy Randomized Adaptive Search Procedures) [Feo & Resende, 1995].
Later on in the following, we shall refer to a generic optimization problem, defined by a finite ground set E= {1, 2… n}, a set of feasible solutions F⊆ 2 Ε, and an objective function
f: 2 Ε→R to be minimized. The target is to find an optimal solution Ŝ in F, such that f
(Ŝ)≤f(S), for each S in F.
4.2.2. What is GRASP?
GRASP is an iterative multi-start metaheuristic for solving difficult combinatorial problems. Grasp or Greedy Randomized adaptive Search Procedure is an algorithm for finding a solution for NP hard problems. This algorithm will give us a best solution, it is a multi-start or iterative process.
This algorithm will iterate as many as possible depend on network designer problem. In each iteration we have 2 phase, Construction and Local search phase.in the first phase which is Construction phase it will build a feasible solution. In the second phase which is
local search phase the neighborhood of the feasible solution from the first phase will be investigated until a local minimum solution will be found. The best over solution among the first and second phase will be kept as the result.
The pseudo-code in Figure 8.1 illustrates the main blocks of a GRASP procedure for minimization, in which Max_Iterations iterations are performed and Seed is used as the initial seed for the pseudorandom number generator.
Figure4.2 Pseudo code of generic GRASP
Incorporation of a candidate into the solution under construction. The heuristic is adaptive because the benefits associated with every element are updated at each iteration of the construction phase to reflect the changes brought on by the selection of the previous element. The probabilistic component of a GRASP is characterized by randomly choosing one of the best candidates in the list, but not necessarily the top candidate. The list of best candidates is called the restricted candidate list (RCL). This choice technique allows for different solutions to be obtained at each GRASP iteration, but does not necessarily compromise the power of the adaptive greedy component of the method.
Construction phase:
In figure below you can find the pseudo-code of the first phase. In the construction phase on each iteration we are going to have a feasible solution.
Figure 4.3. Pseudo code of a generic GRASP construction phase
The key to success for a local search algorithm consists of the suitable choice of a neighborhood structure, efficient neighborhood search techniques, the fast evaluation of the cost function, and the quality of the starting solution itself, which depends on the construction phase.
The pseudo-code shows that the parameter α controls the amounts of greediness and
randomness in the algorithm. A value a = 0 corresponds a greedy construction procedure, while a = 1 produces random construction. This amount of a will be vary from 0 to 1. Let the set of candidate elements be formed by all elements that can be incorporated to the partial solution under construction without destroying feasibility. The selection of the next element for incorporation is determined by the evaluation of all candidate elements according to a greedy evaluation function.
This greedy function usually depends on our cost or objective function, in the way of
restricted candidate list (RCL) formed by the best elements, i.e. those whose incorporation to the current partial solution results in the smallest incremental costs (this is the greedy aspect of the algorithm). The element to be incorporated into the partial solution is randomly selected from those in the RCL (this is the probabilistic aspect of the heuristic). Once the selected element is incorporated to the partial solution, the candidate list is updated and the incremental costs are reevaluated (this is the adaptive aspect of the heuristic).
Local Search Phase
The solution which is found by the greedy randomized construction phase shouldn’t be exactly the best one. It is an optimal. That’s why we use the second step local search among the neighborhood of the feasible solution to improve the constructed solution.
Figure 4.4 Pseudo code of generic Local Search phase
In the figure above you can find the Pseudo-code of the second phase.A local search
algorithm works in an iterative fashion by successively replacing the current solution by a better solution in the neighborhood of the current solution. It terminates when no better solution is found in the neighborhood. It will have the constructed solution as an input and will start from it.
The effectiveness of a local search procedure depends on several aspects, such as the neighborhood structure, the neighborhood search technique, the fast evaluation of the cost function of the neighbors, and the starting solution itself. The construction phase plays a very important role with respect to this last aspect, building high-quality starting solutions for the local search.
A solution s is said to be locally optimal if there is no better solution in N(s). The key to success for a local search algorithm consists of the suitable choice of a neighborhood structure, efficient neighborhood search techniques, and the starting solution. [14]
4.3. Summary.
This chapter presents the basic information about the graph theory for modeling our network and our problem and also some information about the algorithm we are going to use in our scenario for finding the best and feasible solution.
Then in the next chapter we will apply them in our RINA network and later on we will analyze the results.
GRASP is an algorithm which will be applied in NP hard problems to find the feasible solution which is consists of 2 phases, construction and local search phase. In the first phase based on our greedy function we will start to find the best way to route our demands the output of this phase is not locally optimal, to find the feasible one we will apply the second phase and by checking the environment of the first solution will introduce the best one
.
Chapter 5
GRASP and Graph theory
in RINA:
What we did in my master thesis was trying to forward a request or demand in a RINA network from an application to the desired one, and later on calculated the minimum cost as an objective function.
We consider RINA network as a graph with some nodes and some requests to transport. In my case we have some demands with a source and destination that need to be routed in order to find the best path. This problem in RINA is equivalent to find an available DIF or create a new one. In this chapter, we will define our scenario and some works and analysis.
In this chapter we will have: