Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1. Formulations.

Similar presentations


Presentation on theme: "Chapter 1. Formulations."β€” Presentation transcript:

1 Chapter 1. Formulations

2 Integer Optimization Problem (IP)
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) π‘₯∈ 0, 1 𝑛 ( or π‘₯∈ 𝐡 𝑛 ) Integer Programming 2013

3 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

4 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

5 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

6 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: 𝑗=1 𝑛 π‘Ž 𝑗 π‘₯ 𝑗 ≀𝑏 Variables are 0-1: π‘₯ 𝑗 ∈ 0, 1 for 𝑗=1,…,𝑛 Total value is maximized: max 𝑗=1 𝑛 𝑐 𝑗 π‘₯ 𝑗 Integer Programming 2013

7 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

8 Boolean Quadratic Function
max 𝑓 π‘₯ = 𝑖=1 𝑛 𝑑 𝑖 π‘₯ 𝑖 + 𝑖,𝑗,𝑖≠𝑗 𝑐 𝑖𝑗 π‘₯ 𝑖 π‘₯ 𝑗 , π‘₯ 𝑖 ∈ 0,1 for all 𝑖. ( use additional variables 𝑦 𝑖𝑗 , such that 𝑦 𝑖𝑗 = π‘₯ 𝑖 π‘₯ 𝑗 for binary π‘₯. Extended formulation.) οƒž max 𝑖=1 𝑛 𝑑 𝑖 π‘₯ 𝑖 + 𝑖,𝑗,𝑖≠𝑗 𝑐 𝑖𝑗 𝑦 𝑖𝑗 π‘₯ 𝑖 + π‘₯ 𝑗 βˆ’ 𝑦 𝑖𝑗 ≀1 βˆ’ π‘₯ 𝑖 + 𝑦 𝑖𝑗 ≀0 βˆ’ π‘₯ 𝑗 + 𝑦 𝑖𝑗 ≀ for all 𝑖, 𝑗, 𝑖≠𝑗 π‘₯ 𝑖 , 𝑦 𝑖𝑗 ∈ 0, 1 for all 𝑖, 𝑗 constraints ensure that π‘₯ 𝑖 = π‘₯ 𝑗 = ⟺ 𝑦 𝑖𝑗 =1 The technique will be used in lift and project Integer Programming 2013

9 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

10 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 𝑖 : 𝑗=1 𝑛 π‘₯ 𝑖𝑗 =1 for 𝑖=1,…,π‘š. Integer Programming 2013

11 if depot 𝑗 not opened, then π‘₯ 𝑖𝑗 =0. ⟹ π‘₯ 𝑖𝑗 ≀ 𝑦 𝑗 for π‘–βˆˆπ‘€, 𝑦 𝑗 ∈ 0, 1
min 𝑗=1 𝑛 𝑐 𝑗 𝑦 𝑗 + 𝑖=1 π‘š 𝑗=1 𝑛 𝑑 𝑖𝑗 π‘₯ 𝑖𝑗 s.t. 𝑗=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

12 Relation between variables
𝑗=1 𝑛 π‘₯ 𝑖𝑗 ≀ = 1, π‘₯∈ 𝐡 𝑛 : Generalized upper bound (GUB) constraint Integer Programming 2013

13 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) οƒž 𝑖=1 π‘š 𝑦 𝑖 β‰₯π‘˜, π‘Ž 𝑖 β€² π‘₯β‰₯ 𝑏 𝑖 𝑦 𝑖 , 𝑦 𝑖 ∈ 0, 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 + 𝑝 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

14 Restricted range of values
Want to restrict a variable x to take values in a set π‘Ž 1 ,…, π‘Ž π‘š . οƒž π‘₯= 𝑗=1 π‘š π‘Ž 𝑗 𝑦 𝑗 , 𝑗=1 π‘š 𝑦 𝑗 =1 , 𝑦 𝑗 ∈ 0, 1 for all 𝑗 Integer Programming 2013

15 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 , πœ† 1 ,…, πœ† π‘˜ β‰₯0 π‘₯ π‘Ž1 π‘Ž2 π‘Ž3 π‘Ž4 𝑦1 𝑦2 𝑦3 1 2 3 4 Integer Programming 2013

16 Formulation: min 𝑖=1 π‘˜ πœ† 𝑖 𝑓 π‘Ž 𝑖 s. t. πœ† 1 ≀ 𝑦 1 , πœ† π‘˜ ≀ 𝑦 π‘˜βˆ’1
πœ† 𝑖 ≀ 𝑦 π‘–βˆ’1 + 𝑦 𝑖 , 𝑖=2,…,π‘˜βˆ’1, 𝑖=1 π‘˜ πœ† 𝑖 =1, 𝑖=1 π‘˜βˆ’1 𝑦 𝑖 =1 πœ† 𝑖 β‰₯0, for all 𝑖, 𝑦 𝑖 ∈ 0, 1 , for all 𝑖 Integer Programming 2013

17 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 𝑀2 𝑀3 𝐿1 𝐿2 𝐿3 Integer Programming 2013

18 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 οƒž 𝐴π‘₯β‰₯𝑒, 𝐴π‘₯≀𝑒, 𝐴π‘₯=𝑒, π‘₯∈ 𝐡 𝑛 ( 𝑒 : unit vector) Note that 𝐴π‘₯= 𝑗=1 𝑛 𝐴 𝑗 π‘₯ 𝑗 , where 𝐴 𝑗 is π‘—βˆ’π‘‘β„Ž column of 𝐴. Integer Programming 2013

19 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

20 π‘₯ π‘–π‘Ÿ =1, if job 𝑖 is the π‘Ÿβˆ’th job processed =0, otherwise
Let π‘₯ π‘–π‘Ÿ =1, if job 𝑖 is the π‘Ÿβˆ’th job processed =0, otherwise 𝑦 π‘—π‘Ÿ =1, if tool 𝑗 is on the magazine while the π‘Ÿβˆ’th job is processed 𝑦 𝑗0 =0, for all j. (or may use initial magazine setting) π‘Ÿ=1 𝑛 π‘₯ π‘–π‘Ÿ =1, for all 𝑖. (job 𝑖 must be done) 𝑖=1 𝑛 π‘₯ π‘–π‘Ÿ =1, for all r. (π‘Ÿβˆ’π‘‘β„Ž job must be done) π‘₯ π‘–π‘Ÿ ≀ 𝑦 π‘—π‘Ÿ , for all π‘—βˆˆ 𝐽 𝑖 , for all π‘Ÿ,𝑖. 𝑗=1 π‘š 𝑦 π‘—π‘Ÿ ≀𝐡, for all π‘Ÿ. Integer Programming 2013

21 minimize 𝑗=1 π‘š π‘Ÿ=1 𝑛 𝑠 𝑗 𝑦 π‘—π‘Ÿ βˆ’ 𝑦 𝑗,π‘Ÿβˆ’1
𝑧 π‘—π‘Ÿ β‰₯ 𝑦 π‘—π‘Ÿ βˆ’ 𝑦 𝑗,π‘Ÿβˆ’1 , for all 𝑗,π‘Ÿ, 𝑧 π‘—π‘Ÿ β‰₯ 𝑦 𝑗,π‘Ÿβˆ’1 βˆ’ 𝑦 π‘—π‘Ÿ , for all 𝑗,π‘Ÿ. minimize 𝑗=1 π‘š π‘Ÿ=1 𝑛 𝑠 𝑗 𝑧 π‘—π‘Ÿ 𝑧 π‘—π‘Ÿ β‰₯ 𝑦 𝑗,π‘Ÿβˆ’1 βˆ’ 𝑦 π‘—π‘Ÿ , for all 𝑗,π‘Ÿ, π‘Ÿ=1 𝑛 π‘₯ π‘–π‘Ÿ =1 , for all 𝑖. 𝑖=1 𝑛 π‘₯ π‘–π‘Ÿ =1, for all π‘Ÿ. π‘₯ π‘–π‘Ÿ ≀ 𝑦 π‘—π‘Ÿ , for all π‘—βˆˆ 𝐽 𝑖 , for all π‘Ÿ,𝑖. 𝑗=1 π‘š 𝑦 π‘—π‘Ÿ ≀𝐡, for all π‘Ÿ. Integer Programming 2013

22 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

23 min 𝑑=1 𝑇 𝑝 𝑑 𝑦 𝑑 + β„Ž 𝑑 𝑠 𝑑 + 𝑐 𝑑 π‘₯ 𝑑 𝑦 1 = 𝑑 1 + 𝑠 1
Formulation: min 𝑑=1 𝑇 𝑝 𝑑 𝑦 𝑑 + β„Ž 𝑑 𝑠 𝑑 + 𝑐 𝑑 π‘₯ 𝑑 𝑦 1 = 𝑑 1 + 𝑠 1 𝑠 π‘‘βˆ’1 + 𝑦 𝑑 = 𝑑 𝑑 + 𝑠 𝑑 for 𝑑=2,…,𝑇 𝑦 𝑑 β‰€πœ” π‘₯ 𝑑 for 𝑑=1,…,𝑇 𝑠 𝑇 =0 𝑠,π‘¦βˆˆ 𝑅 + 𝑇 , π‘₯∈ 𝐡 𝑇 , where πœ”= 𝑑=1 𝑇 𝑑 𝑑 is an upper bound on 𝑦 𝑑 for all 𝑑. Integer Programming 2013

24 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


Download ppt "Chapter 1. Formulations."

Similar presentations


Ads by Google