private int addToPopulation(Solution solution){
  int id=nextFreeId();
  solutions.put(id,solution);
  return id;
}

private int addToPopulation ( Solution solution ) { int id = nextFreeId ( ) ; solutions . put ( id , solution ) ; return id ; }
adds the specified solution to the population , returning its assigned identifier .
