Download presentation
Presentation is loading. Please wait.
Published byValentine McKinney Modified over 6 years ago
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.