Skip to content

ES fails in the _infill() method, when duplicates are removed from the population #714

Open
@ernstklrb

Description

@ernstklrb

n_offsprings=n_offsprings,

at the above line, the argument
eliminate_duplicates=False,

should be added.

Because, when duplicates are removed in the course of the algorithm running, the actual population size will become less than the value in self.pop_size. This, in turn, will lead to the index I in _infill() going beyond the size of the array X, which results in an error.

(This happened to me when I initialized the population with all zero values to see how well the ES would recover from all solutions being infeasible in my problem - that went well (with the above fix)!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions