Linear Programming (Optimization)
Download
Report
Transcript Linear Programming (Optimization)
Chapter 1. Formulations
1
ο± Mixed Integer Optimization Problem (or (Linear) Mixed Integer Program,
MIP)
min π β² π₯ + π β² π¦
π΄π₯ + π΅π¦ = π (or π΄π₯ + π΅π¦ β€ π)
π₯ β π+π , π¦ β π
+π ,
where π΄ β π πΓπ , π΅ β π πΓπ , π β π π , π β π π , π β π π
ο± Integer Optimization Problem (IP)
min π β² π₯
π΄π₯ = π
π₯ β π+π
ο± Binary (or zero-one) Integer Optimization Problem (BIP)
min π β² π₯
π΄π₯ = π
π₯ β 0, 1
Integer Programming 2013
π
( or π₯ β π΅π )
2
ο± Combinatorial Optimization Problem
Given a finite set π = 1, β¦ , π , weights ππ for each π β π, and a set πΉ of
feasible subsets of π.
Want to find a minimum (or maximum) weight feasible subset in πΉ.
(COP)
min
πβπ
πβπ ππ
:π β πΉ
ο± Almost all COPs can be formulated as IP or BIP
οKnapsack problem, Traveling Salesman Problem, Min/Max cut of graph, Stable
set, Steiner Tree, β¦
Integer Programming 2013
3
Applications
ο± Numerous applications
οTransportation (train scheduling)
οAirline crew scheduling, plane scheduling
οProduction planning, distribution, SCM, logistics
οEnergy, Eletricity generation planning
οTelecommunicaton network design, operation
οBuses for the handicapped
οGround holding of aircraft
οCutting problems
οβ¦.
οToo many to list.
ο± Provides very strong modeling capabilities (much better than LP alone), but
usually difficult to solve (The solution set is not convex)
linear ο« nonlinear, convex ο« non-convex
ο± Recent advances in theory and software makes IP a practical option.
Integer Programming 2013
4
1.1 Modeling Techniques
ο± Steps
οDefine necessary variables
οDefine (construct) constraints so that feasible points correspond to the feasible
solutions of the problem
οDefine objective function
ο± May exist many correct, but different formulations. Needs creativity.
οWhich formulation is better?
ο± Frequently, use incidence vectors to denote sets
οπ β π, incidence vector of π is π βdimensional vector π₯π such that π₯ππ = 1 if
π β π and π₯ππ = 0 otherwise.
Integer Programming 2013
5
Binary choice
ο± The 0-1 knapsack problem
π items
π€π is the weight of item π, and ππ is its value
Bound π on the weight that can be carried in a knapsack
Select items to be put in the knapsack so that the total value is maximum.
π₯π = 1 if item π is selected, and π₯π = 0 otherwise
The capacity bound cannot be exceeded:
Variables are 0-1:
Total value is maximized:
Integer Programming 2013
π
π=1 ππ π₯π
β€π
π₯π β 0, 1 for π = 1, β¦ , π
max
π
π=1 ππ π₯π
6
ο± Variations
οInteger knapsack problem
οPrecedence constrained knapsack problem
Partial orders on projects
project π must be done to perform project π ( π β π )
( can be represented as directed graph, use π₯π β₯ π₯π in constraints (π₯: binary))
ex) repair kit selection, selecting tools for FMS tool magazine, open pit mining,
β¦
οQuadratic knapsack problem: Objective is quadratic function
Integer Programming 2013
7
ο± Boolean Quadratic Function
max π π₯ =
π
π=1 ππ π₯π
+
π,π,πβ π πππ π₯π π₯π
, π₯π β 0,1 for all π.
( use additional variables π¦ππ , such that π¦ππ = π₯π π₯π for binary π₯. Extended
formulation.)
ο max
π
π=1 ππ π₯π
+
π,π,πβ π πππ π¦ππ
π₯π + π₯π β π¦ππ β€ 1
βπ₯π + π¦ππ β€ 0
βπ₯π + π¦ππ β€ 0
for all π, π, π β π
π₯π , π¦ππ β 0, 1 for all π, π
ο± constraints ensure that π₯π = π₯π = 1
βΊ
π¦ππ = 1
ο± The technique will be used in lift and project
Integer Programming 2013
8
ο± Ex: quadratic knapsack problem, max cut of a graph
Def: Given a graph πΊ = (π, πΈ), and subset π β π of vertices, the set of edges
with exactly one endpoint in π is called a cut (relative to π).
ο± Given πΊ = (π, πΈ), and edge weights πππ , π = (π, π) β πΈ, find a maximum
weight cut of πΊ.
max
(π,π)βπΈ πππ
π₯π 1 β π₯π + 1 β π₯π π₯π
π₯π β 0,1 for all π
(may add constraint π₯1 = 1 )
ο± Note: max cut problem is difficult to solve (NP-hard), but min cut problem is
easy (max-flow min-cut theorem).
Integer Programming 2013
9
Forcing constraints
ο± Decision A (π₯ = 1) can be made only if decision B (π¦ = 1) also has been made.
π₯β€π¦
ο± Uncapacitated Facility Location (UFL)
Given potential depots π = 1, β¦ , π , and a set π = 1, β¦ , π of clients.
Fixed cost ππ to open depot π, and transportation cost πππ if all of client π β² π
order is delivered from depot π.
Determine which depots to open, and which depot serves each client so as to
minimize the total cost.
Define π¦π = 1 if depot π is open, and π¦π = 0 otherwise
π₯ππ is fraction of the demand of client π satisfied from depot π.
Satisfaction of demand of client π :
Integer Programming 2013
π
π=1 π₯ππ
= 1 for π = 1, β¦ , π.
10
if depot π not opened, then π₯ππ = 0.
βΉ π₯ππ β€ π¦π for π β π, π¦π β 0, 1
min
s.t.
π
π=1 ππ π¦π +
π
π=1 π₯ππ
π
π=1
π
π=1 πππ π₯ππ
=1
for π β π
π₯ππ β€ π¦π for π β π, π β π
0 β€ π₯ππ β€ 1 for π β π, π β π, π¦π β 0, 1 for π β π
ο± Note that there exists an optimal solution with π₯ππ = 0 or 1.
Capacitated version?
Integer Programming 2013
11
Relation between variables
π
π=1 π₯ππ
β€ = 1, π₯ β π΅π : Generalized upper bound (GUB) constraint
Integer Programming 2013
12
Disjunctive constraints
ο± Assume π₯ β₯ 0
πβ² π₯ β₯ π, π β² π₯ β₯ π,
π, π β₯ 0
at least one of the two constraints needs to be satisfied
ο πβ² π₯ β₯ π¦π, π β² π₯ β₯ 1 β π¦ π, π¦ β 0, 1
ο± General form:
ππβ² π₯ β₯ ππ , π = 1, β¦ , π ( ππ β₯ 0 for all π)
(at least π out of π constraints needs to be satisfied)
π
β²
ο
π¦π β 0, 1 , π = 1, β¦ , π.
π=1 π¦π β₯ π, ππ π₯ β₯ ππ π¦π ,
ο± Ex) machine scheduling: two jobs must be processed on the same machine
and cannot be processed simultaneously.
ππ : processing time of job π,
π‘π : start time of job π,
ο either π‘2 β₯ π‘1 + π1 or π‘1 β₯ π‘2 + π2 should hold.
(need a different formulation from above, using big π)
Note that the feasible solution set is not convex.
Integer Programming 2013
13
Restricted range of values
ο± Want to restrict a variable x to take values in a set π1 , β¦ , ππ .
ο
π₯=
π
π=1 ππ π¦π
Integer Programming 2013
,
π
π=1 π¦π
= 1 , π¦π β 0, 1 for all π
14
Arbitrary piecewise linear cost functions
ο± Piecewise linear, not necessarily convex, cost function
(separable piecewise linear convex cost function can be modeled as LP (min
problem, but non-convex (or non-concave) function cannot be modeled as LP)
, π π₯ = ππ=1 ππ π ππ ,
π
π=1 ππ = 1 , π1 , β¦ , ππ β₯ 0
π(π₯)
π₯=
π1 π¦ π2
1
ο¬2
ο¬1
Integer Programming 2013
π¦2 π 3
ο¬3
π¦3
π4
ο¬4
π
π=1 ππ ππ
π₯
15
ο± Formulation:
π
π=1 ππ π
min
s. t.
ππ
π1 β€ π¦1 , ππ β€ π¦πβ1
ππ β€ π¦πβ1 + π¦π , π = 2, β¦ , π β 1,
π
π=1 ππ
= 1,
πβ1
π=1 π¦π
=1
ππ β₯ 0, for all π,
π¦π β 0, 1 , for all π
Integer Programming 2013
16
ο± Alternative formulation
πΏπ π€π β€ π₯π β€ πΏπ π€πβ1 , π = 1,2, β¦ , π
π€0 = 1
π€π β 0, 1 , π = 1,2, β¦ , π
π₯π β₯ 0, π = 1,2, β¦ , π
π(π₯)
π = πΎ + π1π₯1 + π2π₯2 + β― + πππ₯π
Note that constraints imply π€π β€ π€πβ1
πΎ
π€0
π€1
πΏ1
Integer Programming 2013
π€3
π€2
πΏ2
π₯
πΏ3
17
Set covering, set packing, set partitioning
ο± π = {1, β¦ , π}, π = {1, β¦ , π}
π1 , π2 , β¦ , ππ are collection of subsets of π.
cost ππ for each subset ππ
ο± πΉ β π is a cover of π if
πβπΉ ππ
=π
πΉ is a packing of π if ππ βππ = β
for all π, π β πΉ, π β π
πΉ is a partition of π if it is both a cover and a packing of π.
weight of a subset πΉ of π is defined as
ο± Let π΄: π Γ π with πππ = 1,
πβπΉ ππ
if π β ππ ,
= 0, otherwise
ο π΄π₯ β₯ π, π΄π₯ β€ π, π΄π₯ = π, π₯ β π΅π
Note that π΄π₯ =
Integer Programming 2013
π
π=1 π΄π π₯π ,
( π : unit vector)
where π΄π is π β π‘β column of π΄.
18
Sequencing problem with setup times
ο± One machine, π operations
operation π requires unique tool π
capacity of tool magazine is π΅ < π
loading or unloading tool π into the magazine requires π π units of setup time
π jobs need to be performed by the machine and each job π requires multiple
operations π½π , π½π β€ π΅
(setup time required prior to each job is sequence dependent)
ο± Determine the optimal job sequence that minimizes total setup time. Assume
the magazine is empty initially.
Integer Programming 2013
19
ο± Let
π₯ππ = 1,
= 0,
if job π is the π βth job processed
otherwise
π¦ππ = 1,
if tool π is on the magazine while the π βth job is processed
= 0,
ο±
otherwise
π¦π0 = 0, for all j. (or may use initial magazine setting)
π
π=1 π₯ππ = 1,
π
π=1 π₯ππ = 1,
π₯ππ β€ π¦ππ ,
π
π=1 π¦ππ
Integer Programming 2013
β€ π΅,
for all π.
for all r.
(job π must be done)
(π β π‘β job must be done)
for all π β π½π , for all π, π.
for all π.
20
π
π=1
minimize
π
π=1 π π
π
π=1
ο minimize
ο±
π
π=1
minimize
π¦ππ β π¦π,πβ1
π
π=1 π π π§ππ
π§ππ β₯ π¦ππ β π¦π,πβ1 ,
for all π, π,
π§ππ β₯ π¦π,πβ1 β π¦ππ ,
for all π, π.
π
π=1 π π π§ππ
π§ππ β₯ π¦ππ β π¦π,πβ1 ,
for all π, π,
π§ππ β₯ π¦π,πβ1 β π¦ππ ,
for all π, π,
π
π=1 π₯ππ = 1,
π
π=1 π₯ππ = 1,
π₯ππ β€ π¦ππ ,
π
π=1 π¦ππ
Integer Programming 2013
β€ π΅,
for all π.
for all π.
for all π β π½π , for all π, π.
for all π.
21
Uncapacitated lot sizing (ULS) (NW)
ο± Production plan for a π βperiod horizon for a single product.
ππ‘ is the fixed cost (set-up) of producing in period π‘.
ππ‘ is the unit production cost in period π‘.
βπ‘ is the unit storage cost in period π‘.
ππ‘ is the demand in period π‘.
Variables:
π¦π‘ is the amount produced in period π‘.
π π‘ is the stock at the end of period π‘.
π₯π‘ = 1 if production occurs in π‘, and π₯π‘ = 0 otherwise.
Integer Programming 2013
22
ο± Formulation:
min
π
π‘=1
ππ‘ π¦π‘ + βπ‘ π π‘ + ππ‘ π₯π‘
π¦1 = π1 + π 1
π π‘β1 + π¦π‘ = ππ‘ + π π‘
π¦π‘ β€ ππ₯π‘
π π = 0
π , π¦ β π
+π , π₯ β π΅π ,
where π =
π
π‘=1 ππ‘
Integer Programming 2013
for π‘ = 2, β¦ , π
for π‘ = 1, β¦ , π
is an upper bound on π¦π‘ for all π‘.
23
ο± Alternative formulation:
Define πππ‘ as the quantity produced in period π to satisfy demand in period π‘ β₯ π.
min
π
π‘=1
π‘
π=1
ππ + βπ + βπ+1 + β― + βπ‘β1 πππ‘ +
π‘
π=1 πππ‘
= ππ‘ ,
π
π‘=1 ππ‘ π₯π‘
for π‘ = 1, β¦ , π
πππ‘ β€ ππ‘ π₯π ,
for π = 1, β¦ , π and π‘ = π, β¦ , π
π(π+1)/2
π₯ β π΅π ,
π β π
+
,
ο± If we replace π₯ β π΅π , by 0 β€ π₯π‘ β€ 1 for all π‘, then the LP has an optimal
solution with π₯ β π΅π . Hence this is a stronger formulation.
ο± The formulation is a special case of the uncapacitated facility location problem.
Substitute π¦ππ‘ = πππ‘ /ππ‘ for all π and π‘ β₯ π.
ο± Extensions: capacitated lot sizing, multiple item lot sizing, β¦
Integer Programming 2013
24