Ejemplo n.º 1
0
 public static String getSolverInfo(EAsolver solver) {
   StringBuffer txt = new StringBuffer();
   txt.append(
       MyString.LINE + "\n S O L V E R \n" + MyString.LINE + "\n" + solver.getInformation());
   txt.append(
       "\n\n"
           + MyString.LINE
           + "\n S T O P   C R I T E R I A \n"
           + MyString.LINE
           + "\n"
           + solver.stop.getInformation());
   txt.append(
       "\n\n"
           + MyString.LINE
           + "\n P R O B L E M \n"
           + MyString.LINE
           + "\n"
           + solver.problem.getInformation());
   txt.append(
       "\n\n"
           + MyString.LINE
           + "\n P O P U L A T I O N \n"
           + MyString.LINE
           + "\n"
           + solver.parents.getInformation());
   txt.append(
       "\n\n"
           + MyString.LINE
           + "\n S E L E C T I O N\n"
           + MyString.LINE
           + "\n"
           + solver.selection.getInformation());
   txt.append(
       "\n\n"
           + MyString.LINE
           + "\n R E C O M B I N A T I O N\n"
           + MyString.LINE
           + "\n"
           + solver.recombination.getInformation());
   txt.append(
       "\n\n"
           + MyString.LINE
           + "\n M U T A T I O N\n"
           + MyString.LINE
           + "\n"
           + solver.mutation.getInformation());
   txt.append(
       "\n\n"
           + MyString.LINE
           + "\n R E P L A C E M E N T\n"
           + MyString.LINE
           + "\n"
           + solver.replacement.getInformation());
   txt.append(
       "\n\n"
           + MyString.LINE
           + "\n R E S C A L I N G\n"
           + MyString.LINE
           + "\n"
           + solver.rescaling.getInformation());
   txt.append("\n\n" + MyString.LINE + "\n STATISTICS\n" + MyString.LINE + "\n");
   for (AbstractStatistics s : solver.report.getStatistics()) {
     txt.append(MyString.LINE + "\n");
     txt.append(s.getInformation() + "\n");
   }
   return txt.toString();
 }