Non-dominated sets: [[0, 1, 2, 3, 4, 5]]
Domination Count: [-1, -1, -1, -1, -1, -1]
i am getting -1 for domination count, is it proper way of getting result like this

# Perform Pareto fronts with crowding distances and hypervolume
def pareto_sort(population, fitness_values, objectives):
    non_dominated_sets = []
    domination_counts = [0 for _ in range(len(population))]
    dominated_by = [[] for _ in range(len(population))]
    
    # Compare each pair of individuals
    for i in range(len(population)):
        for j in range(len(population)):
            if i != j:
                if dominates(fitness_values[i], fitness_values[j], objectives):
                    dominated_by[j].append(i)
                elif dominates(fitness_values[j], fitness_values[i], objectives):
                    domination_counts[i] += 1
    
    # Identify the non-dominated front
    current_set = []
    for i in range(len(domination_counts)):
        if domination_counts[i] == 0:
            current_set.append(i)
            domination_counts[i] = -1  # Mark this individual as processed
    if current_set:
        non_dominated_sets.append(current_set)
    
    # Iteratively find subsequent fronts
    front_index = 0
    while front_index < len(non_dominated_sets):
        next_front = []
        for i in non_dominated_sets[front_index]:
            for j in dominated_by[i]:
                domination_counts[j] -= 1
                if domination_counts[j] == 0:
                    next_front.append(j)
                    domination_counts[j] = -1  # Mark this individual as processed
        if next_front:
            non_dominated_sets.append(next_front)
        front_index += 1
    
    print(f"Non-dominated sets: {non_dominated_sets}")
    print(f"Domination Count: {domination_counts}")
    pareto_data = []
    # Calculate crowding distance and prepare pareto data for each front
    for front_index, front in enumerate(non_dominated_sets):
        if len(front) > 0:
            crowding_distances = calculate_crowding_distance(front, fitness_values, objectives)
            for i, chromosome_index in enumerate(front):
                pareto_data.append({
                    "front": front_index + 1,
                    "chromosome": population[chromosome_index],
                    "fitness": [fitness_values[chromosome_index][obj] for obj in objectives],
                    "crowding_distance": crowding_distances[i]
                })
    print("Pareto Data:", pareto_data)
    # Calculate hypervolume and min/max reference points
    maximum_values, minimum_values = update_minimum_values(pareto_data, objectives)
    print("maximum_values, minimum_values", maximum_values, minimum_values)
    reference_point = [maximum_values[obj] + 0.1 if obj in ['Area', 'PowerDissipation'] else minimum_values[obj] - 0.1 for obj in objectives]
    hypervolume_values = calculate_hypervolume(pareto_data, reference_point, objectives)
    print(f"Hypervolume Values: {hypervolume_values}")
    return pareto_data, hypervolume_values

# Determine dominance relationship
def dominates(individual_a, individual_b, objectives):
    better_in_any = False
    for obj in objectives:
        if obj in ['Area', 'PowerDissipation']:  # Minimization
            if individual_a[obj] < individual_b[obj]:
                better_in_any = True
            elif individual_a[obj] > individual_b[obj]:
                return False
        else:  # Maximization
            if individual_a[obj] > individual_b[obj]:
                better_in_any = True
            elif individual_a[obj] < individual_b[obj]:
                return False
    return better_in_any