In some cases I have seen, the indicator constraint can be written as indcons(expression, binary_var). Then it is interpreted as follows:

$$LHS - slack (\leq = \geq) RHS$$ $$ if: \quad (binary = 1) \implies (slack = 0)$$

As far as I know, CPLEX and maybe Gurobi have used binary variables and whose linking to linearize the constraint. I am actually not aware of their internal mechanism. Now, I would like to know the rule of the slack variable in this form and if is it necessary to use that instead of using e.g. $BigM$ approach.

  • $\begingroup$ Dear @RobPratt, do you have any idea about this? $\endgroup$
    – A.Omidi
    Commented Sep 8, 2023 at 20:02
  • 1
    $\begingroup$ I can only tell you that SAS supports the y=1 implies sum {j in JSET} a[j]*x[j] <= b form, where the y=1 could instead be y=0 and the constraint could instead be >= or = or a range or linearizable. Under the hood, a big-M formulation is used. $\endgroup$
    – RobPratt
    Commented Sep 8, 2023 at 20:10
  • $\begingroup$ Dear @RobPratt, Thanks for mentioning that. $\endgroup$
    – A.Omidi
    Commented Sep 8, 2023 at 20:12


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.