I have an array which holds a linear expression in terms of decision variable. Let's say decision variables take values such that the array = [1.7 , 0.3, 0]. Now what I want is the following :
1) If any of the values from the above array is > 0.5, then decision variables : y1 (binary) = 1, else 0. so y1 should turn out to be [1, 0, 0]
2) If any of the values from the above array is > 0.5, then decision variables : y2 (real-valued) = the value, else 0. Hence y2 = [1.7, 0, 0]
3) If any value in the array is > 0 and <= 0.5, then decision variables : y3 (binary) = 1, else 0. Hence y3 = [0, 1, 0]
I know that big M formulation can help, but I am struggling to find a way. Can somebody please help me with the formulation of above 3 points. I am working on pyomo and gurobi for programming the problem.