docs: public void nondominated_sorting_delete(S indiv) {
  
      // find the non-domination level of 'indiv'
      //int indivRank = indiv.getRank();
      int indivRank = (int) indiv.getAttribute(ranking.getAttributeIdentifier());
  
      ArrayList<Integer> curLevel = new ArrayList<>();  // used to keep the solutions in the current non-domination level
      ArrayList<Integer> dominateList = new ArrayList<>();  // used to keep the solutions need to be moved
  
      for (int i = 0; i < populationSize; i++) {
        if (rankIdx[indivRank][i] == 1) {
          curLevel.add(i);
        }
      }
  
      int flag;
      // find the solutions belonging to the 'indivRank+1'th level and are dominated by 'indiv'
      int investigateRank = indivRank + 1;
      if (investigateRank < numRanks) {
        for (int i = 0; i < populationSize; i++) {
          if (rankIdx[investigateRank][i] == 1) {
            flag = 0;
            if (checkDominance(indiv, population.get(i)) == 1) {
              for (int j = 0; j < curLevel.size(); j++) {
                if (checkDominance(population.get(i), population.get(curLevel.get(j))) == -1) {
                  flag = 1;
                  break;
                }
              }
              if (flag == 0) {  // the ith solution can move to the prior level
                dominateList.add(i);
                rankIdx[investigateRank][i] = 0;
                rankIdx[investigateRank - 1][i] = 1;
                //((DoubleSolution) population.get(i)).setRank(investigateRank - 1);
                population.get(i).setAttribute(ranking.getAttributeIdentifier(), investigateRank - 1);
              }
            }
          }
        }
      }
  
      int curIdx;
      int curListSize = dominateList.size();
      while (curListSize != 0) {
        curLevel.clear();
        for (int i = 0; i < populationSize; i++) {
          if (rankIdx[investigateRank][i] == 1) {
            curLevel.add(i);
          }
        }
        investigateRank = investigateRank + 1;
  
        if (investigateRank < numRanks) {
          for (int i = 0; i < curListSize; i++) {
            curIdx = dominateList.get(i);
            for (int j = 0; j < populationSize; j++) {
              if (j == populationSize) {
                System.err.println("There are problems");
              }
              if (rankIdx[investigateRank][j] == 1) {
                flag = 0;
                if (checkDominance(population.get(curIdx), population.get(j)) == 1) {
                  for (int k = 0; k < curLevel.size(); k++) {
                    if (checkDominance(population.get(j), population.get(curLevel.get(k))) == -1) {
                      flag = 1;
                      break;
                    }
                  }
                  if (flag == 0) {
                    dominateList.add(j);
                    rankIdx[investigateRank][j] = 0;
                    rankIdx[investigateRank - 1][j] = 1;
                    //((DoubleSolution) population.get(j)).setRank(investigateRank - 1);
                    population.get(j).setAttribute(ranking.getAttributeIdentifier(), investigateRank - 1);
                  }
                }
              }
            }
          }
        }
        for (int i = 0; i < curListSize; i++) {
          dominateList.remove(0);
        }
  
        curListSize = dominateList.size();
      }
  
    }