Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Mathematical Programming Integer Programming. 2 Common Types of IP’s and IP Constraints Two common types of IP’s –#1: Capital budgeting –#2: Set covering.

Similar presentations


Presentation on theme: "1 Mathematical Programming Integer Programming. 2 Common Types of IP’s and IP Constraints Two common types of IP’s –#1: Capital budgeting –#2: Set covering."— Presentation transcript:

1 1 Mathematical Programming Integer Programming

2 2 Common Types of IP’s and IP Constraints Two common types of IP’s –#1: Capital budgeting –#2: Set covering Four common IP constraints –#3: Binary Variables & Logical Conditions –#4: Fixed costs –#5: Minimum order or purchase size –#6: Quantity discounts

3 3 #1: Capital Budgeting Make a set of “go/no-go” decisions concerning a pool of potential projects Projects consume common resources –Typically place capital demands in different time periods –May require other resources such as staff time or expertise, possibly in different periods –Often have logical linking constraints (can only do project #4 if you do project #6, etc.) When there is just one resource constraint it is known as a “knapsack problem”

4 4 #2: Set Covering Choose least cost set of “facilities” that serves (covers) every customer adequately. Example: Company wants to locate fewest number of service centers such that all customers in region are within X miles of a service center. Example: A city has eight districts; each can house an ambulance. How many ambulances are needed and where should they be placed to make sure all districts are within 3 minutes of an ambulance?

5 5 Set Covering (cont.) Decision variables –X i = 1 if ambulance placed in district i –X i = 0 if no ambulance placed in district i Objective –minimize number of ambulances –i.e., minimize number of X i ’s that equal 1 8 Constraints, 1 for each neighborhood –for every neighborhood, at least one of the neighborhoods within a 3 minute drive must have its X i = 1

6 6 Data for Ambulance Problem: Travel Time Between Districts From Neighborhood To Neighborhood

7 7 Ambulance Problem: Mathematical Formulation Min X 1 + X 2 + X 3 + X 4 + X 5 + X 6 + X 7 + X 8 s.t. X 1 + X 2 + X 3 >= 1 X 2 + X 3 + X 4 >= 1 X 3 + X 4 + X 5 + X 6 >= 1 X 4 + X 5 + X 7 >= 1 X 3 + X 4 + X 6 + X 7 + X 8 >= 1 X 5 + X 6 + X 7 + X 8 >= 1 X 6 + X 7 + X 8 >= 1 and all X i binary

8 8 #3: Binary Variables and Logical Conditions Suppose could place an ambulance in only one of the first three districts: –X 1 + X 2 + X 3 <= 1 Suppose needed an ambulance in at least one of the first three districts –X 1 + X 2 + X 3 >= 1 Exactly one –X 1 + X 2 + X 3 = 1

9 9 Binary Variables and Logical Conditions (cont.) Suppose could only do project #2 if project #1 is funded. I.e., cannot have X 2 = 1 if X 1 = 0. Then add constraint: –X 1 - X 2 >= 0 Suppose could only do project #2 if either project #1 or project #3 is funded. –X 1 - X 2 + X 3 >= 0 Etc.

10 10 Can Apply This Idea to Constraints If must meet at least 1 of 2 constraints: –X 1 + 2X 2 + 3X 3 <= 15 or –2X 1 + X 2 + X 3 <= 10 Create binary variables Y i & constraints –M Y 1 >= X 1 + 2X 2 + 3X 3 - 15 –M Y 2 >= 2X 1 + X 2 + X 3 - 10 –where M is any very, very large number If constraint i violated, then Y i must be 1 Ensure both constraints are not violated –Y 1 + Y 2 <= 1

11 11 Extend to General Sets of Constraints Suppose must meet K of L constraints: –g i (X 1, X 2, X 3,..., X n ) <= 0, i = 1, 2, 3,..., L –Create binary variables Y i such that Y i = 1 if constraint i is violated. –M Y i >= g i (X 1, X 2, X 3,..., X n ) for each i –To ensure that no more than L-K constraints are violated, add constraint –Y 1 + Y 2 + Y 3 +... + Y L <= (L - K)

12 12 #4: Fixed Costs: Ordering Shirts Suppose ordering shirts from LL Bean costs $20/shirt plus a $5 shipping charge (regardless of the number of shirts ordered) and ordering shirts from Land’s End costs $19/shirt plus a $10 shipping charge. How express total cost as a function of –X 1 = # of shirts ordered from LL Bean –X 2 = # of shirts ordered from Land’s End

13 13 Algebraic Formulation of Total Cost of Ordering Shirts Create two new binary variables –Y 1 = 1 if order shirts from Bean; else 0 –Y 2 = 1 if order shirts from L.E.; else 0 Add four constraints –M Y i >= X i for i = 1 and 2 –Y i <= M X i for i = 1 and 2 –M is some very large number (“Big M”) –Note: Y i = 1 if X i > 0 and Y i = 0 if X i = 0. Total cost of ordering shirts is Min 5 Y 1 + 20 X 1 + 10 Y 2 + 19 X 2

14 14 Fixed Costs: General Formulation Suppose incur a fixed cost FC i > 0 if a decision variable is greater than 0 (in addition to variable cost (c i ) per unit) –Create a binary variable Y i –Add constraints: M Y i >= X i for each i –Ensures Y i = 1 if X i > 0 –Objective function becomes Min FC 1 Y 1 + c 1 X 1 + FC 2 Y 2 + c 2 X 2 +... –Minimization ensures Y i = 0 if X i = 0.

15 15 #5: Minimum Order or Purchase Size Suppose a book store has to order at least 20 copies of a title if it orders any. If X = # of copies ordered, how can this constraint be written? –Create binary variable Y such that Y = 1 if X > 0 and Y = 0 if X = 0. –Add constraints: –M Y >= X and (so if X > 0, Y = 1) –X >= 20 Y (if Y = 1, X >= 20)

16 16 General Formulation of Min. Order or Purchase Size Suppose that if X i > 0, it must be at least L i (I.e., cannot have 0 < X i < L i ) –Create a binary variable Y i such that Y i = 1 if X i > 0 and Y i = 0 if X i = 0. –Add constraints: –M Y i >= X i and(so if X i > 0, Y i = 1) –X i >= L i Y i for each i(if Y i = 1, X i >= L i )

17 17 #6: Quantity Discounts Suppose first L i units cost C i1 ; additional units can be purchased at C i2 < C i1. –Create a binary variable Y i such that Y i = 1 if X i > L i. Divide X i into X i1 and X i2. –Add constraints: X i2 0, Y i = 1) X i1 >= L i Y i for each i(if Y i = 1, X i1 >= L i ) Obj fn: Min C 11 X 11 + C 12 X 12 + C 21 X 21 + C 22 X 22 + C 31 X 31 + C 32 X 32 +...

18 18 Quantity Discount Example (One Item; Multiple Breaks) Stock brokerage fees are –$27.50 fixed cost per order + –0.0092 * $ amount up to $10K –0.0066 * $ amount between $10K - $25K + –0.0045 * $ amount over $25K. How express the brokerage fee as a function of the value of the order? Let –X 1 = order amount up to $10K –X 2 = order amount from $10K - $25K –X 3 = order amount over $25K –Y 1, Y 2, Y 3 are binary

19 19 Quantity Discount Example Solution Constraints X 3 0, Y 3 = 1) X 2 >= 15,000 Y 3 (if Y 3 = 1, X 2 >= 15,000) X 2 0, Y 2 = 1) X 1 >= 10,000 Y 2 (if Y 2 > 0, X 1 >= 10,000) X 1 0, Y 1 = 1) Purchase –amount: X 1 + X 2 + X 3 –cost: 27.50 Y 1 + 0.0092 X 1 + 0.0066 X 2 + 0.0045 X 3

20 20 Break

21 21 Mathematical Programming Nonlinear Programming

22 22 Maximin

23 23 Maximin

24 24 Maximin

25 25 Maximin

26 26 Minimale Abweichung

27 27 Minimale Abweichung

28 28 Minimale Abweichung

29 29 Break


Download ppt "1 Mathematical Programming Integer Programming. 2 Common Types of IP’s and IP Constraints Two common types of IP’s –#1: Capital budgeting –#2: Set covering."

Similar presentations


Ads by Google