I am struggling a lot with the following constraint and can only think of quadratic expressions.
Let: Ax == 2b+1. b is a boolean vector, x is a vector of signs (either 1 or -1).
Now I want to express a new constraint: |Ay| == 2b+1 so if 2b+1==3 then I can have either 3 or -3 and 1 or -1 respectively for the case of 2b+1==1. (y again is a vector of signs).
The difficulty arises because the value also changes on the right hand side. i.e |A*y| == 3 wouldn’t pose any problem. Could I maybe use find to break it into 2 cases like the aforementioned?
This can be easily done with a sign variable but then the constraint will lose its linearity.
Any tip/solution to this?