Dear community,
I have a question about min and max values for variables. I have a nonlinear problem. What I want to model is that if the variable a(t) has a value larger than 2,000,000, it should be set to 2,000,000. But it is no problem that a(t) is above 2,000,000, it should not be “punished”. I have the same for the minimum value -400,000. When I just set the min and max values in the range of the variable when I define it, it seems that the optimal solution found is one where the variable a(t) does not exceed 2,000,000 or gets below -400,000.
Am I right in my understanding of the range of variables? And how do I then correctly impose these constraints?
Thank you in advance :)