I am trying to reproduce the Differential Evolution algorithm with python (without using any module or predefined function).
If I am considering an inequality constraint at the fitness function, such as f(x2)-f(x1)<=0.15
, being the fitness a 2-dimensional problem with x1 and x2 as posssible solutions. How can I consider such constraint inside the algorithm without affecting the convergence? Do you have any code examples that could guide me?
Thanks!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…