I don't have much experience with defining the limits of my binary variables. In basic terms, I want my binary variable to switch from 1 to 0, when my other value (called base) hits its upper limit at 379900. What I wish is this:
base >= 379900 means that Y=0
base < 379900 means that Y=1
To give some further context, here's a full picture of where I am currently at.
base = salary - 89700;
base <= M * Y;
supp <= 89700 * Y;
supp <= 89700 - suppBase*0.309 + (1-Y)*M;
supp >= 0;
Salary is an input (that I am currently choosing myself), and can technically take any positive value. I have 3 test cases
salary < 89700 meaning supp = 89700,
salary = 220000 meaning supp = 49437,
salary > 399700 meaning supp SHOULD be = 0, but I get infeasible problem.
Here, supp is the value I am calculating. It works for all values less than 379900, since this is the value that makes the second supp condition go into negative territory, making the model infeasible. If Y becomes 0 at 379900, then the 1st and 3rd supp conditions will determine that supp = 0, while the 2nd supp condition becomes irrelevantly large.
I am assuming that my error is in the second base condition, but my lack of experience with how to define binary variables makes me unable to find the solution.
I have tried a couple of different things. Mostly changing how I define my base. Changing M to be exactly 399700 seemed like a solution for a second, but when I tried it, it changed nothing (obviously in hindsight). I also tried to change my base calculation to salary - 399700, but that just made the supp calculation wrong, since base no longer was the actual number it needed to be. I also just raised the limit for when the problem became infeasible.