Questions tagged [integer-programming]

Questions on optimization constrained to integer variables.

An integer programming problem is a mathematical optimization or feasibility program in which some or all of the variables are restricted to be integers.

Integer problems may be defined as the problem of maximizing or minimizing a linear function subject to both linear and integer constraints. The constraints may be equalities or inequalities.

Integer programs are problems that can be expressed in canonical form as

$$\max\quad c^\top x$$ $$\text{s.t.}\quad Ax\le b$$ $$x\ge0$$ $$x\in\Bbb Z^n$$

where $x$ represents the vector of variables (to be determined), $c$ and $b$ are vectors of (known) coefficients, $A$ is a (known) matrix of coefficients, $(⋅)^⊤$ is the matrix transpose, and $\Bbb Z^n$ is the set of whole numbers of dimension $n$.

The expression to be maximized or minimized is called the objective function ($c^⊤x$ in this case).

The inequalities $Ax \le b$ and $x \ge 0$ are the constraints which specify a convex polytope over which the objective function is to be optimized. The inequality $x \ge 0$ is called non-negativity constraints and are often found in linear programming problems. The $x\in\Bbb Z^n$ constraint limits the to be determined vector variables $x$ to be whole integers. The other inequality $Ax \le b$ is called the main constraints.

Integer programming is NP-hard. A special case, $0-1$ integer linear programming, in which unknowns are binary, and only the restrictions must be satisfied, is one of Karp's $21$ NP-complete problems.

Reference:

1094 questions
2
votes
2 answers

Integer programming problem, 5 pens and 10 bags

I am trying to solve an Integer Programming question (trying to come up with a model). The question goes like this: There are 5 pens a person has. He wants to have all 5 of them at the same time. And he has 10 different weighted bags. He wants to…
2
votes
1 answer

Integer programming problem.

I do not know the integer programming problem. I am reading a paper (1 below) which makes the following claim for the problem P1. I have two questions regarding this claim which I will post after posting the problem from the paper. Problem (P1) is…
SJa
  • 849
2
votes
1 answer

How to determine lowest integer multiple for any given decimal fraction

In the equation a * b = c, given a, how can I find the lowest integer c provided that: a is a terminating decimal b is an integer Here is an example: a = 0.2525, b = 400, c = 101 I realize that I can multiply the decimal by 10^(decimal length)…
jsejcksn
  • 123
1
vote
1 answer

If-Then Constraint: If X < 4 Then T = 4 -X

All the generic If-then constraints do not seem to be gaining me any insight into this. I would like to form a mixed-integer program with Lingo which can minimize cost given that a series of: When $X < 4$ Then $T \ge 1$ & $Y = 1$ Otherwise, when $x…
1
vote
0 answers

fill up a square with rectanagles

I have a square 46*46, I want to fill this up with three types of rectangles of size 29*20, 21*5, 10*4 such that the free space can be minimized? any rectangles can't be overlapped and they can be rotated. Integer linear programming can be a way…
1
vote
0 answers

How to find best set of customers

I've got a problem with getting optimized solution from this task: We have n customers, which buy articles from m suppliers. There are much more customers and suppliers on the market. We've got sales data from the m suppliers concernig total market.…
Gabriel
  • 11
1
vote
1 answer

Ordered pair of positive integers

One holiday, I gave each of my 3 grandsons x coins and each of my 4 granddaughters y coins. The total number of coins that I gave to my grandchildren will allow for only one ordered pair of positive intergers (x,y). At most how many coins did I give…
1
vote
2 answers

how to tackle an integer variable with multipe domains in an integer program

I'm trying to model an integer program whose integer variables may have multipe domains? For example, an integer variable x with range [10,30], [62,70]. How to build this constraint? Any ideas are welcomed and appreciated.
Quanwang
  • 101
1
vote
1 answer

Representation of conditions in integer linear programming

How to represent in PLI the fact that inequality (1) or inequality (2) must be satisfied but not both? $j$ is executed before $k \rightarrow t_{ij} + p_{ij} \leq t_{ik}$ (1) $j$ is executed after $k \rightarrow t_{ij} \geq t_{ik} + p_{ik}$ (2)
1
vote
0 answers

How do I solve this integer linear program?

I am trying to wrap my head around this problem: $$maximize \quad w^t X \quad \text{with}\, w=[a, b, c, d]$$ $$\text{subject to}\quad x_1 a + y_1 b + z_1 c + k_1 d \leq v_1$$ $$\dots$$ $$x_n a + y_n b + z_n c + k_n d \leq v_n$$ $$\text{with} \sum…
D4nt3
  • 11
1
vote
1 answer

Cutting bars problem with integer programming.

How to model the Linear Programming for the problem below with the most complete + reasonable constraints. A production facility has 2 types of reinforcement bars 6m, 8m long (unlimited quantity). Need to process 100 2.4m and 150 2.8m sections. Ask…
ghibli
  • 13
1
vote
1 answer

Multiple Origin/Destination connection problem Formulation

The multiple origin/destination connection Problem is as follows Let $G=(V,E)$ be an undirected graph, and let $c_e$ be a given cost for each $e\in E$. Let $(s_k, t_k)$ for $k=1,...,p\ $ be a given list of origin/destination pairs with $s_k, t_k\in…
Kufscrow
  • 325
1
vote
0 answers

Translating from Problem to Equation in an Integer Programming Problem

A problem was proposed to me by my superiors, which they asked me to solve by writing a program, and goes like this: There are beds for 18 patients of diagnosis $P_{D}$ on a unit (let's call it $U_D$). 12 patients can have remote monitoring (let's…
oort
  • 133
1
vote
1 answer

Finding a solution for quadratic inequality

Given $r$ and $t$, Is there a way to find the maximum positive integer $N$ such that: $$2 N^2 + (2r+3)N + (2r+1) \leq t$$ I want to write a program to solve that inequality without brute-force. At least the program should be as fast as possible.
1
vote
2 answers

numerical instability of integer programming

Let us assume the objective function $f$ of some IP looks as follows $$ f = \sum x_i + \varepsilon \sum y_i.$$ With $\varepsilon$ being very small ($\approx 0.00001$) and $x_i$ and $y_i$ some variables. There may also be some constraints, but let us…
Till
  • 504