private void printSolution(Solution solution){
  if (includeVariables) {
    for (int i=0; i < solution.getNumberOfVariables(); i++) {
      if (i > 0) {
        writer.print(' ');
      }
      writer.print(encode(solution.getVariable(i)));
    }
  }
  for (int i=0; i < solution.getNumberOfObjectives(); i++) {
    if ((i > 0) || (includeVariables && (solution.getNumberOfVariables() > 0))) {
      writer.print(' ');
    }
    writer.print(solution.getObjective(i));
  }
  writer.println();
}

private void printSolution ( Solution solution ) { if ( includeVariables ) { for ( int i = 0 ; i < solution . getNumberOfVariables ( ) ; i ++ ) { if ( i > 0 ) { writer . print ( ' ' ) ; } writer . print ( encode ( solution . getVariable ( i ) ) ) ; } } for ( int i = 0 ; i < solution . getNumberOfObjectives ( ) ; i ++ ) { if ( ( i > 0 ) || ( includeVariables && ( solution . getNumberOfVariables ( ) > 0 ) ) ) { writer . print ( ' ' ) ; } writer . print ( solution . getObjective ( i ) ) ; } writer . println ( ) ; }
prints the solution to the result file .
