From e7e6345c473d00605955f296f86715cf45ed4184 Mon Sep 17 00:00:00 2001 From: Cristian Ramirez Atencia Date: Mon, 29 Jul 2024 01:31:33 +0200 Subject: [PATCH] Update es.py (#627) --- pymoo/algorithms/soo/nonconvex/es.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymoo/algorithms/soo/nonconvex/es.py b/pymoo/algorithms/soo/nonconvex/es.py index ca4c44545..6a0afee25 100644 --- a/pymoo/algorithms/soo/nonconvex/es.py +++ b/pymoo/algorithms/soo/nonconvex/es.py @@ -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."