Non-dominated sets: [[0], [1, 3, 5], [2], [4]]
Domination Count: [0, -1, -1, -1, -1, -1]
Index 5 or 1 or 3 exceeds the number of individuals 3
Index 3 or 5 or 1 exceeds the number of individuals 3
Index 3 or 5 or 1 exceeds the number of individuals 3
Index 3 or 5 or 1 exceeds the number of individuals 3
Index 3 or 5 or 1 exceeds the number of individuals 3
Index 3 or 5 or 1 exceeds the number of individuals 3
Index 3 or 5 or 1 exceeds the number of individuals 3
Index 3 or 5 or 1 exceeds the number of individuals 3

after the above message the below code stops running
i am having totally 8 objectives(performance metrics), for that 8 objective performance metrics we are calculating 8 individual fitness values corresponding to each. among that 'area' and 'power dissipation' are required to be minumum as possible other 6 objectives are need to be maximum. please check the following code is properly and debug the error, the updated code must keep maintain my multi objective optimization criteria.

# Perform Pareto fronts with crowding distances and hypervolume
def pareto_sort(population, fitness_values, objectives):
    non_dominated_sets = []
    domination_count = [0] * len(population)

    for i in range(len(population)):
        added_to_existing_set = False
        for front in non_dominated_sets:
            if any(dominates(fitness_values[i], fitness_values[j], objectives) for j in front):
                front.append(i)
                added_to_existing_set = True
                break

        if not added_to_existing_set:
            non_dominated_sets.append([i])

    current_level = 0
    while non_dominated_sets:
        next_level = []
        for chromosome in non_dominated_sets[current_level]:
            for j in range(len(population)):
                if chromosome != j and dominates(fitness_values[chromosome], fitness_values[j], objectives):
                    domination_count[j] -= 1
                    if domination_count[j] == 0:
                        next_level.append(j)

        if next_level:
            non_dominated_sets.append(next_level)
            current_level += 1
        else:
            break

    print(f"Non-dominated sets: {non_dominated_sets}")
    print(f"Domination Count: {domination_count}")

    pareto_data = {}    
    for front in non_dominated_sets:
        # For each front, keep the multi-dimensional fitness values and compute crowding distance
        crowding_distance = calculate_crowding_distance(front, fitness_values, population, objectives)
        
        for chromosome_index in front:
            pareto_data[chromosome_index] = {
                "front": front,
                "front_fitness": [fitness_values[chromosome_index][objective] for objective in objectives],  # Keeping fitness as multi-dimensional
                "crowding_distance": crowding_distance[chromosome_index],  # Individual crowding distances
                "chromosome": population[chromosome_index]
            }
            
    print(f"Pareto Data: {pareto_data}")

    # Update minimum values based on the front points in pareto_data
    maximum_values, minimum_values = update_minimum_values(pareto_data, objectives)

    # Set the reference point based on the minimum and maximum criteria for hypervolume calculation
    reference_point = [maximum_values[objective] if objective in ['Area', 'PowerDissipation'] else minimum_values[objective] for objective in objectives]
    
    # Calculate Hypervolume
    hypervolume_values = calculate_hypervolume(pareto_data, reference_point, fitness_values)
    print(f"hypervolume_values: {hypervolume_values}")

    return pareto_data, hypervolume_values

# Determine dominance relationship
def dominates(fitness_values_a, fitness_values_b, objectives):
    # Check if fitness_values_a dominates fitness_values_b
    dominates_a = False
    dominates_b = False   

    for objective in objectives:
        value_a = fitness_values_a[objective]
        value_b = fitness_values_b[objective]
        
        if objective in ['Area', 'PowerDissipation']:
            # For objectives to be minimized, lower values are better
            if value_a < value_b:
                dominates_a = True
            elif value_a > value_b:
                dominates_b = True
        else:
            # For objectives to be maximized, higher values are better
            if value_a > value_b:
                dominates_a = True
            elif value_a < value_b:
                dominates_b = True   
  
    return dominates_a and not dominates_b