Proyecto Heuristic Lab
Proyecto Heuristic Lab
Proyecto Heuristic Lab
Proyecto en HeuristicLab
Sistemas Inteligentes e Interacción Persona
Computador
Máster en Ingeniería Informática
Universidad de La Laguna
Leonor Priego García
Índice
First Heuristic Algorithm: Local Search …………………………………………..3
Second Heuristic Algorithm: Simmulated Annealing……………….…………..6
Third Heuristic Algorithm: Tabu Search…………………………………………..10
Fourth Heuristic Algorithm: Variable Neighborhood Search…………………..13
In this document we will make an analysis of the problem or VRP Vehicle Routing Problem
analyzing how different heuristic algorithms used for resolution solve the problem. In this
case, we have used variants of different algorithms, which are: Local Search, Simmulated
Annealing, Tabu Search and Variable Neighbourhood Search (VNS) . For each algorithm
we have used two variants by changing the parameters and compared which behaves best
measuring its effectiveness and efficiency.
First Heuristic Algorithm: Local Search
Local search is a heuristic method to solve computationally difficult optimization problems. It
can be used in problems that can be formulated as the search for a solution of the
maximization of a criterion of a number of solutions candidates (This is possible only if a
neighborhood relation is defined in the search space). The algorithm goes from solution to
neighbor solution in the space of candidate solutions applying local changes, until an
optimal solution of the cost or after a certain time.
The image below on the left shows the problem to resolve. In all cases in this work we will
use the
Vehicle Routing Problem . And the image below on the right shows the parameters
changed of the Local Search algorithm. The parameters are:
MaximumIterations: 400
SampleSize: 100
MoveEvaluator: MultiVRPMoveEvaluator
MoveGenerator: MultiVRPMoveGenerator
Image 1: VRP Problem to resolve with LS
Image 2: Local Search parameters first
variation
The image below shows the results obtained after applying the above algorithm and the
execution time.
Image 3: Results obtained after applying the algortihm Image 4: Execution Time
The images below show the distances and travel times results graphics that are generated
after applying the algorithm
Image 5: Distances and Travel Times Graphics for the first variant of the LS
The image below the parameters changed for the second variation of the Local Search algorithm.
The parameters are:
MaximumIterations: 800
SampleSize: 100
MoveEvaluator: MultiVRPMoveEvaluator
MoveGenerator: MultiVRPMoveGenerator
Image 6: Local Search parameters second variation
The image below shows the results obtained after applying the above algorithm and the
execution time.
Image 7: Results obtained after applying the algortihm Image 8: Execution Time
The images below show the distances and travel times results graphics that are generated
after applying the second variant of the Local Search algorithm.
Image 9: Distances and Travel Times Graphics for the second variant of the LS
Conclusion: In this case, the variation in results is not very noticeable, we can see that the
graphs are almost equal. This may be due to a local optimum prevents improving the
solution as it is a local search down so that is locked with the first found. Anyway, this
algorithm does not allow editing of many parameters and not let improve the solution.
Second Heuristic Algorithm: Simmulated Annealing
Simulated annealing is a probabilistic
technique for approximating the
global optimum of a
given function. Specifically, it is a
metaheuristic
to approximate
global optimization
in a large
search space . It is often used when the search space is discrete.
Simulated annealing sometimes accept worse solutions as it explores the solution space. It
is a fundamental property of metaheuristics, allowing a wider search for the optimal solution.
The image below on the left shows the problem to resolve (
Vehicle Routing Problem).
And the
image below on the right shows the parameters changed of the Simulated Annealing algorithm.
The parameters are:
StartTemperature: 100
EndTemperature: 1E06
InnerIterations: 10
MaximumIterations: 100
MoveEvaluator and Generator: PotvinVehicleAssignment
Image 10: VRP Problem to resolve with SA
Image 11: SA parameters first variation
The image below shows the results obtained after applying the above algorithm and the
execution time.
Image 12: Results obtained after applying the algortihm Image 13: Execution Time
The images below show the distances results graphic that is generated after applying the
algorithm:
Image 14: Distances graphic for the first variant of the SA
The image below the parameters changed for the second variation of the Simulated Annealing
algorithm. The parameters are:
StartTemperature: 100
EndTemperature: 1E12
InnerIterations: 13
MaximumIterations: 500
MoveEvaluator and Generator: PotvinVehicleAssignment
Image 15: SA parameters second variation
The images below show the distances results graphic that is generated after applying the
algorithm:
Image 16: Distances graphic for the second variant of the SA
Image 17: Execution Time
Conclusion: In this case, we can see how after change the parameters, the graphics have
been equals. However, in this algorithm, if you reduce the final temperature, you will
probably reach a better solution. Probably, the moveGenerator parameter isn´t the correct
parameter to evaluate that. So, if you change the parameter move Generator to
PotvinPDShiftMultiMoveGenerator and you hold the final temperature to 1E06 the graphic
will be the next. And here, we can see how the distance is less when increase the number of
iteration.
Image 18: Distances graphic when the moveGenerator is PotvinPDSShiftMultiMoveGenerator
Third Heuristic Algorithm: Tabu Search
Tabu Search is an algorithm to solve combinatorial optimization problems, to this end
maintains a current solution at each iteration. It also creates and improves neighborhoods
systematically to improve the solution. The approach strategy is to maintain a shortterm
memory of the specific changes of recent moves in the search space and the prevention of
future moves to undo the changes. In this algorithm, worsening movements may be
accepted if there is no improvement movement is available, so, let to avoid local optimal and
to advance in improving the solution
The image below on the left shows the problem to resolve (
Vehicle Routing Problem).
And the
image below on the right shows the parameters changed of the Tabu Search algorithm. The
parameters are:
SampleSize: 2000
TabuTenure:10
MaximumIterations: 300
MoveEvaluator and Generator: PotvinCustomerRelocationMove
Image 19: VRP Problem to resolve with TS
Image 20: TS parameters first variation
The image below shows the results obtained after applying the above algorithm and the
execution time.
Image 21: Results obtained after applying the algortihm Image 22: Execution Time
The images below show the distances and travel times results graphics that are generated
after applying the first variant of the Tabu Search algorithm.
Image 23: Distances and Travel Times Graphics for the first variant of the TS
The image below the parameters changed for the second variation of the Simulated Annealing
algorithm. The parameters are:
SampleSize: 2000
TabuTenure:10
MaximumIterations: 600
MoveEvaluator and Generator: PotvinCustomerRelocationMove
Image 24: TS parameters of second variation
The image below shows the results obtained after applying the above algorithm and the
execution time.
Image 25: Results obtained after applying the algortihm Image 26: Execution Time
The images below show the distances and travel times results graphics that are generated
after applying the second variant of the Tabu Search algorithm.
Image 27: Distances and Travel Times Graphics for the second variant of the TS
Conclusion: For this experiment, we can conclude that, the algorithm improve while the
number of iterations increase. In addition, we can see how this algorithm let bad movements
to reach a better solution.
Fourth Heuristic Algorithm: Variable Neighborhood Search
Variable Neighborhood is a metaheuristic method for solving a set of
combinatorial
optimization and global optimization problems.
The most remote neighborhoods of the current solution are explored, and moves from there
to a new only if it was an improvement. The local search method is applied several times to
obtain solutions in the area of local optima.
The image below on the left shows the problem to resolve (
Vehicle Routing Problem). And the
image below on the right shows the parameters changed of the VNS algorithm. The parameters
are:
LocalImprovement: AlbaLambdaInterchange
MaximumIterations: 10
ShackingOperator: VRPShakingOperator
Image 28: VRP Problem to resolve with VNS
Image 29: VNS parameters first variation
The image below shows the results obtained after applying the above algorithm just in the
execution time.
Image 30: Results obtained after applying the algortihm Image 31: Execution Time
The images below show the distances and travel times results graphics that are generated
after applying the first variant of the VNS algorithm.
Image 32: Distances and Travel Times Graphics for the first variant of the VNS
The image below the parameters changed for the second variation of the Simulated Annealing
algorithm. The parameters are:
LocalImprovement: AlbaLambdaInterchange
MaximumIterations: 6
ShackingOperator: VRPShakingOperator
Image 33: VNS parameters of second variation
The image below shows the results obtained after applying the above algorithm and the
execution time.
Image 34: Results obtained after applying the algortihm Image 35: Execution Time
The images below show the distances and travel times results graphics that are generated
after applying the second variant of the VNS algorithm.
Image 36: Distances and Travel Times Graphics for the second variant of the VNS
Conclusion:
In this case, we have observed that resolve this problem requires a lot of time of computing
and it consume enough computer resources. However, in the times of execution shows we
can see how the algorithm improve with the number of executions. It is due to avoid the local
optima that occurred in the local search.
In addition, we can´t make much more experiments because there aren't many parameters
to change.