Skip to content

Commit

Permalink
Update es.py (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianramirezatencia authored Jul 28, 2024
1 parent a51cb9c commit e7e6345
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymoo/algorithms/soo/nonconvex/es.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self,
if pop_size is None and n_offsprings is not None:
pop_size = int(np.math.ceil(n_offsprings * rule))
elif n_offsprings is None and pop_size is not None:
n_offsprings = int(np.math.floor(n_offsprings / rule))
n_offsprings = int(np.math.floor(pop_size / rule))

assert pop_size is not None and n_offsprings is not None, "You have to at least provivde pop_size of n_offsprings."
assert n_offsprings >= 2 * pop_size, "The number of offsprings should be at least double the population size."
Expand Down

0 comments on commit e7e6345

Please sign in to comment.