Originally posted by: NaomiLearnCplex
I am sorry I might ask too many "simple" questions. I am new to CPLEX and working on an optimization problem and hope to solve it asap.
I found indicator variables can handle constraints that include variables. However, by definition indicator variables should be binary. How does it work when the indicator constraints are not binary? How to set up conditional constraints for non-binary variables?
In my problem I want to set up
C[i]=1 when i=1,2 or 3;
C[i]=C[i-1], when x[i-1]+x[i-2]+x[i-3]<5 && x[i-1]+x[i-2] !=0; for all i = 4..10
C[i]=-100000, when x[i-1]+x[i-2]+x[i-3]>=5; for all i = 4..10
C[i]=1, when x[i-1]+x[i-2]=0; for all i = 4..10
Regards.
#DecisionOptimization#OPLusingCPLEXOptimizer