Optimization, Programming, Python, Evolutionary Algorithms, Editors Pick.
a useful alternative for solving them. Let us modify our objective function in the sense that it interprets continuous real variables x1 and x2 as discrete multiples of 0.0625. def integer_x(x): x[0] = int(x[0] / 0.0625 + 1) * 0.0625 x[1] = int(x[1] / 0.0625 + 1) * 0.0625 return x def