how to force succesive variable to be of same value?
问题 I have a binary variable y[k][t] , where k = 1..3 (machines) and t = 1..10 (time). Variable Y is 1 if machine is active and 0 otherwise. In the optimization if machine 1 is active in period 1 e.g. Y[1][1] = 1 , i want the machine to continue to operate for at least 3 time periods. i.e. Y[1][1] = Y[1][2] = Y[1][3] = Y[1][4] = 1 . I only want the succesive variable for t+1,t+2,t+3 to be same as t if it is active. how can i do that in cplex studio? 回答1: what Erwin wrote about minimum run length