Integer programming Flashcards
Difference between the fasible region of LP and IP problems?
LP has convex feasible region.
IP has non-convex feasible region
Can we round off the LP relaxation to get solution, or soemthing good enough?
No, genenrelly not. Many cases have the LP relaxation extremely far away from the IP optimal solution.
can we have non linear integer programming?
Yes, but this typically create extremely difficult problems to solve.
it is therefore common to approximate non linear functions using linear functions and apply integer variables as support
Why do we need integers?
two reasons primiarily:
1) many sizes are naturally integers. For instance, quantities etc
2) Binary variables used for logical purposes to extend modelling abilities
General rule for when we must use integers rather than continuous value and rounding off?
if the variable value is less than 10, we typically have to use integers
elaborate on the usual suspects of what we can use integer variables for in terms of modelling
Yes no decisions
Modelling fixed costs
Description of non-convex areas
Approximation of non-linear functions (piece wiese)
Definition of logical restrictions
When only a discrete set of values are allowed (say 0,4,7,22).
CASE
We consider a production machine that has a variable cost associated with each unit of production. However, starting up the machinery also cost cash. How can we model this?
This is a classic case of fixed cost problem.
We call the fixed cost “f”.
Logically, the fixed cost should be 0 if the nubmer of units is 0. If the number of units is greater than 0, the fixed cost should be applied in its entirety.
z = f + ca xa, if xa > 0
z = 0, if xa = 0
To express this, we introdice a binary variable, y. The interpretation of this variable is a yes/no decision “Start up the machinery”.
xa <= yM
the constant M must be chosen large enough.
CASE
Suppose we have a problem where the feasible points are defined as lying in either area 1 or area 2 (or in both). The areas are defined as constraints. For instance, area 1:
x2 <= 3
x1 + x2 <= 4
x1, x2 >= 0
area 2:
-x1 + x2 <= 0
3x1 - x2 <= 8
x1, x2 >= 0
Express the feasible area mathematically
First off, we can add all constraints to create a new feasible region, because this would be an AND case. We have OR.
So, we introduce 2 new binary variables.
y1: 1 if the point is in area 1, 0 otherwise
y2: 1 if the point is in area 2, 0 otherwise
So, the general idea is that either the constraints of the first area must apply, or the constraints of the second area must apply. Both can apply, but this is not a requirement that we need to enforce. it is enough with only enforcing either.
x2 <= 3 + M(1-y1)
x1 + x2 <= 4 + M(1-y1)
-x1 + x2 <= M(1-y2)
3x1 - x2 <= 8 + M(1-y2)
Finally, enforce that one of them are always active:
y1 + y2 >= 1
Now, it is up to the objective function to decide which region to pick. It will naturally pick the area that gives the better value. Our only requirement is that the point that the model ultimately finds as optimal, must lie in one of the areas.
What is the general model of a knapsack problem
for the binary variant:
max z = ∑cj xj
s.t.
∑aj xj <= b
xj in {0,1} for j=1,…,n
Then we can extend with multiple resource constraints:
max z = ∑cj xj
s.t.
∑aij xj <= bi, where this is a sum over j, giving us a constraint per “i”.
xj in {0,1}
Give an example of a binary knapsack problem
the housing budget problem
Say we want to buy houses, and we have a budget. We’d like to maximize the value of the purchase.
Another example is investing in projects. Say we can only be in or out. the objective function give payoff from each project. THe technology coefficients tell us how expensive it is, probably in terms of cash, time, mental energy etc. Then the objective is to maximize payoff, given that we can only select a subset.
Elaborate on the facility location problem
Choosing a set of facilities, and from these facilities, support a set of customers.
Suppose we have m potenatial facilities and n customers. Each facility i has a given capacity (supply) si and each customers j has a given demand dj.
Typically include the fixed cost of using a facility, and a unit cost for each unit that is transported between facility i and custyomer j.
This is a mixed integer programming problem, because it use the fixed cost with binary, and it has a flow of units that is measured as a continuous variable.
Typically, the idea is to minimize costs.
min z = ∑∑cij xij + ∑fi yi
s.t.
∑xij <= si yi
∑xij >= dj
Basically, choose a set of facilities in a way that meet the overall demand.
IMPORTANT: The customers are the same regardless of facilities. Therefore, the problem is how to most efficiently select faciities to balance the cost of each facility (fixed and variable) vs the cost of transporting.
elaborate on assignment problems
Objects in one set are to be assigned/allocated to objects in some other set.
For instance, assigning staff to various projects or tasks.
Typically, the goal is to minimize either cost or time. Therefore, depending on whether it is cost of time we solve for, we need to know how expnesive variouys objects are.
Generally speaking, we say that theassignment problem is a special case of the transportation problem, where we only have a bipartite graph.
We have one set of objects, which is the set of sources.
We have one set of objects, which is the set of sinks.
We assume there is an arc going from a source to all sinks, for all sources.
We need the following parameters:
aij = resource use if machine i is assigned to job j
cij = cost if machine i is assigned to job j
bi = resource capacity of machine i
variable: xij = 1 if machine i has been assigned to job j. 0 otherwrise.
Then the model becomes:
min z = ∑∑cij xij
s.t.
∑aij xij <= bi
∑xij [i]= 1
the first constraint limits how much a single machine can be utilized. If actual machine, this may be in terms of hours.
THe second constraint make sure that for each j (j = job/task) we have assigned a machine
elaborate on set-partitioning
We have m objects/tasks, and these objects/tasks are listed in a variety of different subsets so that some are included in some subsets, while not in others.
Our objective is to pick a certain selection of subsets so that all of the objects/tasks are represented. Typically with the lowest possible cost.
General model:
xj = 1 if alternative j is used. 0 otherwise
min z = ∑cj xj
s.t.
∑aij xj = 1
where aij is 1 if activity/task/object “i” is included in set j. 0 otherwise. We get one such constraint for each object that needs to be included.
What is the difference between set partitining and set covering?
Set partitionign is concerned with picking each object/task exactly once.
Set covering just wants to cover all tasks. Allows overlaps.
we get set covering when instead of using = constraint as in set partitioning, we use >= constraint
set packing?
Same as set covering and set partitioning, but with <= constraint instead
elaborate on the travelling salesman problem
need to visit n nodes exactly once, start and stop must be the same place, with the aim of minimizing total distance.
There is a differnece between the symmetrical and assymetrical TSP. The symmetrical problem has the same cost in both directions along a path. The asymmetric variant has differnet cost for differnet directions oalong the same edge.
What constraints are important/necessary in the TSP
Recall that the variable is binary xij, and is 1 if edge ij is included in the tour or not.
we need 2 constraints that make sure that we are no going multiple ways from same node.
∑xij [j] = 1
∑xij [i] = 1
These two ensure that the number of edges OUT from i is 1, and the number of edges IN to a node is 1.
Then we need the constriant that makes sure that the tour is connected, and dont just consist of sub tours.
∑∑xij [i in S][j in S] <= |S| - 1
why are IP cnsidered hard to solve, while LP is more easy?
Hard becasue of exponentual time complexity.
LP is easy because we know so much about where the optimal solution will be. Simplex utilize the fact that optimal solutions must liue at vertices.
What 4 important strategies for solving IP problems do we have?
1) Enumeration methods
2) Relaxation and decomposition methods
3) Cutting plane methods
4) Heuristics
What technique is branch and bound based on?
Enumeration. It use implicit enumeraiton, where implicit enumeration refer to using various “tests” to see/conclude that some solutions cannot lead ti better solutions than the best available.
elaborate on relaxation and decomposition methods
Relaxation is about solving an easier problem. Common ways are LP relaxation and Lagrangian relaxation.
Decomposition is about splitting up the problem and sovling smaller problems in a systematic way and later combine the findings to conclude with optimalituy
Elaborate on cutting plane methpds
Repeatdely solve the LP relaxation of the IP problem. In each new iteration, we add a constraint so that we make the next LP relaxation closer and closer to the optimal IP solution.
Related to findng the convex hull
Elaborate on heuristics
No guarantee of fidning optimal solution, however they are very ffast.
Utilize simple rules of thumb
the difficulty in solving IP problems depends on …?
1) Nubmero f integer variables
2) Problem structure
In LP, what determines the difficulty in solving a problem?
Typically the number of constraints.
This is a contrast to IP, where there is more focus on the number of integer variables and the structure of the problem.
For LP problems, how can we prove a solution is optimal or not?
KKT conditions along with convexity analyss
Are there optimality conditions for IP?
No.
if we want to prove optimality for IP, what do we do?
We need to use some iterative procedure where we find optimistic and pessimistic bounds that are iteratively brought closer together. We stop when the error (upperbound - lowerbound) is smaller than some pre defined error constant.
elaborate on pessimistic bounds
A pessimistic bound is always given by any feasible solution to a problem. For max problems, pessimistic bounds is a lower bound.
For min problems, pessimistic bound is an upper bound.
elaborate on optimistic bounds
we find optimistic bounds by solving a relaxed variant of the problem. Relaxation can be done in a variety of ways:
1) Remove integer constraint
2) Make feasible region larger by removing one of several of the constraints
What are pessimistic bounds alternatively called?
Primal bounds
What are optimistic bounds alternatively called?
Dual bounds
what happens if the relaxation of a problem has no feasible solution?
The problem (without relaxation) will not have any feasible solutions either
elaborate on weak and strong LP formulations
A problem is weak if its LP relaxation gives an optimal solution that is far away from the optimal solution of the IP problem.
The closer the stronger.
We say that the formulation is IDEAL if the optimal solution is the same for both problems.
what is the mathematical foundation we need to go further in the discussion on good models in IP?
Convex hull.