Kapita Selekta Matematika Industri
Pertemuan 4
Mixed-Integer Programming dan Metode Penyelesainnya
[email protected]
September 26, 2023
Outline
Preview
Mathematical Optimization
Integer (and Mixed-Integer) Programming
A Note on Mixed-Integer Programming
Some Mixed-Integer Programming Problems
Warehouse Location
Investing Problem
Method
Existing Method
Branch and Bound
2/16
A PREVIEW
3/16
Mathematical Optimization
A generic mathematical optimization problem can be written as:
min : f (x)
subject to : gi (x) ≤ 0, i = 1...m
x ∈ X.
The above problem is computationally tractable1 case if:
▶ f (x) and all gi (x) are linear, and X = Rn
+ (Linear Programming)
▶ f (x) and all gi (x) are linear, and X = Z+ R+ (Mixed-Integer Linear
n1 n2
Programming)
▶ f (x) is quadratic and all gi (x) are linear, and X = Rn
+ (Quadratic
Programming)
▶ f (x) and all gi (x) are quadratic, and X = Rn
+ (Quadratically
Constrained Quadratic Programming)
Only Linear Programming can be solved in polynomial time (efficient)!
1
Computational tractability means that a problem can be solved by a computer in a reasonable amount of
time.
4/16
Integer Programming
Let’s now consider the following integer-programming problem:
∑
n
max : c j xj
j=1
∑n
subject to : aij xj = bi (i = 1, . . . , m),
j=1
xj ≥ (j = 1, . . . , n),
xj integer (for some or for all j = 1, . . . , n).
It is said to be a mixed integer program when some, but not all,
variables are restricted to be integer; and is called a pure integer
program when all decision variables must be integers.
5/16
A Note on Mixed-Integer Programming
Many practical (industry) problems can be mathematically formulated as
mixed-integer programming (MIP) problems. These problems often
involve a combination of both discrete (integer) and continuous variables,
making MIP a versatile tool for addressing a wide range of real-world
challenges.
▶ Production Planning;
▶ Airline Scheduling (Routing, Staffing, etc.);
▶ Telecommunication Network Design;
▶ Classroom Scheduling;
▶ And many other practical problems
Theoretically, MIP is NP-hard: not much hope for efficient algorithms.
But in practice, even very large MIPs can be solved to optimality in a
reasonable time.
6/16
SOME MIXED-INTEGER PROGRAMMING
PROBLEMS
7/16
Warehouse Location: Part 1
In modeling distribution systems, decisions must be made about
trade-offs between transportation costs and costs for operating
distribution centers.
As an example, suppose that a manager must decide which of n
warehouses to use for meeting the demands of m customers for a
good. The decisions to be made are which warehouses to operate
and how much to ship from any warehouse to any customer. Let
8/16
Warehouse Location: Part 2
Let {
1 warehouse is opened
yi =
0 warehouse is not opened
and xij = amount to be sent from warehouse i to customer j.
The relevant costs are:
▶ fi = Fixed operating cost for warehouse i, if opened (for example, a
cost to lease the warehouse).
▶ cij = Per-unit operating cost at warehouse i plus the transportation
cost for shipping from warehouse i to customer j.
There are two types of constraints for the model:
1. the demand dj of each customer must be filled from the
warehouses; and
2. goods can be shipped from a warehouse only if it is opened.
9/16
Warehouse Location: Part 3
The model is
∑
m ∑
n ∑
m
min : cij xij + f i yi
i=1 j=1 i=1
∑m
subject to : xij = dj (j = 1, . . . , n),
i=1
∑
n ∑
n
xij − yi dj ≤ 0 (i = 1, . . . , m),
j=1 j=1
xij ≥ 0 (i = 1, . . . , m; j = 1, . . . , n),
yi ∈ {0, 1} (i = 1, . . . , m).
10/16
Warehouse Location: Part 4
From the previous model:
▶ The objective function incorporates transportation and variable
warehousing costs, in addition to fixed costs for operating
warehouses.
▶ The first constraint indicates that each customer’s demand must
be met.
▶ The summation over the shipment variables xij in the ith constraint
of the second is the amount of the good shipped from warehouse i.
▶ When the warehouse is not opened, yi = 0 and the constraint
specifies that nothing can be shipped from the warehouse. On the
other hand, when the warehouse is opened and yi = 1, the
constraint simply states that the amount to be shipped from
warehouse i can be no larger than the total demand, which is always
true. Consequently, the second constraint implies restriction 2 as
proposed above.
We can change the model according to our needs.
11/16
Portfolio Selection Optimization Problem: Part 1
Let’s say we want to invest $1,000 in the form of stocks from three
different companies for a one-month period. This means we will use
$1,000 to purchase stocks from three different companies at their current
prices, hold them for one month, and then sell them at the end of the
month.
As rational investors, we expect to profit from this investment. Suppose
we buy at $p per share at the beginning of the month and sell them at $s
per share at the end of the month. Then, the one-month profit for each
share is $ s−p
p per share.
Stock prices are highly uncertain, which can significantly impact the
end-of-month profits. Our goal is to invest in such a way that the
end-of-month profit is at least $50 or 5%. Furthermore, we want to
ensure that the risk of not achieving the expected profit is minimized. We
want to select only three different companies from 40 given companies.
12/16
Portfolio Optimization Problem: Part 2
The model of the previous portfolio selection optimization problem
is:
min : xT Qx
∑
40
subject to : xi = 1,
i=1
r̄T x ≥ 50,
∑
40
yi = 3,
i=1
xi ≥ 0 (i = 1, . . . , 40),
yi ∈ {0, 1} (i = 1, . . . , 40).
13/16
METHODS
14/16
Existing Method
In practice MIPs are solved via enumeration:
▶ The branch-and-bound algorithm, Land and Doig (1960).
▶ The branch-and-cut scheme proposed by Padberg and Rinaldi
(1987).
However, the above methods are old!
15/16
Branch and Bound: Basic Idea
Given an optimization problem z ∗ = min{f (x) : x ∈ P }.
▶ Partitioning
Let P = ∪pi=1 Pi (division), then
z ∗ = min{zi } where zi = min{f (x) : x ∈ Pi }.
i
In a simple way, we can say that we find i that minimizes the
function.
▶ Lower Bounding
For i = 1, . . . , p, let Pi ⊆ Pir (relaxation), then
∗
zi ≥ ziR = min{f (x) : xR
i }, and z = min{zi }.
R
i
▶ Upper Bounding
If x̄ ∈ Pi ⊆ P then f (x̄) ≥ z ∗
16/16
Matlab Optimization Tool
The easy way to solve the MIP problem is to use optimization
tools in Matlab.
17/16