Presentation is loading. Please wait.

Presentation is loading. Please wait.

Integer Programming (정수계획법)

Similar presentations


Presentation on theme: "Integer Programming (정수계획법)"— Presentation transcript:

1 Integer Programming (정수계획법)
max 𝑐 ′ 𝑥 𝐴𝑥≤(=)𝑏 𝑥≥0 and integer (𝑥∈ 𝐵 𝑛 , or 0≤𝑥≤1 and integer, 𝑥 𝑗 ∈ 0,1 ∀𝑗) mixed integer programming problem (MIP) if some variables are continuous. Formulations Plane scheduling, Crew scheduling leg: one flight taking off from an airport and landing some other airport. route: a set of legs that an airplane can serve sequentially and return home. Let 𝑥 𝑗 = 1, if route 𝑗 selected 0, otherwise 𝑎 𝑖𝑗 = 1, if leg 𝑖 is part of route 𝑗 0, otherwise 𝑐 𝑗 : cost of using route 𝑗. OR-1 Opt

2 Crews may ride some airplanes (legs) as passengers (dead heading).
Plane scheduling: min 𝑗=1 𝑛 𝑐 𝑗 𝑥 𝑗 s. t. 𝑗=1 𝑛 𝑎 𝑖𝑗 𝑥 𝑗 =1, 𝑖=1,2,…,𝑚 𝑥 𝑗 ∈{0,1} for all 𝑗 m : total number of legs, n : total number of possible routes (big number). Each route should satisfy timing and regulatory constraints. Assume that we already generated enough routes. This formulations is a set partitioning type formulation Crew scheduling: s. t. 𝑗=1 𝑛 𝑎 𝑖𝑗 𝑥 𝑗 ≥1, 𝑖=1,2,…,𝑚 Crews may ride some airplanes (legs) as passengers (dead heading). Set covering type formulation. Note that the routes and costs can be different from the plane scheduling case. OR-1 Opt

3 Let 𝑀 be the index set of chosen subsets.
Set partitioning, set covering, set packing : ex) 𝑁={1, 2, 3, 4, 5} 𝑆 1 ={1, 2}, 𝑆 2 ={1, 3, 4}, 𝑆 3 ={3, 4}, 𝑆 4 ={1, 4, 5}, 𝑆 5 ={3, 4, 5}, 𝑆 6 ={1, 2, 3}, 𝑆 7 ={2, 3} Let 𝑀 be the index set of chosen subsets. Set partitioning: { 𝑆 1 , 𝑆 5 }, { 𝑆 4 , 𝑆 7 }, … ( 𝑗∈𝑀 𝑆 𝑗 =𝑁, 𝑆 𝑖 ∩ 𝑆 𝑗 =∅, 𝑖≠𝑗, 𝑖,𝑗∈𝑀) Set covering: { 𝑆 1 , 𝑆 2 , 𝑆 4 }, { 𝑆 4 , 𝑆 6 }, … ( 𝑗∈𝑀 𝑆 𝑗 =𝑁) Set packing: { 𝑆 1 , 𝑆 3 }, { 𝑆 5 }, … ( 𝑆 𝑖 ∩ 𝑆 𝑗 =∅, 𝑖≠𝑗, 𝑖,𝑗∈𝑀) OR-1 Opt

4 Traveling salesman problem
(Formulation in the handout considers the directed case. It is correct, but not a strong formulation. We assume the nodes are numbered 1, 2, …, 𝑛, unlike the handout. We will consider a different formulation for undirected case later. Similar idea can be used for directed case too. ) Let 𝑥 𝑖𝑗 =1 if move from city (node) 𝑖 to city 𝑗 in the tour, 0 otherwise. min (𝑖,𝑗)∈𝐴 𝑐 𝑖𝑗 𝑥 𝑖𝑗 s.t. 𝑢 𝑖 − 𝑢 𝑗 +𝑛 𝑥 𝑖𝑗 ≤𝑛−1, 𝑖,𝑗 ∈𝐴, 𝑖,𝑗≠1, ( or 𝑢 𝑗 ≥ 𝑢 𝑖 +1−𝑛 1− 𝑥 𝑖𝑗 as given in handout) 𝑖:(𝑖,𝑗)∈𝐴 𝑥 𝑖𝑗 =1, 𝑗∈𝑉 𝑗:(𝑖,𝑗)∈𝐴 𝑥 𝑖𝑗 =1, 𝑖∈𝑉 𝑥 𝑖𝑗 ∈ 0,1 , 𝑖,𝑗∈𝑉 Note that, 𝑢 𝑗 ′𝑠 are continuous variables in the above formulation. OR-1 Opt

5 Is the formulation correct?
The formulation has 𝑢,𝑥 variables. If ( 𝑢 ∗ , 𝑥 ∗ ) feasible, we only read 𝑥 ∗ values ( projection of ( 𝑢 ∗ , 𝑥 ∗ ) to 𝑥 space) We need to show that (1) any tour solution 𝑥 ∗ (together with some 𝑢 ∗ ) satisfies the constraints so that no feasible tour is excluded from the set of feasible tours and (2) any non-tour solution (more than 1 subtours) does not satisfy the constraints. (1) For any tour 𝑥 ∗ , starting from node 1, if node 𝑖 is 𝑘−th node in the tour (2≤𝑘≤𝑛), assign 𝑢 𝑖 =𝑘. (2) If 𝑥 ∗ is 0,1 and satisfies degree constraints, it is either a tour or consists of more than one subtours. If subtours exist, there is one that does not include node 1. Add the lhs and rhs of constraints 𝑢 𝑖 − 𝑢 𝑗 +𝑛 𝑥 𝑖𝑗 ≤𝑛−1 along the arcs in the subtour. Then we obtain a constraint which is valid for the feasible solutions, but it is violated by the subtour solution. Note that the constraints 𝑢 𝑖 − 𝑢 𝑗 +𝑛 𝑥 𝑖𝑗 ≤𝑛−1, are not used for 𝑖, 𝑗=1. Otherwise any tour cannot be a feasible solution. Formulations to include the constraints for all 𝑖,𝑗 can be used to eliminate any directed cycle in a feasible solution. OR-1 Opt

6 Fixed cost charge problem
cost function 𝑐 𝑥 = , if 𝑥=0 𝐾+𝑐𝑥, if 𝑥>0 Introduce binary decision variable 𝑦 that satisfies 𝑥>0 ⇒ 𝑦=1 𝑥=0 ⇒ 𝑦=0 and use cost function 𝑐 𝑥 =𝐾𝑦+𝑐𝑥 i.e., we want to enforce the condition (𝑥>0 ⟺ 𝑦=1) in the formulation. If 𝐾>0 and want to minimize 𝑐(𝑥), can use the formulation min 𝐾𝑦+𝑐𝑥, s.t. 𝑥≤𝑢𝑦, 𝑥≥0, 𝑦∈{0,1} (𝑢: upper bound on 𝑥) (Note that 𝑦=1, 𝑥=0 cannot be an optimal solution since 𝐾>0.) OR-1 Opt

7 𝑓(𝑥) 𝑐 𝑖 : slope (unit cost) 𝑐 4 𝑐 2 𝑐 3 𝑐 1 𝐾 x 𝐿 1 𝐿 2 𝐿 3 ( 𝑥 1 )
Nonlinear Objective functions May approximate a nonlinear objective function by a continuous piecewise linear objective function. 𝑓(𝑥) 𝑐 𝑖 : slope (unit cost) 𝑐 4 𝑐 2 𝑐 3 𝑐 1 𝐾 x 𝐿 1 𝐿 2 𝐿 3 ( 𝑥 1 ) ( 𝑥 2 ) ( 𝑥 3 ) OR-1 Opt

8 Express 𝑥 as 𝑥= 𝑥 1 + 𝑥 2 +…+ 𝑥 𝑘 , where each 𝑥 𝑗 denotes how much of the 𝑗-th interval is used to express 𝑥. Want to express 𝑥 as 𝑥= 𝐿 1 + 𝐿 2 +…+ 𝐿 𝑡−1 + 𝑥 𝑡 , for some 𝑡 in a feasible solution and objective value as 𝑓 𝑥 =𝐾+ 𝑐 1 𝐿 1 + 𝑐 2 𝐿 2 +…+ 𝑐 𝑡−1 𝐿 𝑡−1 + 𝑐 𝑡 𝑥 𝑡 . Formulation: 𝐿 𝑗 𝑤 𝑗 ≤ 𝑥 𝑗 ≤ 𝐿 𝑗 𝑤 𝑗−1 , 𝑗=1, 2, …, 𝑘 𝑤 0 =1 𝑤 𝑗 ∈{0, 1}, 𝑗=1, 2, …, 𝑘 𝑥 𝑗 ≥0, 𝑗=1, 2, …, 𝑘 note that we have 𝑤 𝑗 ≤ 𝑤 𝑗−1 for 𝑗=1, 2, …,𝑘. If 𝑤 𝑗 =0 for some 𝑗  𝑤 𝑘 =0 for 𝑘≥𝑗+1 If 𝑤 𝑗 = 𝑤 𝑗−1 =1  𝑥 𝑗 = 𝐿 𝑗 If 𝑤 𝑗 = 𝑤 𝑗−1 =0  𝑥 𝑗 =0 If 𝑤 𝑗 =0, 𝑤 𝑗−1 =1  0≤ 𝑥 𝑗 ≤ 𝐿 𝑗 Write the piecewise linear function as 𝐾+ 𝑐 1 𝑥 1 + 𝑐 2 𝑥 2 + …+ 𝑐 𝑘 𝑥 𝑘 . OR-1 Opt

9 𝑥 𝑗 ≥0 and integer (or 𝑥 𝑗 binary)
Knapsack problem max 𝑗=1 𝑛 𝑐 𝑗 𝑥 𝑗 s. t. 𝑗=1 𝑛 𝑎 𝑗 𝑥 𝑗 ≤𝑏 𝑥 𝑗 ≥0 and integer (or 𝑥 𝑗 binary) (general knapsack, binary knapsack problem) satisfying at least one of two constraints (disjunctive constraints) If 𝑥 satisfies at least one of the two constraints, 𝑥 is feasible. ex) one machine job scheduling problem. Let 𝑀 denote a large positive value either 3 𝑥 1 +2 𝑥 2 ≤ 𝑥 1 +2 𝑥 2 ≤18+𝑦𝑀 or 𝑥 1 +4 𝑥 2 ≤16  𝑥 1 +4 𝑥 2 ≤16+ 1−𝑦 𝑀 must hold (or both hold) 𝑦∈{0,1} For computational purpose, it is not desirable to use big-𝑀 in the formulation. The technique can be extended to handle 𝑘 out of 𝑚 constraints case. ( 𝑖=1 𝑚 𝑦 𝑖 ≤𝑚−𝑘 ) OR-1 Opt

10 ex) scheduling jobs on a machine
𝑛 jobs, processing time 𝑑 𝑖 for job 𝑖, any additional constraints and obj. fn. Let 𝑡 𝑖 denote the starting time of job 𝑖. Then, for each pair of jobs 𝑖,𝑗, either 𝑡 𝑗 ≥ 𝑡 𝑖 + 𝑑 𝑖 𝑡 𝑗 − 𝑡 𝑖 ≥ 𝑑 𝑖 −𝑀 𝑦 𝑖𝑗 or 𝑡 𝑖 ≥ 𝑡 𝑗 + 𝑑 𝑗  𝑡 𝑖 − 𝑡 𝑗 ≥ 𝑑 𝑗 −𝑀(1− 𝑦 𝑖𝑗 ) must hold 𝑦 𝑖𝑗 ∈ 0,1 , ∀ 𝑖,𝑗 𝑦 𝑖𝑗 =0  job 𝑖 precedes job 𝑗 𝑦 𝑖𝑗 =1  job 𝑗 precedes job 𝑖 Functions with N possible values 𝑓 𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 = 𝑑 1 , 𝑜𝑟 𝑑 2 , …, 𝑜𝑟 𝑑 𝑁  𝑓 𝑥 1 , 𝑥 2 , …, 𝑥 𝑛 = 𝑖=1 𝑁 𝑑 𝑖 𝑦 𝑖 𝑖=1 𝑁 𝑦 𝑖 =1 𝑦 𝑖 ∈{0, 1} for all 𝑖. OR-1 Opt

11 ex) quadratic knapsack problem
Quadratic 0-1 function ex) quadratic knapsack problem max 𝑖,𝑗,𝑖≠𝑗 𝑐 𝑖𝑗 𝑥 𝑖 𝑥 𝑗 + 𝑗=1 𝑛 𝑑 𝑗 𝑥 𝑗 𝑗=1 𝑛 𝑎 𝑗 𝑥 𝑗 ≤𝑏 (or 𝐴𝑥≤𝑏 ) 𝑥 𝑗 ∈{0, 1} for all 𝑗  max 𝑖,𝑗,𝑖≠𝑗 𝑐 𝑖𝑗 𝑦 𝑖𝑗 + 𝑗=1 𝑛 𝑑 𝑗 𝑥 𝑗 𝑗=1 𝑛 𝑎 𝑗 𝑥 𝑗 ≤𝑏 𝑦 𝑖𝑗 ≤ 𝑥 𝑖 , 𝑦 𝑖𝑗 ≤ 𝑥 𝑗 , for all 𝑖,𝑗 𝑥 𝑖 + 𝑥 𝑗 −1≤ 𝑦 𝑖𝑗 , for all 𝑖,𝑗 𝑥 𝑗 ∈{0, 1} for all 𝑗, 𝑦 𝑖𝑗 ∈{0,1} for all 𝑖,𝑗 Express 𝑥 𝑖 𝑥 𝑗 by 𝑦 𝑖𝑗 and add constraints that ensure 𝑦 𝑖𝑗 =1 if 𝑥 𝑖 = 𝑥 𝑗 =1, and 𝑦 𝑖𝑗 =0 otherwise. (If 𝑥 𝑖 = 𝑥 𝑗 =1  𝑦 𝑖𝑗 =1, else (at least one of 𝑥 𝑖 , 𝑥 𝑗 =0)  𝑦 𝑖𝑗 =0) ( 𝑥 𝑖 = 𝑥 𝑗 =  𝑦 𝑖𝑗 =1 ) OR-1 Opt

12 Models with many constraints
Traveling salesman problem (undirected case) Undirected graph 𝐺=(𝑁,𝐸), edge cost 𝑐 𝑒 , 𝑒∈𝐸 𝑁: set of nodes, 𝐸: set of edges (edge 𝑒= 𝑖,𝑗 , 𝑖,𝑗∈𝑁) Find a minimum cost tour that visits each node exactly once and returns home Cutset formulation minimize 𝑒∈𝐸 𝑐 𝑒 𝑥 𝑒 subject to 𝑒∈𝛿( 𝑖 ) 𝑥 𝑒 =2, 𝑖∈𝑁 𝑒∈𝛿(𝑆) 𝑥 𝑒 ≥2, 𝑆⊂𝑁, 𝑆≠∅, 𝑁 𝑥 𝑒 ∈{0,1} for all 𝑒∈𝐸, where 𝛿 𝑆 ={𝑒=(𝑖,𝑗)∈𝐸: 𝑖∈𝑆, 𝑗∉𝑆 or 𝑗∈𝑆, 𝑖∉𝑆} (called a cut defined by 𝑆, the set of edges with one end node in 𝑆 and the other end node not in 𝑆) (Note that the number of constraints can be very large.) OR-1 Opt

13 Subtour elimination formulation minimize 𝑒∈𝐸 𝑐 𝑒 𝑥 𝑒
subject to 𝑒∈𝛿( 𝑖 ) 𝑥 𝑒 =2, 𝑖∈𝑁 𝑒∈𝐸(𝑆) 𝑥 𝑒 ≤ 𝑆 −1, 𝑆⊂𝑁, 𝑆≠∅, 𝑁 𝑥 𝑒 ∈{0,1} for all 𝑒∈𝐸, where 𝐸 𝑆 ={𝑒=(𝑖,𝑗)∈𝐸: 𝑖∈𝑆, 𝑗∈𝑆} (set of edges with both end nodes in 𝑆) Both formulations are correct and LP relaxations of both formulations give the same solution set. But there are enormous number of constraints. We will consider how to solve the formulation later. Although the formulation given earlier in the handout is not a good one, it may be used if we want to solve small TSPs using a generic IP software, not the sophisticated algorithm that can handle the cutset or subtour elimination constraints. OR-1 Opt

14 Integer programming significantly increases the modeling capability, but usually takes much more time to solve than linear programming. Theoretically, it is generally believed that there does not exist a polynomial time algorithm to solve general integer programming problems. However, recent advances in theory and software, combined with powerful computers makes it possible to solve many real world problems using integer programming. OR-1 Opt


Download ppt "Integer Programming (정수계획법)"

Similar presentations


Ads by Google