Class RandomRemoveDestructive

java.lang.Object
es.urjc.etsii.grafo.shake.Destructive<FLPSolution, FLPInstance>
es.urjc.etsii.grafo.flayouts.shake.RandomRemoveDestructive

public class RandomRemoveDestructive extends Destructive<FLPSolution, FLPInstance>
Partially destroys a DRFP solution by removing part of its facilities.
  • Constructor Details

    • RandomRemoveDestructive

      public RandomRemoveDestructive(double ratio)
  • Method Details

    • destroy

      public FLPSolution destroy(FLPSolution solution, int k)
      Description copied from class: Destructive
      Destroy a part of the solution. Usually involves deassigning parts of the solution to be rebuilt later by a reconstructive method
      Specified by:
      destroy in class Destructive<FLPSolution, FLPInstance>
      Parameters:
      solution - original solution
      k - destroy intensity, may be ignored by the implementing class
      Returns:
      reference to the modified solution. Can be modified in placed or cloned before. // TODO clone always or not? decided by the caller?
    • bulkRemove

      public FLPSolution bulkRemove(FLPSolution solution, Set<Integer> facilitiesToRemove)
    • moveRemove

      public FLPSolution moveRemove(FLPSolution solution, Set<Integer> facilitiesToRemove)
    • toString

      public String toString()
      Overrides:
      toString in class Object