Skip to content

"break" in selection section #3

@CHI-MING-LEE

Description

@CHI-MING-LEE

Hi,

Thank you for your excellent work!
However, it seemed that there was a mistake in the selection section.

 if selection_rand[i]<=qk[0]:
            population_list[i][:]=total_chromosome[0][:]
            break  # <- the break was weird
        else:
            for j in range(0,population_size*2-1):
                if selection_rand[i]>qk[j] and selection_rand[i]<=qk[j+1]:
                    population_list[i][:]=total_chromosome[j+1][:]
                    break  # -> should be moved here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions