Questions tagged [indicator-constraints]

For questions on constraints controlled by binary variables.

33 questions
Filter by
Sorted by
Tagged with
4k views

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

Various optimization modeling languages and solvers allow for both indicator constraints (see for example here, here and here) and traditional binary variable and big-M approaches can be used to model ...
568 views

362 views

Mocking up conditional statements in LP

I would like to know how if condition statements in linear programming can be reformulated using indicator constraints, and hence solved as a mixed integer linear program. Specifically: 1. Is it ...
62 views

Logical equivalencies to modeling an indicator decision variable in transportation problem

I am formulating a model that seeks to minimize the cost of shipping goods from factories to warehouses, where the cost of shipping is independent of the type or amount of goods being shipped (except ...
140 views

Portfolio optimization with indicator function constraint in CVXPY

I have the following portfolio optimization problem that I want to solve using CVXPY: \begin{align}\min_w&\quad w^\top\Pi\\\text{s.t.}&\quad\sum_{i=1}^nw_i=1\\&\quad w^\top\Sigma w\le\...
245 views

243 views

Switching of decision variables to be larger than or equal to a decision variable according to an indicator variable value

I would like to seek some advice on modeling the following: I have two integer decisions variables, $x, x'$, that are either equal or greater than zero and either of them is greater than or equal to a ...
85 views

How to model this chain of logical implication II

I would like to seek some advice on modeling the following (chain of) logical implication: For instance $\omega_{xz}$ might indicate precedence, i.e., $x$, $z$ being the nodes $x$ and $z$, ...
70 views

How to model this chain of logical implication

I would like to seek some advice on modeling the following (chain of) logical implication: For instance $\omega_{xy}$ might indicate precedence, i.e., $x$, $y$ being the nodes $x$ and $y$, ...
I am looking for the most elegant solution to the following problem: I have an if-else query that depends on my optimization variable $x_i$. If $a \leq b_i + x_i$, the parameter $c$ should take the ...