Originally posted by: SystemAdmin
Sorry, this time I messed up the tags. Reposting ...
I guess your code is
cplex.addIndicators(5, 1, 1 2 3 4 5 6', 'E', 100, {'indc3'});
This constraints says "If x(5) is 0 then x(1)+...+x(6) must be 100". I think you misinterpreted the second argument (where you pass '1'): This argument says whether the indicator variable (first argument) should be complemented or not. If the indicator variable is complicated then the constraint is "if indicator variable is 0 then ...", otherwise it is "if indicator variable is 1 then ...".
You can find more details about the arguments in the reference documentation for function addIndicators().
Please also look at the examples etsp.m and foodmanu.m in the CPLEX distribution. They use indicator constraints and have comments that describe what constraints are created.
Again, please wrap code into '{code}' tags, otherwise it is hard to read (for example because the Forum software swallows square brackets).
#CPLEXOptimizers#DecisionOptimization