I don't know if this question is in the right place or not, if not, please tell me. So, I'm using python and I have to optimize a cost function which has two constraints. This cost function is non-increasing w.r.t. production quantity, so it is optimal to order as less as possible. However, my constraints put lower and upper bounds on the production quantity. It can be argued that hence in this case the lower bound will be binding.
But now, I also computed the lower and upperbounds by hand, and in some cases the lower bound is greater than the upper bound in value...
I use scipy.optimize.minimize and method SLSQP and I have understood that the inequality constraints are such that they are non negative. So I entered production quantity - lower bound as a constraint, and upper bound - production quantity (these should be non-negative).
When executing, I get as answers the lowest possible value, as argued before. However, sometimes this lowest possible value is given by the upper bound?? And therefore, the two constraints both also do not hold, since lower > upper. However I get no error, all the time it is able to find the solutions? How is this possible? And how can the lower bound be greater than the upper bound