Class ParetoSet<S extends Solution<S,I>,I extends Instance>

java.lang.Object
es.urjc.etsii.grafo.mo.pareto.ParetoSet<S,I>
Direct Known Subclasses:
NDTree, ParetoSimpleList

public abstract class ParetoSet<S extends Solution<S,I>,I extends Instance> extends Object
  • Constructor Details

    • ParetoSet

      public ParetoSet(int nObjectives)
      Create a new Pareto set that will track solutions with n objectives
      Parameters:
      nObjectives -
  • Method Details

    • resetElites

      public void resetElites()
    • getLastModifiedTime

      public long getLastModifiedTime()
    • add

      public boolean add(Iterable<S> solutions)
      Try to add multiple solutions to the Pareto front
      Parameters:
      solutions - solutions to try to add
      Returns:
      true if the Pareto front has been modified, false otherwise (all solutions are dominated by those in the Pareto front)
    • add

      public boolean add(S newSol)
      Try add solution to Pareto front. Solution is only added if it is not dominated by any other solution in the Pareto front.
      Parameters:
      newSol - solution to try to add to Pareto front
      Returns:
      true if the solution was added to the pareto front and therefore the Pareto front has been updated, false otherwise
    • weaklyDominates

      public static boolean weaklyDominates(double[] a, double[] b)
      Check if a solution weakly dominates another
      Parameters:
      a - solution A scores
      b - solution B scores
      Returns:
      true if A weakly dominates B, false otherwise
    • tryAddToElite

      public static <S extends Solution<S, I>, I extends Instance> void tryAddToElite(S newSol, TreeSet<S> elite)
    • clear

      public void clear()
    • add

      public abstract boolean add(double[] solution)
    • size

      public abstract int size()
    • stream

      public abstract Stream<double[]> stream()
    • toText

      public String toText()
    • toMatrix

      public double[][] toMatrix()
    • getElites

      public Map<String,TreeSet<S>> getElites()
    • getTrackedSolutions

      public Iterable<S> getTrackedSolutions()
    • ejectedSolution

      protected S ejectedSolution(double[] ejectedSolution)