New answers tagged integer-programming
5
votes
Is there a better way of defining a constraint on positive integer variables such that no two variables are the same and are uniquely assigned a value
This is called an alldifferent constraint and is supported directly by constraint programming solvers. @Kuifje gave a traditional linear formulation (+1) that uses binary variables, but it is worth ...
10
votes
Accepted
Is there a better way of defining a constraint on positive integer variables such that no two variables are the same and are uniquely assigned a value
Introduce binary variables $y_{ij}\in \{0,1\}$ that take value $1$ if and only if $x_i$ is assigned to value $j\in \{1,...,N\}$, and use the following constraints:
\begin{align}
x_i &= \sum_{j=1}^...
3
votes
Accepted
How to pose the constraint for binary variable to indicate if quantity is zero or greater than zero
$$b_i \le p^i-p^{i+1} \le (N-1)b_i$$
4
votes
Accepted
Modeling a special case of conservation of flow
Introduce binary variables $x_a,\dots,x_e,$ with each variable taking value 1 if the corresponding arc is used. To limit yourself to a single input, add the constraint $$x_a + x_b = 1$$ (or $x_a + x_b ...
3
votes
Integer programming books
There are at least three somewhat distinct aspects to integer programming: theory (e.g., why LP solutions occur at vertices of polytopes); algorithms (branch-and-bound, decomposition, cutting plane ...
3
votes
What is the meaning of this math formulation?
The set of equations are used to represent the conservation of flow at every node $j$ in a network. Here, $\Delta^{-}(j)$ represents the set of nodes coming into node $j$ and $\Delta^{+}(j)$ ...
Top 50 recent answers are included
Related Tags
integer-programming × 250mixed-integer-programming × 84
linear-programming × 69
modeling × 58
optimization × 55
binary-variable × 31
combinatorial-optimization × 25
constraint × 21
logical-constraints × 20
gurobi × 17
python × 15
constraint-programming × 15
graphs × 14
solver × 13
linearization × 12
scheduling × 12
cplex × 11
reference-request × 11
computational-complexity × 10
indicator-constraints × 9
nonlinear-programming × 7
quadratic-programming × 7
big-m × 6
docplex × 5
vehicle-routing × 4