Package es.urjc.etsii.grafo.improve.ls
Class LocalSearchFirstImprovement<M extends Move<S,I>,S extends Solution<S,I>,I extends Instance>
java.lang.Object
es.urjc.etsii.grafo.improve.Improver<S,I>
es.urjc.etsii.grafo.improve.ls.LocalSearch<M,S,I>
es.urjc.etsii.grafo.improve.ls.LocalSearchFirstImprovement<M,S,I>
- Type Parameters:
M
- the type of moveS
- the type of problem solutionI
- the type of problem instances
public class LocalSearchFirstImprovement<M extends Move<S,I>,S extends Solution<S,I>,I extends Instance>
extends LocalSearch<M,S,I>
Local search procedures start from a given feasible solution and explore a determined neighborhood
in each iteration, replacing the current solution if a neighbor solution improves the objective
function of the current one. In this case, this local search procedure follows a First Improvement strategy.
The first improvement strategy is related to executing the first move that improves the current solution
-
Nested Class Summary
-
Field Summary
Fields inherited from class es.urjc.etsii.grafo.improve.ls.LocalSearch
neighborhood, objective
-
Constructor Summary
ConstructorsConstructorDescriptionLocalSearchFirstImprovement
(Neighborhood<M, S, I> neighborhood) Create a new local search method using the given neighborhood.LocalSearchFirstImprovement
(Objective<M, S, I> objective, Neighborhood<M, S, I> neighborhood) Create a new local search method using the given neighborhood -
Method Summary
Methods inherited from class es.urjc.etsii.grafo.improve.ls.LocalSearch
improve, improves, iteration, toString
Methods inherited from class es.urjc.etsii.grafo.improve.Improver
getObjective, nul, serial, serial
-
Constructor Details
-
LocalSearchFirstImprovement
Create a new local search method using the given neighborhood. Uses the method Move::getValue as the guiding function, with fMaximize = fmode.- Parameters:
neighborhood
- neighborhood to use
-
LocalSearchFirstImprovement
Create a new local search method using the given neighborhood- Parameters:
objective
- objective function to optimizeneighborhood
- neighborhood to use
-
-
Method Details
-
getMove
Get next move to execute, different strategies are possible Get next move to execute.
-