private List<DoubleSolution> createSolutionListFrontFiles(String algorithmName, Front frontWithVariableValues, Front frontWithObjectiveValues) {
    if (frontWithVariableValues.getNumberOfPoints() != frontWithObjectiveValues.getNumberOfPoints()) {
      throw new JMetalException("The number of solutions in the variable and objective fronts are not equal") ;
    } else if (frontWithObjectiveValues.getNumberOfPoints() == 0) {
      throw new JMetalException("The front of solutions is empty") ;
    }

    GenericSolutionAttribute<DoubleSolution, String> solutionAttribute = new GenericSolutionAttribute<DoubleSolution, String>()  ;

    int numberOfVariables = frontWithVariableValues.getPointDimensions() ;
    int numberOfObjectives = frontWithObjectiveValues.getPointDimensions() ;
    DummyProblem problem = new DummyProblem(numberOfVariables, numberOfObjectives) ;

    List<DoubleSolution> solutionList = new ArrayList<>() ;
    for (int i = 0 ; i < frontWithVariableValues.getNumberOfPoints(); i++) {
      DoubleSolution solution = new DefaultDoubleSolution(problem);
      for (int vars = 0; vars < numberOfVariables; vars++) {
        solution.setVariableValue(vars, frontWithVariableValues.getPoint(i).getValues()[vars]);
      }
      for (int objs = 0; objs < numberOfObjectives; objs++) {
        solution.setObjective(objs, frontWithObjectiveValues.getPoint(i).getValues()[objs]);
      }

      solutionAttribute.setAttribute(solution, algorithmName);
      solutionList.add(solution) ;
    }

    return solutionList ;
  }
private List < DoubleSolution > createSolutionListFrontFiles ( String algorithmName , Front frontWithVariableValues , Front frontWithObjectiveValues ) { if ( frontWithVariableValues . getNumberOfPoints ( ) != frontWithObjectiveValues . getNumberOfPoints ( ) ) { throw new JMetalException ( "The number of solutions in the variable and objective fronts are not equal" ) ; } else if ( frontWithObjectiveValues . getNumberOfPoints ( ) == 0 ) { throw new JMetalException ( "The front of solutions is empty" ) ; } GenericSolutionAttribute < DoubleSolution , String > solutionAttribute = new GenericSolutionAttribute < DoubleSolution , String > ( ) ; int numberOfVariables = frontWithVariableValues . getPointDimensions ( ) ; int numberOfObjectives = frontWithObjectiveValues . getPointDimensions ( ) ; DummyProblem problem = new DummyProblem ( numberOfVariables , numberOfObjectives ) ; List < DoubleSolution > solutionList = new ArrayList < > ( ) ; for ( int i = 0 ; i < frontWithVariableValues . getNumberOfPoints ( ) ; i ++ ) { DoubleSolution solution = new DefaultDoubleSolution ( problem ) ; for ( int vars = 0 ; vars < numberOfVariables ; vars ++ ) { solution . setVariableValue ( vars , frontWithVariableValues . getPoint ( i ) . getValues ( ) [ vars ] ) ; } for ( int objs = 0 ; objs < numberOfObjectives ; objs ++ ) { solution . setObjective ( objs , frontWithObjectiveValues . getPoint ( i ) . getValues ( ) [ objs ] ) ; } solutionAttribute . setAttribute ( solution , algorithmName ) ; solutionList . add ( solution ) ; } return solutionList ; }
@param algorithmName
@param frontWithVariableValues
@param frontWithObjectiveValues
@return