Questions tagged [integer-programming]

244 questions
9
votes
3 answers

Boolean variable true iff equation is satisfied in ILP

Assuming $y$ is a boolean variable in an ILP program (that is $y \in Z$, s.t. $0 <= y <= 1$) and $x_1$, $x_2$ are bounded integer variables between $0$ and $M$. I want to encode the following high level constraint: $$y = 1 \iff x_1 \le x_2$$ So far…
Setzer22
  • 327
  • 1
  • 6
3
votes
1 answer

Estimate complexity of integer sequence enumeration

I would like to seek help on the complexity of the following problem. Given positive integers $m$, $n$, $D_1$ and $D_2$, find all sequences $a_1\lt a_2 \lt \dots \lt a_n$ are there such that: each $a_i\in\{1, \dots, m\}$ $\sum_{i=1}^n a_i =…
Steve Yau
  • 43
  • 4
3
votes
1 answer

From CNF to ILP?

Can we transform a CNF to ILP without introducing new variables? My question can be seen as a follow up to Express boolean logic operations in zero-one integer linear programming (ILP) as the solution proposed in that post introduces additional…
Moati
  • 33
  • 3
1
vote
0 answers

Decide whether a set of inequalities is solvable

Let $\{x_1, ..., x_n\}$ be a set of $n$ distinct variables, and suppose given a finite set of $m$ inequalities such that, for all $1 \leq i \leq n$, the $i$-th inequality is of the form: $$y_i + a_i \leq z_i + b_i$$ where $y_i,z_i \in…
pbaren
1
vote
1 answer

How to model this constraint using integer linear programming?

Suppose we have $S=\{1,2,\ldots,n\}$, a binary variable $x$ and an integer $p$. I would like to model the following constraint using integer linear programming: If $x = 1$, then there must exists a unique $i\in S$ such that: $x_j=1$ for all…
Zir
  • 259
  • 1
  • 9
1
vote
1 answer

Using integer programming to find a solution without optimizing it

Oftentimes I find myself wanting to use integer programming to find a solution to a particular problem, without caring about optimizing a certain variable at all. I've found that most packages that offer integer programming do not provide this…
orlp
  • 13,386
  • 1
  • 24
  • 40
1
vote
1 answer

Converting 4 variable if else condition to Linear integer program

There are four variables: $x_1, x_2, x_3, x_4$. If you choose either $x_3$ or $x_4$ or both — then you should choose exactly one of $x_1$ or $x_2$. If you choose neither $x_3$ or $x_4$ — then there is no restriction in choosing $x_1$ or $x_2$. I…
1
vote
1 answer

If Then Constraint Linear Programming

I want to write the following constraint: If A=1 and B <= m then C=1 ( where A and C are binary, m is a constant and B is continuous).
bcv
  • 11
  • 1
0
votes
1 answer

XOR Statement in integer programming

How can I convert a XOR statement into linear constraints for integer programming ? The expression is $(x_1 \geq 1)$ XOR $(x_2 \geq 1)$ where $x_1$ and $x_2$ are integer. It means that if $x_1 \geq 1$ then $x_2 = 0$ and vice versa. I started to…
0
votes
1 answer

Convert an IF statement in Mixed Integer Programming

I want to convert an IF statement for my optimization problem. I want to minimize the total price. I want 800 tones of salt and 3 suppliers offer me their prices. Supplier $1$ offers me $100$ tones at $\\\$150$ a tone. Supplier $2$ offers me $400$…
0
votes
0 answers

How develop a branch and bound algorithm for ILP with black box objective function?

The problem here described was taken from a university exercitation session. A serial production line is made of $K$ workstations: one kind product is manufactured by this line and has to be processed by each of this workstation. In each workstation…
-2
votes
1 answer

How to express the predice c > 0 in linear programming constraints?

I want a constraint that: if c=0 become x=0 if c > 0 become x=1 for example: C < = M.X or C> = M.X or X=exp(-M*C) that X is binary variable and M is huge value. This constraint is very important for me. Please help me.
AminRasi
  • 9
  • 2