# Tag Info

### When to use indicator constraints versus big-M approaches in solving (mixed-)integer programs

Here is the advice in the IBM CPLEX documentation. So this pertains to CPLEX. I don't know to what extent it applies to other solvers. First of all, indicator constraints may not be available in all ...
• 13.5k
Accepted

### When to use indicator constraints versus big-M approaches in solving (mixed-)integer programs

For Gurobi there seems to be a dual advantage of using general constraints (http://www.gurobi.com/documentation/8.1/refman/constraints.html#subsubsection:GeneralConstraints): Benefit number one - ...
• 1,333

### When to use indicator constraints versus big-M approaches in solving (mixed-)integer programs

To the best of my knowledge the indicator constraints are just syntactic sugar for the user. Internally these indicator constraints are reformulated using computed big-M formulations or SOS ...
• 2,767
Accepted

• 13.6k

### When to use indicator constraints versus big-M approaches in solving (mixed-)integer programs

Question by me at the IBM CPLEX Forum: Are indicator constraints immune to trickle flow or other numerics-induced logic "errors"? Are indicator constraints immune to trickle flow or other ...
• 13.5k
Accepted

• 33.1k
Accepted

### If-then condition formulation to avoid variable multiplication

Something like: \begin{align} & c_i \le x_i + M(1-y_i)\\ & c_i \le My_i \end{align} $M$ can be interpreted as an upperbound on $c_i$. If you don't like the big-$M$'s, consider using ...
• 2,830
Accepted

### How to enforce logical implication $\sum_j a_j x_j \le b \implies \sum_j c_j x_j \le d$

You can accomplish this by introducing a binary decision variable and splitting into two implications: \begin{align} \sum_j a_j x_j \le b &\implies y = 1 \tag1\label1 \\ y = 1 &\implies \sum_j ...
• 33.1k

• 33.1k
Accepted

### How to model this chain of logical implication II

You can use conjunctive normal form to derive the desired constraints. The first one is: a \ge b \implies a\ge c\\ (b \implies a) \implies (c \implies a)\\ \lnot(\lnot b \lor a) \lor (\lnot c \lor ...
• 33.1k
Accepted

### Logical equivalencies to modeling an indicator decision variable in transportation problem

Consider the following tiny example. You have two factories, one warehouse and two product. Factory 1 can produce both goods in sufficient quantity to meet demand but has a very large cost coefficient....
• 39.9k
Accepted

Equivalently, you want to enforce the contrapositive $y = 1 \implies x > 0$. The standard approach is to introduce a small constant tolerance $\epsilon > 0$ and enforce $y = 1 \implies x \ge \... • 33.1k 5 votes Accepted ### Piecewise function with two variables You have a disjunction of four polyhedra$A_i x \le b_i$. Introduce four binary variables$r_i(one per region) and impose linear constraints: \begin{align} \sum_{i=1}^4 r_i &= 1 \\ A_i x - b_i &... • 33.1k 5 votes Accepted ### Is this constraint with an indicator function nonlinear? Since the constraint includes binaries, it does not define a convex set, and is therefore not linear. For example, ifx=c_11_{A}$,$x$can take values either$0$or$c_1$. But$\frac{0+c_1}{2} \notin ...
• 13.6k
You want to enforce $x+y=1 \implies z \le 20$. Introduce a new binary variable $w$ and enforce \begin{align} x+y = 1 &\implies w = 1 \tag1\label1\\ w = 1 &\implies z \le 20 \tag2\label2\\ \...