I'm trying to optimize my bounds in a "scipy" optimization. Some variables in my "x" vector are extremely restricted, and I cannot optimize my objective function using another values.
For example, x1 just can take the following values: 19, 20, 24, 40. Scipy ask to provide x1 bounds like (19, 40), but the function takes the tolerance steps as they want.
There is a way to optimize with scipy developing a constrained step for some variables??
bounds = ((19, 40),...)
x0 = (300, 19, ...)
resultado = optimize.minimize(fun, x0, bounds = bounds, method = 'TNC',
constraints = cons)