@@ -0,0 +1,2136 @@
+package org.uma.jmetal.util.observer.impl;%0A%0Aimport org.uma.jmetal.solution.Solution;%0Aimport org.uma.jmetal.util.JMetalLogger;%0Aimport org.uma.jmetal.util.fileoutput.SolutionListOutput;%0Aimport org.uma.jmetal.util.fileoutput.impl.DefaultFileOutputContext;%0Aimport org.uma.jmetal.util.observable.Observable;%0Aimport org.uma.jmetal.util.observer.Observer;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0A/**%0A * This observer stores a solution list in files. Concretely, the variables and objectives are written in files called%0A * VAR.x.tsv and VAR.x.tsv, respectively (x is an iteration counter). The frequency of the writes are set by a%0A * parameter.%0A *%0A * @author Antonio J. Nebro %3Cantonio@lcc.uma.es%3E%0A */%0Apublic class WriteSolutionsToFilesObserver implements Observer%3CMap%3CString, Object%3E%3E %7B%0A%0A  private Integer frequency ;%0A  private int counter ;%0A  private String outputDirectory = %22%22 ;%0A  /**%0A   * Constructor%0A   */%0A%0A  public WriteSolutionsToFilesObserver(Integer frequency, String outputDirectory) %7B%0A    this.frequency = frequency ;%0A    this.counter = 0 ;%0A    this.outputDirectory = outputDirectory ;%0A  %7D%0A%0A  public WriteSolutionsToFilesObserver() %7B%0A    this(1, %22outputDirectory%22) ;%0A  %7D%0A%0A  /**%0A   * This method gets the population%0A   * @param data Map of pairs (key, value)%0A   */%0A  @Override%0A  public void update(Observable%3CMap%3CString, Object%3E%3E observable, Map%3CString, Object%3E data) %7B%0A    List%3C?%3E population = (List%3C?%3E) data.get(%22POPULATION%22);%0A%0A    if (population!=null) %7B%0A      if (counter %25 frequency == 0) %7B%0A        new SolutionListOutput((List%3C? extends Solution%3C?%3E%3E) population)%0A            .setSeparator(%22%5Ct%22)%0A            .setVarFileOutputContext(new DefaultFileOutputContext(outputDirectory + %22/VAR.%22 + counter + %22.tsv%22))%0A            .setFunFileOutputContext(new DefaultFileOutputContext(outputDirectory + %22/FUN.%22 + counter + %22.tsv%22))%0A            .print();%0A      %7D%0A    %7D else %7B%0A      JMetalLogger.logger.warning(getClass().getName()+ %22: The POPULATION is null%22);%0A    %7D%0A%0A    counter ++ ;%0A  %7D%0A%0A  public String getName() %7B%0A    return %22Print objectives observer%22;%0A  %7D%0A%0A  @Override%0A  public String toString() %7B%0A    return getName() ;%0A  %7D%0A%7D%0A

Add class WriteSolutionsToFilesObserver