Presentation is loading. Please wait.

Presentation is loading. Please wait.

EMGT 6412/MATH 6665 Mathematical Programming Spring 2016

Similar presentations


Presentation on theme: "EMGT 6412/MATH 6665 Mathematical Programming Spring 2016"β€” Presentation transcript:

1 EMGT 6412/MATH 6665 Mathematical Programming Spring 2016
Mathematical Programming: Introduction to Linear Programming Dincer Konur Engineering Management and Systems Engineering

2 Outline Chapter 1 Introduction to Mathematical Programming
Linear Programming Formulation Steps of Formulation Examples Assumptions Geometric Interpretation Geometry of LPs Properties of LPs Linear Programming Format Matrix Notation Standard Format Chapter 1

3 Outline Introduction to Mathematical Programming
Linear Programming Formulation Steps of Formulation Examples Assumptions Geometric Interpretation Geometry of LPs Properties of LPs Linear Programming Format Matrix Notation Standard Format

4 Mathematical Programming
Mathematical programming is selecting the best option(s) from a set of alternatives mathematically Minimizing/maximizing a function where your alternatives are defined by functions Many industries use mathematical programming Supply chain, logistics, and transportation Health industry, energy industry, finance, airlines Manufacturing industry, agriculture industry Education, Military Operations Research raised with WWII

5 Linear Programming Linear Programming problem (LP) is a mathematical programming problem where all of your functions are linear A function is linear when The variables have power of 1 and the variables are not multiplied with each other 𝑓 π‘₯ =3π‘₯+5 οƒ  linear 𝑓 π‘₯ =3 π‘₯ 2 +5 οƒ  not linear 𝑓 π‘₯ 1 , π‘₯ 2 =3 π‘₯ 1 +5 π‘₯ 2 +7 οƒ  linear 𝑓 π‘₯ 1 , π‘₯ 2 =3 π‘₯ 1 π‘₯ 2 +7 οƒ  not linear 𝑓 π‘₯ π‘₯

6 Outline Introduction to Mathematical Programming
Linear Programming Formulation Steps of Formulation Examples Assumptions Geometric Interpretation Geometry of LPs Properties of LPs Linear Programming Format Matrix Notation Standard Format

7 Linear Programming Formulation
There are 4 main steps for formulating a mathematical programming model: Step 0: Understand the problem and problem data Objective function (cost) coefficients, technological coefficients Step 1: Identify the decision variables Things we control, and want to solve for Step 2: Construct the objective function Measure of performance (criterion function) Step 3: Construct the constraints Restrictions

8 Linear Programming Formulation
x1,…, xn are the decision variables c1, c2,…, cn are the cost coefficients c1x1 + c2x2 + … + cnxn is the objective function ith constraint: Technological coefficient:

9 Linear Programming Formulation
Deserted Island: Linear programming will save you! Suppose that you will be left in a deserted island You want to live as many days as you can Fortunately (!), you can take a bag with you to the island The bag can carry at most 50 lbs and there are limited set of items you can carry Bread: You can survive for 2 days with 1 lb of bread Steak: You can survive for 5 days with 1 lb of steak (Memphis style grilled!) Chicken: You can survive for 3 days with 1 lb of chicken (southern style deep fried!) Chocolate: You can survive for 6 days with 1 lb of chocolate How much of each item to take with you?

10 Linear Programming Formulation
STEP 0: Know the problem and gather your data Your problem is to increase your chance of rescue by maximizing the number of days you survive You can have 1 bag which can carry 50 lbs at most You can only put bread, steak, chicken and chocolate into you bag Each item enables you survive for a specific number of days for each pound you take οƒ Bread: 2 days/lb οƒ Steak: 5 days/lb οƒ Chicken: 3days/lb οƒ Chocolate: 6days/lb STEP 1: Identify your decision variables, which are the things you control The amount of each item you will take with you π‘₯ 1 :π‘‘β„Žπ‘’ π‘Žπ‘šπ‘œπ‘’π‘›π‘‘ π‘œπ‘“ π‘π‘Ÿπ‘’π‘Žπ‘‘ (𝑙𝑏𝑠) π‘₯ 2 :π‘‘β„Žπ‘’ π‘Žπ‘šπ‘œπ‘’π‘›π‘‘ π‘œπ‘“ π‘ π‘‘π‘’π‘Žπ‘˜ (𝑙𝑏𝑠) π‘₯ 3 :π‘‘β„Žπ‘’ π‘Žπ‘šπ‘œπ‘’π‘›π‘‘ π‘œπ‘“ π‘β„Žπ‘–π‘π‘˜π‘’π‘› (𝑙𝑏𝑠) π‘₯ 4 :π‘‘β„Žπ‘’ π‘Žπ‘šπ‘œπ‘’π‘›π‘‘ π‘œπ‘“ π‘β„Žπ‘œπ‘π‘œπ‘™π‘Žπ‘‘π‘’ 𝑙𝑏𝑠 Warning: Always be careful with the metrics (try to use the same metrics)

11 Linear Programming Formulation
STEP 2: Define your objective function and objective Your objective function is the measure of performance as a result of your decisions Your objective is what you want to do with your objective function Recall that you want to maximize the number of days you will survive We know our objective (maximize) and our performance of measure (number of days). Express the performance of measure as a function of your decision variables to get the objective function If you take π‘₯ 1 lbs of bread, you will survive for 2π‘₯ 1 days If you take π‘₯ 2 lbs of steak, you will survive for 5π‘₯ 1 days If you take π‘₯ 3 lbs of chicken, you will survive for 3π‘₯ 1 days If you take π‘₯ 4 lbs of chocolate, you will survive for 6π‘₯ 1 days Then objective function in terms of decision variables: 2π‘₯ 1 + 5π‘₯ 2 + 3π‘₯ 3 + 6π‘₯ 4 Objective Performance measure, Not a function though

12 Linear Programming Formulation
STEP 3: Define your restrictions (constraints) There may be some restrictions which limit what you can do (hence, they define set of your alternatives) You can carry 1 bag and it can carry 50 lbs at most π‘₯ 1 + π‘₯ 2 + π‘₯ 3 + π‘₯ 4 ≀50 You cannot get negative amounts!!! π‘₯ 1 β‰₯0, π‘₯ 2 β‰₯0, π‘₯ 3 β‰₯0, π‘₯ 4 β‰₯0 Limit on how much you can carry Total amount you decide to carry

13 Linear Programming Formulation
Combine your objective, objective function, and constraints 2π‘₯ 1 + 5π‘₯ 2 + 3π‘₯ 3 + 6π‘₯ 4 π‘₯ 1 + π‘₯ 2 + π‘₯ 3 + π‘₯ 4 ≀50 π‘₯ 1 β‰₯0, π‘₯ 2 β‰₯0, π‘₯ 3 β‰₯0, π‘₯ 4 β‰₯0 This is your LP model Note that everything is linear! π‘€π‘Žπ‘₯π‘–π‘šπ‘–π‘§π‘’ 𝑠𝑒𝑏𝑗𝑒𝑐𝑑 π‘‘π‘œ

14 Linear Programming Formulation
Feed Mix Problem: An agricultural mill manufactures feed for chickens. This is done by mixing several ingredients, such as corn, limestone, or alfalfa. The mixing is to be done in such a way that the feed meets certain levels for different types of nutrients, such as protein, calcium, carbohydrates, and vitamins. Suppose that there are n ingredients j = 1,…, n Suppose that there are m nutrients i = 1,…, m Let the unit cost of ingredient j be cj Suppose that aij is the amount of nutrient i present in a unit of ingredient j Acceptable lower and upper limits of nutrient i in a unit of the chicken feed are li’ and ui’, respectively Suppose that the mill cannot acquire more than uj units of ingredient j What should be the mixing the ingredients such that the cost is minimized and the restrictions are met?

15 Linear Programming Formulation
Let the amount of ingredient j to be used be xj

16 Linear Programming Formulation
Cutting Stock Problem: A manufacturer of metal sheets produces rolls of standard fixed width w and of standard length l. A large order is placed by a customer who needs sheets of width w and varying lengths. The manufacturer would like to cut the standard rolls in such a way as to satisfy the order and minimize the waste. Suppose that bi sheets with length li and width w needed, i = 1,…, m There are many ways of cutting the standard sheet in different lengths The cutting patterns: j=1,2,…,n Minimize the number of standard rolls used by determining how many of each pattern cut so that you satisfy the customer needs? aij is the number of sheets of length li in the jth pattern

17 Linear Programming Formulation
Let xj be the number of standard rolls cut according to the jth pattern This is not a LP unless we remove the integer constraints!! LP models assume that decision variables are continuous

18 Linear Programming Formulation
Transportation Problem: The Brazilian coffee company processes coffee beans into coffee at m plants. The coffee is then shipped every week to n warehouses in major cities for retail, distribution, and exporting. Suppose that the unit shipping cost from plant i to warehouse j is cij. Furthermore, suppose that the production capacity at plant i is ai and that the demand at warehouse j is bj. Practice: Formulate Tanker Scheduling problem

19 Linear Programming Formulation
More numerical examples in Supplement 1 Assumptions of Linear Programming: Proportionality: Given variable xj, its contribution to cost is cixj and its contribution to the ith constraint is aijxj Additivity: This assumption guarantees that the total cost is the sum of the individual costs, and that the total contribution to the ith restriction is the sum of the individual contributions of the individual activities. Divisibility:This assumption ensures that the decision variables can be divided into any fractional levels so that non-integral values for the decision variables are permitted. Deterministic. The coefficients ci, aij, and bi are all known deterministically.

20 Outline Introduction to Mathematical Programming
Linear Programming Formulation Steps of Formulation Examples Assumptions Geometric Interpretation Geometry of LPs Properties of LPs Linear Programming Format Matrix Notation Standard Format

21 Geometric Interpretation
A simple graphical procedure to solve simple LPs (with two decision variables)

22 Geometric Interpretation
Illustration: Examples in Supplement 1

23 Geometric Interpretation
There are 4 cases possible for a LP: Unique Optimal Solution. If the optimal solution is unique, then it occurs at an extreme point.

24 Geometric Interpretation
There are 4 cases possible for a LP: Alternative Optimal Solutions. If there are more than one feasible solutions that are optimal.

25 Geometric Interpretation
There are 4 cases possible for a LP: Unbounded Optimal Objective Value. If there is always a better solution, we have unboundedness. If the feasible region is bounded, you cannot have unbounded optimal objective value

26 Geometric Interpretation
There are 4 cases possible for a LP: Empty Feasible Region. The case when there is no feasible solution.

27 Outline Introduction to Mathematical Programming
Linear Programming Formulation Steps of Formulation Examples Assumptions Geometric Interpretation Geometry of LPs Properties of LPs Linear Programming Format Matrix Notation Standard Format

28 Linear Programming Format
Matrix Notation: A LP can be stated in a more convenient form using matrix notation

29 Linear Programming Format
Standard format: Objective is minimization All variables are non-negative All constraints (except non-negativity) are equality constraints Any linear programming model can be converted to the standard format!!! Convert the variables if needed, convert the constraints if needed and convert the objective function if needed

30 Linear Programming Format
Converting to standard format: Variables: X1, X2,…, Xn Non-negative: 𝑋𝑗β‰₯0 Do nothing  Non-positive: 𝑋𝑗≀0 Then define π‘Œπ‘—=βˆ’π‘‹π‘— and replace 𝑋𝑗 with βˆ’π‘Œπ‘— in the formulation Unrestricted: 𝑋𝑗 can be both negative or positive Any number can be written as difference of two positive numbers Then define 𝑋𝑗=𝑋 𝑗 β€² βˆ’π‘‹π‘—β€²β€² where 𝑋𝑗′β‰₯0 and 𝑋𝑗′′β‰₯0 Replace 𝑋𝑗 with 𝑋 𝑗 β€² βˆ’π‘‹π‘—β€²β€² (one variable is replaced with two) If 𝑋1, 𝑋2, …, π‘‹π‘˜ for some k, then define 𝑋𝑗=𝑋 𝑗 β€² βˆ’π‘‹β€²β€² for all j=1,2,…,k where 𝑋𝑗′β‰₯0 and 𝑋′′β‰₯0 Bounded….

31 Linear Programming Format
Converting to standard format: Variables: X1, X2,…, Xn Bounded: 𝑋𝑗β‰₯𝐿𝑗 or π‘‹π‘—β‰€π‘ˆπ‘— If 𝑋𝑗β‰₯𝐿𝑗 define 𝑋 𝑗 β€² =π‘‹π‘—βˆ’πΏπ‘— note that 𝑋 𝑗 β€² β‰₯0 Replace 𝑋𝑗 with 𝑋 𝑗 β€² +𝐿𝑗 If π‘‹π‘—β‰€π‘ˆπ‘— define 𝑋 𝑗 β€² =π‘ˆπ‘—βˆ’π‘‹π‘— Replace 𝑋𝑗 with U 𝑗 β€² βˆ’π‘‹π‘—β€² You can also treat bounded variables as regular <= or >= constraints and convert them to β€˜=β€˜ constraints Constraints: Less than or equal to constraints Greater than or equal to constraints Must be converted to β€˜=β€˜ constraints

32 Linear Programming Format
Converting to standard format: Constraints: Greater than or equal to constraint: This can be made an β€˜=β€˜ constraint by subtracting a positive slack variable, (sometimes referred to si) from left-hand-side We will have and Less than or equal to constraint: This can be made an β€˜=β€˜ constraint by adding a positive slack variable, (sometimes referred to si) to the left-hand-side We will have and Note: An equality constraint can be transformed into two inequality constraints:

33 Linear Programming Format
Converting to standard format: Objective: Example: Objective must be β€˜minimize’ Maximize - + + Must be β€˜=β€˜ Must be β€˜=β€˜ This is β€˜=β€˜ Convert to >=0 Convert to >=0

34 Linear Programming Format
Converting to standard format: Objective converted! Objective is β€˜minimize’ now Must be β€˜=β€˜ Must be β€˜=β€˜ This is β€˜=β€˜ Convert to >=0 Convert to >=0

35 Linear Programming Format
Converting to standard format: First constraint: ≀ constraint Define a slack variable π‘₯ 4 β‰₯0 and add it to the left side βˆ’ π‘₯ 1 + 3π‘₯ 2 + π‘₯ 3 +π‘₯ 4 =13 and π‘₯ 4 β‰₯0 This is β€˜=β€˜ βˆ’ 𝒙 𝟏 + πŸ‘π’™ 𝟐 + 𝒙 πŸ‘ +𝒙 πŸ’ =πŸπŸ‘ Must be β€˜=β€˜ Objective is β€˜minimize’ This is β€˜=β€˜ Convert to >=0 π‘₯ 4 β‰₯0 Convert to >=0 This is β‰₯0

36 Linear Programming Format
Converting to standard format: Second constraint: β‰₯ constraint Define a slack variable π‘₯ 5 β‰₯0 and subtract it from the left side π‘₯ 1 + 2π‘₯ 2 + 3π‘₯ 3 βˆ’π‘₯ 5 =12 and π‘₯ 5 β‰₯0 This is β€˜=β€˜ βˆ’ π‘₯ 1 + 3π‘₯ 2 + π‘₯ 3 +π‘₯ 4 =13 This is β€˜=β€˜ 𝒙 𝟏 + πŸπ’™ 𝟐 + πŸ‘π’™ πŸ‘ βˆ’π’™ πŸ“ =𝟏𝟐 Objective is β€˜minimize’ This is β€˜=β€˜ Convert to >=0 π‘₯ 4 β‰₯0 Convert to >=0 These are β‰₯0 π‘₯ 5 β‰₯0

37 Linear Programming Format
Converting to standard format: Objective and constraints are converted, we have: π‘€π‘–π‘›π‘–π‘šπ‘–π‘§π‘’ π‘₯ 1 βˆ’ 2π‘₯ 2 βˆ’3 π‘₯ 3 𝑠𝑒𝑏𝑗𝑒𝑐𝑑 π‘‘π‘œ βˆ’ π‘₯ 1 + 3π‘₯ 2 + π‘₯ 3 +π‘₯ =13 π‘₯ 1 + 2π‘₯ 2 + 3π‘₯ βˆ’π‘₯ 5 =12 2π‘₯ 1 βˆ’ π‘₯ 2 + π‘₯ =4 π‘₯ 1 , π‘₯ 2 π‘’π‘›π‘Ÿπ‘’π‘ π‘‘π‘Ÿπ‘–π‘π‘‘π‘’π‘‘ Convert to >=0 π‘₯ 3 β‰€βˆ’3 π‘₯ 4 β‰₯0 π‘₯ 5 β‰₯0

38 Linear Programming Format
Converting to standard format: Variables π‘₯ 1 , π‘₯ 2 π‘Žπ‘Ÿπ‘’ π‘’π‘›π‘Ÿπ‘’π‘ π‘‘π‘Ÿπ‘–π‘π‘‘π‘’π‘‘ Let π‘₯ 1 = π‘₯ 1 β€²βˆ’ π‘₯ 1 β€²β€² where π‘₯ 1 β€² β‰₯0, π‘₯ 1 β€²β€² β‰₯0, replace π‘₯ 1 with π‘₯ 1 β€²βˆ’ π‘₯ 1 β€²β€² Let π‘₯ 2 = π‘₯ 2 β€²βˆ’ π‘₯ 2 β€²β€² where π‘₯ 2 β€² β‰₯0, π‘₯ 2 β€²β€² β‰₯0, replace π‘₯ 2 with π‘₯ 2 β€²βˆ’ π‘₯ 2 β€²β€² π‘€π‘–π‘›π‘–π‘šπ‘–π‘§π‘’ ( π‘₯ 1 β€² βˆ’ π‘₯ 1 β€²β€² )βˆ’ 2(π‘₯ 2 β€²βˆ’ π‘₯ 2 β€²β€²)βˆ’3 π‘₯ 3 𝑠𝑒𝑏𝑗𝑒𝑐𝑑 π‘‘π‘œ βˆ’( π‘₯ 1 β€² βˆ’ π‘₯ 1 β€²β€² )+ 3(π‘₯ 2 β€²βˆ’ π‘₯ 2 β€²β€²)+ π‘₯ 3 +π‘₯ =13 ( π‘₯ 1 β€² βˆ’ π‘₯ 1 β€²β€² )+ 2(π‘₯ 2 β€²βˆ’ π‘₯ 2 β€²β€²)+ 3π‘₯ βˆ’π‘₯ 5 =12 2( π‘₯ 1 β€² βˆ’ π‘₯ 1 β€²β€² )βˆ’ (π‘₯ 2 β€²βˆ’ π‘₯ 2 β€²β€²) + π‘₯ =4 π‘₯ 1 β€²β‰₯0, π‘₯ 1 β€²β€²β‰₯0, π‘₯ 2 β€²β‰₯0, π‘₯ 2 β€²β€²β‰₯0,π‘₯ 4 β‰₯0, π‘₯ 5 β‰₯0 π‘₯ 3 β‰€βˆ’3 Convert to >=0

39 Linear Programming Format
Converting to standard format: Variable π‘₯ 3 β‰€βˆ’3 Let π‘₯ 3 β€² =βˆ’3βˆ’ π‘₯ 3 note that π‘₯ 3 β€² β‰₯0, π‘₯ 1 β€²β€² β‰₯0, Then we have π‘₯ 3 =βˆ’3βˆ’ π‘₯ 3 β€² so replace π‘₯ 3 with βˆ’3βˆ’ π‘₯ 3 β€² π‘€π‘–π‘›π‘–π‘šπ‘–π‘§π‘’ ( π‘₯ 1 β€² βˆ’ π‘₯ 1 β€²β€² )βˆ’ 2(π‘₯ 2 β€²βˆ’ π‘₯ 2 β€²β€²)βˆ’3(βˆ’3βˆ’ π‘₯ 3 β€² ) 𝑠𝑒𝑏𝑗𝑒𝑐𝑑 π‘‘π‘œ βˆ’( π‘₯ 1 β€² βˆ’ π‘₯ 1 β€²β€² )+ 3(π‘₯ 2 β€²βˆ’ π‘₯ 2 β€²β€²)+(βˆ’3βˆ’ π‘₯ 3 β€² ) +π‘₯ =13 ( π‘₯ 1 β€² βˆ’ π‘₯ 1 β€²β€² )+ 2(π‘₯ 2 β€²βˆ’ π‘₯ 2 β€²β€²)+3(βˆ’3βˆ’ π‘₯ 3 β€² ) βˆ’π‘₯ 5 =12 2( π‘₯ 1 β€² βˆ’ π‘₯ 1 β€²β€² )βˆ’ (π‘₯ 2 β€²βˆ’ π‘₯ 2 β€²β€²) +(βˆ’3βˆ’ π‘₯ 3 β€² ) =4 π‘₯ 1 β€²β‰₯0, π‘₯ 1 β€²β€²β‰₯0, π‘₯ 2 β€² β‰₯0, π‘₯ 2 β€²β€² β‰₯0, π‘₯ 3 β€² β‰₯0,π‘₯ 4 β‰₯0, π‘₯ 5 β‰₯0

40 Linear Programming Format
Converted to standard format: π‘€π‘–π‘›π‘–π‘šπ‘–π‘§π‘’ π‘₯ 1 β€² βˆ’ π‘₯ 1 β€²β€² βˆ’ 2π‘₯ 2 β€² +2 π‘₯ 2 β€²β€² +3 π‘₯ 3 β€² 𝑠𝑒𝑏𝑗𝑒𝑐𝑑 π‘‘π‘œ βˆ’ π‘₯ 1 β€² + π‘₯ 1 β€²β€² + 3π‘₯ 2 β€²βˆ’3 π‘₯ 2 β€²β€²βˆ’ π‘₯ 3 β€² +π‘₯ =16 π‘₯ 1 β€² βˆ’ π‘₯ 1 β€²β€² + 2π‘₯ 2 β€²βˆ’2 π‘₯ 2 β€²β€²βˆ’ π‘₯ 3 β€² βˆ’π‘₯ 5 =21 2 π‘₯ 1 β€² βˆ’2 π‘₯ 1 β€²β€² βˆ’ π‘₯ 2 β€²+ π‘₯ 2 β€²β€²βˆ’ π‘₯ 3 β€² =7 π‘₯ 1 β€²β‰₯0, π‘₯ 1 β€²β€²β‰₯0, π‘₯ 2 β€² β‰₯0, π‘₯ 2 β€²β€² β‰₯0, π‘₯ 3 β€² β‰₯0,π‘₯ 4 β‰₯0, π‘₯ 5 β‰₯0

41 Linear Programming Format
Let’s put it in matrix notation Let 𝐱= π‘₯ 1 β€² π‘₯ 1 β€²β€² π‘₯ 2 β€² π‘₯ 1 β€²β€² π‘₯ 3 β€² π‘₯ 4 π‘₯ 5 , 𝐀= βˆ’1 1 3 βˆ’3 βˆ’ βˆ’1 2 βˆ’2 βˆ’ βˆ’2 βˆ’1 1 βˆ’ , and 𝐛= Let 𝒄= 1 βˆ’1 βˆ’

42 Linear Programming Format
Standard form can have maximization objective as well but we will discuss Simplex mostly for minimization problems Another format that can be helpful is canonical form Examples in Supplement 1

43 Next time… Linear algebra review Basic linear algebra
Affine and Linear combinations Linear independence, spanning Convex sets and convex functions Polyhedral sets, extreme points, representation


Download ppt "EMGT 6412/MATH 6665 Mathematical Programming Spring 2016"

Similar presentations


Ads by Google