code: @Override
     public boolean add(Solution solution_to_add)
     {
        List<Solution> solutions_to_remove = new ArrayList<>();
  
        boolean should_add = true;
        for (Solution solution : solutions)
        {
           int flag = invertedCompare(solution_to_add, solution);
  
           if (flag < 0) // solution_to_add is better
           {
              solutions_to_remove.add(solution);
           }
           else if (flag > 0) // solution is better than solution_to_add
           {
              should_add = false;
              break;
           }
           else if (getDistance(solution_to_add, solution) < Epsilon)
           {
              should_add = false;
              break;
           }
        }
  
        solutions.removeAll(solutions_to_remove);
  
        if (should_add)
        {
           return solutions.add(solution_to_add);
        }
  
  
  
        return should_add;
     }
docs: only add solution if solution is not worse than any solution in the non-dominated population