Class LocalSearchBestImprovement<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.LocalSearchBestImprovement<M,S,I>
Type Parameters:
M - the type of move
S - the type of problem solution
I - the type of problem instances

public class LocalSearchBestImprovement<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 Best Improvement strategy. The best improvement strategy is related to executing the best move of the given neighbors.
  • Constructor Details

    • LocalSearchBestImprovement

      @AutoconfigConstructor public LocalSearchBestImprovement(Neighborhood<M,S,I> neighborhood)
      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
    • LocalSearchBestImprovement

      public LocalSearchBestImprovement(Objective<M,S,I> objective, Neighborhood<M,S,I> neighborhood)
      Create a new local search method using the given neighborhood
      Parameters:
      objective - objective function to optimize
      neighborhood - neighborhood to use
  • Method Details

    • getMove

      public M getMove(S solution)
      Get next move to execute, different strategies are possible Get next move to execute.
      Specified by:
      getMove in class LocalSearch<M extends Move<S,I>,S extends Solution<S,I>,I extends Instance>
      Parameters:
      solution - Solution
      Returns:
      Proposed move, null if there are no candidate moves in the neighborhood