code: public static int CrowdingDistanceCompare(Solution solution1, Solution solution2)
     {
        double crowding1 = solution1.getCrowdingDistance();
        double crowding2 = solution2.getCrowdingDistance();
  
        if (crowding1 > crowding2)
        {
           return -1;
        }
        else if (crowding1 < crowding2)
        {
           return 1;
        }
        else
        {
           return 0;
        }
     }
docs: return 1 if solution 2 is better